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