Ticket #7201 (closed submission: duplicate)
NEW: hplip -Unfinished port
| Reported by: | simX@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | Cc: | aschenke@…, rich@…, adrian@…, okmacports@… | |
| Port: |
Description (last modified by toby@…) (diff)
The official project page is http://hpoj.sourceforge.net/ . It's a project, supposedly funded by HP, that creates open-source drivers for HP's printers/scanners. It even supports scanning for HP's all-in-one models that don't seem to be widely support elsewhere.
There's also a FreeBSD port here, which might help: http:// www.freshports.org/graphics/hpoj . It seems that this can be installed by using a different package manager called pkg_add, but I wasn't able to find this for Mac OS X.
(hpoj supports printing and scanning, while the HPLIP software also mentioned on the hpoj project page only supports printing, and also supports fewer HP models. So hpoj would probably be better for a Fink package.)
Attachments
Change History
Changed 7 years ago by aschenke@…
Portfile for hplip 0.9.10 (EXPERIMENTAL)
Changed 7 years ago by aschenke@…
- Attachment Portfile.2 added
Portfile for hplip-0.9.10 (slightly-less-experimental)
Changed 7 years ago by aschenke@…
- Attachment Portfile.3 added
Portfile for hplip-0.9.10 (partly-working)
Changed 7 years ago by aschenke@…
- Attachment patch-io_hpiod_device.cpp added
patch for io/hpiod/device.cpp
Changed 7 years ago by aschenke@…
- Attachment patch-io_hpiod_device.2.cpp added
patch for io/hpiod/device.cpp
Changed 7 years ago by aschenke@…
- Attachment Portfile.4 added
Portfile for hplip 0.9.10 (partly-working)
Changed 7 years ago by aschenke@…
- Attachment patch-io_hpiod_device.3.cpp added
patch for io/hpiod/device.cpp
Changed 7 years ago by aschenke@…
- Attachment patch-io_hpiod_device.4.cpp added
patch for io/hpiod/device.cpp
comment:10 Changed 7 years ago by markd@…
- Summary changed from Request for hpoj package to be created for DarwinPorts to NEW: hplip -Unfinished port
comment:11 Changed 7 years ago by aschenke@…
This new portfile is updated to use the latest version of hplip (1.6.9). By default it will now build without X11 GUI support, so you don't need PyQt and its dependencies, making it much faster to install. There is a gui variant that will build the GUI support as before.
Note that this is still experimental and I haven't really tested this latest version. It is definitely not ready to be committed.
comment:12 Changed 7 years ago by aschenke@…
Fixed the startupitems.
comment:14 Changed 6 years ago by simX_other@…
I managed to get this experimental portfile working, and it finishes the installation. However, when I open up Image Capture to try and scan from my HP PSC 1210 all-in-one printer, it just says that "SANE is in use by another application". I'm pretty sure that this is the correct way to access the scanning services offered by SANE, which in turn uses hplip to access the printer. But I guess it's still not working.
I tried installing the "gui" variant, but got a couple of errors, specifically:
Error: Target com.apple.configure returned: configure failure: shell command " cd "/opt/local/var/db/dports/build/_Users_simx_DarwinPorts_local-sources_print_hplip/work/hplip-1.6.9" && ./configure --prefix=/opt/local --disable-pp-build " returned error 6
and
configure: error: cannot find python-devel support Error: Status 1 encountered during processing.
Not sure what the deal is there.
I have previously install TWAIN-SANE (information at http://www.ellert.se/twain-sane/ ). Not sure if this installation is conflicting with the MacPorts install of SANE and hplip.
Also note that the latest version of hplip is now up to 1.7.4a, while the patchfile specifies version 1.6.9. I'm not sure if the patch supplied in this bug report applies to the latest version anymore. Manually modifying the patchfile to retrieve the latest version of hplip and trying to install it simply results in these errors:
Error: reinplace: couldn't read file "/opt/local/var/db/dports/build/_Users_simx_DarwinPorts_local-sources_print_hplip/work/hplip-1.7.4a/prnt/hpijs/hplip_api.h": no such file or directory Error: Target com.apple.configure returned: reinplace sed(1) failed Error: Status 1 encountered during processing.
comment:15 Changed 6 years ago by jmpp@…
- Milestone changed from New Ports to Port Submissions
Milestone New Ports deleted
comment:16 Changed 6 years ago by nox@…
- Priority changed from Expected to Normal
- Version 1.2 deleted
comment:17 Changed 5 years ago by toby@…
- Status changed from new to closed
- Resolution set to wontfix
- Description modified (diff)
closing, this obviously isn't happening
comment:19 Changed 4 years ago by anonymous
- Milestone Port Submissions deleted
Milestone Port Submissions deleted
comment:23 Changed 4 years ago by rich@…
Any chance of reopening this?
comment:26 follow-up: ↓ 27 Changed 3 years ago by okmacports@…
- Status changed from closed to reopened
- Resolution wontfix deleted
I have uploaded a new Portfile based on the previous versions that went before. I needed to make some minor changes to the Makefile as well. I believe this now works. I am able to use xsane (Macports version, under X11 or XQuartz) to successfully scan using my PSC 1310.
Note that this is based on a VERY old version of HPLIP, but it has the advantage of working! The current (3.x) version of HPLIP requires DBUS communication. I haven't checked intermediate versions of HPLIP to see if they would also work, but this meets my needs.
comment:27 in reply to: ↑ 26 Changed 2 years ago by okmacports@…
I note that there is a Dbus port, so I tried building the latest HPLIP. There were a few minor problems but nothing too much -- three patches attached. You have to remember to activate Dbus, once for the Daemon and one Agent for each user. Then just fire up xsane under X11 and scan away.
comment:28 follow-up: ↓ 29 Changed 2 years ago by okmacports@…
A couple of other points:
1) I didn't try to build the gui version of HPLIP (don't see the point, frankly, but in theory it should work and I left the pointers there if someone wants to try it). 2) One problem with the original effort from several years back was that the Python extensions created by HP were not being installed into the "live" Python directory on the Mac. I have done that via symlinks to avoid the "tree violation" error message in MacPorts. This relies on Python 2.6, however, and would need to be changed if a different Python version were in use. 3) This defaults to a more-or-less complete HPLIP installation (minus the GUI). From what I can tell, it also prints (using CUPS) and makes an All In One printer show up in the Mac printer list. In theory it should be able to be built to fax as well, but I have no way to test it and the fax drivers violated the MacPorts tree structure so I deleted them. 4) This does not use the SANE version created for the Mac, which relies on the SANE project. That project, unhelpfully, does not offer an HPAIO driver because it's "provided by the HPLIP" project, which as we know doesn't do a Mac version. (My guess is that it wouldn't work anyway, because of the Dbus dependency.) As a result, to do your scanning, as mentioned, fire up xsane under X11 (or XQuartz). 5) I'm noting this here in case somebody is searching for the error message:
#################################################################### You will get the following error if you have not properly set up dbus: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! To repair this, you must launch the dbus daemon systemwide: sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist Then for EACH user who wants access, the user must launch the dbus agent: launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist ############################################################################
comment:29 in reply to: ↑ 28 Changed 2 years ago by rosenjon2@…
This patch is missing from this port:
http://launchpadlibrarian.net/60601504/hplip-hpaio-segfault.patch
This causes errors that are as described in the patch.
Replying to okmacports@…:
A couple of other points:
1) I didn't try to build the gui version of HPLIP (don't see the point, frankly, but in theory it should work and I left the pointers there if someone wants to try it). 2) One problem with the original effort from several years back was that the Python extensions created by HP were not being installed into the "live" Python directory on the Mac. I have done that via symlinks to avoid the "tree violation" error message in MacPorts. This relies on Python 2.6, however, and would need to be changed if a different Python version were in use. 3) This defaults to a more-or-less complete HPLIP installation (minus the GUI). From what I can tell, it also prints (using CUPS) and makes an All In One printer show up in the Mac printer list. In theory it should be able to be built to fax as well, but I have no way to test it and the fax drivers violated the MacPorts tree structure so I deleted them. 4) This does not use the SANE version created for the Mac, which relies on the SANE project. That project, unhelpfully, does not offer an HPAIO driver because it's "provided by the HPLIP" project, which as we know doesn't do a Mac version. (My guess is that it wouldn't work anyway, because of the Dbus dependency.) As a result, to do your scanning, as mentioned, fire up xsane under X11 (or XQuartz). 5) I'm noting this here in case somebody is searching for the error message:
#################################################################### You will get the following error if you have not properly set up dbus: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! To repair this, you must launch the dbus daemon systemwide: sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist Then for EACH user who wants access, the user must launch the dbus agent: launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist ############################################################################
comment:30 Changed 2 years ago by okmacports@…
This ticket has been superseded by ticket #36001
comment:31 Changed 2 years ago by okmacports@…
sorry that's #30061
this ticket should be marked CLOSED
comment:32 Changed 2 years ago by aschenke@…
- Status changed from reopened to closed
- Resolution set to duplicate


I'm working on adding HPLIP, which replaces HPOJ and has all the functionality. No guarantees I get it working, though. It seems to compile without problems once the dependencies are installed (libusb and jpeg), but there are a few difficulties. First, because it works with CUPS, it needs to install files outside the standard DP tree. I'm not clear on how best to handle this. Second, the user interface requires PyQt, which isn't available as a port yet (bug 3210). Third, PyQt depends on py-sip, which needs to be updated (bug 8473).