1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | name hplip |
---|
6 | version 3.11.5 |
---|
7 | revision 2 |
---|
8 | categories print |
---|
9 | platforms macosx |
---|
10 | maintainers okmacports@johnfreed.com |
---|
11 | description printing, scanning, and faxing for HP inkjet and laser printers |
---|
12 | long_description HPLIP is an HP developed solution for printing, scanning, and \ |
---|
13 | faxing with HP inkjet and laser based printers |
---|
14 | master_sites sourceforge |
---|
15 | |
---|
16 | checksums md5 0a3d0f46ec89857b4c0feea6923864f1 \ |
---|
17 | rmd160 8a87f201aac95253d0ac1765e21aa094f11389f8 \ |
---|
18 | sha1 e3604752b7a1ab0f492a1b4d470f8fa75e8959e5 |
---|
19 | |
---|
20 | patchfiles patch-prnt_hpijs_context2.cpp \ |
---|
21 | patch-prnt_hpijs_ljzjscolor.cpp \ |
---|
22 | patch-io_hpmud_hpmud.c \ |
---|
23 | patch-prnt_hpps_hppsfilter.c |
---|
24 | |
---|
25 | depends_lib port:libusb \ |
---|
26 | port:jpeg \ |
---|
27 | port:sane-backends \ |
---|
28 | port:dbus-python27 \ |
---|
29 | port:openssl \ |
---|
30 | port:net-snmp \ |
---|
31 | port:xorg-libpthread-stubs |
---|
32 | |
---|
33 | depends_run bin:gs:espgs |
---|
34 | |
---|
35 | set python_version 2.7 |
---|
36 | set python_prefix ${frameworks_dir}/Python.framework/Versions/${python_version} |
---|
37 | |
---|
38 | configure.args --disable-gui-build \ |
---|
39 | --disable-qt4 \ |
---|
40 | --with-cupsbackenddir=${prefix}/libexec/cups/backend \ |
---|
41 | --with-cupsfilterdir=${prefix}/libexec/cups/filter |
---|
42 | |
---|
43 | |
---|
44 | configure.cflags-append "-I${prefix}/include -I${python_prefix}/include" |
---|
45 | configure.ldflags-append "-L${prefix}/lib" |
---|
46 | |
---|
47 | |
---|
48 | variant gui { |
---|
49 | depends_lib-append port:PyQt |
---|
50 | depends_run-append port:py-readline port:py-reportlab |
---|
51 | configure.args-delete --disable-gui-build --disable-qt4 |
---|
52 | |
---|
53 | post-destroot { |
---|
54 | # need to use pythonw for PyQt scripts |
---|
55 | reinplace "s|/usr/bin/env python|/usr/bin/env pythonw|" \ |
---|
56 | ${destroot}${prefix}/bin/hp-check |
---|
57 | reinplace "s|/usr/bin/env python|/usr/bin/env pythonw|" \ |
---|
58 | ${destroot}${prefix}/bin/hp-print |
---|
59 | reinplace "s|/usr/bin/env python|/usr/bin/env pythonw|" \ |
---|
60 | ${destroot}${prefix}/bin/hp-toolbox |
---|
61 | reinplace "s|/usr/bin/env python|/usr/bin/env pythonw|" \ |
---|
62 | ${destroot}${prefix}/bin/hp-fab |
---|
63 | reinplace "s|/usr/bin/env python|/usr/bin/env pythonw|" \ |
---|
64 | ${destroot}${prefix}/bin/hp-sendfax |
---|
65 | reinplace "s|/usr/bin/env python|/usr/bin/env pythonw|" \ |
---|
66 | ${destroot}${prefix}/bin/hp-unload |
---|
67 | } |
---|
68 | } |
---|
69 | |
---|
70 | pre-configure { |
---|
71 | # change location so we don't have to install hplip.conf in root /etc |
---|
72 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/base/g.py |
---|
73 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/check.py |
---|
74 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/base/codes.py |
---|
75 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/base/utils.py |
---|
76 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/fax/backend/hpfax.py |
---|
77 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/installer/distros.dat |
---|
78 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/prnt/hpcups/Utils.cpp |
---|
79 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/prnt/hpijs/globals.cpp |
---|
80 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/ui/devmgr4.py |
---|
81 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/ui4/devmgr5.py |
---|
82 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/installer/core_install.py |
---|
83 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/hplip.list.in |
---|
84 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/Makefile.am |
---|
85 | reinplace "s|/etc/hp|${prefix}/etc/hp|g" ${worksrcpath}/Makefile.in |
---|
86 | |
---|
87 | # change location so we don't have to install hplip.state in root /var/lib |
---|
88 | reinplace "s|/var/lib/hp|${prefix}/var/lib/hp|g" ${worksrcpath}/base/g.py |
---|
89 | reinplace "s|/var/lib/hp|${prefix}/var/lib/hp|g" ${worksrcpath}/check.py |
---|
90 | reinplace "s|/var/lib/hp|${prefix}/var/lib/hp|g" ${worksrcpath}/hplip.list.in |
---|
91 | reinplace "s|/var/lib/hp|${prefix}/var/lib/hp|g" ${worksrcpath}/Makefile.am |
---|
92 | reinplace "s|/var/lib/hp|${prefix}/var/lib/hp|g" ${worksrcpath}/Makefile.in |
---|
93 | |
---|
94 | # change location so we don't have to install rules in root /etc/udev/rules.d |
---|
95 | reinplace "s|/etc/udev/rules.d|${prefix}/etc/udev/rules.d|g" ${worksrcpath}/hplip.list.in |
---|
96 | reinplace "s|/etc/udev/rules.d|${prefix}/etc/udev/rules.d|g" ${worksrcpath}/Makefile.in |
---|
97 | reinplace "s|/etc/udev/rules.d|${prefix}/etc/udev/rules.d|g" ${worksrcpath}/Makefile.am |
---|
98 | |
---|
99 | # change location so we don't have to install hpaio driver in root /etc/sane.d/dll.conf |
---|
100 | reinplace "s|/etc/sane.d|${prefix}/etc/sane.d|g" ${worksrcpath}/check.py |
---|
101 | reinplace "s|/etc/sane.d|${prefix}/etc/sane.d|g" ${worksrcpath}/data/rules/55-hpmud.rules |
---|
102 | reinplace "s|/etc/sane.d|${prefix}/etc/sane.d|g" ${worksrcpath}/hplip.list.in |
---|
103 | reinplace "s|/etc/sane.d|${prefix}/etc/sane.d|g" ${worksrcpath}/Makefile.am |
---|
104 | reinplace "s|/etc/sane.d|${prefix}/etc/sane.d|g" ${worksrcpath}/Makefile.in |
---|
105 | |
---|
106 | } |
---|
107 | |
---|
108 | |
---|
109 | post-destroot { |
---|
110 | |
---|
111 | # this file, provided by sane-backends port, |
---|
112 | # is fixed up in post-install, so delete this version |
---|
113 | file delete ${destroot}${prefix}/etc/sane.d/dll.conf |
---|
114 | |
---|
115 | # Deleting fax drivers |
---|
116 | file delete ${destroot}/usr/share/cups/mime/pstotiff.convs |
---|
117 | file delete ${destroot}/usr/share/cups/mime/pstotiff.types |
---|
118 | |
---|
119 | # dont need these |
---|
120 | file delete ${destroot}/etc/xdg/autostart/hplip-systray.desktop |
---|
121 | file delete ${destroot}/usr/share/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi |
---|
122 | file delete ${destroot}/usr/share/applications/hplip.desktop |
---|
123 | |
---|
124 | } |
---|
125 | |
---|
126 | post-install { |
---|
127 | # if sane-backends is installed, add "hpaio" to dll.conf if needed |
---|
128 | # so it will recognize the hpaio backend |
---|
129 | if { [ file exists ${prefix}/etc/sane.d/dll.conf ] } then { |
---|
130 | system \ |
---|
131 | "if ! grep ^hpaio ${prefix}/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \ |
---|
132 | echo 'hpaio' >> ${prefix}/etc/sane.d/dll.conf;fi" |
---|
133 | } |
---|
134 | # symlink local Python extensions to real Python |
---|
135 | ln -sf ${prefix}/lib/python${python_version}/site-packages/cupsext.so ${python_prefix}/lib/python${python_version}/site-packages |
---|
136 | ln -sf ${prefix}/lib/python${python_version}/site-packages/cupsext.la ${python_prefix}/lib/python${python_version}/site-packages |
---|
137 | ln -sf ${prefix}/lib/python${python_version}/site-packages/hpmudext.so ${python_prefix}/lib/python${python_version}/site-packages |
---|
138 | ln -sf ${prefix}/lib/python${python_version}/site-packages/hpmudext.la ${python_prefix}/lib/python${python_version}/site-packages |
---|
139 | ln -sf ${prefix}/lib/python${python_version}/site-packages/pcardext.so ${python_prefix}/lib/python${python_version}/site-packages |
---|
140 | ln -sf ${prefix}/lib/python${python_version}/site-packages/pcardext.la ${python_prefix}/lib/python${python_version}/site-packages |
---|
141 | ln -sf ${prefix}/lib/python${python_version}/site-packages/scanext.so ${python_prefix}/lib/python${python_version}/site-packages |
---|
142 | ln -sf ${prefix}/lib/python${python_version}/site-packages/scanext.la ${python_prefix}/lib/python${python_version}/site-packages |
---|
143 | |
---|
144 | |
---|
145 | } |
---|
146 | |
---|
147 | notes "#################################################################### |
---|
148 | You will get the following error if you have not properly set up dbus: |
---|
149 | Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! |
---|
150 | |
---|
151 | To repair this, you must launch the dbus daemon systemwide: |
---|
152 | sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist |
---|
153 | |
---|
154 | Then for EACH user who wants access, the user must launch the dbus agent: |
---|
155 | launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist |
---|
156 | ############################################################################" |
---|