From 3bbe82c99c723f06b3a95ee91177175658fe1b4d Mon Sep 17 00:00:00 2001 From: Denis Dupeyron Date: Thu, 18 Oct 2007 20:30:04 +0000 Subject: Fixed bug #195565 for old 1.x branch. Fixed quoting. Package-Manager: portage-2.1.3.14 --- net-print/hplip/ChangeLog | 9 +- net-print/hplip/Manifest | 35 +++--- net-print/hplip/files/digest-hplip-1.6.10 | 6 - net-print/hplip/files/digest-hplip-1.7.4a-r2 | 6 + .../hplip-1.7.4a-subprocess_replacement.patch | 50 ++++++++ net-print/hplip/hplip-1.6.10.ebuild | 123 ------------------ net-print/hplip/hplip-1.7.4a-r1.ebuild | 12 +- net-print/hplip/hplip-1.7.4a-r2.ebuild | 138 +++++++++++++++++++++ 8 files changed, 227 insertions(+), 152 deletions(-) delete mode 100644 net-print/hplip/files/digest-hplip-1.6.10 create mode 100644 net-print/hplip/files/digest-hplip-1.7.4a-r2 create mode 100644 net-print/hplip/files/hplip-1.7.4a-subprocess_replacement.patch delete mode 100644 net-print/hplip/hplip-1.6.10.ebuild create mode 100644 net-print/hplip/hplip-1.7.4a-r2.ebuild (limited to 'net-print') diff --git a/net-print/hplip/ChangeLog b/net-print/hplip/ChangeLog index 377f50f47ee5..266523446db8 100644 --- a/net-print/hplip/ChangeLog +++ b/net-print/hplip/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-print/hplip # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.79 2007/10/18 13:08:21 calchan Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.80 2007/10/18 20:30:00 calchan Exp $ + +*hplip-1.7.4a-r2 (18 Oct 2007) + + 18 Oct 2007; Denis Dupeyron + +files/hplip-1.7.4a-subprocess_replacement.patch, -hplip-1.6.10.ebuild, + +hplip-1.7.4a-r2.ebuild: + Fixed bug #195565 for old 1.x branch. Fixed quoting. *hplip-2.7.9-r1 (18 Oct 2007) diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest index 4c43817b8e59..afe6cb98c4f1 100644 --- a/net-print/hplip/Manifest +++ b/net-print/hplip/Manifest @@ -1,3 +1,7 @@ +AUX hplip-1.7.4a-subprocess_replacement.patch 1820 RMD160 6f98018b72cae4a89fd66352f3d36a7a5ec41665 SHA1 d0f649842585904f6d49a56eb8739ea0ec2dee50 SHA256 eb40787e7e5fceccacc5bcd07ff6625f3788b74cd5524502c10aab8774fc9eb5 +MD5 2cc63e00e608d68c9b3a46a68a51756d files/hplip-1.7.4a-subprocess_replacement.patch 1820 +RMD160 6f98018b72cae4a89fd66352f3d36a7a5ec41665 files/hplip-1.7.4a-subprocess_replacement.patch 1820 +SHA256 eb40787e7e5fceccacc5bcd07ff6625f3788b74cd5524502c10aab8774fc9eb5 files/hplip-1.7.4a-subprocess_replacement.patch 1820 AUX hplip-2.7.9-subprocess_replacement.patch 3538 RMD160 8b74cea35584ad411b6634bc3ca12b9d20f10403 SHA1 92933732c2b6fbc35fea7b601c81ce5ea46a9b9c SHA256 ba9b51e5aa69c39dab519a30aac1707f1cbda5404cdd4ddf7fd0afc3aab19ed0 MD5 e492d6b4706bc5c4f96d4a3067aa4e51 files/hplip-2.7.9-subprocess_replacement.patch 3538 RMD160 8b74cea35584ad411b6634bc3ca12b9d20f10403 files/hplip-2.7.9-subprocess_replacement.patch 3538 @@ -7,35 +11,34 @@ MD5 dcda3bf144b5f2cd4bebd1719383dd31 files/hplip.init.d 948 RMD160 3908cd5b42175416cc4ac6fc36f0006f7c65588c files/hplip.init.d 948 SHA256 9dad79022ced93da207a50f8d49d93acfc19f36b89e2b3d77f6b809ee81abd95 files/hplip.init.d 948 DIST foomatic-db-hpijs-20060720.tar.gz 98252 RMD160 0c2c09f3cea6fc2a8e5da216bd9996b96d91613d SHA1 0e4ec08d01cd28bb751bc2e5844f0d0f7b97ba42 SHA256 1e50f603b46b1d07980212b2e5dfc5d72d07c889259e79ecbf09469fef5ad20e -DIST hplip-1.6.10.tar.gz 10561620 RMD160 3608757fca36865528565c0c40571d91a936fd3f SHA1 7c877cac132fc8695c693800c7e34322bdc8d858 SHA256 45f4eafd4568a06889bf4b996a3c75ef571a157b921f56b027b567766d8e239f DIST hplip-1.7.4a.tar.gz 13566965 RMD160 e2777b8b065abe385bfe557b9eed86848029e2c9 SHA1 98fcb0ce13ee7d9f17cc6c61c568528dd9cbf71d SHA256 903957b1b1aa86438d546a205a3d526a600b1e56754a5ba5ce99228a26cc475e DIST hplip-2.7.9.tar.gz 14488632 RMD160 007a4c888bde277e86b1a78628062774a43ff2f7 SHA1 1ac491fd2b49f8a5a658532fd44e2aa0b008e072 SHA256 e8867529434411f6c44ef6224405f92fd6be25f04513946621bf209b2e81baaf -EBUILD hplip-1.6.10.ebuild 3675 RMD160 877081de0015019133f1031fda241b7709771b87 SHA1 c09c30009fb5a98caefe8bf1b75e856160f1be26 SHA256 583c89b73d79581d51e8ca1dff6d2139bd5a2137c4871e536c0d5d3e00f04070 -MD5 8446d1a564a05b03114e9a4cc7e35d1f hplip-1.6.10.ebuild 3675 -RMD160 877081de0015019133f1031fda241b7709771b87 hplip-1.6.10.ebuild 3675 -SHA256 583c89b73d79581d51e8ca1dff6d2139bd5a2137c4871e536c0d5d3e00f04070 hplip-1.6.10.ebuild 3675 -EBUILD hplip-1.7.4a-r1.ebuild 3690 RMD160 2205bf20df3371dfb7e17600300c9b866fe746db SHA1 ca11ba718f90d2f3138a9fa940aaf8105af796d3 SHA256 adae960db7d1bc4df717b8a53f9e65fcc6011938a2ed9f1526221856c3cd7c96 -MD5 33e0e690f7dddf3786a73ff1ac6c19bd hplip-1.7.4a-r1.ebuild 3690 -RMD160 2205bf20df3371dfb7e17600300c9b866fe746db hplip-1.7.4a-r1.ebuild 3690 -SHA256 adae960db7d1bc4df717b8a53f9e65fcc6011938a2ed9f1526221856c3cd7c96 hplip-1.7.4a-r1.ebuild 3690 +EBUILD hplip-1.7.4a-r1.ebuild 3704 RMD160 5dc4753a4ab9d474d113a17fd7a02847317fb1ac SHA1 ee6d916cd567beeef8b02713b032a83d6f251ee5 SHA256 9d1f5e35b756b08c55f70f0a8e0db85db29c5393eff27cb8536b1442a45fcd92 +MD5 eda789fc03376c9853412d90e0bc5b8e hplip-1.7.4a-r1.ebuild 3704 +RMD160 5dc4753a4ab9d474d113a17fd7a02847317fb1ac hplip-1.7.4a-r1.ebuild 3704 +SHA256 9d1f5e35b756b08c55f70f0a8e0db85db29c5393eff27cb8536b1442a45fcd92 hplip-1.7.4a-r1.ebuild 3704 +EBUILD hplip-1.7.4a-r2.ebuild 3783 RMD160 c47b471b34d9f2a5aab7c0e60de478b479ea9daf SHA1 5a190979c714470f1f39829bf5dcda87d88f6aad SHA256 4fe250a0edcc0dfce99d3702e19c8ffd528bb6fd16f5ae832e3be9ccaa638184 +MD5 2d819057ace9b4f74a4ba7a1f82d2ceb hplip-1.7.4a-r2.ebuild 3783 +RMD160 c47b471b34d9f2a5aab7c0e60de478b479ea9daf hplip-1.7.4a-r2.ebuild 3783 +SHA256 4fe250a0edcc0dfce99d3702e19c8ffd528bb6fd16f5ae832e3be9ccaa638184 hplip-1.7.4a-r2.ebuild 3783 EBUILD hplip-2.7.9-r1.ebuild 3825 RMD160 5b368908abfd46bffa3b02c534e368a983842c37 SHA1 1791d363a4a52ab7eb3203115c2c7caada17b1fb SHA256 ccc4856fcf3904f24e44851ef4a333ce3807b10e111a71d9e53ef142e015f864 MD5 8d058d337fca7a7d3b8720add13cb22e hplip-2.7.9-r1.ebuild 3825 RMD160 5b368908abfd46bffa3b02c534e368a983842c37 hplip-2.7.9-r1.ebuild 3825 SHA256 ccc4856fcf3904f24e44851ef4a333ce3807b10e111a71d9e53ef142e015f864 hplip-2.7.9-r1.ebuild 3825 -MISC ChangeLog 13748 RMD160 1884361dba9116402d37294496201c5e966cb99c SHA1 3f849c0d9cf23695225c567e9a5b8211ef2ad890 SHA256 232664ffc3519c9cd80a79038a73e6c252f827f881411a8794afe1e7d597430a -MD5 d2fd07d6dbaf775086d9da6e955f58f2 ChangeLog 13748 -RMD160 1884361dba9116402d37294496201c5e966cb99c ChangeLog 13748 -SHA256 232664ffc3519c9cd80a79038a73e6c252f827f881411a8794afe1e7d597430a ChangeLog 13748 +MISC ChangeLog 13988 RMD160 4a1663eb49a750217713a8b3f3bc69d8153c8563 SHA1 e897877d102858f99408c80cee811c2a6b07545b SHA256 925682c952981df9ce2c1107b8043a5b8259bf3a0a34d6dcec1095de495fcd87 +MD5 2d027eb7c9ca0e6510c7220e4b7e3a40 ChangeLog 13988 +RMD160 4a1663eb49a750217713a8b3f3bc69d8153c8563 ChangeLog 13988 +SHA256 925682c952981df9ce2c1107b8043a5b8259bf3a0a34d6dcec1095de495fcd87 ChangeLog 13988 MISC metadata.xml 250 RMD160 00f8254bd6b52bc050cdc822b7370b3e2d2f4970 SHA1 f91d1e6c01026cba252d042ba254f4a4bc61194a SHA256 ab106df12671f3f541e0416f8c0d5a96b6e725ed7b3b111d27af7a584c4bf164 MD5 a7f39f5758507140c896dcc24a3e0e2f metadata.xml 250 RMD160 00f8254bd6b52bc050cdc822b7370b3e2d2f4970 metadata.xml 250 SHA256 ab106df12671f3f541e0416f8c0d5a96b6e725ed7b3b111d27af7a584c4bf164 metadata.xml 250 -MD5 2bbef9d8400c26b5a2bc15636d0db05b files/digest-hplip-1.6.10 521 -RMD160 fdbb47f4de10565f30fc32fcaa11d63def826a41 files/digest-hplip-1.6.10 521 -SHA256 a6a40ef739f13c2b5baf4d46161d709d65d1770a0bef40d472cd3161562c92ef files/digest-hplip-1.6.10 521 MD5 8cdad3401711a59d614863b839c45335 files/digest-hplip-1.7.4a-r1 521 RMD160 ac859e445b139c0789441184c5af69e1cb75d679 files/digest-hplip-1.7.4a-r1 521 SHA256 4d98dfc9fec72da07fc2405364c623aaed10c8476d582920a75639e8499cd135 files/digest-hplip-1.7.4a-r1 521 +MD5 8cdad3401711a59d614863b839c45335 files/digest-hplip-1.7.4a-r2 521 +RMD160 ac859e445b139c0789441184c5af69e1cb75d679 files/digest-hplip-1.7.4a-r2 521 +SHA256 4d98dfc9fec72da07fc2405364c623aaed10c8476d582920a75639e8499cd135 files/digest-hplip-1.7.4a-r2 521 MD5 f68fb8f4981ef3faecff859da377ddb1 files/digest-hplip-2.7.9-r1 241 RMD160 1c32e9bb5148d9cafb89f9c096e793197fc76485 files/digest-hplip-2.7.9-r1 241 SHA256 6854a0c055d17b18ecdf0d14a071a5c01b818a85a2fcc47fef928fb4aa1cb2f7 files/digest-hplip-2.7.9-r1 241 diff --git a/net-print/hplip/files/digest-hplip-1.6.10 b/net-print/hplip/files/digest-hplip-1.6.10 deleted file mode 100644 index 0ebd3f0dbc26..000000000000 --- a/net-print/hplip/files/digest-hplip-1.6.10 +++ /dev/null @@ -1,6 +0,0 @@ -MD5 1c4b65222333d048450d37082d521b1e foomatic-db-hpijs-20060720.tar.gz 98252 -RMD160 0c2c09f3cea6fc2a8e5da216bd9996b96d91613d foomatic-db-hpijs-20060720.tar.gz 98252 -SHA256 1e50f603b46b1d07980212b2e5dfc5d72d07c889259e79ecbf09469fef5ad20e foomatic-db-hpijs-20060720.tar.gz 98252 -MD5 01519018343978776fe4acfbdb7cb6df hplip-1.6.10.tar.gz 10561620 -RMD160 3608757fca36865528565c0c40571d91a936fd3f hplip-1.6.10.tar.gz 10561620 -SHA256 45f4eafd4568a06889bf4b996a3c75ef571a157b921f56b027b567766d8e239f hplip-1.6.10.tar.gz 10561620 diff --git a/net-print/hplip/files/digest-hplip-1.7.4a-r2 b/net-print/hplip/files/digest-hplip-1.7.4a-r2 new file mode 100644 index 000000000000..5fae59ecf518 --- /dev/null +++ b/net-print/hplip/files/digest-hplip-1.7.4a-r2 @@ -0,0 +1,6 @@ +MD5 1c4b65222333d048450d37082d521b1e foomatic-db-hpijs-20060720.tar.gz 98252 +RMD160 0c2c09f3cea6fc2a8e5da216bd9996b96d91613d foomatic-db-hpijs-20060720.tar.gz 98252 +SHA256 1e50f603b46b1d07980212b2e5dfc5d72d07c889259e79ecbf09469fef5ad20e foomatic-db-hpijs-20060720.tar.gz 98252 +MD5 210e948d1f1f376426a2cca0ed9d1e6c hplip-1.7.4a.tar.gz 13566965 +RMD160 e2777b8b065abe385bfe557b9eed86848029e2c9 hplip-1.7.4a.tar.gz 13566965 +SHA256 903957b1b1aa86438d546a205a3d526a600b1e56754a5ba5ce99228a26cc475e hplip-1.7.4a.tar.gz 13566965 diff --git a/net-print/hplip/files/hplip-1.7.4a-subprocess_replacement.patch b/net-print/hplip/files/hplip-1.7.4a-subprocess_replacement.patch new file mode 100644 index 000000000000..ca1b022a1ce1 --- /dev/null +++ b/net-print/hplip/files/hplip-1.7.4a-subprocess_replacement.patch @@ -0,0 +1,50 @@ +diff -urN hplip-1.7.4a.orig/hpssd.py hplip-1.7.4a/hpssd.py +--- hplip-1.7.4a.orig/hpssd.py 2007-10-18 15:20:16.000000000 +0200 ++++ hplip-1.7.4a/hpssd.py 2007-10-18 15:54:34.000000000 +0200 +@@ -53,7 +53,7 @@ + + # Std Lib + import sys, socket, os, os.path, signal, getopt, glob, time, select +-import popen2, threading, re, fcntl, pwd, tempfile ++import subprocess, threading, re, fcntl, pwd, tempfile + #from asyncore import dispatcher, loop + + from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \ +@@ -562,21 +562,23 @@ + + if sendmail: + sendmail = os.path.join(sendmail, 'sendmail') +- sendmail += ' -t -r %s' % self.from_address ++ cmd = [sendmail,'-t','-r',self.from_address] + +- log.debug(sendmail) +- std_out, std_in, std_err = popen2.popen3(sendmail) +- log.debug(repr(self.message)) +- std_in.write(self.message) +- std_in.close() +- +- r, w, e = select.select([std_err], [], [], 2.0) +- +- if r: +- err = std_err.read() +- if err: +- log.error(repr(err)) +- self.result = ERROR_TEST_EMAIL_FAILED ++ log.debug(repr(cmd)) ++ err = None ++ try: ++ sp = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) ++ std_out, std_err = sp.communicate(self.message) ++ log.debug(repr(self.message)) ++ if std_err != '': ++ err = std_err ++ ++ except OSError, e: ++ err = str(e) ++ ++ if err: ++ log.error(repr(err)) ++ self.result = ERROR_TEST_EMAIL_FAILED + + else: + log.error("Mail send failed. sendmail not found.") diff --git a/net-print/hplip/hplip-1.6.10.ebuild b/net-print/hplip/hplip-1.6.10.ebuild deleted file mode 100644 index b58002d7b53e..000000000000 --- a/net-print/hplip/hplip-1.6.10.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-1.6.10.ebuild,v 1.10 2007/07/13 07:15:13 mr_bones_ Exp $ - -inherit eutils - -DB_V=20060720 -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 - foomaticdb? ( - http://gentooexperimental.org/~genstef/dist/foomatic-db-hpijs-${DB_V}.tar.gz - http://www.linuxprinting.org/download/foomatic/foomatic-db-hpijs-${DB_V}.tar.gz - )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ppc x86" -IUSE="cups foomaticdb snmp X qt3 ppds scanner" - -DEPEND=">=dev-lang/python-2.2.0 - snmp? ( >=net-analyzer/net-snmp-5.0.9 ) - !net-print/hpijs - !net-print/hpoj - virtual/ghostscript - scanner? ( - >=media-gfx/sane-backends-1.0.9 - || ( - X? ( >=media-gfx/xsane-0.89 ) - >=media-gfx/sane-frontends-1.0.9 - ) - ) - qt3? ( >=dev-python/PyQt-3.11 =x11-libs/qt-3* ) - >=dev-libs/libusb-0.1.10a - sys-apps/hotplug-base - net-print/cups - foomaticdb? ( net-print/foomatic-db-engine ) - >=net-print/foomatic-filters-3.0.2" -RDEPEND="${DEPEND}" - -pkg_setup() { - # 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 -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # bug 98428 - sed -i -e "s:/usr/bin/env python:/usr/bin/python:g" \ - hpssd.py -} -src_compile() { - econf \ - $(use_enable snmp network-build) \ - $(use_enable cups cups-install) \ - $(use_enable ppds foomatic-install) \ - || die "econf failed" - emake || die "emake failed" - - if use foomaticdb ; then - cd ../foomatic-db-hpijs-${DB_V} - econf || die "econf failed" - rm -fR data-generators/hpijs-rss - emake || die "emake failed" - fi -} - -src_install() { - # cups-1.2 installation paths, make sure that the .desktop is installed - sed -i -e "s:/usr/lib/cups:$(cups-config --serverbin):" \ - -e 's:\(ICON_FILE = \).*:\1hplip.desktop:' \ - -e 's:\(ICON_PATH = \).*:\1/usr/share/applications:' \ - Makefile - - emake -j1 DESTDIR="${D}" install || die "emake install failed" - - newinitd "${FILESDIR}"/hplip.init.d hplip - - if use scanner; then - dodir /usr/$(get_libdir)/sane - dosym /usr/$(get_libdir)/libsane-hpaio.la /usr/$(get_libdir)/sane/libsane-hpaio.la - dosym /usr/$(get_libdir)/libsane-hpaio.so /usr/$(get_libdir)/sane/libsane-hpaio.so - dosym /usr/$(get_libdir)/libsane-hpaio.so.1 /usr/$(get_libdir)/sane/libsane-hpaio.so.1 - dosym /usr/$(get_libdir)/libsane-hpaio.so.1.0.0 /usr/$(get_libdir)/sane/libsane-hpaio.so.1.0.0 - else - rm -f "${D}"/usr/$(get_libdir)/libsane-hpaio.la - rm -f "${D}"/usr/$(get_libdir)/libsane-hpaio.so - rm -f "${D}"/usr/$(get_libdir)/libsane-hpaio.so.1 - rm -f "${D}"/usr/$(get_libdir)/libsane-hpaio.so.1.0.0 - rm -f "${D}"/etc/sane.d/dll.conf - fi - - # bug 106035 - if ! use qt3 ; then - rm -f "${D}"/usr/bin/hp-print - rm -f "${D}"/usr/bin/hp-toolbox - rm -f "${D}"/usr/share/hplip/print - rm -f "${D}"/usr/share/hplip/toolbox - rm -f "${D}"/usr/share/applications/hplip.desktop - rm -f "${D}"/usr/lib/menu/hplip - fi - - rm -rf ${D}/$(cups-config --serverbin)/filter ${D}/usr/bin/foomatic-rip - - if use foomaticdb ; then - cd ../foomatic-db-hpijs-${DB_V} - emake DESTDIR="${D}" install || die "emake install failed" - fi -} - -pkg_preinst() { - if use scanner; then - insinto /etc/sane.d - [ -e /etc/sane.d/dll.conf ] && cp /etc/sane.d/dll.conf . - [ -e ${ROOT}/etc/sane.d/dll.conf ] && cp ${ROOT}/etc/sane.d/dll.conf . - grep -q hpaio dll.conf || echo hpaio >> dll.conf - doins dll.conf - fi -} diff --git a/net-print/hplip/hplip-1.7.4a-r1.ebuild b/net-print/hplip/hplip-1.7.4a-r1.ebuild index 2981f5042274..be0923d685b4 100644 --- a/net-print/hplip/hplip-1.7.4a-r1.ebuild +++ b/net-print/hplip/hplip-1.7.4a-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-1.7.4a-r1.ebuild,v 1.6 2007/07/13 07:15:13 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-1.7.4a-r1.ebuild,v 1.7 2007/10/18 20:30:00 calchan Exp $ inherit eutils @@ -47,8 +47,8 @@ RDEPEND="${DEPEND}" pkg_setup() { # 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}; + 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 } @@ -107,7 +107,7 @@ src_install() { rm -f "${D}"/usr/lib/menu/hplip fi - rm -rf ${D}/$(cups-config --serverbin)/filter ${D}/usr/bin/foomatic-rip + rm -rf "${D}"/$(cups-config --serverbin)/filter "${D}"/usr/bin/foomatic-rip if use foomaticdb ; then cd ../foomatic-db-hpijs-${DB_V} @@ -115,14 +115,14 @@ src_install() { fi # Fix a symlink collision, see bug #172341 - rm -f ${D}/usr/share/cups/model/foomatic-ppds + rm -f "${D}"/usr/share/cups/model/foomatic-ppds } pkg_preinst() { if use scanner; then insinto /etc/sane.d [ -e /etc/sane.d/dll.conf ] && cp /etc/sane.d/dll.conf . - [ -e ${ROOT}/etc/sane.d/dll.conf ] && cp ${ROOT}/etc/sane.d/dll.conf . + [ -e "${ROOT}"/etc/sane.d/dll.conf ] && cp "${ROOT}"/etc/sane.d/dll.conf . grep -q hpaio dll.conf || echo hpaio >> dll.conf doins dll.conf fi diff --git a/net-print/hplip/hplip-1.7.4a-r2.ebuild b/net-print/hplip/hplip-1.7.4a-r2.ebuild new file mode 100644 index 000000000000..ce8907c627a5 --- /dev/null +++ b/net-print/hplip/hplip-1.7.4a-r2.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-1.7.4a-r2.ebuild,v 1.1 2007/10/18 20:30:00 calchan Exp $ + +inherit eutils + +DB_V=20060720 +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 + foomaticdb? ( + http://gentooexperimental.org/~genstef/dist/foomatic-db-hpijs-${DB_V}.tar.gz + http://www.linuxprinting.org/download/foomatic/foomatic-db-hpijs-${DB_V}.tar.gz + )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="cups fax foomaticdb parport ppds qt3 scanner snmp X" + +DEPEND="!net-print/hpijs + !net-print/hpoj + dev-libs/openssl + virtual/ghostscript + >=media-libs/jpeg-6b + net-print/cups + dev-libs/libusb + >=dev-lang/python-2.2 + net-print/foomatic-filters + fax? ( >=dev-lang/python-2.3 + dev-python/reportlab ) + foomaticdb? ( net-print/foomatic-db-engine ) + snmp? ( net-analyzer/net-snmp ) + qt3? ( >=dev-python/PyQt-3.11 =x11-libs/qt-3* ) + scanner? ( + >=media-gfx/sane-backends-1.0.9 + X? ( || ( + >=media-gfx/xsane-0.89 + >=media-gfx/sane-frontends-1.0.9 + ) ) + !X? ( || ( + >=media-gfx/sane-frontends-1.0.9 + >=media-gfx/xsane-0.89 + ) ) + )" +RDEPEND="${DEPEND}" + +pkg_setup() { + # 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 +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Fix bug #195565 + epatch "${FILESDIR}"/${P}-subprocess_replacement.patch + + # bug 98428 + sed -i -e "s:/usr/bin/env python:/usr/bin/python:g" \ + hpssd.py +} +src_compile() { + econf \ + $(use_enable cups cups-install) \ + $(use_enable fax fax-build) \ + $(use_enable parport pp-build) \ + $(use_enable ppds foomatic-install) \ + $(use_enable qt3 gui-build) \ + $(use_enable scanner scan-build) \ + $(use_enable snmp network-build) \ + || die "econf failed" + emake || die "emake failed" + + if use foomaticdb ; then + cd ../foomatic-db-hpijs-${DB_V} + econf || die "econf failed" + rm -fR data-generators/hpijs-rss + emake || die "emake failed" + fi +} + +src_install() { + # cups-1.2 installation paths, make sure that the .desktop is installed + sed -i -e "s:/usr/lib/cups:$(cups-config --serverbin):" \ + -e 's:\(ICON_FILE = \).*:\1hplip.desktop:' \ + -e 's:\(ICON_PATH = \).*:\1/usr/share/applications:' \ + Makefile + + emake -j1 DESTDIR="${D}" install || die "emake install failed" + + newinitd "${FILESDIR}"/hplip.init.d hplip + + if use scanner; then + dodir /usr/$(get_libdir)/sane + for i in libsane-hpaio.{la,so{,.1{,.0.0}}}; do + dosym /usr/$(get_libdir)/${i} /usr/$(get_libdir)/sane/${i}; done + else + rm -f "${D}"/usr/$(get_libdir)/libsane-hpaio.{la,so{,.1{,.0.0}}} + rm -f "${D}"/etc/sane.d/dll.conf + fi + + # bug 106035 + if ! use qt3 ; then + rm -f "${D}"/usr/{bin/hp-,share/hplip/}{print,toolbox} + rm -f "${D}"/usr/share/applications/hplip.desktop + rm -f "${D}"/usr/lib/menu/hplip + fi + + rm -rf "${D}"/$(cups-config --serverbin)/filter "${D}"/usr/bin/foomatic-rip + + if use foomaticdb ; then + cd ../foomatic-db-hpijs-${DB_V} + emake DESTDIR="${D}" install || die "emake install failed" + fi + + # Fix a symlink collision, see bug #172341 + rm -f "${D}"/usr/share/cups/model/foomatic-ppds +} + +pkg_preinst() { + if use scanner; then + insinto /etc/sane.d + [ -e /etc/sane.d/dll.conf ] && cp /etc/sane.d/dll.conf . + [ -e "${ROOT}"/etc/sane.d/dll.conf ] && cp "${ROOT}"/etc/sane.d/dll.conf . + grep -q hpaio dll.conf || echo hpaio >> dll.conf + doins dll.conf + fi +} + +pkg_postinst() { + if ! use qt3 ; then + elog "You need to enable the qt3 useflag to use the GUI" + fi +} -- cgit v1.2.3-65-gdbad