summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Solano Gómez <gentoo@sattvik.com>2011-08-23 18:32:38 -0500
committerDaniel Solano Gómez <gentoo@sattvik.com>2011-08-23 18:32:38 -0500
commit3ae02e32ed703cbaf93d50613c7a683a25455206 (patch)
treef171fe7da32d20f3a378b20b907673755c249b25 /net-print
parentRemove unused/obsolete ebuilds (diff)
downloadsattvik-3ae02e32ed703cbaf93d50613c7a683a25455206.tar.gz
sattvik-3ae02e32ed703cbaf93d50613c7a683a25455206.tar.bz2
sattvik-3ae02e32ed703cbaf93d50613c7a683a25455206.zip
Sync up with portage.
Diffstat (limited to 'net-print')
-rw-r--r--net-print/cups/ChangeLog9
-rw-r--r--net-print/cups/Manifest11
-rw-r--r--net-print/cups/cups-1.4.6-r2.ebuild270
-rw-r--r--net-print/cups/cups-1.4.6-r21.ebuild3
-rw-r--r--net-print/cups/cups-1.4.8.ebuild (renamed from net-print/cups/cups-1.4.6-r1.ebuild)4
-rw-r--r--net-print/cups/cups-1.5.0.ebuild299
-rw-r--r--net-print/cups/files/cups-1.5.0-group_fix.patch67
7 files changed, 657 insertions, 6 deletions
diff --git a/net-print/cups/ChangeLog b/net-print/cups/ChangeLog
index dc492c2..da5fa36 100644
--- a/net-print/cups/ChangeLog
+++ b/net-print/cups/ChangeLog
@@ -2,6 +2,15 @@
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*cups-1.5.0 (23 Aug 2011)
+*cups-1.4.8 (23 Aug 2011)
+*cups-1.4.6-r2 (23 Aug 2011)
+
+ 23 Aug 2011; Daniel Solano Gómez <gentoo@sattvik.com> -cups-1.4.6-r1.ebuild,
+ +cups-1.4.6-r2.ebuild, cups-1.4.6-r21.ebuild, +cups-1.4.8.ebuild,
+ +cups-1.5.0.ebuild, +files/cups-1.5.0-group_fix.patch:
+ Sync up with portage.
+
*cups-1.4.6-r1 (02 May 2011)
02 May 2011; Daniel Solano Gómez <gentoo@sattvik.com> cups-1.3.11-r4.ebuild,
diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 12fd2ab..74fc738 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -17,12 +17,17 @@ AUX cups-1.4.4-php-destdir.patch 679 RMD160 1b15d42373a952a608a01cb8c97efbbd3c78
AUX cups-1.4.6-force-gnutls.patch 3319 RMD160 c6cc024a702305eb81661d5cdadd9857e9a6778e SHA1 5ac62ed3ca20bc7a4541c990c676c433299b2177 SHA256 beb4014eac5218d9f424b81946ac1e209625026bf20a7f4820758e5ee1fe5b66
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.5.0-group_fix.patch 1774 RMD160 cd6b98deecbc8e6f92fdf24f6682c3426a4512b2 SHA1 501ada69a9607c7831f827277c5691b34392d519 SHA256 88a7d41298a43fd2004ef6d40690333c6a1e9c1da4251ac9f23b659e91a6559f
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
DIST cups-1.4.6-source.tar.bz2 4517061 RMD160 94c9921e03f5ec52d9c16947435622365f53aef6 SHA1 42fb1ca00ee7291561564d3072716eb2045f05d1 SHA256 f08711702a77b52c7150f96fe1f45482f6151cb95ef601268c528607fe6ad514
+DIST cups-1.4.8-source.tar.bz2 4547162 RMD160 ee80e8d0b56dc0e2edf2a9aa9a43c4b92619f741 SHA1 9167f556e78e0bc075f1eb2f695d79cc1f334007 SHA256 6bd27e1213c139ed0bbadc5c29f97cf1e8f7f8f5b0bb29b227ecaff32aafa9a6
+DIST cups-1.5.0-source.tar.bz2 4090210 RMD160 e7be9b6b44428561609c59abaea8fa31a11aefff SHA1 628f549867751e373fc20c7558fec422f9eb942b SHA256 c6f99b68a558f4d626e9a5076d664f38e9925715dc541b07f0328c9aeb02ec33
EBUILD cups-1.3.11-r4.ebuild 8230 RMD160 06cae988bc72fd05846e74c736798294c948ea1d SHA1 4a88b7dd7c62690e4e3ebdd3c8da1087ba5f94d9 SHA256 b7643b9e72c90fa66078ab8d4af8af463d1bfdf837e465e9fc078276e418493d
-EBUILD cups-1.4.6-r1.ebuild 8579 RMD160 44ceddc76420f0ddae9f63529986d15220b4ac55 SHA1 5dfcdbcd392501e172be9114a502a69d9e98afde SHA256 38a65433fc9d00c329abcf6f246aeaf178c1a55cfcce194c9ce27f15b4d72118
-EBUILD cups-1.4.6-r21.ebuild 8509 RMD160 6178c8831132937a82ab0c5452c6f46e3b3d1879 SHA1 3f51dd19726a31c71c3fda6def94c112974434b9 SHA256 a10216bb3af633739ac6aefa06d4e89aa88690f774768bdf66a03b7569a09b16
-MISC ChangeLog 2355 RMD160 c482e4cc7b35d71a58c24f2c6ff1321f527e6a1d SHA1 fdbf7dee70844746fdcad76d50bcb4cb26f716fe SHA256 6767cca086602520a58b196007eb4c5429ef96db7559fd901fc491621c2fd976
+EBUILD cups-1.4.6-r2.ebuild 7302 RMD160 ae4b79035d1bffde784e6e93e03787f7eaaf4cc6 SHA1 a8dbbd84a26884bf88c3da27234c86bab011d471 SHA256 feba1310274d9a11b2966c0e22498e3eec44aff2f342a24e53428b1c7031d4ae
+EBUILD cups-1.4.6-r21.ebuild 8579 RMD160 44ceddc76420f0ddae9f63529986d15220b4ac55 SHA1 5dfcdbcd392501e172be9114a502a69d9e98afde SHA256 38a65433fc9d00c329abcf6f246aeaf178c1a55cfcce194c9ce27f15b4d72118
+EBUILD cups-1.4.8.ebuild 8474 RMD160 a6e20d2ac3958833ce88296b99565a9d98bbf0e0 SHA1 6339144452f654333546aa54d7f763a89c3f4738 SHA256 742b0fa58c806a1e7a0410af06a412fd335c2c27110393f258d5071dc0b15b86
+EBUILD cups-1.5.0.ebuild 8331 RMD160 6e5e56d34d9fefc2123b19503f31274ee8c83a05 SHA1 0bd11e3a6c97251c2200f835144ca3b2c103ab41 SHA256 926ee129e002889f218ca28dbdbb2a08ee49e7e397151ef1d4eba2c73fc89a0e
+MISC ChangeLog 2667 RMD160 e3eacaad20268636d51e3fabfcb65bbd620f28d7 SHA1 2a976be6b2eb0bca6aee3c1213595d808419907b SHA256 7d5612fb507adf0ee2a86d3ffd73f8f398465ad534d5598579f49b95c222c4d7
MISC metadata.xml 161 RMD160 1e5b1e42553c8869b93c4a5448e9a2a2ed9fe525 SHA1 209c6a46e4cdd891980115e42ba419e3799f8088 SHA256 7c85e6739a71f5bb23e8de36c88677d772946e61f7285892f7554e37bd2bca76
diff --git a/net-print/cups/cups-1.4.6-r2.ebuild b/net-print/cups/cups-1.4.6-r2.ebuild
new file mode 100644
index 0000000..83e34bd
--- /dev/null
+++ b/net-print/cups/cups-1.4.6-r2.ebuild
@@ -0,0 +1,270 @@
+# 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.6-r2.ebuild,v 1.10 2011/08/07 14:04:11 armin76 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 x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="acl dbus debug gnutls java +jpeg kerberos ldap pam perl php +png python samba slp +ssl static-libs +threads +tiff 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 )
+ 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
+
+ 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
+ #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"
+ 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"
+ # interface hangs using some browsers, bug #325871
+ epatch "${FILESDIR}/${PN}-1.4.6-web-hang.patch"
+
+ # Dan's group fix
+ epatch "${FILESDIR}/${PN}-1.4.1-group_fix.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) \
+ --disable-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.4.6-r21.ebuild b/net-print/cups/cups-1.4.6-r21.ebuild
index 6d4343a..d49c134 100644
--- a/net-print/cups/cups-1.4.6-r21.ebuild
+++ b/net-print/cups/cups-1.4.6-r21.ebuild
@@ -142,6 +142,9 @@ src_prepare() {
# interface hangs using some browsers, bug #325871
epatch "${FILESDIR}/${PN}-1.4.6-web-hang.patch"
+ # Dan's group fix
+ epatch "${FILESDIR}/${PN}-1.4.1-group_fix.patch"
+
AT_M4DIR=config-scripts eaclocal
eautoconf
}
diff --git a/net-print/cups/cups-1.4.6-r1.ebuild b/net-print/cups/cups-1.4.8.ebuild
index d49c134..2b3a607 100644
--- a/net-print/cups/cups-1.4.6-r1.ebuild
+++ b/net-print/cups/cups-1.4.8.ebuild
@@ -1,6 +1,6 @@
# 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.6-r21.ebuild,v 1.2 2011/06/06 21:54:07 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.4.8.ebuild,v 1.1 2011/08/17 20:28:56 dilfridge Exp $
EAPI=3
@@ -139,8 +139,6 @@ src_prepare() {
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"
- # interface hangs using some browsers, bug #325871
- epatch "${FILESDIR}/${PN}-1.4.6-web-hang.patch"
# Dan's group fix
epatch "${FILESDIR}/${PN}-1.4.1-group_fix.patch"
diff --git a/net-print/cups/cups-1.5.0.ebuild b/net-print/cups/cups-1.5.0.ebuild
new file mode 100644
index 0000000..23b4cdf
--- /dev/null
+++ b/net-print/cups/cups-1.5.0.ebuild
@@ -0,0 +1,299 @@
+# 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.ebuild,v 1.1 2011/08/17 20:28:56 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)."
+ die "USB_PRINTER module enabled"
+ 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"
+
+ # Dan's group fix
+ epatch "${FILESDIR}/${PN}-1.5.0-group_fix.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.5.0-group_fix.patch b/net-print/cups/files/cups-1.5.0-group_fix.patch
new file mode 100644
index 0000000..28d3fb5
--- /dev/null
+++ b/net-print/cups/files/cups-1.5.0-group_fix.patch
@@ -0,0 +1,67 @@
+diff -Naur cups-1.5.0/scheduler/auth.c cups-1.5.0-group_fix/scheduler/auth.c
+--- cups-1.5.0/scheduler/auth.c 2011-05-19 22:49:49.000000000 -0500
++++ cups-1.5.0-group_fix/scheduler/auth.c 2011-08-23 18:13:32.000000000 -0500
+@@ -1431,6 +1431,7 @@
+ const char *groupname) /* I - Group name */
+ {
+ int i; /* Looping var */
++ int foundit; /* Whether or not the search returned a positive result. */
+ struct group *group; /* System group info */
+ char junk[33]; /* MD5 password (not used) */
+ #ifdef HAVE_MBR_UID_TO_UUID
+@@ -1452,29 +1453,43 @@
+ return (0);
+
+ /*
+- * Check to see if the user is a member of the named group...
++ * Iterate through all group entries until a match is found.
+ */
+-
+- group = getgrnam(groupname);
+- endgrent();
+-
+- if (group != NULL)
++ setgrent();
++ foundit=0;
++ while(!foundit && (group=getgrent())!=NULL)
+ {
+ /*
+- * Group exists, check it...
++ * If the group name doesn't match, move on...
++ */
++ if(_cups_strcasecmp(groupname, group->gr_name))
++ continue;
++
++ /*
++ * First, check to see if group ID matches the user's group ID.
+ */
++ if(user && group->gr_gid == user->pw_gid)
++ {
++ foundit=1;
++ break;
++ }
+
++ /*
++ * Check to see if the user is listed as a member of the group...
++ */
+ for (i = 0; group->gr_mem[i]; i ++)
+ if (!_cups_strcasecmp(username, group->gr_mem[i]))
+- return (1);
++ {
++ foundit=1;
++ break;
++ }
+ }
++ endgrent();
+
+ /*
+- * Group doesn't exist or user not in group list, check the group ID
+- * against the user's group ID...
++ * If the group membership was confirmed, return.
+ */
+-
+- if (user && group && group->gr_gid == user->pw_gid)
++ if (foundit)
+ return (1);
+
+ #ifdef HAVE_MBR_UID_TO_UUID