summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--net-print/hplip/Manifest4
-rw-r--r--net-print/hplip/files/70-hpmud.rules19
-rw-r--r--net-print/hplip/files/hplip-2.8.6b-add-sane-lib.patch15
-rw-r--r--net-print/hplip/hplip-2.8.6b.ebuild172
4 files changed, 210 insertions, 0 deletions
diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest
new file mode 100644
index 0000000..f0d5929
--- /dev/null
+++ b/net-print/hplip/Manifest
@@ -0,0 +1,4 @@
+AUX 70-hpmud.rules 763 RMD160 b8326b26658b8e8355ae3d74423b51e2e15001e2 SHA1 fdb6b4937a814db50dc3ac3ca9b9c04cb44a6590 SHA256 6e7f2a0fd5a2111505066a412daea0d29c1ce858f09dbbaa489bb5a2f231e837
+AUX hplip-2.8.6b-add-sane-lib.patch 502 RMD160 db1d7e2ddc437004d14053e31ef9ab3e9f02e5c6 SHA1 3344cdd1e5ba97a3d2ceb364b08689114807db1e SHA256 97670e5d55248ed08d852d91906e7172682a7a7da24832dd241db054368662e2
+DIST hplip-2.8.6b.tar.gz 10955713 RMD160 fa903344c59f4bc474aeb049dd75631e72435b92 SHA1 b15e1dcb00d745ccc424633a84ba062c307740f9 SHA256 aa1094f0f91bbc0b5a611ce6ece40651edc7b3da8fa111921a3524916fc179fa
+EBUILD hplip-2.8.6b.ebuild 5244 RMD160 b8faccc53e630bca639c041265ea449a69f2c8e6 SHA1 1c5556e54d9474019f9b935ca1767eff22651456 SHA256 5b996514686d24dc108a69a51b38c59d8fc4dd053dd3f66ab5a9d2564b7d4eaa
diff --git a/net-print/hplip/files/70-hpmud.rules b/net-print/hplip/files/70-hpmud.rules
new file mode 100644
index 0000000..1e6ab66
--- /dev/null
+++ b/net-print/hplip/files/70-hpmud.rules
@@ -0,0 +1,19 @@
+# Udev rules file for HP printer products.
+
+ACTION!="add", GOTO="hpmud_rules_end"
+
+SUBSYSTEM!="usb|usb_device", GOTO="hpmud_rules_end"
+SUBSYSTEM=="usb", ENV{DEVTYPE}!="usb_device" ,GOTO="hpmud_rules_end"
+
+# Check for AiO products (0x03f0xx11).
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??11", GROUP="lp"
+# Check for Photosmart products (0x03f0xx02).
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??02", GROUP="lp"
+# Check for Business Inkjet products (0x03f0xx12).
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??12", GROUP="lp"
+# Check for Deskjet products (0x03f0xx04).
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??04", GROUP="lp"
+# Check for LaserJet products (0x03f0xx17).
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??17", GROUP="lp"
+
+LABEL="hpmud_rules_end"
diff --git a/net-print/hplip/files/hplip-2.8.6b-add-sane-lib.patch b/net-print/hplip/files/hplip-2.8.6b-add-sane-lib.patch
new file mode 100644
index 0000000..ac543bd
--- /dev/null
+++ b/net-print/hplip/files/hplip-2.8.6b-add-sane-lib.patch
@@ -0,0 +1,15 @@
+=== modified file 'Makefile.am'
+--- Makefile.am 2008-11-10 17:43:43 +0000
++++ Makefile.am 2008-11-10 17:44:10 +0000
+@@ -198,8 +198,8 @@
+ # scanext
+ scanextdir = $(pyexecdir)
+ scanext_LTLIBRARIES = scanext.la
+-#scanext_la_LDFLAGS = -module -avoid-version -lsane
+-scanext_la_LDFLAGS = -module -avoid-version
++scanext_la_LDFLAGS = -module -avoid-version -lsane
++#scanext_la_LDFLAGS = -module -avoid-version
+ scanext_la_SOURCES = scan/scanext/scanext.c
+ scanext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
+ endif
+
diff --git a/net-print/hplip/hplip-2.8.6b.ebuild b/net-print/hplip/hplip-2.8.6b.ebuild
new file mode 100644
index 0000000..7cbc046
--- /dev/null
+++ b/net-print/hplip/hplip-2.8.6b.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-2.8.6b.ebuild,v 1.6 2008/08/15 11:08:00 calchan Exp $
+
+inherit eutils linux-info python autotools
+
+DESCRIPTION="HP Linux Imaging and Printing System. Includes net-print/hpijs, scanner drivers and service tools."
+HOMEPAGE="http://hplip.sourceforge.net/"
+SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+
+IUSE="cupsddk dbus doc fax minimal parport ppds qt3 qt4 scanner snmp"
+
+DEPEND="!net-print/hpijs
+ !net-print/hpoj
+ virtual/ghostscript
+ >=media-libs/jpeg-6b
+ >=net-print/foomatic-filters-3.0.20080507
+ !minimal? (
+ >=net-print/cups-1.2
+ dev-libs/libusb
+ cupsddk? ( net-print/cupsddk )
+ dbus? ( >=sys-apps/dbus-1.0.0 )
+ scanner? ( >=media-gfx/sane-backends-1.0.19-r1 )
+ snmp? (
+ net-analyzer/net-snmp
+ dev-libs/openssl
+ )
+ )"
+
+RDEPEND="${DEPEND}
+ !minimal? (
+ !<sys-fs/udev-114
+ scanner? (
+ dev-python/imaging
+ qt3? ( >=media-gfx/xsane-0.89 )
+ qt4? ( >=media-gfx/xsane-0.89 )
+ !qt3? ( !qt4? ( >=media-gfx/sane-frontends-1.0.9 ) )
+ )
+ qt4? ( !qt3? (
+ dev-python/PyQt4
+ dbus? ( >=dev-python/dbus-python-0.80 )
+ fax? ( dev-python/reportlab )
+ ) )
+ qt3? (
+ >=dev-python/PyQt-3.14
+ dev-python/ctypes
+ dbus? ( >=dev-python/dbus-python-0.80 )
+ fax? ( dev-python/reportlab )
+ )
+ )"
+
+CONFIG_CHECK="PARPORT PPDEV"
+ERROR_PARPORT="Please make sure parallel port support is enabled in your kernel (PARPORT and PPDEV)."
+
+pkg_setup() {
+ if ! use ppds && ! use cupsddk; then
+ ewarn "Installing neither static (USE=-ppds) nor dynamic (USE=-cupsddk) PPD files,"
+ ewarn "which is probably not what you want. You will almost certainly not be able to "
+ ewarn "print (recommended: USE=\"cupsddk -ppds\")."
+ fi
+ if use minimal ; then
+ ewarn "Installing hpijs driver only, make sure you know what you are doing."
+ else
+ use parport && linux-info_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i -e "s:\$(doc_DATA)::" Makefile.in || die "Patching Makefile.in failed"
+ sed -i -e "s/'skipstone']/'skipstone', 'epiphany']/" \
+ -e "s/'skipstone': ''}/'skipstone': '', 'epiphany': '--new-window'}/" \
+ base/utils.py || die "Patching base/utils.py failed"
+
+ # bug 98428
+ sed -i -e "s:/usr/bin/env python:/usr/bin/python:g" hpssd.py || die "Patching hpssd.py failed"
+
+ # Force recognition of Gentoo distro by hp-check
+ sed -i \
+ -e "s:file('/etc/issue', 'r').read():'Gentoo':" \
+ installer/core_install.py || die "sed core_install.py"
+
+ # Replace udev rules, see bug #197726.
+ rm data/rules/55-hpmud.rules
+ cp "${FILESDIR}"/70-hpmud.rules data/rules
+ sed -i -e "s/55-hpmud.rules/70-hpmud.rules/g" Makefile.* */*.html || die "sed failed"
+
+ # Use system foomatic-rip instead of foomatic-rip-hplip
+ sed -i -e 's/foomatic-rip-hplip/foomatic-rip/' ppd/*.ppd || die "sed failed"
+
+ # Qt4 is still undocumented by upstream, so use with caution
+ local QT_VER
+ use qt4 && QT_VER="4"
+ use qt3 && QT_VER="3"
+ sed -i \
+ -e "s/%s --force-startup/%s --force-startup --qt${QT_VER}/" \
+ -e "s/'--force-startup'/'--force-startup', '--qt${QT_VER}'/" \
+ base/device.py || die "sed failed"
+ sed -i \
+ -e "s/Exec=hp-systray/Exec=hp-systray --qt${QT_VER}/" \
+ hplip-systray.desktop.in || die "sed failed"
+
+ # Re-Add libsane to LDFLAGS for scan builds
+ epatch "${FILESDIR}/${P}-add-sane-lib.patch"
+ eautoreconf
+}
+
+src_compile() {
+ if use qt3 || use qt4 ; then
+ local GUI_BUILD="--enable-gui-build"
+ else
+ local GUI_BUILD="--disable-gui-build"
+ fi
+
+ econf \
+ --disable-dependency-tracking \
+ --disable-cups11-build \
+ --with-cupsbackenddir=$(cups-config --serverbin)/backend \
+ --with-cupsfilterdir=$(cups-config --serverbin)/filter \
+ --disable-foomatic-rip-hplip-install \
+ ${GUI_BUILD} \
+ $(use_enable doc doc-build) \
+ $(use_enable cupsddk foomatic-drv-install) \
+ $(use_enable dbus dbus-build) \
+ $(use_enable fax fax-build) \
+ $(use_enable minimal hpijs-only-build) \
+ $(use_enable parport pp-build) \
+ $(use_enable ppds foomatic-ppd-install) \
+ $(use_enable scanner scan-build) \
+ $(use_enable snmp network-build) \
+ || die "econf failed"
+ emake || die "Compilation failed"
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "emake install failed"
+ rm -f "${D}"/etc/sane.d/dll.conf
+
+ # bug 106035
+ use qt3 || use qt4 || rm -Rf "${D}"/usr/share/applications
+
+ use minimal && rm -rf "${D}"/usr/lib
+}
+
+pkg_preinst() {
+ # avoid collisions with cups-1.2 compat symlinks
+ if [ -e "${ROOT}"/usr/lib/cups/backend/hp ] && [ -e "${ROOT}"/usr/libexec/cups/backend/hp ]; then
+ rm -f "${ROOT}"/usr/libexec/cups/backend/hp{,fax};
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ elog "You should run hp-setup as root if you are installing hplip for the first time, and may also"
+ elog "need to run it if you are upgrading from an earlier version."
+ elog
+ elog "If your device is connected using USB, users will need to be in the lp group to access it."
+ elog
+ elog "This release doesn't use an init script anymore, so you should probably do a"
+ elog "'rc-update del hplip' if you are updating from an old version."
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}