summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hüttel <dilfridge@gentoo.org>2014-01-18 20:09:24 +0000
committerAndreas Hüttel <dilfridge@gentoo.org>2014-01-18 20:09:24 +0000
commit602c540d76f025b833d62ce90b77b326f722db91 (patch)
tree9e531073bfa195b82079e0af777b07d4ebb3d808 /net-print
parentStable for alpha, wrt bug #495650 (diff)
downloadhistorical-602c540d76f025b833d62ce90b77b326f722db91.tar.gz
historical-602c540d76f025b833d62ce90b77b326f722db91.tar.bz2
historical-602c540d76f025b833d62ce90b77b326f722db91.zip
Remove old
Package-Manager: portage-2.2.8/cvs/Linux x86_64 Manifest-Sign-Key: 0xEBE6A336BE19039C!
Diffstat (limited to 'net-print')
-rw-r--r--net-print/cups/ChangeLog7
-rw-r--r--net-print/cups/Manifest37
-rw-r--r--net-print/cups/cups-1.6.2-r5.ebuild305
-rw-r--r--net-print/cups/cups-1.7.0-r1.ebuild308
-rw-r--r--net-print/cups/files/cups-1.6.3-colord-profile.patch32
-rw-r--r--net-print/cups/files/cupsd.init.d22
-rw-r--r--net-print/cups/files/pdftops-1.20.gentoo340
7 files changed, 22 insertions, 1029 deletions
diff --git a/net-print/cups/ChangeLog b/net-print/cups/ChangeLog
index ac4bf307a82d..fe2a58049d46 100644
--- a/net-print/cups/ChangeLog
+++ b/net-print/cups/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-print/cups
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.583 2014/01/18 19:55:10 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.584 2014/01/18 20:09:16 dilfridge Exp $
+
+ 18 Jan 2014; Andreas K. Huettel <dilfridge@gentoo.org> -cups-1.6.2-r5.ebuild,
+ -files/cups-1.6.3-colord-profile.patch, -cups-1.7.0-r1.ebuild,
+ -files/pdftops-1.20.gentoo, -files/cupsd.init.d:
+ Remove old
18 Jan 2014; Agostino Sarubbo <ago@gentoo.org> cups-1.6.4.ebuild:
Stable for alpha, wrt bug #489914
diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 947042ea17d5..3ad250735241 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -6,35 +6,30 @@ AUX cups-1.5.0-systemd-socket-2.patch 12914 SHA256 779a91231b62f6467b3ee08d5cf9c
AUX cups-1.6.0-dont-compress-manpages.patch 435 SHA256 d3e41e8d4a841ac71e5ed8598fc444a2f11b4c94215b55dcf5147694bbbc88c3 SHA512 f004b1e7178212eddefda8416c33514834e0e444243c456a8f0723e763247330b8366e71f64ee0e84196789498c5b22334049a8bec210068e02f06b64b683d7c WHIRLPOOL 1453927d8478c740f74ad9f18ef2bdc3dea30596b59cd5fb2a740942da14bef76a2418c3e536aeaad1cbf5ffb14c72e914ba6726776fe5f23f8b43ef4dedd25f
AUX cups-1.6.0-fix-install-perms.patch 948 SHA256 4a4a885bb2e111bd67bcb90a5780f33841b18bc02382317fb5e64c384aa0c4c8 SHA512 9b2ecc47be2fd08d092017316af39e217e17a540d096cc62971521052632c40033a06cd7bdd5b319bd7f623fea803d569ced6728504d680fd50087288302164f WHIRLPOOL 7d6f4a5eab9964e6c2277f03affaf0eada9b7408eeac742a75d541ec5efe883940c816ea508a59c733327d3bbe0e31bd242b8c183e3f817a54208ed4a3071982
AUX cups-1.6.2-statedir.patch 468 SHA256 52867308281522fce419b704ddf5c2c7c10b670fe4977050cf926f1d2f4259ca SHA512 dd9a609aa3d24d23cbb96f14c0a177d7d571508f63cfc98f7050d11b4ec59162bc48df2875ff2d39de1d1bba79ae0b163b82272fc5a48c1f080baff33502925c WHIRLPOOL 5fce69513834e675bd8c9dc843f75131f452601007f086db40878d0fc5453ebd7c5d06e25f3d556447fb9bf29a1df712f87477561d67d521e973835de1eb94e9
-AUX cups-1.6.3-colord-profile.patch 1461 SHA256 1666a6ac70007bc2a505174daee9993d6df6c3a10afb18d0e86e3fd770961f65 SHA512 b85d0b739e0412834ced80ef90c175098dc692beb31471e34edafcd46c26a88dc21c6fac29e6815e2ed2923eb6303e2e40ed7709ab8de0f88d31a95f0067a00f WHIRLPOOL 32242bfa8cf3947d93e6e501806dec5afcf04fcfea43eb995e2d4da9ffc2f23de806582cca4448cef66cf80ea587f18e81b521367e6b9bd5da04e9aaa5bd59af
-AUX cupsd.init.d 402 SHA256 66b14dffc99900c0db04453765e5bf48cdf0c197c6f50dccf2a55dc66dd0cf95 SHA512 1f71ba4240f5e8735f782dc688f21db5020065eed9063e1f452eeb5c7cef10cf50519c88746ce4b6a3133ce178fe7dd0ac975e5270ec0df95274e4b13627ef1b WHIRLPOOL c3a1be2ac335642ce85940855c4405af1d0e6e0b45f8e121e18ba98402ce5d035a6202e817bf7b03357b7727191ec7c2e7394d6e856df518b4443c5f81eff8de
AUX cupsd.init.d-r1 504 SHA256 4705b68372090ee7db69da1ad35131551ed1ba99032db2486ff6c31d2170ce6b SHA512 9eac4fc725b14615bb31c96a69c00a14ab2fb23fa355f1ced655f93e6364555b2710a277ceab439199a275405b016492b4c9183fab755c02354013e0904a03bc WHIRLPOOL e0ce34f4b73de6e63ba1f01b0df543cd66fecc692af8254acb3dd1147c0cd4e1f42ed7df4b18b26af0114db54c3b8c1bca526ed54146307223ac24a0b3d3502c
-AUX pdftops-1.20.gentoo 10412 SHA256 ac5fa01ca776d75bd7cef62eef9f6b0c3945ee87e8950b40ca9f9f3ff46a16c1 SHA512 ee6179e862ef3561412a246e755a8c4379ca1afca3885412452104e2dbc8335d745cc7a4336f806d2bcd25a466a37751b34ce6283ee5d8682f41107b9e989469 WHIRLPOOL 8ebf6a8ad25485171f3cb55dfbdea4ccf30d56f095554e27f9800e72cefd2ae00dfe58ac28ddd8b8c30ab53e1fe74f4a5451d4b313ebe48b9832bc1a11b6262d
-DIST cups-1.6.2-source.tar.bz2 8363773 SHA256 37a3ebd305e76cfd4c9c53013e89c0f7a4dcb04b2e9da61029a29faa57e0f10d SHA512 08b7ae95af9c19a1bb72f851b801d55a51360a4c2993c34878d18a605bf1d9381eada5a8f51653c4467738f0509bb8ad713b79e78c8d2a80f1aa86f1d2196038 WHIRLPOOL 527f4eb1016ac20e737cb5171c8cb4c71295e36da8704dd97c8d405c1cf31a8861cab4dc1b2c8a37e21f83672b5212bf8ffbf7568bd118e8056aa777d0caa1ba
DIST cups-1.6.4-source.tar.bz2 8262021 SHA256 b910c3e43b2d06f54154d12710e849455d0710c9983dab0a5f49a5e93b1b7e73 SHA512 b150b5915a6ab433546e14024c673372fba04623accc10c637742c83342d73bfb91b9bfbb2e3e6a64a4cc189449ae811eb4a721a994ed42e1a9c489a166f2719 WHIRLPOOL 4152b1b2699af91831f21f308e9836f66649bf6ccaeb03b7fe2fef7017ecaa0907dce5adf7eb7c37af0e6dd10de53f295b29cad52dad38fe1a8c141525b87541
-DIST cups-1.7.0-source.tar.bz2 8421353 SHA256 cf15b8caa9dab4638b628427ef309ab381817fc574b8e736d58680e0475cb2c8 SHA512 764b0fdf9a2d6d1b0be1990f8144ede7cae22a78502776f342fd76ff292ad9ba02dfbcecca5a2c1bf8bfb9597d227bdc953b790ad4eb8380ddcb2c63e4bda915 WHIRLPOOL 78ec4fa7db588ae73e0a8151d78884840c0419b8828c908a6383e259d7d0aec6e5967e7887b03e8ba6317a5572ab9f9feab947ac8f4884f1d51db7049c68da8a
DIST cups-1.7.1-source.tar.bz2 8738002 SHA256 f52bec893d9daf92b6029be79c07e6c516b4c85ffae3e6e01885cc85e9081681 SHA512 e52f98f00e8b2c0eb7a8b29a8ed5e33b14b1a68a18f3f4558e473d8146c2dfd659c9a96ae07257c456d7a34dcc7bcabf858dcf719e8557173c8849d734711e57 WHIRLPOOL b715560357b22d0cc5887059137b79132e1f46a9adc76410d3ad2e8a1a16047fd2179372632f544b1d798a03a3d41410071f09d2ed82aeda66afe789c080cb04
-EBUILD cups-1.6.2-r5.ebuild 8950 SHA256 62b61bdb510ed6be19602a1be3a5f7f38de0930706076eaaab13d534b77538b0 SHA512 82896c9597e929ce23b0abbf1b093f981fc00896f663b129de34a403548a9eb9b2ef6f11c55840dc154719e44676ade9b2c265f35218e7f105a49115fe486ff5 WHIRLPOOL 834ebf4dab854b84bd90ed749a2d0f0af8a5d9425f3f9afd77f0538784830258c1e02af8592fcb43767e46d6587d30171edab99f65b3644827277a8cca422f3c
EBUILD cups-1.6.4.ebuild 9036 SHA256 06ae73d0d378671baca978097bc3c02ae3c9f2260ea14431360486b0a1451a85 SHA512 3c2f4616e9df2e5d8dab6163d6d8ddd6737f55605b82991e0d71ff19109337b202e12c4f7013bf3a28c215a1ff554fa2e68adfff22d670d5ef3a87c82ddf24b9 WHIRLPOOL b085f50042e45218808c6d33cb35c9b4be230d21ff55b6fdcda5c99bc6fcf99b8e6eb20fbbf424b9b4c634b9e45ae1154774158f1b7c3d7b51e83c8c9a4da932
-EBUILD cups-1.7.0-r1.ebuild 9056 SHA256 300074d4c67084036fd2ee1d3b559a9edbe308691991121a3301c28d8e7d8bf6 SHA512 7314c8c42f0111fee15b18a8ed82314fc93fb724c66d82bfaf261308f35e5cc6d5942cbd8677b25932016a00720472bb8f498146122fe4f2ae72e03392766b70 WHIRLPOOL 55026c2d63dd8ef45f63f2cd31cbb1259d3e1fc5e7c0aaeecb0dbacf2b6e27f5e2b25342fbad575f016e11b10095f137561bf177704989df1d697fb17be6dd94
EBUILD cups-1.7.1.ebuild 9222 SHA256 e3c2683ec26b8923f9d31643bdc6a590dd60673936b90ab11645af09c28f209e SHA512 a14af4679db73abe31736ecbb052ade71065eef0aef68cba89505ae5757b03977e12d56d21a71451f68802d9b0962f7061cdd84b30f00ed992c6dbe45a7a0c1e WHIRLPOOL 231887da4825c74f6b26c57acb6d0f5a50e5dacd873f8ac7fd6471490c77003c7c5a78e18f0205c013f5dd2911a8440e518f7fe1871522e69be77902a5f0dfd5
EBUILD cups-9999.ebuild 9211 SHA256 0d3f35345938851bc8149a2cef611d70b032bc2b0ab0434bb86c071320e62b3d SHA512 6c42b81ca0a8211b8db0cf259730aff76a1cca11ea448f765f56734e64b118284d8eb8e337cd06b70793f4e67b64eee8b0ef05a8a4e45ee3661f4cdd930174c8 WHIRLPOOL e41c053d580aa909e1b6e323f9637c954217061cb343c921c158a7667fe5d56049c7d0c92dce3b79a2895fce8be8bb110adc9a33ad0a360bad151d53ed741b67
-MISC ChangeLog 88630 SHA256 6c7d44c4c524ab1b2caca6d925243127472d72f93f17e907f8791eaa46050227 SHA512 15fdb93dd3318d0533939068203b9508dc643fe733bc33a5d02d0214c17a715b419b17a7c9cb47fda7285540285ae69f45b0ad15ef21e94b9327380e18003b0f WHIRLPOOL fc6c3130b8c6dd8f6ac30eb9e6d32694b69482e52781f15c236e97efedee32e8e478df887960c6425c0ace679e6eca5f376cdf2cd1d2979cb23e6437ca4cf6d0
+MISC ChangeLog 88846 SHA256 7d461d1a7c77ae478689f95c084d84b3fa2da2fe758b256cfa279a52a623e0ba SHA512 d0ba557cf22f3b8940739af506648ac17a076f09e6d2aae682518eb2d1c54533756a6047bbcc17fbc250519ca76eb1796adc9a6bd86ca3cebd78bd5a9d408327 WHIRLPOOL d482d848fa67522fe8dec151a20702b38047223a213e6cdcb47fb08064a909d2e14ac8fc8b1b6ca2c8def7823a85502195a94cc8a12df77d3e554651f8d4d2fd
MISC metadata.xml 601 SHA256 9bcf6942c89c7dd963f9a34c413c1da17e25cd36489b95b708d4a89ff9659ea8 SHA512 58f0fe7d1f7b66a637013eeddb26a5c409d46915c8f4220e54850cf17cfa0cb082b3c2c5055a660857729cb4c5a53c7ac229dab6a29f801e53dae0ddc94cb573 WHIRLPOOL 55660efe3345c304742dbb12947776a97ebec51354fbab55423dd1fa7efa1b3d9321f067dfcc469462911e12446892b223ebbd3b670d1126255ffe642a64a527
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCAAGBQJS2twfAAoJELp701BxlEWfmToP/3IyQ7VQ68fmtg7G15ULn/n3
-r7L2jVvI+5eiLCXy+6JaPTpDtxc2K5uMo4AMDhAirtSIMJ1Y5Y05F3OIGCbiS20W
-5isoHmfCZbpqtuUZRqpv2E7LVPWMxJLyfeWetAj/K/LjsM8GZR2Qw+Fn9v/Sw1xJ
-XvO7Py0dabil4NNNckFd1Xt5539S7jm+ENDpcvC6pJkweC/NRev8bsSnqQgdKxZo
-wnA4UiKugDOuh43OWBnuvfmxCbpGRJLv+OJIDjZrXeVYHmWt9n884ckF3feQt7TS
-az7d8zcMFqTwSayqGu2cZ4AJMIjiG0DX8h+xaQmlw6W3R+bsmx0ifNe5mp3rMZ5u
-6cYl2W6F5mx1LxGu7HxRtvV/HwL6udDwsA0gKzyUjc7ZubotI0Y7km0CJ5Cgk+CY
-GrWZeC1laZwp3Re1gBm5e9SKu/0/TCQqtpa7g4fy+ZyFbLKnAxNbeTXCn8db07Ec
-yI+WCifFKcaFpYkJEacwqKMD1sLHINxmlX8PUdCJDWPN1SvPhs+TpYQIs2avMVnq
-Kpk9Hf2FDN9QSAQGLKmHIchoqmgLOaIaD16oPVjzrEongoDwO2zt6M5l2ST8sMyj
-8ec1evI6zH+/ri4c9Rd+gcUCTWCbKY8NRQRSjBl2F5ZffznyCIIuORoVFz2WPFd/
-MdICrOFga2Sq6P37jK39
-=UPZG
+iQJ8BAEBCABmBQJS2t/HXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwNzlCRDk4QzA4RENBRkYzQUEwRjQzMDlF
+QkU2QTMzNkJFMTkwMzlDAAoJEOvmoza+GQOcewsP/2lCf7Ksctql8kYNCxWY5680
+N3O2L/wKOKR/O7FqHWMyDJoJBI57Yuipgt2hb0EEBlmlvfaeuuvUAmn9TeVehVGB
+Y5dYDuCJXPsd24O1FKRrwQ2mRt1SnKLj1OtGWnOj4tql9IE6jR2RKEV6Ma7HJCs5
+e+rYkV4VdsHTbG/1pdiJDHcjvO3yPQBG8Huwf0ivqfeRlrvBWJW+0p5JzglQAvqQ
+Y4rfIKDSbtGBus4OzYT5OieEoYJCKVPPRNkfhuY8JnmR0Ppyr5QOrO90ht7HsSKA
+8vLbkD4YfCRLa5GZUn3T9TsRm1GAbigmJpzbL4xj3GiOUKL+zDQLaComuWtvyhlN
+w8k9cfOADT71NXobbg+chpyof+v31+cwba/BxXYc/CUlbm+ShVAWlRpLzrYq8q6I
+0tX9eYnp+18Wz3GmD8vDcCUprEsk4dqqQ+EjAKMiP7i5td4oAm6VigV/5U5i7PwR
+FY2QgVwTtbCKos2+tps7AsReOg/8iO415UcowCKWVswgyahPorRLpYIAvlwA90Ul
+C+1mac6I4d+jsG3VvEcplobCkfbn3RA9EZ+lU7nUEFlNKol+PdBreNIV8kieOsuE
+DIVV43LiOpygLnRVLgLI51bXReBgO+YRM8KSjfvyc0SKWPMoE7g5I49gOYPjkWvR
+cKUzeRxlDG6yLoO2pwco
+=eor6
-----END PGP SIGNATURE-----
diff --git a/net-print/cups/cups-1.6.2-r5.ebuild b/net-print/cups/cups-1.6.2-r5.ebuild
deleted file mode 100644
index ddac98187b27..000000000000
--- a/net-print/cups/cups-1.6.2-r5.ebuild
+++ /dev/null
@@ -1,305 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.6.2-r5.ebuild,v 1.15 2013/12/26 00:37:12 dilfridge Exp $
-
-EAPI=5
-
-PYTHON_DEPEND="python? 2:2.5"
-
-inherit autotools base fdo-mime gnome2-utils flag-o-matic linux-info multilib pam python user versionator java-pkg-opt-2 systemd
-
-MY_P=${P/_beta/b}
-MY_PV=${PV/_beta/b}
-
-if [[ "${PV}" != "9999" ]]; then
- SRC_URI="http://www.cups.org/software/${MY_PV}/${MY_P}-source.tar.bz2"
- KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
-else
- inherit subversion
- ESVN_REPO_URI="http://svn.easysw.com/public/cups/trunk"
- KEYWORDS=""
-fi
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="http://www.cups.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="acl dbus debug +filters gnutls java kerberos lprng-compat pam
- python selinux +ssl static-libs +threads usb X xinetd zeroconf"
-
-LANGS="ca es fr ja ru"
-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 )
- kerberos? ( virtual/krb5 )
- !lprng-compat? ( !net-print/lprng )
- pam? ( virtual/pam )
- selinux? ( sec-policy/selinux-cups )
- ssl? (
- gnutls? (
- dev-libs/libgcrypt
- net-libs/gnutls
- )
- !gnutls? ( >=dev-libs/openssl-0.9.8g )
- )
- usb? ( virtual/libusb:1 )
- X? ( x11-misc/xdg-utils )
- xinetd? ( sys-apps/xinetd )
- zeroconf? ( net-dns/avahi )
-"
-
-DEPEND="${RDEPEND}
- virtual/pkgconfig
-"
-
-PDEPEND="
- app-text/ghostscript-gpl[cups]
- app-text/poppler[utils]
- >=net-print/cups-filters-1.0.30
- filters? ( net-print/foomatic-filters )
-"
-
-REQUIRED_USE="gnutls? ( ssl )"
-
-# upstream includes an interactive test which is a nono for gentoo
-RESTRICT="test"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.6.0-dont-compress-manpages.patch"
- "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch"
- "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
- "${FILESDIR}/${PN}-1.5.0-systemd-socket-2.patch" # systemd support
- "${FILESDIR}/${PN}-1.6.2-statedir.patch"
-)
-
-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 kernel_linux; then
- 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. In this case, "
- 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 libusb code."
- fi
- fi
- fi
- fi
-}
-
-src_prepare() {
- base_src_prepare
- AT_M4DIR=config-scripts eaclocal
- eautoconf
-}
-
-src_configure() {
- export DSOFLAGS="${LDFLAGS}"
-
- einfo LANGS=\"${LANGS}\"
- einfo LINGUAS=\"${LINGUAS}\"
-
- local myconf
- if use ssl ; then
- myconf+="
- $(use_enable gnutls)
- $(use_enable !gnutls openssl)
- "
- else
- myconf+="
- --disable-gnutls
- --disable-openssl
- "
- fi
-
- econf \
- --libdir="${EPREFIX}"/usr/$(get_libdir) \
- --localstatedir="${EPREFIX}"/var \
- --with-cups-user=lp \
- --with-cups-group=lp \
- --with-docdir="${EPREFIX}"/usr/share/cups/html \
- --with-languages="${LINGUAS}" \
- --with-system-groups=lpadmin \
- $(use_enable acl) \
- $(use_enable zeroconf avahi) \
- $(use_enable dbus) \
- $(use_enable debug) \
- $(use_enable debug debug-guards) \
- $(use_enable kerberos gssapi) \
- $(use_enable pam) \
- $(use_enable static-libs static) \
- $(use_enable threads) \
- $(use_enable usb libusb) \
- --disable-dnssd \
- $(use_with java) \
- --without-perl \
- --without-php \
- $(use_with python) \
- $(use_with xinetd xinetd /etc/xinetd.d) \
- --enable-libpaper \
- --with-systemdsystemunitdir="$(systemd_get_unitdir)" \
- ${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\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
- sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
- sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
-}
-
-src_install() {
- # Fix install-sh, posix sh does not have 'function'.
- sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh"
-
- emake BUILDROOT="${D}" install
- dodoc {CHANGES,CREDITS,README}.txt
-
- # move the default config file to docs
- dodoc "${ED}"/etc/cups/cupsd.conf.default
- rm -f "${ED}"/etc/cups/cupsd.conf.default
-
- # clean out cups init scripts
- rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
-
- # install our init script
- local neededservices
- use zeroconf && neededservices+=" avahi-daemon"
- use dbus && neededservices+=" dbus"
- [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
- cp "${FILESDIR}"/cupsd.init.d-r1 "${T}"/cupsd || die
- sed -i \
- -e "s/@neededservices@/$neededservices/" \
- "${T}"/cupsd || die
- doinitd "${T}"/cupsd
-
- # 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:" \
- "${ED}"/etc/xinetd.d/cups-lpd || die
- # it is safer to disable this by default, bug #137130
- grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
- { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/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 "${ED}"/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/spool/cups/tmp
-
- keepdir /etc/cups/{interfaces,ppd,ssl}
-
- use X || rm -r "${ED}"/usr/share/applications
-
- # create /etc/cups/client.conf, bug #196967 and #266678
- echo "ServerName /run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
-
- # the following files are now provided by cups-filters:
- rm -r "${ED}"/usr/share/cups/banners || die
- rm -r "${ED}"/usr/share/cups/data/testprint || die
-
- # for the special case of running lprng and cups together, bug 467226
- if use lprng-compat ; then
- rm -fv "${ED}"/usr/bin/{lp*,cancel}
- rm -fv "${ED}"/usr/sbin/lp*
- rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*}
- rm -fv "${ED}"/usr/share/man/man8/lp*
- ewarn "Not installing lp... binaries, since the lprng-compat useflag is set."
- ewarn "Unless you plan to install an exotic server setup, you most likely"
- ewarn "do not want this. Disable the useflag then and all will be fine."
- fi
-}
-
-pkg_preinst() {
- gnome2_icon_savelist
-}
-
-pkg_postinst() {
- # Update desktop file database and gtk icon cache (bug 370059)
- gnome2_icon_cache_update
- fdo-mime_desktop_database_update
-
- # not slotted - at most one value
- if ! [[ "${REPLACING_VERSIONS}" ]]; then
- 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
- fi
-
- if [[ "${REPLACING_VERSIONS}" ]] && [[ "${REPLACING_VERSIONS}" < "1.6" ]]; then
- echo
- elog "CUPS-1.6 no longer supports automatic remote printers or implicit classes"
- elog "via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\"."
- elog "You will have to find printers using zeroconf/avahi instead, enter"
- elog "the location manually, or run cups-browsed from net-print/cups-filters"
- elog "which re-adds that functionality as a separate daemon."
- echo
- fi
-
- if [[ "${REPLACING_VERSIONS}" == "1.6.2-r4" ]]; then
- ewarn
- ewarn "You are upgrading from the broken version net-print/cups-1.6.2-r4."
- ewarn "Please rebuild net-print/cups-filters now to make sure everything is OK."
- ewarn
- fi
-}
-
-pkg_postrm() {
- # Update desktop file database and gtk icon cache (bug 370059)
- gnome2_icon_cache_update
- fdo-mime_desktop_database_update
-}
diff --git a/net-print/cups/cups-1.7.0-r1.ebuild b/net-print/cups/cups-1.7.0-r1.ebuild
deleted file mode 100644
index a200d56dd7d0..000000000000
--- a/net-print/cups/cups-1.7.0-r1.ebuild
+++ /dev/null
@@ -1,308 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.7.0-r1.ebuild,v 1.1 2014/01/01 19:15:40 dilfridge Exp $
-
-EAPI=5
-
-PYTHON_COMPAT=( python{2_6,2_7} )
-
-inherit autotools base fdo-mime gnome2-utils flag-o-matic linux-info \
- multilib pam python-single-r1 user versionator java-pkg-opt-2 systemd
-
-MY_P=${P/_rc/rc}
-MY_P=${MY_P/_beta/b}
-MY_PV=${PV/_rc/rc}
-MY_PV=${MY_PV/_beta/b}
-
-if [[ ${PV} == *9999 ]]; then
- inherit git-2
- EGIT_REPO_URI="http://www.cups.org/cups.git"
- if [[ ${PV} != 9999 ]]; then
- EGIT_BRANCH=branch-${PV/.9999}
- fi
- KEYWORDS=""
-else
- SRC_URI="http://www.cups.org/software/${MY_PV}/${MY_P}-source.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-fi
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="http://www.cups.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="acl dbus debug gnutls java kerberos lprng-compat pam
- python selinux +ssl static-libs +threads usb X xinetd zeroconf"
-
-LANGS="ca es fr it ja ru"
-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 )
- kerberos? ( virtual/krb5 )
- !lprng-compat? ( !net-print/lprng )
- pam? ( virtual/pam )
- python? ( ${PYTHON_DEPS} )
- selinux? ( sec-policy/selinux-cups )
- ssl? (
- gnutls? (
- dev-libs/libgcrypt
- net-libs/gnutls
- )
- !gnutls? ( >=dev-libs/openssl-0.9.8g )
- )
- usb? ( virtual/libusb:1 )
- X? ( x11-misc/xdg-utils )
- xinetd? ( sys-apps/xinetd )
- zeroconf? ( net-dns/avahi )
-"
-
-DEPEND="${RDEPEND}
- virtual/pkgconfig
-"
-
-PDEPEND="
- app-text/ghostscript-gpl[cups]
- app-text/poppler[utils]
- >=net-print/cups-filters-1.0.43
-"
-
-REQUIRED_USE="gnutls? ( ssl )
- python? ( ${PYTHON_REQUIRED_USE} )"
-
-# upstream includes an interactive test which is a nono for gentoo
-RESTRICT="test"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.6.0-dont-compress-manpages.patch"
- "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch"
- "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
- "${FILESDIR}/${PN}-1.5.0-systemd-socket-2.patch" # systemd support
-)
-
-pkg_setup() {
- enewgroup lp
- enewuser lp -1 -1 -1 lp
- enewgroup lpadmin 106
-
- use python && python-single-r1_pkg_setup
-
- if use kernel_linux; then
- 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. In this case, "
- 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 libusb code."
- fi
- fi
- fi
- fi
-}
-
-src_prepare() {
- base_src_prepare
- AT_M4DIR=config-scripts eaclocal
- eautoconf
-}
-
-src_configure() {
- export DSOFLAGS="${LDFLAGS}"
-
- einfo LANGS=\"${LANGS}\"
- einfo LINGUAS=\"${LINGUAS}\"
-
- local myconf
- if use ssl ; then
- myconf+="
- $(use_enable gnutls)
- $(use_enable !gnutls openssl)
- "
- else
- myconf+="
- --disable-gnutls
- --disable-openssl
- "
- fi
-
- econf \
- --libdir="${EPREFIX}"/usr/$(get_libdir) \
- --localstatedir="${EPREFIX}"/var \
- --with-rundir="${EPREFIX}"/run/cups \
- --with-cups-user=lp \
- --with-cups-group=lp \
- --with-docdir="${EPREFIX}"/usr/share/cups/html \
- --with-languages="${LINGUAS}" \
- --with-system-groups=lpadmin \
- $(use_enable acl) \
- $(use_enable zeroconf avahi) \
- $(use_enable dbus) \
- $(use_enable debug) \
- $(use_enable debug debug-guards) \
- $(use_enable kerberos gssapi) \
- $(use_enable pam) \
- $(use_enable static-libs static) \
- $(use_enable threads) \
- $(use_enable usb libusb) \
- --disable-dnssd \
- $(use_with java) \
- --without-perl \
- --without-php \
- $(use_with python python "${PYTHON}") \
- $(use_with xinetd xinetd /etc/xinetd.d) \
- --enable-libpaper \
- --with-systemdsystemunitdir="$(systemd_get_unitdir)" \
- ${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\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
- sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
- sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
-}
-
-src_install() {
- # Fix install-sh, posix sh does not have 'function'.
- sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh"
-
- emake BUILDROOT="${D}" install
- dodoc {CHANGES,CREDITS,README}.txt
-
- # move the default config file to docs
- dodoc "${ED}"/etc/cups/cupsd.conf.default
- rm -f "${ED}"/etc/cups/cupsd.conf.default
-
- # clean out cups init scripts
- rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
-
- # install our init script
- local neededservices
- use zeroconf && neededservices+=" avahi-daemon"
- use dbus && neededservices+=" dbus"
- [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
- cp "${FILESDIR}"/cupsd.init.d-r1 "${T}"/cupsd || die
- sed -i \
- -e "s/@neededservices@/$neededservices/" \
- "${T}"/cupsd || die
- doinitd "${T}"/cupsd
-
- # 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:" \
- "${ED}"/etc/xinetd.d/cups-lpd || die
- # it is safer to disable this by default, bug #137130
- grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
- { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/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 "${ED}"/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/spool/cups/tmp
-
- keepdir /etc/cups/{interfaces,ppd,ssl}
-
- use X || rm -r "${ED}"/usr/share/applications
-
- # create /etc/cups/client.conf, bug #196967 and #266678
- echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
-
- # the following files are now provided by cups-filters:
- rm -r "${ED}"/usr/share/cups/banners || die
- rm -r "${ED}"/usr/share/cups/data/testprint || die
-
- # for the special case of running lprng and cups together, bug 467226
- if use lprng-compat ; then
- rm -fv "${ED}"/usr/bin/{lp*,cancel}
- rm -fv "${ED}"/usr/sbin/lp*
- rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*}
- rm -fv "${ED}"/usr/share/man/man8/lp*
- ewarn "Not installing lp... binaries, since the lprng-compat useflag is set."
- ewarn "Unless you plan to install an exotic server setup, you most likely"
- ewarn "do not want this. Disable the useflag then and all will be fine."
- fi
-}
-
-pkg_preinst() {
- gnome2_icon_savelist
-}
-
-pkg_postinst() {
- # Update desktop file database and gtk icon cache (bug 370059)
- gnome2_icon_cache_update
- fdo-mime_desktop_database_update
-
- # not slotted - at most one value
- if ! [[ "${REPLACING_VERSIONS}" ]]; then
- 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
- fi
-
- if [[ "${REPLACING_VERSIONS}" ]] && [[ "${REPLACING_VERSIONS}" < "1.6" ]]; then
- echo
- elog "CUPS-1.6 no longer supports automatic remote printers or implicit classes"
- elog "via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\"."
- elog "You will have to find printers using zeroconf/avahi instead, enter"
- elog "the location manually, or run cups-browsed from net-print/cups-filters"
- elog "which re-adds that functionality as a separate daemon."
- echo
- fi
-
- if [[ "${REPLACING_VERSIONS}" == "1.6.2-r4" ]]; then
- ewarn
- ewarn "You are upgrading from the broken version net-print/cups-1.6.2-r4."
- ewarn "Please rebuild net-print/cups-filters now to make sure everything is OK."
- ewarn
- fi
-}
-
-pkg_postrm() {
- # Update desktop file database and gtk icon cache (bug 370059)
- gnome2_icon_cache_update
- fdo-mime_desktop_database_update
-}
diff --git a/net-print/cups/files/cups-1.6.3-colord-profile.patch b/net-print/cups/files/cups-1.6.3-colord-profile.patch
deleted file mode 100644
index c03968099446..000000000000
--- a/net-print/cups/files/cups-1.6.3-colord-profile.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Description: Add colord profile fix
-Author: Alexey Galakhov <agalakhov@gmail.com>
-Bug-Debian: http://bugs.debian.org/711868
-Last-Update: 2013-06-10
-
---- cups-1.6.2.orig/scheduler/colorman.c 2013-02-20 05:53:01.000000000 +0600
-+++ cups-1.6.2/scheduler/colorman.c 2013-06-10 18:50:49.000000000 +0600
-@@ -84,10 +84,13 @@
- # define COLORD_KIND_PRINTER "printer"
- /* printing output device */
-
--# define COLORD_DBUS_MSG(p,m) dbus_message_new_method_call(\
-+# define COLORD_DBUS_MSG_PARM(p,x,m) dbus_message_new_method_call(\
- "org.freedesktop.ColorManager", (p),\
-- "org.freedesktop.ColorManager", (m))
-+ "org.freedesktop.ColorManager" x, (m))
- /* Macro to make new colord messages */
-+# define COLORD_DBUS_MSG(p,m) COLORD_DBUS_MSG_PARM(p,"",m)
-+ /* Macro to make new colord messages */
-+
- # define COLORD_DBUS_PATH "/org/freedesktop/ColorManager"
- /* Path for color management system */
- # define COLORD_DBUS_TIMEOUT 5000 /* Timeout for connecting to colord in ms */
-@@ -1177,7 +1180,7 @@
- DBusError error; /* D-Bus error */
-
-
-- message = COLORD_DBUS_MSG(device_path, "AddProfile");
-+ message = COLORD_DBUS_MSG_PARM(device_path, ".Device", "AddProfile");
-
- dbus_message_iter_init_append(message, &args);
- dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &relation);
diff --git a/net-print/cups/files/cupsd.init.d b/net-print/cups/files/cupsd.init.d
deleted file mode 100644
index 1e9ccf8381c9..000000000000
--- a/net-print/cups/files/cupsd.init.d
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/runscript
-
-depend() {
- use net
- @neededservices@
- before nfs
- after logger
-}
-
-start() {
- ebegin "Starting cupsd"
- checkpath -q -d -m 0755 -o root:lp /var/run/cups
- checkpath -q -d -m 0511 -o lp:lpadmin /var/run/cups/certs
- start-stop-daemon --start --quiet --exec /usr/sbin/cupsd
- eend $?
-}
-
-stop() {
- ebegin "Stopping cupsd"
- start-stop-daemon --stop --quiet --exec /usr/sbin/cupsd
- eend $?
-}
diff --git a/net-print/cups/files/pdftops-1.20.gentoo b/net-print/cups/files/pdftops-1.20.gentoo
deleted file mode 100644
index 8fdafe34a674..000000000000
--- a/net-print/cups/files/pdftops-1.20.gentoo
+++ /dev/null
@@ -1,340 +0,0 @@
-#!/usr/bin/perl -w
-# pdftops.pl - wrapper script for xpdf's pdftops utility to act as a CUPS filter
-# ==============================================================================
-# 1.00 - 2004-10-05/Bl
-# Initial implementation
-# 1.10 - 2006-09-27/Bl
-# Alternatively, use Adobe Reader in place of Xpdf's pdftops
-# 1.20 - 2007-12-03/Bl
-# Safe temp file creation (fix gentoo bug # 201042)
-#
-# Copyright: Helge Blischke / SRZ Berlin 2004-2006
-# This program is free seoftware and governed by the GNU Public License Version 2.
-#
-# Description:
-# ------------
-# This program wraps the pdftops utility from the xpdf 3.00 (and higher) suite
-# to behave as a CUPS filter as a replacement for the original pdftops filter.
-# As an alternative the Adobe Reader may be used.
-#
-# The main purpose of this approach is to keep the properties of a PDF to be
-# printed as undesturbed as possible, especially with respect to page size,
-# scaling, and positioning.
-#
-# The pdftops utility reads a configuration file 'pdftops.conf' or 'acroread.conf',
-# respectively, in the CUPS_SERVERROOT directory, which must exist but may be empty.
-# The sample configuration file accompanying this program sets the defaults which
-# seem plausible to me with respect to high end production printers.
-#
-# To give the user highest possible flexibility, this program accepts and
-# evaluates a set of job attributes special to this filter, which are
-# described below:
-#
-# pdf-pages=<f>,<l>
-# expands to the -f and -l options of pdftops
-# or the -start and -end options of acroread, respectively
-# to select a page range to process. This is independent
-# of the page-ranges attribute and may significantly
-# increase throughput when printing page ranges.
-# Either of these numbers may be omitted.
-#
-# pdf-paper=<name>
-# For pdftops, <name> may be one of "letter", "legal",
-# "A4", "A3", or "match"; for acroread, the permetted values
-# are "letter", "legal", "tabloid", "ledger", "executive",
-# "a3", "a4", "a5", "b4", "b5", respectively (without the
-# quotes; the names are treated case independent).
-# In case of acroread, no paper specification is equivalent
-# to pdsftops's "match".
-# pdf-paper=<width>x<height>
-# <name> may be one of letter, legal , A4, A3, or match;
-# <width> and <height> are the paper width and height
-# in printers points (1/72 inch). This expands to
-# either the -paper or the -paperh and -paperw options
-# of pdftops or the -size option of acroread.
-#
-# pdf-opw=<password>
-# pdf-upw=<password>
-# expand to the -opw and -upw options of pdftops,
-# respectively and permit printing of password
-# protected PDFs.
-#
-# pdf-<option> where <option> is one of
-# level1, level1sep, level2, level2sep, level3, level3sep,
-# opi, nocrop, expand, noshrink, nocenter.
-# See the pdftops manpage for a detailed description of
-# the respective options.
-# In case of acroread, the options level1, level?sep, opi,
-# nocrop, noshrink, and nocenter are silently ignored.
-#
-# All other pdftops commandline options are refused.
-#
-# The return code of the pdftops utility or acroread, if nonzero, is used as the exit code
-# of this program; error messages of the pdftops utility are only visible
-# if 'debug' is specified as LogLevel in cupsd.conf.
-#
-# NOTE:
-# -----
-# This wrapper script has been initially designed to use the original pdftops utility
-# as a CUPS filter and now extended to alternately use acroread.
-# But there are situations where you need to be able to select either variant, thus it
-# is possible to configure the wrapper to both programs but select one of them by default;
-# the other one then may be selected by command line option:
-#
-# use-pdftops selects pdftops
-# use-acroread selects acroread
-#
-# if both are configured (by defining the appropriate configuration file).
-#
-
-#
-# Site specific parameters - modify as needed
-# ----------------------------------------------------------------------------------
-$pdftops_path = "/usr/bin/pdftops"; # path to the xpdf utility
-$acroread_path = "/opt/bin/acroread"; # path to Adobe Reader
-$default_app = 'use-pdftops'; # the default if both are configured
-$use_pdftops = 1; # default on gentoo and highly recommended
-$use_acroread = 0; # not supported/working on gentoo yet, use at your own risk
-# ----------------------------------------------------------------------------------
-
-use File::Temp qw( tempfile );
-
-#
-# Check which app to use - pdftops or acroread
-#
-$rootdir = $ENV{CUPS_SERVERROOT} || die ("ERROR: CUPS server root directory undefined\n");
-$use_both = $use_pdftops && $use_acroread;
-
-#
-# Check the arguments
-#
-die ("ERROR: wrong number of arguments\n") if (scalar @ARGV < 5);
-
-$jobid = $username = $title = $copies = undef;
-$jobid = shift; # Job ID
-$username = shift; # Job requesting user name
-$title = shift; # Job title
-$copies = shift; # Number of requested copies
-$options = shift; # Textual representation of job attributes
-$pdffile = shift; # Pathname of PDF file to process
-
-if (defined $use_both && $use_both)
-{
- my $optstr = " $options ";
- my $to_use = '';
- if ($optstr =~ /\s+(use-acroread|use-pdftops)\s+/)
- {
- $to_use = $1;
- }
- else
- {
- $to_use = $default_app;
- }
- if ($to_use eq 'use-acroread')
- {
- undef $use_pdftops;
- }
- elsif ($to_use eq 'use-pdftops')
- {
- undef $use_acroread;
- }
- else
- {
- die ("ERROR: cannot use both pdftops and acroread simultaneously\n");
- }
-}
-
-
-if (defined $use_pdftops)
-{
- # If we are reading from STDIN, we must copy the input to a temporary file
- # as the PDF consumer needs a seekable input.
- if (! defined $pdffile)
- {
- my $template = "pdfinXXXXXX";
- my $tmpdir = $ENV{TMPDIR};
- my ($bytes, $buffer);
- my ($tmpfh, $tmpfile) = tempfile ($template, OPEN => 1, DIR => $tmpdir, UNLINK => 0, SUFFIX => '.tmp');
- while (($bytes = read (STDIN, $buffer, 1024)) > 0)
- {
- print $tmpfh "$buffer";
- }
- if ($bytes < 0)
- {
- close ($tmpfh);
- unlink $tmpfile;
- die ("ERROR: pdftops wrapper: $tmpfile: $!\n");
- }
- close ($tmpfh);
- $pdffile = $tmpfile;
- $delete_input = 1; # for deleting the temp file after converting
- }
-}
-
-
-#
-# Check the options string for options to modify the bahaviour of the pdftops utility:
-#
-@optarr = split (/\s+/, $options);
-if (defined $use_pdftops)
-{
- $cmdopt = ""; # do not pass the -cfg argument to the poppler pdftops util
- # The following are the (parameterless) command line options that may be used to change the
- # defaults defiend by pdftops.conf
- $simple = 'level1|level1sep|level2|level2sep|level3|level3sep|opi|nocrop|expand|noshrink|nocenter';
- %papernames = (
- 'letter' => '-paper letter',
- 'tabloid' => '-paperw 792 -paperh 1224',
- 'ledger' => '-paperw 1224 -paperh 792',
- 'legal' => '-paper legal',
- 'executive' => '-paperw 756 -paperh 522',
- 'a3' => '-paper A3',
- 'a4' => '-paper A4',
- 'a5' => '-paperw 421 -paperh 595',
- 'b4' => '-paperw 709 -paperh 1002',
- 'b5' => '-paperw 501 -paperh 709',
- 'match' => '-paper match'
- );
-}
-else
-{
- open (CFG, "<$rootdir/acroread.conf") || die ("ERROR: acroread.conf: $!\n");
- $cmdopt = '-toPostScript';
- while (<CFG>)
- {
- chomp;
- next if (/^\s*#/); # skip comment lines
- next if (/^\s*$/); # skip blank lines
- s/^-\s*//; # discard leading '-' and white space, as it will be generated later
- s/\s+$//; # discard trailing white space
- $cmdopt .= " -$_";
- }
- close (CFG);
- $simple = 'level1|level1sep|level2|level2sep|level3|level3sep|opi|nocrop|expand|noshrink|nocenter';
- %papernames = (
- 'letter' => '-size letter',
- 'tabloid' => '-size tabloid',
- 'ledger' => '-size ledger',
- 'legal' => '-size legal',
- 'executive' => '-size executive',
- 'a3' => '-size a3',
- 'a4' => '-size a4',
- 'a5' => '-size a5',
- 'b4' => '-size b4',
- 'b5' => '-size b5',
- 'match' => '' # this is the default with acroread
- );
-}
-
-foreach my $option (@optarr)
-{
- if ($option =~ /^pdf-(.+)$/)
- { # We assume this is an option to evaluate
- my $optkey = $1; # possible pdftops option
- if ($optkey =~ /^pages=(\d*),(\d*)$/)
- {
- # We do this hack here to avoid clashes with the page-ranges atrribute
- # which is handled by the pstops filter. And we allow one of the numbers
- # to be omitted.
- my $first = $1;
- my $lastp = $2;
- if (defined $use_pdftops)
- {
- $cmdopt .= " -f $1" if ($1); # first page
- $cmdopt .= " -l $2" if ($2); # last page
- }
- else
- {
- $cmdopt .= " -start $1" if ($1); # first page
- $cmdopt .= " -end $2" if ($2); # last page
- }
- }
- elsif ($optkey =~ /^paper=(letter|tabloid|ledger|legal|[Aa]3|[Aa]4|[Aa]5|[Bb]4|[Bb]5|match)$/)
- {
- # evaluate paper name
- my $paper = $1;
- $paper =~ tr/A-Z/a-z/;
- my $value = $papernames{$paper};
- $cmdopt .= " $value" if ($value);
- }
- elsif ($optkey =~ /^paper=(\d+)x(\d+)$/)
- {
- # evaluate paper dimensions
- if (defined $use_pdftops)
- {
- $cmdopt .= " -paperw $1 -paperh $2";
- }
- else
- {
- $cmdopt .= " -size $1" . 'x' . "$2";
- }
- }
- elsif ($optkey =~ /^(o|u)pw=(\S+)$/)
- {
- $cmdopt .= " $1" . 'pw ' . $2 if (defined $use_pdftops); # owner/user password
- }
- elsif ($optkey =~ /^($simple)$/)
- {
- my $thisopt = $1;
- if (defined $use_pdftops)
- {
- $cmdopt .= ' -' . $1; # allowed simple options
- }
- else
- {
- $thisopt =~ s/sep$//; # ignore the ...sep suffix
- if ($thisopt =~ /level1|opi|nocrop|nocenter/)
- {
- $thisopt = '';
- }
- elsif ($thisopt eq 'noshrink')
- {
- $thisopt = '';
- $cmdopt =~ s/ -shrink//;
- }
- $cmdopt .= " -" . $thisopt if ($thisopt);
- }
- }
- else
- {
- warn ("ERROR: pdftops wrapper: illegal attribute \"pdf-$optkey\"\n");
- }
- }
- # All other attributes are processed elsewhere
-}
-#
-# Complete the command
-#
-if (defined $use_pdftops)
-{
- warn ("ERROR: pdftops-options: $cmdopt\n");
-}
-else
-{
- warn ("ERROR: acroread-options: $cmdopt\n");
-}
-if (defined $use_pdftops)
-{
- $rc = system ("$pdftops_path $cmdopt $pdffile -");
-}
-else
-{
- if (defined $pdffile && $pdffile)
- {
- $rc = system ("$acroread_path $cmdopt < $pdffile")
- }
- else
- {
- $rc = system ("$acroread_path $cmdopt");
- }
-}
-if ($rc)
-{
- $ir = $rc & 127;
- $rc >>= 8;
- my $temp = (defined $use_pdftops) ? $pdftops_path : $acroread_path;
- warn ("ERROR: $temp exited with ", ($ir) ? "signal $ir, " : " exit code $rc", "\n");
- exit $rc;
-}
-unlink ($pdffile) if (defined $delete_input); # Delete the temp file if any
-exit 0;