diff options
author | Daniel Pielmeier <billie@gentoo.org> | 2009-12-02 19:27:15 +0000 |
---|---|---|
committer | Daniel Pielmeier <billie@gentoo.org> | 2009-12-02 19:27:15 +0000 |
commit | 61873d2c9faacf269f7d6fa0372ddf64f915ec64 (patch) | |
tree | e81fc2af1010a6d1d3bfed097d0737b78390ca5e /net-print | |
parent | Force the use of the newer upstream tarball, so we can drop the maintainer mo... (diff) | |
download | gentoo-2-61873d2c9faacf269f7d6fa0372ddf64f915ec64.tar.gz gentoo-2-61873d2c9faacf269f7d6fa0372ddf64f915ec64.tar.bz2 gentoo-2-61873d2c9faacf269f7d6fa0372ddf64f915ec64.zip |
Patches part 2, replace sed expression with patches. If they don't get accepted upstream it is probaably a good idea to revert this. Ebuild cosmetics. Don't run gunzip/gzip on hpcups ppds as they don't not use foomatic-rip.
(Portage version: 2.1.6.13/cvs/Linux i686)
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/hplip/ChangeLog | 9 | ||||
-rw-r--r-- | net-print/hplip/files/hplip-3.9.10-cupsddk.patch | 22 | ||||
-rw-r--r-- | net-print/hplip/files/hplip-3.9.10-htmldir.patch | 109 | ||||
-rw-r--r-- | net-print/hplip/hplip-3.9.10.ebuild | 40 |
4 files changed, 160 insertions, 20 deletions
diff --git a/net-print/hplip/ChangeLog b/net-print/hplip/ChangeLog index 407c4cc3b6c5..2719390f8175 100644 --- a/net-print/hplip/ChangeLog +++ b/net-print/hplip/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-print/hplip # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.135 2009/12/01 12:43:27 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.136 2009/12/02 19:27:06 billie Exp $ + + 02 Dec 2009; Daniel Pielmeier <billie@gentoo.org> hplip-3.9.10.ebuild, + +files/hplip-3.9.10-cupsddk.patch, +files/hplip-3.9.10-htmldir.patch: + Patches part 2, replace sed expression with patches. If they don't get + accepted upstream it is probaably a good idea to revert this. Ebuild + cosmetics. Don't run gunzip/gzip on hpcups ppds as they don't use + foomatic-rip. 01 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org> hplip-3.9.8-r3.ebuild, hplip-3.9.10.ebuild: diff --git a/net-print/hplip/files/hplip-3.9.10-cupsddk.patch b/net-print/hplip/files/hplip-3.9.10-cupsddk.patch new file mode 100644 index 000000000000..906532cbcab9 --- /dev/null +++ b/net-print/hplip/files/hplip-3.9.10-cupsddk.patch @@ -0,0 +1,22 @@ +--- installer/core_install.py.old 2009-11-15 14:39:35.000000000 +0100 ++++ installer/core_install.py 2009-11-15 16:38:27.000000000 +0100 +@@ -29,6 +29,7 @@ + import grp + import pwd + import tarfile ++import commands # TODO: Replace with subprocess (commands is deprecated in Python 3.0) + + try: + import hashlib # new in 2.5 +@@ -1036,9 +1037,8 @@ + def check_cupsddk(self): + log.debug("Checking for cups-ddk...") + # TODO: Compute these paths some way or another... +- #return check_tool("/usr/lib/cups/driver/drv list") and os.path.exists("/usr/share/cupsddk/include/media.defs") +- return (check_file('drv', "/usr/lib/cups/driver") or check_file('drv', "/usr/lib64/cups/driver")) and \ +- check_file('media.defs', "/usr/share/cupsddk/include") ++ #return check_tool(commands.getoutput("cups-config --serverbin") + "/driver/drv list") and os.path.exists("/usr/share/cupsddk/include/media.defs") ++ return check_file('drv', commands.getoutput("cups-config --serverbin") + "/driver") and check_file('media.defs', "/usr/share/cupsddk/include") + + + def check_policykit(self): diff --git a/net-print/hplip/files/hplip-3.9.10-htmldir.patch b/net-print/hplip/files/hplip-3.9.10-htmldir.patch new file mode 100644 index 000000000000..60f7864adb37 --- /dev/null +++ b/net-print/hplip/files/hplip-3.9.10-htmldir.patch @@ -0,0 +1,109 @@ +diff -Naur hplip-3.9.10-old/configure.in hplip-3.9.10/configure.in +--- hplip-3.9.10-old/configure.in 2009-11-15 18:24:03.000000000 +0100 ++++ hplip-3.9.10/configure.in 2009-11-15 18:30:14.000000000 +0100 +@@ -319,6 +319,9 @@ + AC_ARG_WITH(docdir, AC_HELP_STRING([--with-docdir=DIR], [set hplip documentation directory [default=datadir/doc]]), + hpdocdir=$withval, hpdocdir="$datadir/doc/hplip-$VERSION") + ++AC_ARG_WITH(htmldir, AC_HELP_STRING([--with-htmldir=DIR], [set hplip html documentation directory [default=datadir/doc]]), ++ hphtmldir=$withval, hphtmldir="$datadir/doc/hplip-$VERSION") ++ + AC_MSG_CHECKING([for foomatic ppd install]) + AC_ARG_ENABLE(foomatic_ppd_install, + [ --enable-foomatic-ppd-install enable foomatic static ppd install (default=no), uses hpppddir], +@@ -543,6 +546,7 @@ + AC_DEFINE_DIR([abs_sbindir], [sbindir]) + AC_DEFINE_DIR([abs_hpppddir], [hpppddir]) + AC_DEFINE_DIR([abs_docdir], [hpdocdir]) ++AC_DEFINE_DIR([abs_htmldir], [hphtmldir]) + abs_ppddir=${abs_hpppddir%/*} + AC_DEFINE_DIR([abs_drvdir], [drvdir]) + +@@ -550,6 +554,7 @@ + AC_SUBST(abs_sbindir) + AC_SUBST(abs_hpppddir) + AC_SUBST(abs_docdir) ++AC_SUBST(abs_htmldir) + AC_SUBST(abs_ppddir) + AC_SUBST(abs_drvdir) + AC_SUBST(icondir) +@@ -558,6 +563,7 @@ + AC_SUBST(cupsfilterdir) + AC_SUBST(hpppddir) + AC_SUBST(hpdocdir) ++AC_SUBST(hphtmldir) + AC_SUBST(drvdir) + AC_SUBST(network_build) + AC_SUBST(pp_build) +diff -Naur hplip-3.9.10-old/hplip.conf.in hplip-3.9.10/hplip.conf.in +--- hplip-3.9.10-old/hplip.conf.in 2009-11-15 18:24:03.000000000 +0100 ++++ hplip-3.9.10/hplip.conf.in 2009-11-15 18:25:01.000000000 +0100 +@@ -9,6 +9,7 @@ + ppd=@abs_hpppddir@ + ppdbase=@abs_ppddir@ + doc=@abs_docdir@ ++html=@abs_htmldir@ + icon=@icondir@ + cupsbackend=@cupsbackenddir@ + cupsfilter=@cupsfilterdir@ +@@ -42,4 +43,4 @@ + lite-build=@lite_build@ + udev-acl-rules=@udev_acl_rules@ + hpcups-only-build=@hpcups_only_build@ +-hpijs-only-build=@hpijs_only_build@ +\ Kein Zeilenumbruch am Dateiende. ++hpijs-only-build=@hpijs_only_build@ +diff -Naur hplip-3.9.10-old/hplip.list.in hplip-3.9.10/hplip.list.in +--- hplip-3.9.10-old/hplip.list.in 2009-11-15 18:24:03.000000000 +0100 ++++ hplip-3.9.10/hplip.list.in 2009-11-15 18:25:01.000000000 +0100 +@@ -49,6 +49,7 @@ + $icondir=@icondir@ + $systraydir=@systraydir@ + $docdir=@hpdocdir@ ++$htmldir=@hphtmldirdir@ + $version=@VERSION@ + $internal_tag=@PACKAGE_BUGREPORT@ + +@@ -252,11 +253,11 @@ + @epm_full@f 644 root root $home/pcard/photocard.py pcard/photocard.py + @epm_full@f 755 root root $home/info.py info.py + # docs +-@epm_full@f 644 root root $docdir doc/* +-@epm_full@d 775 root root $docdir/images - +-@epm_full@f 644 root root $docdir/images doc/images/* +-@epm_full@d 775 root root $docdir/styles - +-@epm_full@f 644 root root $docdir/styles doc/styles/* ++@epm_full@f 644 root root $htmldir doc/* ++@epm_full@d 775 root root $htmldir/images - ++@epm_full@f 644 root root $htmldir/images doc/images/* ++@epm_full@d 775 root root $htmldir/styles - ++@epm_full@f 644 root root $htmldir/styles doc/styles/* + # python commands + @epm_full@l 755 root root $bindir/hp-toolbox ../share/hplip/toolbox.py + @epm_full@l 755 root root $bindir/hp-colorcal ../share/hplip/colorcal.py +diff -Naur hplip-3.9.10-old/Makefile.am hplip-3.9.10/Makefile.am +--- hplip-3.9.10-old/Makefile.am 2009-11-15 18:24:03.000000000 +0100 ++++ hplip-3.9.10/Makefile.am 2009-11-15 18:27:20.000000000 +0100 +@@ -9,6 +9,7 @@ + hplipdir = $(datadir)/hplip + + docdir = $(hpdocdir) ++htmldir = $(hphtmldir) + doc_DATA = COPYING copyright prnt/hpijs/README_LIBJPG + EXTRA_DIST = prnt/hpijs/gdevijs-krgb-1.5-gs8.61.patch prnt/hpijs/README_LIBJPG copyright + +@@ -23,11 +24,11 @@ + + if DOC_BUILD + wwwsrc = doc +-www0dir = $(docdir) ++www0dir = $(htmldir) + dist_www0_DATA = $(wwwsrc)/index.html $(wwwsrc)/commandline.html $(wwwsrc)/copying.html $(wwwsrc)/devicemanager.html $(wwwsrc)/faxtrouble.html $(wwwsrc)/gettinghelp.html $(wwwsrc)/hpscan.html $(wwwsrc)/mainttask.html $(wwwsrc)/plugins.html $(wwwsrc)/print.html $(wwwsrc)/printing.html $(wwwsrc)/printoptions.html $(wwwsrc)/printtroubleshooting.html $(wwwsrc)/scanning.html $(wwwsrc)/scantrouble.html $(wwwsrc)/sendfax.html $(wwwsrc)/setup.html $(wwwsrc)/systray.html $(wwwsrc)/troubleshooting.html $(wwwsrc)/uninstalling.html $(wwwsrc)/upgrading.html +-www3dir = $(docdir)/styles ++www3dir = $(htmldir)/styles + dist_www3_DATA = $(wwwsrc)/styles/* +-www4dir = $(docdir)/images ++www4dir = $(htmldir)/images + dist_www4_DATA = $(wwwsrc)/images/* + endif + diff --git a/net-print/hplip/hplip-3.9.10.ebuild b/net-print/hplip/hplip-3.9.10.ebuild index 6580ed54e0d8..feee1f783c6f 100644 --- a/net-print/hplip/hplip-3.9.10.ebuild +++ b/net-print/hplip/hplip-3.9.10.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-3.9.10.ebuild,v 1.5 2009/12/01 12:43:27 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-3.9.10.ebuild,v 1.6 2009/12/02 19:27:06 billie Exp $ EAPI="2" @@ -14,6 +14,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +# zeroconf does not work properly with >=cups-1.4. thus support for it is also disabled in hplip. IUSE="doc fax gtk +hpcups hpijs libnotify minimal -new-hpcups parport policykit qt3 qt4 scanner snmp static-ppds -udev-acl" # Note : libusb-compat untested (calchan 20090516) @@ -91,30 +92,36 @@ pkg_setup() { } src_prepare() { + # Do not install desktop files if there is no gui # Upstream bug: https://bugs.launchpad.net/hplip/+bug/452113 epatch "${FILESDIR}"/${P}-desktop.patch + + # Browser detection through xdg-open # Upstream bug: https://bugs.launchpad.net/hplip/+bug/482674 epatch "${FILESDIR}"/${P}-browser.patch - # bug 98428 - sed -i -e "s:/usr/bin/env python:/usr/bin/python:g" hpssd.py || die "Sed hpssd.py failed" + # Use cups-config when checking for cupsddk + # Upstream bug: https://bugs.launchpad.net/hplip/+bug/483136 + epatch "${FILESDIR}"/${P}-cupsddk.patch - # Force recognition of Gentoo distro by hp-check - sed -i \ - -e "s:file('/etc/issue', 'r').read():'Gentoo':" \ - installer/core_install.py || die "Sed installer/core_install.py failed" + # htmldocs are not installed under docdir/html so enable htmldir configure switch + # Upstream bug: https://bugs.launchpad.net/hplip/+bug/483217 + epatch "${FILESDIR}"/${P}-htmldir.patch - # SYSFS deprecated - https://bugs.launchpad.net/hplip/+bug/346390 + # SYSFS deprecated but kept upstream for compatibility reasons + # Upstream bug: https://bugs.launchpad.net/hplip/+bug/346390 sed -i -e "s/SYSFS/ATTRS/g" -e "s/sysfs/attrs/g" data/rules/56-hpmud_support.rules \ data/rules/55-hpmud.rules || die "Sed 55-hpmud.rules 56-hpmud_support.rules failed" + # Force recognition of Gentoo distro by hp-check sed -i \ - -e s:/usr/lib/cups/driver:$(cups-config --serverbin)/driver:g \ + -e "s:file('/etc/issue', 'r').read():'Gentoo':" \ installer/core_install.py || die "Sed installer/core_install.py failed" - # Use system foomatic-rip instead of foomatic-rip-hplip + # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip + # The hpcups driver does not use foomatic-rip local i - for i in ppd/{hpcups,hpijs}/*.ppd.gz + for i in ppd/hpijs/*.ppd.gz do rm -f ${i}.temp gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | gzip > ${i}.temp || die "Sed *.ppd.gz failed" @@ -134,12 +141,6 @@ src_prepare() { hplip-systray.desktop.in || die "Sed hplip-systray.desktop.in failed" fi - # htmldocs are not installed under docdir/html - # the following sed enables --htmldir configure switch in src_configure - if use doc ; then - sed -i -e 's/www\([0-9]\)dir = $(docdir)/www\1dir = $(htmldir)/g' Makefile.am || die "Sed Makefile.am failed" - fi - eautoreconf } @@ -218,7 +219,7 @@ src_configure() { --disable-shadow-build \ --with-cupsbackenddir=$(cups-config --serverbin)/backend \ --with-cupsfilterdir=$(cups-config --serverbin)/filter \ - --htmldir=/usr/share/doc/${P}/html \ + --with-htmldir=/usr/share/doc/${P}/html \ ${gui_build} \ ${myconf} \ ${drv_build} \ @@ -235,7 +236,8 @@ src_configure() { src_install() { emake DESTDIR="${D}" install || die "Emake install failed" - # Bug #201023 + # Installed by sane-backends + # Gentoo Bug: #201023 rm -f "${D}"/etc/sane.d/dll.conf # kde3 autostart hack |