diff options
author | Denis Dupeyron <calchan@gentoo.org> | 2007-10-18 20:30:04 +0000 |
---|---|---|
committer | Denis Dupeyron <calchan@gentoo.org> | 2007-10-18 20:30:04 +0000 |
commit | 1f2f23d15ce241cceec91a6081754f7163b89e43 (patch) | |
tree | 17fd086fc98ce56da2e1ebf2a56ad66a6589c613 /net-print | |
parent | Stable on amd64 wrt bug #195522 (diff) | |
download | gentoo-2-1f2f23d15ce241cceec91a6081754f7163b89e43.tar.gz gentoo-2-1f2f23d15ce241cceec91a6081754f7163b89e43.tar.bz2 gentoo-2-1f2f23d15ce241cceec91a6081754f7163b89e43.zip |
Fixed bug #195565 for old 1.x branch. Fixed quoting.
(Portage version: 2.1.3.14)
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/hplip/ChangeLog | 9 | ||||
-rw-r--r-- | net-print/hplip/files/digest-hplip-1.7.4a-r2 (renamed from net-print/hplip/files/digest-hplip-1.6.10) | 6 | ||||
-rw-r--r-- | net-print/hplip/files/hplip-1.7.4a-subprocess_replacement.patch | 50 | ||||
-rw-r--r-- | net-print/hplip/hplip-1.7.4a-r1.ebuild | 12 | ||||
-rw-r--r-- | net-print/hplip/hplip-1.7.4a-r2.ebuild (renamed from net-print/hplip/hplip-1.6.10.ebuild) | 81 |
5 files changed, 115 insertions, 43 deletions
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 <calchan@gentoo.org> + +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/files/digest-hplip-1.6.10 b/net-print/hplip/files/digest-hplip-1.7.4a-r2 index 0ebd3f0dbc26..5fae59ecf518 100644 --- a/net-print/hplip/files/digest-hplip-1.6.10 +++ b/net-print/hplip/files/digest-hplip-1.7.4a-r2 @@ -1,6 +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 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 +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.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.6.10.ebuild b/net-print/hplip/hplip-1.7.4a-r2.ebuild index b58002d7b53e..ce8907c627a5 100644 --- a/net-print/hplip/hplip-1.6.10.ebuild +++ b/net-print/hplip/hplip-1.7.4a-r2.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.6.10.ebuild,v 1.10 2007/07/13 07:15:13 mr_bones_ Exp $ +# $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 @@ -15,33 +15,40 @@ SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ppc x86" -IUSE="cups foomaticdb snmp X qt3 ppds scanner" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="cups fax foomaticdb parport ppds qt3 scanner snmp X" -DEPEND=">=dev-lang/python-2.2.0 - snmp? ( >=net-analyzer/net-snmp-5.0.9 ) - !net-print/hpijs +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 ) + 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" + ) ) + !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}; + 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 } @@ -49,15 +56,22 @@ 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 snmp network-build) \ $(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" @@ -82,42 +96,43 @@ src_install() { 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 + 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 - 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}"/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-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/{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 + 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 . + [ -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 +} |