summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hüttel <dilfridge@gentoo.org>2011-08-28 23:20:47 +0000
committerAndreas Hüttel <dilfridge@gentoo.org>2011-08-28 23:20:47 +0000
commit46eb060d67ad2d0ca49126603073183bea4ffc5d (patch)
treef8cf82270a1cd65f5eb61d5189c2b13fe697835c /net-print
parentClean up EAPI clean up #380249 by Michael. Add patch to fix up missing heade... (diff)
downloadhistorical-46eb060d67ad2d0ca49126603073183bea4ffc5d.tar.gz
historical-46eb060d67ad2d0ca49126603073183bea4ffc5d.tar.bz2
historical-46eb060d67ad2d0ca49126603073183bea4ffc5d.zip
Add upstream fix for bug 378597, mis-printing of large image files
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64
Diffstat (limited to 'net-print')
-rw-r--r--net-print/cups/ChangeLog10
-rw-r--r--net-print/cups/Manifest25
-rw-r--r--net-print/cups/cups-1.4.8-r22.ebuild296
-rw-r--r--net-print/cups/cups-1.5.0-r2.ebuild298
-rw-r--r--net-print/cups/files/cups-1.4.8-largeimage.patch18
5 files changed, 645 insertions, 2 deletions
diff --git a/net-print/cups/ChangeLog b/net-print/cups/ChangeLog
index f7c60c829ef9..783c76f36f43 100644
--- a/net-print/cups/ChangeLog
+++ b/net-print/cups/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-print/cups
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.432 2011/08/28 22:23:45 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.433 2011/08/28 23:20:47 dilfridge Exp $
+
+*cups-1.5.0-r2 (28 Aug 2011)
+*cups-1.4.8-r22 (28 Aug 2011)
+
+ 28 Aug 2011; Andreas K. Huettel <dilfridge@gentoo.org>
+ +cups-1.4.8-r22.ebuild, +files/cups-1.4.8-largeimage.patch,
+ +cups-1.5.0-r2.ebuild:
+ Add upstream fix for bug 378597, mis-printing of large image files
28 Aug 2011; Tony Vroon <chainsaw@gentoo.org> cups-1.4.8-r1.ebuild:
Marked stable on AMD64 based on arch testing by Agostino "ago" Sarubbo &
diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 0b27eb6439ce..d7bf970a34b9 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA512
+
AUX cups-1.3.0-configure.patch 651 RMD160 e4c7f45d7ddc28157433bf025c7f946c7e3b6d6a SHA1 101bf1893b56640d9fa82078e29319fbbd1449c7 SHA256 d6e5e60a982a3c093c0d0f89cf865e2b4c36290f5b1e188b7bf305d210070736
AUX cups-1.3.10-str3178.patch 888 RMD160 ff061fc3500960f441c59896cdfe421d5f47f386 SHA1 fac5361b1172aba167d48988f874faa6faf1554a SHA256 e6550fad17017ac6897e6e9c70a4aafaaec5473c05a19e9e50277293cdc6aac6
AUX cups-1.3.11-pdf-m4.patch 1476 RMD160 be4d4ed2b699625282c9725faee08e01edca9b7a SHA1 a8b092b9c155c161c781319a94cb1bb7de734c3f SHA256 191b0c41c142ed31718fc01f55fcefc6c26735fa56165c23450fd7a454818b01
@@ -16,6 +19,7 @@ AUX cups-1.4.6-force-gnutls.patch 3319 RMD160 c6cc024a702305eb81661d5cdadd9857e9
AUX cups-1.4.6-serialize-gnutls.patch 3625 RMD160 873b2806cfec732c4a4f3f2981f666a958dd5b0e SHA1 aae046121d0139fbba1cb9147c8742f73b2f1fa0 SHA256 6bc9e16fc6865b2f3e0ee2d1947bdde691e41f90fce32b9839b3661dcea4a827
AUX cups-1.4.6-web-hang.patch 1749 RMD160 ff8d4cfa10a5de5a911c8672313904f50b13fd0f SHA1 f37a3fb7d71a6d56bbb3e5e7a8cf74ca8cb19276 SHA256 f49cef2ce1f2eecdd8ee07d85f306a19375f6d48510763aa51e96a0c54ad27c5
AUX cups-1.4.8-CVE-2011-3170.patch 1045 RMD160 9a27eb1ec34ced57da5bbe7c55261d8aa35b01c0 SHA1 6155d7c4b34ff6447a93aa56fa4b5958eb943202 SHA256 c94d49c3ff980b830874dae4158768554f87f429ae400838a605505aae350af6
+AUX cups-1.4.8-largeimage.patch 572 RMD160 62e0a92fb1dc62adff43bcdc22f201da426d8916 SHA1 1528f2b1f67e7c532418dd7f495db1788ae7d2d4 SHA256 364a3ed3e161ad75836e6bc56746c25207680ab6f44563219c93146f0cf74541
AUX cupsd.init.d 293 RMD160 19fbef21cee7e472e7028f3101b680baa0089c54 SHA1 e6b27b2638fec258fe2f55c926c2530e909ca3d2 SHA256 b4268a6bae95e96b6af21c3716ecc905073736ce7dc33be1489d574a447f3c48
AUX pdftops-1.20.gentoo 10412 RMD160 16e229662c47e03af1d1f4cb5764a76d17a66642 SHA1 6afb8a655b6ff013a2c8c8cbfb615ba1e561503b SHA256 ac5fa01ca776d75bd7cef62eef9f6b0c3945ee87e8950b40ca9f9f3ff46a16c1
DIST cups-1.3.11-source.tar.bz2 3799393 RMD160 a0646f2ba29fbd39d211ea5c3fdbd24a00f66a78 SHA1 df5cfb64fb608fc128acadde670dc30af49bdb18 SHA256 5e310fd324a15fae1e1c9721879f5c948d788e04735a5263a40c6146fff607b8
@@ -26,6 +30,25 @@ EBUILD cups-1.3.11-r4.ebuild 8157 RMD160 8a87f90b96c08a694643df5324e7daab651daed
EBUILD cups-1.4.6-r2.ebuild 7232 RMD160 360accbab201dc540131622d6fc1dcf1df88d1e1 SHA1 ef0640f2bb2a846fc1435de4bb77eebfa82436f5 SHA256 c36d259463de77c8a6395eeb10571853702db0efc90ac4bfddd8144240462974
EBUILD cups-1.4.8-r1.ebuild 7200 RMD160 08fd2e364d4ef9aac63c7bc1a39fc1e16bf3ab67 SHA1 e04a5085fe18dca8023f6ba4739adeb321c1426b SHA256 89a6a609f21d7040d8c102015f7cfef2a3b215c5c824b7a8de4bab14ca8c3030
EBUILD cups-1.4.8-r21.ebuild 8443 RMD160 679ccbc84e633feff758cf3475d09c9d05472457 SHA1 f26fc96e87bd0fb849a948f3ca57fb50056c8e43 SHA256 e0abc4a87def1cbe0cd5ab086984cfd46356bfc5d9427312cac4323a6c5a7635
+EBUILD cups-1.4.8-r22.ebuild 8494 RMD160 35528619a66960590cfdb86d332e3af986fce93c SHA1 94f8bc27c699780992b8817a28ac57d2f0da679e SHA256 bc9bf411685d6edd9aed5abb058e153bb1e94127be1063abcd5c0bd5bc725230
EBUILD cups-1.5.0-r1.ebuild 8299 RMD160 cd482176e3cf5f29b09d8b35fa47450beae289c6 SHA1 c9bd7e12e6feb3dcf215c5b5c6c085c0f0825c8d SHA256 f2ed0e6c468f22b36f9fb0774fb0b4c6ed377246356ebc4385afa6b791170bd7
-MISC ChangeLog 65006 RMD160 bee8b55b7a5f96bb915618fce2c5765f60979041 SHA1 5cdbf337186254425e1da55e6eefe3c0fb02a26c SHA256 f7ad3b19422c6046d58485769fae3012320608bdcbc223905e18ce6953039710
+EBUILD cups-1.5.0-r2.ebuild 8350 RMD160 673447f224905f4c8c4ce0bd1814b61fd1cd19bd SHA1 4fd00939022570341fe9239b7cf6cc904b736625 SHA256 f43298d8b8f456d00945b1fa93dfdce4ebfb6021a51c351a763f4951317735fe
+MISC ChangeLog 65281 RMD160 3d00c70631cfa1e80a84321af7ceaebe85bb8d5e SHA1 c213621151e4ce5774847b8094c89e48eef0d819 SHA256 eb25e67586b63de129ecd95d39c7dff720da81165badcee4fc281ef6264fe8ce
MISC metadata.xml 586 RMD160 73a1f1c0096d5035dfa53207b00c125894f6822a SHA1 123501263490cab57af2b99f2336fb70c094d9b0 SHA256 3b729c497ee38452b1ca051b759f43b5f9e117f9c36c0f3b660e4bd8ab7c295b
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iQIcBAEBCgAGBQJOWs1rAAoJENwGBM22xffe+8sP/1rcMw815woU0Qg2uYW9bybW
+UdP5ellz9UzsCaUkCZBs7cXVGu2X4MnQyF09wt3leVaNgZoe9qaR78ueRFlJdMcC
+crVTwsaEooAk+uubC3T/Fke+DoTaIRLRbJwxw46qbgOCv/K/S7tSzDPAgDnVe7vG
+8ZaRNj+d8Z8UwkNPzQ6RBKXQYji/mejFeTV4V1nYlm82ht/AMQjcx7LRKR96Dgpo
+xDZU3TdlPX3DvDA3OscvJTaaIKbQwdDO7xKs2/2Rd8Ibrabf25uXRHhmra90sKwh
+jRrvN4OK2H7J5ICMKN69fOKpOxfI+Rdo3PstNqCBFmDkZBmJUDqXd5eTwGwVzvcM
+H1gFnRKEWP5f9CBxStCYoi9aEYDevkCO2mrvwLm+qBxdMj+gLZuWgKy/WuUaRamw
++9PdTBXJFE5N4pwwguDSjZLuKEWZDwXma4uux82B351jgCzn++GVeGnhbaKHe34U
+IYZ+PuELJDy8XyEtx/be7xYYQ+zgUnyhUxX9YRhZqklTV/9tYLrX1OduUVrFYaA/
+zxjwHpii98zGKPtTuz+EfAa+iC1qxq1y83vo5KU9r1Hz+NN5eI7GD0t3eTkfD4rd
+11RFt0doUwAHBBZH9qOxRzQPqlpG8RKxpAx9Tl4YSQNWuJpltSbMh4kpGRSId668
+cxZbI3ySiiBNB7f9mu4p
+=77/i
+-----END PGP SIGNATURE-----
diff --git a/net-print/cups/cups-1.4.8-r22.ebuild b/net-print/cups/cups-1.4.8-r22.ebuild
new file mode 100644
index 000000000000..d047c93577f7
--- /dev/null
+++ b/net-print/cups/cups-1.4.8-r22.ebuild
@@ -0,0 +1,296 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.4.8-r22.ebuild,v 1.1 2011/08/28 23:20:47 dilfridge Exp $
+
+EAPI=3
+
+PYTHON_DEPEND="python? 2:2.5"
+
+inherit autotools eutils flag-o-matic linux-info multilib pam perl-module python versionator java-pkg-opt-2
+
+MY_P=${P/_}
+
+DESCRIPTION="The Common Unix Printing System"
+HOMEPAGE="http://www.cups.org/"
+SRC_URI="mirror://easysw/${PN}/${PV}/${MY_P}-source.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="acl dbus debug gnutls java +jpeg kerberos ldap pam perl php +png python samba slp +ssl static-libs +threads +tiff usb X xinetd"
+
+LANGS="da de es eu fi fr id it ja ko nl no pl pt pt_BR ru sv zh zh_TW"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} linguas_${X}"
+done
+
+RDEPEND="
+ app-text/libpaper
+ acl? (
+ kernel_linux? (
+ sys-apps/acl
+ sys-apps/attr
+ )
+ )
+ dbus? ( sys-apps/dbus )
+ java? ( >=virtual/jre-1.6 )
+ jpeg? ( virtual/jpeg:0 )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap[ssl?,gnutls?] )
+ pam? ( virtual/pam )
+ perl? ( dev-lang/perl )
+ php? ( dev-lang/php )
+ png? ( >=media-libs/libpng-1.4.3 )
+ slp? ( >=net-libs/openslp-1.0.4 )
+ ssl? (
+ gnutls? (
+ dev-libs/libgcrypt
+ net-libs/gnutls
+ )
+ !gnutls? ( >=dev-libs/openssl-0.9.8g )
+ )
+ tiff? ( >=media-libs/tiff-3.5.5 )
+ usb? ( virtual/libusb:0 )
+ X? ( x11-misc/xdg-utils )
+ xinetd? ( sys-apps/xinetd )
+ !net-print/cupsddk
+"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+"
+
+PDEPEND="
+ app-text/ghostscript-gpl[cups]
+ >=app-text/poppler-0.12.3-r3[utils]
+"
+
+# upstream includes an interactive test which is a nono for gentoo.
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup lp
+ enewuser lp -1 -1 -1 lp
+ enewgroup lpadmin 106
+
+ # python 3 is no-go
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+
+ if use usb; then
+ elog "You are going to use new libusb backed to access your usb printer."
+ elog "This interface has quite few known issues and does not report all"
+ elog "issues and just refuses to print."
+ elog "Please consider disabling usb useflag if you are having issues."
+ elog
+ elog "Please note that if you disable the usb useflag your device will be"
+ elog "still working using kernel usblp interface instead of libusb."
+ echo
+ fi
+
+ linux-info_pkg_setup
+ if ! linux_config_exists; then
+ ewarn "Can't check the linux kernel configuration."
+ ewarn "You might have some incompatible options enabled."
+ else
+ # recheck that we don't have usblp to collide with libusb
+ if use usb; then
+ if linux_chkconfig_present USB_PRINTER; then
+ eerror "Your usb printers will be managed via libusb which collides with kernel module."
+ eerror "${P} requires the USB_PRINTER support disabled."
+ eerror "Please disable it:"
+ eerror " CONFIG_USB_PRINTER=n"
+ eerror "in /usr/src/linux/.config or"
+ eerror " Device Drivers --->"
+ eerror " USB support --->"
+ eerror " [ ] USB Printer support"
+ eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)."
+ fi
+ else
+ #here we should warn user that he should enable it so he can print
+ if ! linux_chkconfig_present USB_PRINTER; then
+ ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
+ ewarn "support in your kernel."
+ ewarn "Please enable it:"
+ ewarn " CONFIG_USB_PRINTER=y"
+ ewarn "in /usr/src/linux/.config or"
+ ewarn " Device Drivers --->"
+ ewarn " USB support --->"
+ ewarn " [*] USB Printer support"
+ ewarn "Alternatively, enable the usb useflag for cups and use the new, less-tested libusb code."
+ fi
+ fi
+ fi
+}
+
+src_prepare() {
+ # create a missing symlink to allow https printing via IPP, bug #217293
+ epatch "${FILESDIR}/${PN}-1.4.0-backend-https.patch"
+ # various build time fixes
+ epatch "${FILESDIR}/${PN}-1.4.4-dont-compress-manpages.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-fix-install-perms.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-php-destdir.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-perl-includes.patch"
+ epatch "${FILESDIR}/${PN}-1.4.6-force-gnutls.patch"
+ epatch "${FILESDIR}/${PN}-1.4.6-serialize-gnutls.patch"
+ epatch "${FILESDIR}/${PN}-1.4.8-largeimage.patch"
+ # security fixes
+ epatch "${FILESDIR}/${PN}-1.4.8-CVE-2011-3170.patch"
+
+ AT_M4DIR=config-scripts eaclocal
+ eautoconf
+}
+
+src_configure() {
+ export DSOFLAGS="${LDFLAGS}"
+
+ # locale support
+ strip-linguas ${LANGS}
+ if [ -z "${LINGUAS}" ] ; then
+ export LINGUAS=none
+ fi
+
+ local myconf
+ if use ssl || use gnutls ; then
+ myconf+="
+ $(use_enable gnutls)
+ $(use_enable !gnutls openssl)
+ "
+ else
+ myconf+="
+ --disable-gnutls
+ --disable-openssl
+ "
+ fi
+
+ # bug 352252, recheck for later versions if still necessary....
+ if use gnutls && ! use threads ; then
+ ewarn "The useflag gnutls requires also threads enabled. Switching on threads."
+ fi
+ if use gnutls || use threads ; then
+ myconf+=" --enable-threads "
+ else
+ myconf+=" --disable-threads "
+ fi
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --localstatedir=/var \
+ --with-cups-user=lp \
+ --with-cups-group=lp \
+ --with-docdir=/usr/share/cups/html \
+ --with-languages="${LINGUAS}" \
+ --with-pdftops=/usr/bin/pdftops \
+ --with-system-groups=lpadmin \
+ $(use_enable acl) \
+ $(use_enable dbus) \
+ $(use_enable debug) \
+ $(use_enable debug debug-guards) \
+ $(use_enable jpeg) \
+ $(use_enable kerberos gssapi) \
+ $(use_enable ldap) \
+ $(use_enable pam) \
+ $(use_enable png) \
+ $(use_enable slp) \
+ $(use_enable static-libs static) \
+ $(use_enable tiff) \
+ $(use_enable usb libusb) \
+ $(use_with java) \
+ $(use_with perl) \
+ $(use_with php) \
+ $(use_with python) \
+ $(use_with xinetd xinetd /etc/xinetd.d) \
+ --enable-libpaper \
+ --disable-dnssd \
+ ${myconf}
+
+ # install in /usr/libexec always, instead of using /usr/lib/cups, as that
+ # makes more sense when facing multilib support.
+ sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs || die
+ sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h || die
+ sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config || die
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use perl ; then
+ cd "${S}"/scripting/perl
+ perl-module_src_prep
+ perl-module_src_compile
+ fi
+
+ if use php ; then
+ cd "${S}"/scripting/php
+ emake || die "emake php failed"
+ fi
+}
+
+src_install() {
+ emake BUILDROOT="${D}" install || die "emake install failed"
+ dodoc {CHANGES,CREDITS,README}.txt || die "dodoc install failed"
+
+ if use perl ; then
+ cd "${S}"/scripting/perl
+ perl-module_src_install
+ fixlocalpod
+ fi
+
+ if use php ; then
+ cd "${S}"/scripting/php
+ emake DESTDIR="${D}" install || die "emake install for php bindings failed"
+ fi
+
+ # clean out cups init scripts
+ rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
+
+ # install our init script
+ local neededservices
+ use dbus && neededservices+=" dbus"
+ [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
+ cp "${FILESDIR}"/cupsd.init.d "${T}"/cupsd || die
+ sed -i \
+ -e "s/@neededservices@/$neededservices/" \
+ "${T}"/cupsd || die
+ doinitd "${T}"/cupsd || die "doinitd failed"
+
+ # install our pam script
+ pamd_mimic_system cups auth account
+
+ if use xinetd ; then
+ # correct path
+ sed -i \
+ -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
+ "${D}"/etc/xinetd.d/cups-lpd || die
+ # it is safer to disable this by default, bug #137130
+ grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
+ { sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd || die ; }
+ # write permission for file owner (root), bug #296221
+ fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed"
+ else
+ rm -rf "${D}"/etc/xinetd.d
+ fi
+
+ keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
+ /var/cache/cups /var/cache/cups/rss /var/log/cups /var/run/cups/certs \
+ /var/spool/cups/tmp
+
+ keepdir /etc/cups/{interfaces,ppd,ssl}
+
+ use X || rm -r "${D}"/usr/share/applications
+
+ # create /etc/cups/client.conf, bug #196967 and #266678
+ echo "ServerName /var/run/cups/cups.sock" >> "${D}"/etc/cups/client.conf
+}
+
+pkg_postinst() {
+ echo
+ elog "For information about installing a printer and general cups setup"
+ elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
+ echo
+}
diff --git a/net-print/cups/cups-1.5.0-r2.ebuild b/net-print/cups/cups-1.5.0-r2.ebuild
new file mode 100644
index 000000000000..80965f60e242
--- /dev/null
+++ b/net-print/cups/cups-1.5.0-r2.ebuild
@@ -0,0 +1,298 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.5.0-r2.ebuild,v 1.1 2011/08/28 23:20:47 dilfridge Exp $
+
+#
+# See http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=blob;f=net-print/cups/notes.txt;hb=HEAD
+# for some notes about the ongoing work here
+#
+
+EAPI=3
+
+PYTHON_DEPEND="python? 2:2.5"
+
+inherit autotools eutils flag-o-matic linux-info multilib pam perl-module python versionator java-pkg-opt-2
+
+MY_P=${P/_}
+MY_PV=${PV/_}
+
+DESCRIPTION="The Common Unix Printing System"
+HOMEPAGE="http://www.cups.org/"
+SRC_URI="mirror://easysw/${PN}/${MY_PV}/${MY_P}-source.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="acl dbus debug gnutls java +jpeg kerberos ldap pam perl php +png python samba slp +ssl static-libs +threads +tiff usb X xinetd"
+
+LANGS="da de es eu fi fr id it ja ko nl no pl pt pt_BR ru sv zh zh_TW"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} linguas_${X}"
+done
+
+RDEPEND="
+ app-text/libpaper
+ acl? (
+ kernel_linux? (
+ sys-apps/acl
+ sys-apps/attr
+ )
+ )
+ dbus? ( sys-apps/dbus )
+ java? ( >=virtual/jre-1.6 )
+ jpeg? ( virtual/jpeg:0 )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap[ssl?,gnutls?] )
+ pam? ( virtual/pam )
+ perl? ( dev-lang/perl )
+ php? ( dev-lang/php )
+ png? ( >=media-libs/libpng-1.4.3 )
+ slp? ( >=net-libs/openslp-1.0.4 )
+ ssl? (
+ gnutls? (
+ dev-libs/libgcrypt
+ >=net-libs/gnutls-2.11
+ )
+ !gnutls? ( >=dev-libs/openssl-0.9.8g )
+ )
+ tiff? ( >=media-libs/tiff-3.5.5 )
+ usb? ( virtual/libusb:0 )
+ X? ( x11-misc/xdg-utils )
+ xinetd? ( sys-apps/xinetd )
+ !net-print/cupsddk
+"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+"
+
+PDEPEND="
+ app-text/ghostscript-gpl[cups]
+ >=app-text/poppler-0.12.3-r3[utils]
+"
+
+# upstream includes an interactive test which is a nono for gentoo.
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup lp
+ enewuser lp -1 -1 -1 lp
+ enewgroup lpadmin 106
+
+ # python 3 is no-go
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+
+ if use usb; then
+ elog "You are going to use new libusb backed to access your usb printer."
+ elog "This interface has quite few known issues and does not report all"
+ elog "issues and just refuses to print."
+ elog "Please consider disabling usb useflag if you are having issues."
+ elog
+ elog "Please note that if you disable the usb useflag your device will be"
+ elog "still working using kernel usblp interface instead of libusb."
+ echo
+ fi
+
+ linux-info_pkg_setup
+ if ! linux_config_exists; then
+ ewarn "Can't check the linux kernel configuration."
+ ewarn "You might have some incompatible options enabled."
+ else
+ # recheck that we don't have usblp to collide with libusb
+ if use usb; then
+ if linux_chkconfig_present USB_PRINTER; then
+ eerror "Your usb printers will be managed via libusb which collides with kernel module."
+ eerror "${P} requires the USB_PRINTER support disabled."
+ eerror "Please disable it:"
+ eerror " CONFIG_USB_PRINTER=n"
+ eerror "in /usr/src/linux/.config or"
+ eerror " Device Drivers --->"
+ eerror " USB support --->"
+ eerror " [ ] USB Printer support"
+ eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)."
+ fi
+ else
+ #here we should warn user that he should enable it so he can print
+ if ! linux_chkconfig_present USB_PRINTER; then
+ ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
+ ewarn "support in your kernel."
+ ewarn "Please enable it:"
+ ewarn " CONFIG_USB_PRINTER=y"
+ ewarn "in /usr/src/linux/.config or"
+ ewarn " Device Drivers --->"
+ ewarn " USB support --->"
+ ewarn " [*] USB Printer support"
+ ewarn "Alternatively, enable the usb useflag for cups and use the new, less-tested libusb code."
+ fi
+ fi
+ fi
+}
+
+src_prepare() {
+ # various build time fixes
+ epatch "${FILESDIR}/${PN}-1.4.4-dont-compress-manpages.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-fix-install-perms.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-php-destdir.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-perl-includes.patch"
+ epatch "${FILESDIR}/${PN}-1.4.8-largeimage.patch"
+ # security fixes
+ epatch "${FILESDIR}/${PN}-1.4.8-CVE-2011-3170.patch"
+
+ AT_M4DIR=config-scripts eaclocal
+ eautoconf
+}
+
+src_configure() {
+ export DSOFLAGS="${LDFLAGS}"
+
+ # locale support
+ strip-linguas ${LANGS}
+ if [ -z "${LINGUAS}" ] ; then
+ export LINGUAS=none
+ fi
+
+ local myconf
+ if use ssl || use gnutls ; then
+ myconf+="
+ $(use_enable gnutls)
+ $(use_enable !gnutls openssl)
+ "
+ else
+ myconf+="
+ --disable-gnutls
+ --disable-openssl
+ "
+ fi
+
+ # bug 352252, recheck for later versions if still necessary....
+ if use gnutls && ! use threads ; then
+ ewarn "The useflag gnutls requires also threads enabled. Switching on threads."
+ fi
+ if use gnutls || use threads ; then
+ myconf+=" --enable-threads "
+ else
+ myconf+=" --disable-threads "
+ fi
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --localstatedir=/var \
+ --with-cups-user=lp \
+ --with-cups-group=lp \
+ --with-docdir=/usr/share/cups/html \
+ --with-languages="${LINGUAS}" \
+ --with-pdftops=/usr/bin/pdftops \
+ --with-system-groups=lpadmin \
+ $(use_enable acl) \
+ $(use_enable dbus) \
+ $(use_enable debug) \
+ $(use_enable debug debug-guards) \
+ $(use_enable jpeg) \
+ $(use_enable kerberos gssapi) \
+ $(use_enable ldap) \
+ $(use_enable pam) \
+ $(use_enable png) \
+ $(use_enable slp) \
+ $(use_enable static-libs static) \
+ $(use_enable tiff) \
+ $(use_enable usb libusb) \
+ $(use_with java) \
+ $(use_with perl) \
+ $(use_with php) \
+ $(use_with python) \
+ $(use_with xinetd xinetd /etc/xinetd.d) \
+ --enable-libpaper \
+ --disable-dnssd \
+ ${myconf}
+
+ # install in /usr/libexec always, instead of using /usr/lib/cups, as that
+ # makes more sense when facing multilib support.
+ sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs || die
+ sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h || die
+ sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config || die
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use perl ; then
+ cd "${S}"/scripting/perl
+ perl-module_src_prep
+ perl-module_src_compile
+ fi
+
+ if use php ; then
+ cd "${S}"/scripting/php
+ emake || die "emake php failed"
+ fi
+}
+
+src_install() {
+ emake BUILDROOT="${D}" install || die "emake install failed"
+ dodoc {CHANGES,CREDITS,README}.txt || die "dodoc install failed"
+
+ if use perl ; then
+ cd "${S}"/scripting/perl
+ perl-module_src_install
+ fixlocalpod
+ fi
+
+ if use php ; then
+ cd "${S}"/scripting/php
+ emake DESTDIR="${D}" install || die "emake install for php bindings failed"
+ fi
+
+ # clean out cups init scripts
+ rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
+
+ # install our init script
+ local neededservices
+ use dbus && neededservices+=" dbus"
+ [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
+ cp "${FILESDIR}"/cupsd.init.d "${T}"/cupsd || die
+ sed -i \
+ -e "s/@neededservices@/$neededservices/" \
+ "${T}"/cupsd || die
+ doinitd "${T}"/cupsd || die "doinitd failed"
+
+ # install our pam script
+ pamd_mimic_system cups auth account
+
+ if use xinetd ; then
+ # correct path
+ sed -i \
+ -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
+ "${D}"/etc/xinetd.d/cups-lpd || die
+ # it is safer to disable this by default, bug #137130
+ grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
+ { sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd || die ; }
+ # write permission for file owner (root), bug #296221
+ fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed"
+ else
+ rm -rf "${D}"/etc/xinetd.d
+ fi
+
+ keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
+ /var/cache/cups /var/cache/cups/rss /var/log/cups /var/run/cups/certs \
+ /var/spool/cups/tmp
+
+ keepdir /etc/cups/{interfaces,ppd,ssl}
+
+ use X || rm -r "${D}"/usr/share/applications
+
+ # create /etc/cups/client.conf, bug #196967 and #266678
+ echo "ServerName /var/run/cups/cups.sock" >> "${D}"/etc/cups/client.conf
+}
+
+pkg_postinst() {
+ echo
+ elog "For information about installing a printer and general cups setup"
+ elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
+ echo
+}
diff --git a/net-print/cups/files/cups-1.4.8-largeimage.patch b/net-print/cups/files/cups-1.4.8-largeimage.patch
new file mode 100644
index 000000000000..abf0b44d46d2
--- /dev/null
+++ b/net-print/cups/files/cups-1.4.8-largeimage.patch
@@ -0,0 +1,18 @@
+Index: filter/image.c
+===================================================================
+--- filter/image.c (Revision 9872)
++++ filter/image.c (Revision 9873)
+@@ -349,9 +349,10 @@
+ * Load the image as appropriate...
+ */
+
+- img->max_ics = CUPS_TILE_MINIMUM;
+- img->xppi = 128;
+- img->yppi = 128;
++ img->cachefile = -1;
++ img->max_ics = CUPS_TILE_MINIMUM;
++ img->xppi = 128;
++ img->yppi = 128;
+
+ if (!memcmp(header, "GIF87a", 6) || !memcmp(header, "GIF89a", 6))
+ status = _cupsImageReadGIF(img, fp, primary, secondary, saturation, hue,