From cb3e8c6af7661fbcafdcacc7e0ecdfb610d098fa Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 9 Jun 2018 09:27:03 +0100 Subject: gentoo resync : 09.06.2018 --- net-print/cups/Manifest | 17 +- net-print/cups/cups-2.1.4.ebuild | 344 --------------------- net-print/cups/cups-2.2.6.ebuild | 339 -------------------- net-print/cups/cups-2.2.8.ebuild | 337 ++++++++++++++++++++ net-print/cups/cups-2.3_beta4.ebuild | 340 -------------------- net-print/cups/cups-2.3_beta5.ebuild | 331 ++++++++++++++++++++ net-print/cups/cups-9999.ebuild | 17 +- .../files/cups-1.6.0-dont-compress-manpages.patch | 17 - .../cups/files/cups-1.6.0-fix-install-perms.patch | 23 -- .../cups/files/cups-2.0.3-cross-compile.patch | 30 -- .../cups/files/cups-2.1.2-systemd-socket.patch | 51 --- net-print/cups/files/cupsd.init.d-r2 | 19 -- 12 files changed, 677 insertions(+), 1188 deletions(-) delete mode 100644 net-print/cups/cups-2.1.4.ebuild delete mode 100644 net-print/cups/cups-2.2.6.ebuild create mode 100644 net-print/cups/cups-2.2.8.ebuild delete mode 100644 net-print/cups/cups-2.3_beta4.ebuild create mode 100644 net-print/cups/cups-2.3_beta5.ebuild delete mode 100644 net-print/cups/files/cups-1.6.0-dont-compress-manpages.patch delete mode 100644 net-print/cups/files/cups-1.6.0-fix-install-perms.patch delete mode 100644 net-print/cups/files/cups-2.0.3-cross-compile.patch delete mode 100644 net-print/cups/files/cups-2.1.2-systemd-socket.patch delete mode 100644 net-print/cups/files/cupsd.init.d-r2 (limited to 'net-print/cups') diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest index 8632fed0a454..446c40912294 100644 --- a/net-print/cups/Manifest +++ b/net-print/cups/Manifest @@ -1,22 +1,15 @@ AUX cups-1.4.4-nostrip.patch 487 BLAKE2B efc4b3db44b65a1b0c67c472e467d80b486969396a48443b8e6be007ba991bdf6830b1e36965bae053753440528e1aa58d792c4f42bea8464ffed1179f049960 SHA512 10f46e841aa5646f40564e92b6c5b90a5d27702ea8a4dd8652cfd39834be54feec20a2c8d4fea663b90685865deae17851e57161aad7ff250916ce4accbb01fa -AUX cups-1.6.0-dont-compress-manpages.patch 300 BLAKE2B 9efd83f7fbd07eade96311ffb4a634f0f67197e35b33c3dcb989ca8805d7e17c3dcd4e963aecc2a5bab85061ed8688da8b30e30ee9807e6519bd373572ba96a3 SHA512 f61189be61f2be4963f3feeafe281fcf69ccf968cfddf262b30636e5a09584feadecbdf187bb9206c0cd7b5945053f602a9d715ec4d1a1b766323085407f58a6 -AUX cups-1.6.0-fix-install-perms.patch 833 BLAKE2B 96e76288409fd343f76188724cc64899460fe8cf4baf3f1d17f6d2210fc17e78a98949f0c707bba943e7f8d7c4de7a5c371c97af637ef53ff562083935c1e921 SHA512 b8ffec939651ef2114bb8cf53aad82262ada883cee90efa84f2f8fe73de6b0d3ea0997991e1d002b8c707f2b159cc52d9039282aa0894d73bd8122493c72683c AUX cups-2.0.1-xinetd-installation-fix.patch 332 BLAKE2B 5688eeabaea0d2db636012e658f5cbbf6793138653df731c24c89149553994a2db423f85251385628de2f467597af98baa91ab954f63f77b5f7eec037d8db7af SHA512 e4111fb05ac381f5639868464734fbbc9296252bda288fc415274cb0eda37ff57d4d2816e34960a3e30a1c73c3aa6911267a5d2c29f1480d8e44fdb6e95f3836 AUX cups-2.0.2-rename-systemd-service-files.patch 2092 BLAKE2B c34d8d6c5295aea6eaeb5aea05dcf32a9a554d445ae1b57b8d33386394e1d3f414095d89dc55eb0d4c5678e2985c37451e64101e6426bc2ad26aa50404b51844 SHA512 409a7508dccbbcfca60ba448f8cea84ecb2710890e7655c67b8292c34c8d555884e7e82e70c2c700691af1a786ce0d8c8c799b6fb471a18f1b87eda99eacd9cb -AUX cups-2.0.3-cross-compile.patch 773 BLAKE2B ee7558c0211787c21dd0a3fa3e40ddb6ccbe0802c170a574873e0450126987cb70128b11b2d2ab43ff4b3a25d7e5ae5a551b53e4225ffde6a55010c5460a1f2a SHA512 0a99089f5f6dd231c34a017cfba91182717926943c2865ab0857b2c1aec2efac4e6fc1b9eee9cd1a1f6a99b810f272e8e69bc6fe2275f3d7ff001be3a3bf8ccc -AUX cups-2.1.2-systemd-socket.patch 1542 BLAKE2B 8836cfba795f2af00f700f380afccdcf71b273bac056303a33bbabb6b4716155d92f70ad5a05413363f7993329bb14ee3e06d63d5206f0fcbf6768831bacb64b SHA512 56759eafbac1e9947bcc445c850acd0c176687ae6360bc925bbb62153d4a049143d1d41efb3fcc78bbdeba18b0f11ef9a0c5452ec20fae7ef689518781cac48e AUX cups-2.2.0-dont-compress-manpages.patch 319 BLAKE2B b03a0ab815751055d79475423242bbc407e934cdc00e4596ab05e3d7f87ca0feb7201f6696a8eef59fdb73630431364f12146f1d32743e272de054019acb8380 SHA512 0f4822e50f9376dc2e8c87b55f6526ab514f5f08f737071f5b15696e71b51416203df6c9219d78989544bbc135cd92be91ef351a377be7ab4052e98c25c0c4f5 AUX cups-2.2.6-fix-install-perms.patch 660 BLAKE2B 85c42742762dc72c746550c36160c5fd13b10727fa4e40793b7072c88c3856c580e408180819acc1668da06024b30173fd71f725175981305c739aaa40b7ba65 SHA512 f64ed254bc79935ea3d9fce4c4cd8074445397c20ee1bc1e759e3bc7a336b30f73722357d2702219932e7a774f925abf9a450d3b30a12ca1f0c5f3c92b0b5fbf AUX cups-2.3_rc1-no_pam.patch 4704 BLAKE2B 99d9726f43ebc6ebb7fcaa608b99f435dccdeaa53f8fd6b47b4735c084dec8852ab5b34d06f07293299f13a4d975cf9b5bfc44950910c58c409fdcb71dfec6ea SHA512 f5f0f850a954a970aa5129d518f7b84e1e5fbb57c4bf16d42eb09eac01ebb5280514a580938433525514d5cd57acfcb363aa972d783d7b6b23e8f30e01d5e1b1 -AUX cupsd.init.d-r2 432 BLAKE2B bec86d0a61cfe67b4d760114b703f2b2a9c10a1613cb71eb6aee74e4fdae2ef829086058236279e26c7fff53ba3a037b6cbb0a52ddfaa50c720bb7d98f01acb1 SHA512 d14973383158dd78e4970dce3037b73e812788f9e61ad9348b580cc8891e7ad6c2214709cac4a43829f7010720a755855c8357d1ada11d048deccf59aa4e83d5 AUX cupsd.init.d-r3 584 BLAKE2B f503663a59673209fc6c161aed3cc214cab2b3e68692078dc47c1a833fe141225f48f2d07dab65fc19ea68e54bb7c9a7c94f6db1dac443111d04b392fd7855a4 SHA512 ace66b46c17f99f8c6487188c14e8a1baf7acad602156b88cdae7fb4738c163a045240a1b28c6db4af86caa317723357186812eed81f9553a9ef3517c966c6b3 -DIST cups-2.1.4.tar.gz 9572653 BLAKE2B d01242e8188f8b179e2beebc3730cc32588c4512e56e76be740f6a3e63411f277a6e9b241b27cfa12d3b26743ad9ef6e85f70f66e19d4f4c70593707b1bbaec1 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae -DIST cups-2.2.6.tar.gz 10317889 BLAKE2B 5d9d8a09e73074a8638913c30e163cbed6bbadc4fa0c6b24dd185a2137f3af72aba553b3de62dbf053f9f92f7737efdb5d06e27bfb84225f39d855d830aea02e SHA512 ae880aa3f675e0c1ad269200d06be3c25675a45a697c7a8b44e6ec0c30f05f333acca35cd965e667ff066d753df5e59447c2eeaea240e72d2731690b3b9dcf76 DIST cups-2.2.7-source.tar.gz 10330296 BLAKE2B 015a64758ee8d2559f4259ff36bf702b93dc695a44e2170d4ecf71b80d5691b4d947decf0a84ff9433b43c6d47dc350a8769d1e230ceda276c13add67e5e8a20 SHA512 780a6a484f38967ff678456ec7b532aa8445a9562663e4e4f6f7a24aac6ec9e8eae36459ee3c025dff053d59ad1d9ecfb823e8a832bae9d384db3d1a10d8860e -DIST cups-2.3b4-source.tar.gz 10130356 BLAKE2B 10dd250516bafa1df0e8d123fbfff44f290180771d5d9bca0879ca985435299277d42e2222969cb1d6f9b5e55ad86f3dd7ebd246724edcb257b42ddb3d7e91b4 SHA512 5613b18bfc28c53fb738feb3e0a96ec6b4cec8575479f50dc06f835e109de52af6f5d0c247c84b9b22285e92ea9694839269c27b67c641cc5f81a68a1f818b31 -EBUILD cups-2.1.4.ebuild 10148 BLAKE2B 8c1fb902b3f7531b212c22315869360c30fccfe4f354052386f9e4d8c28df07ffc78de6cb8a3d24c83329d025c2dd385cdcb59cfb58b001f68e77012bb44269f SHA512 29453995a34ccdd7303365d7c2f5abe457e81897080fefd8c42b82f3133d7833774d9276e2f5569f1a268dbd9c28fcaf35b9ae740f32ba1b163d43857546c1ab -EBUILD cups-2.2.6.ebuild 9835 BLAKE2B 0a9b787a1691f452ab5b441b2f4a7afcfbb752ade54648428ec823a80098996c63a3a37200df3204ae01e751eccf7b19cb6d548e4171f4949cf677fb4d6fef81 SHA512 bdf1f5a77acc7ad782603c92ad7bb4aaaff178683edf465dfe88b9ecac8315d3996b0f89869acb6ee60e118b34d1225ac0648d1162b704aff74ad6b4f72f6bcb +DIST cups-2.2.8-source.tar.gz 10374921 BLAKE2B 3fc4d5cae3848cbb7fb1263b377210254dfa08d70a1218c7f20d5a277d0536791e071c50bac282ab2049e1cffddfe91438216ceb37ec279d7cb0ec7b57a315da SHA512 6ed44c5e6f1c46c85b06691713ce476330c93834243720ad2c04fa983e20cde9f6ebfc2eb2ba8bb3700f11320471b99856d6402d3641038da690f89c49fbd261 +DIST cups-2.3b5-source.tar.gz 10176856 BLAKE2B beda07a64ef463371e4e1f25b397caa9487f7acdc982fcfa7edee736a41f6a6875747c772e4c59e2d2746c8c508a0cc87f8608227592f5e1d9c8c48d956ab97c SHA512 48d45f090637bf32bdcc83106272efb8462ff609f74fbe4e82add7f851dcb9173126a1df186848c087d02e8c1441f31a70859faf2714b6ddb1f3738ef8dba60d EBUILD cups-2.2.7.ebuild 9948 BLAKE2B 93f232963bb18833570171402bf98eb67a5dc4ab0a05fd224ce82dc71d12ec2698ea0d5e8ce5dd6030005d3392b053261bf22eee9943618146ba7bb3da8811fa SHA512 6bd4ff2b0c17db27ff65a93a5f3ecb61c2bc5c1e4a48621dbe14ba76dd7fb1fbdc9a4eb10a1f08aa9af57cf3afa0114217bbe84df9f5aca24b9cc47cb5625afd -EBUILD cups-2.3_beta4.ebuild 9877 BLAKE2B 39ada1548f440a4d91602ba56d4451382783e2d851e3b0891ccdae42c54d71915f69cd5fa868c6ed60e266c5ecd4bd73a18f644630b4e196a9942bdb99fd83e3 SHA512 b141f3a9da543989a82af2c1bdef94bc8ee173710e6607efd0c0bbf95ff4e921373aa7cc7ddf739edd32e38b7a8e3052ebfc2737c68a34007f95c8d6393b92e4 -EBUILD cups-9999.ebuild 9877 BLAKE2B 39ada1548f440a4d91602ba56d4451382783e2d851e3b0891ccdae42c54d71915f69cd5fa868c6ed60e266c5ecd4bd73a18f644630b4e196a9942bdb99fd83e3 SHA512 b141f3a9da543989a82af2c1bdef94bc8ee173710e6607efd0c0bbf95ff4e921373aa7cc7ddf739edd32e38b7a8e3052ebfc2737c68a34007f95c8d6393b92e4 +EBUILD cups-2.2.8.ebuild 9897 BLAKE2B cda48fea3fbf39493718b585b2c7a451b57a01ef7d4c888285c2c749d5354880f90cb1705c9e007343fd73688c76de835781aa7008f9c15d9014a13a09f429b0 SHA512 ce22dcbedcd7e6e8366343a2a1ef826fe34bb6403e58ee7fc51a4f7482c1b00a075060a1b1f682e120096ce4a9245b585645f67ebd9f3585a777facdbd5aee02 +EBUILD cups-2.3_beta5.ebuild 9673 BLAKE2B a4b10549bb1e045347580400611de0dc637d23dbab783ff6a6524bfab05a44ea5dc1d9f7f14349028f0843a20ea04ff98fe563c610ad6f5fff00d90110e83029 SHA512 b5024f8e94d6f8e251f54a5c988b512d622ac454a49f84893a900ad63e65dcb565007f95a93b52301e1c0a16ba8cfca06f78edc476fa5c631222fcfed0153bf8 +EBUILD cups-9999.ebuild 9673 BLAKE2B a4b10549bb1e045347580400611de0dc637d23dbab783ff6a6524bfab05a44ea5dc1d9f7f14349028f0843a20ea04ff98fe563c610ad6f5fff00d90110e83029 SHA512 b5024f8e94d6f8e251f54a5c988b512d622ac454a49f84893a900ad63e65dcb565007f95a93b52301e1c0a16ba8cfca06f78edc476fa5c631222fcfed0153bf8 MISC metadata.xml 677 BLAKE2B ca19e7bd0d56a0a78771a30efcbd867cd0ab1eba7aaf3add8d384721ac70ed8809bc8a171df43887d772f81dcfd54f31bc13267a9a3a88da44b51322aff87c15 SHA512 f7ed769c4f662ea52ed9e24702b91948a376e7d5a59b305f6d89950d0ea40130e6d471cc0bee373a63338f590bce3b6df5a09e56a166ba7fdd960f82e7648717 diff --git a/net-print/cups/cups-2.1.4.ebuild b/net-print/cups/cups-2.1.4.ebuild deleted file mode 100644 index f3ca5bc789d9..000000000000 --- a/net-print/cups/cups-2.1.4.ebuild +++ /dev/null @@ -1,344 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) - -inherit autotools fdo-mime gnome2-utils flag-o-matic linux-info \ - multilib multilib-minimal pam python-single-r1 user versionator \ - java-pkg-opt-2 systemd toolchain-funcs - -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-r3 - EGIT_REPO_URI="https://github.com/apple/cups.git" - if [[ ${PV} != 9999 ]]; then - EGIT_BRANCH=branch-${PV/.9999} - fi -else - SRC_URI="https://github.com/apple/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" -fi - -DESCRIPTION="The Common Unix Printing System" -HOMEPAGE="https://www.cups.org/" - -LICENSE="GPL-2" -SLOT="0" -IUSE="acl dbus debug java kerberos lprng-compat pam - python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" - -CDEPEND=" - app-text/libpaper - sys-libs/zlib - acl? ( - kernel_linux? ( - sys-apps/acl - sys-apps/attr - ) - ) - dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) - java? ( >=virtual/jre-1.6:* ) - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) - !lprng-compat? ( !net-print/lprng ) - pam? ( virtual/pam ) - python? ( ${PYTHON_DEPS} ) - ssl? ( - >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] - >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] - ) - systemd? ( sys-apps/systemd ) - usb? ( virtual/libusb:1 ) - X? ( x11-misc/xdg-utils ) - xinetd? ( sys-apps/xinetd ) - zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) -" - -DEPEND="${CDEPEND} - >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] -" - -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-cups ) -" - -PDEPEND=">=net-print/cups-filters-1.0.43" - -REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) - usb? ( threads ) -" - -# upstream includes an interactive test which is a nono for gentoo -RESTRICT="test" - -S="${WORKDIR}/${PN}-release-${MY_PV}" - -# systemd-socket.patch from Fedora -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}-2.0.2-rename-systemd-service-files.patch" - "${FILESDIR}/${PN}-2.1.2-systemd-socket.patch" - "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" - "${FILESDIR}/${PN}-2.0.3-cross-compile.patch" -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/cups-config -) - -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() { - default - - # Remove ".SILENT" rule for verbose output (bug 524338). - sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" - - # Fix install-sh, posix sh does not have 'function'. - sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" - - AT_M4DIR=config-scripts eaclocal - eautoconf - - # custom Makefiles - multilib_copy_sources -} - -multilib_src_configure() { - export DSOFLAGS="${LDFLAGS}" - - einfo LINGUAS=\"${LINGUAS}\" - - local myconf=() - - if tc-is-static-only; then - myconf+=( - --disable-shared - ) - fi - - # explicitly specify compiler wrt bug 524340 - # - # need to override KRB5CONFIG for proper flags - # https://github.com/apple/cups/issues/4423 - econf \ - CC="$(tc-getCC)" \ - CXX="$(tc-getCXX)" \ - KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \ - --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 \ - --with-xinetd=/etc/xinetd.d \ - $(multilib_native_use_enable acl) \ - $(use_enable dbus) \ - $(use_enable debug) \ - $(use_enable debug debug-guards) \ - $(use_enable debug debug-printfs) \ - $(multilib_native_use_with java) \ - $(use_enable kerberos gssapi) \ - $(multilib_native_use_enable pam) \ - $(multilib_native_use_with python python "${PYTHON}") \ - $(use_enable static-libs static) \ - $(use_enable threads) \ - $(use_enable ssl gnutls) \ - $(use_enable systemd) \ - $(multilib_native_use_enable usb libusb) \ - $(use_enable zeroconf avahi) \ - --disable-dnssd \ - --without-perl \ - --without-php \ - $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \ - "${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 -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - emake libs - fi -} - -multilib_src_test() { - multilib_is_native_abi && default -} - -multilib_src_install() { - if multilib_is_native_abi; then - emake BUILDROOT="${D}" install - else - emake BUILDROOT="${D}" install-libs install-headers - dobin cups-config - fi -} - -multilib_src_install_all() { - 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-r2 "${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 - # always configure with --with-xinetd= and clean up later, - # bug #525604 - rm -rf "${ED}"/etc/xinetd.d - fi - - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ - /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 file is now provided by cups-filters: - rm -r "${ED}"/usr/share/cups/banners || die - - # the following are created by the init script - rm -r "${ED}"/var/cache/cups || die - rm -r "${ED}"/run || 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: https://wiki.gentoo.org/wiki/Printing" - 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-2.2.6.ebuild b/net-print/cups/cups-2.2.6.ebuild deleted file mode 100644 index 362712966b7a..000000000000 --- a/net-print/cups/cups-2.2.6.ebuild +++ /dev/null @@ -1,339 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) - -inherit autotools gnome2-utils flag-o-matic linux-info xdg-utils \ - multilib multilib-minimal pam python-single-r1 user versionator \ - java-pkg-opt-2 systemd toolchain-funcs - -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-r3 - EGIT_REPO_URI="https://github.com/apple/cups.git" - if [[ ${PV} != 9999 ]]; then - EGIT_BRANCH=branch-${PV/.9999} - fi -else - SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" -fi - -DESCRIPTION="The Common Unix Printing System" -HOMEPAGE="https://www.cups.org/" - -LICENSE="GPL-2" -SLOT="0" -IUSE="acl dbus debug java kerberos lprng-compat pam - python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" - -CDEPEND=" - app-text/libpaper - sys-libs/zlib - acl? ( - kernel_linux? ( - sys-apps/acl - sys-apps/attr - ) - ) - dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) - java? ( >=virtual/jre-1.6:* ) - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) - !lprng-compat? ( !net-print/lprng ) - pam? ( virtual/pam ) - python? ( ${PYTHON_DEPS} ) - ssl? ( - >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] - ) - systemd? ( sys-apps/systemd ) - usb? ( virtual/libusb:1 ) - X? ( x11-misc/xdg-utils ) - xinetd? ( sys-apps/xinetd ) - zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) -" - -DEPEND="${CDEPEND} - >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] -" - -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-cups ) -" - -PDEPEND=">=net-print/cups-filters-1.0.43" - -REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) - usb? ( threads ) -" - -# upstream includes an interactive test which is a nono for gentoo -RESTRICT="test" - -# systemd-socket.patch from Fedora -PATCHES=( - "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" - "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch" - "${FILESDIR}/${PN}-1.4.4-nostrip.patch" - "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" - "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/cups-config -) - -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; this should now work in most cases (bug 501122) - if use usb; then - if linux_chkconfig_present USB_PRINTER; then - elog "Your USB printers will be managed via libusb. In case you run into problems, " - elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" - elog "usblp kernel module." - elog "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() { - default - - # Remove ".SILENT" rule for verbose output (bug 524338). - sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" - - # Fix install-sh, posix sh does not have 'function'. - sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" - - AT_M4DIR=config-scripts eaclocal - eautoconf - - # custom Makefiles - multilib_copy_sources -} - -multilib_src_configure() { - export DSOFLAGS="${LDFLAGS}" - - einfo LINGUAS=\"${LINGUAS}\" - - local myeconfargs=() - - # explicitly specify compiler wrt bug 524340 - # - # need to override KRB5CONFIG for proper flags - # https://github.com/apple/cups/issues/4423 - myeconfargs+=( - CC="$(tc-getCC)" - CXX="$(tc-getCXX)" - KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config - --libdir="${EPREFIX}"/usr/$(get_libdir) - --localstatedir="${EPREFIX}"/var - --with-exe-file-perm=755 - --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 - --with-xinetd="${EPREFIX}"/etc/xinetd.d - $(multilib_native_use_enable acl) - $(use_enable dbus) - $(use_enable debug) - $(use_enable debug debug-guards) - $(use_enable debug debug-printfs) - $(multilib_native_use_with java) - $(use_enable kerberos gssapi) - $(multilib_native_use_enable pam) - $(multilib_native_use_with python python "${PYTHON}") - $(use_enable static-libs static) - $(use_enable threads) - $(use_enable ssl gnutls) - $(use_enable systemd) - $(multilib_native_use_enable usb libusb) - $(use_enable zeroconf avahi) - --disable-dnssd - --without-perl - --without-php - $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) - ) - - if tc-is-static-only; then - myeconfargs+=( - --disable-shared - ) - fi - - econf "${myeconfargs[@]}" - - # 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 - - # additional path corrections needed for prefix, see bug 597728 - sed -i -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" Makedefs || die - sed -i -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" Makedefs || die - sed -i -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" Makedefs || die - sed -i -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" Makedefs || die -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - emake libs - fi -} - -multilib_src_test() { - multilib_is_native_abi && default -} - -multilib_src_install() { - if multilib_is_native_abi; then - emake BUILDROOT="${D}" install - else - emake BUILDROOT="${D}" install-libs install-headers - dobin cups-config - fi -} - -multilib_src_install_all() { - dodoc {CHANGES,CREDITS,README}.md - - # 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-r3 "${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 - # always configure with --with-xinetd= and clean up later, - # bug #525604 - rm -rf "${ED}"/etc/xinetd.d - fi - - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ - /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 file is now provided by cups-filters: - rm -r "${ED}"/usr/share/cups/banners || die - - # the following are created by the init script - rm -r "${ED}"/var/cache/cups || die - rm -r "${ED}"/run || 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 - xdg_desktop_database_update - - local v - - for v in ${REPLACING_VERSIONS}; do - if ! version_is_at_least 2.2.2-r2 ${v}; then - echo - ewarn "The cupsd init script switched to using pidfiles. Shutting down" - ewarn "cupsd will fail the next time. To fix this, please run once as root" - ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" - echo - break - fi - done - - for v in ${REPLACING_VERSIONS}; do - echo - elog "For information about installing a printer and general cups setup" - elog "take a look at: https://wiki.gentoo.org/wiki/Printing" - echo - break - done -} - -pkg_postrm() { - # Update desktop file database and gtk icon cache (bug 370059) - gnome2_icon_cache_update - xdg_desktop_database_update -} diff --git a/net-print/cups/cups-2.2.8.ebuild b/net-print/cups/cups-2.2.8.ebuild new file mode 100644 index 000000000000..55a2084618d0 --- /dev/null +++ b/net-print/cups/cups-2.2.8.ebuild @@ -0,0 +1,337 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools eapi7-ver gnome2-utils flag-o-matic linux-info xdg-utils multilib multilib-minimal pam python-single-r1 user java-pkg-opt-2 systemd toolchain-funcs + +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-r3 + EGIT_REPO_URI="https://github.com/apple/cups.git" + if [[ ${PV} != 9999 ]]; then + EGIT_BRANCH=branch-${PV/.9999} + fi +else + #SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://github.com/apple/cups/releases/download/v${PV}/${P}-source.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" +fi + +DESCRIPTION="The Common Unix Printing System" +HOMEPAGE="https://www.cups.org/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="acl dbus debug java kerberos lprng-compat pam python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" + +CDEPEND=" + app-text/libpaper + sys-libs/zlib + acl? ( + kernel_linux? ( + sys-apps/acl + sys-apps/attr + ) + ) + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) + java? ( >=virtual/jre-1.6:* ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + !lprng-compat? ( !net-print/lprng ) + pam? ( virtual/pam ) + python? ( ${PYTHON_DEPS} ) + ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd ) + usb? ( virtual/libusb:1 ) + X? ( x11-misc/xdg-utils ) + xinetd? ( sys-apps/xinetd ) + zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) +" + +DEPEND="${CDEPEND} + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-cups ) +" + +PDEPEND=">=net-print/cups-filters-1.0.43" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + usb? ( threads ) +" + +# upstream includes an interactive test which is a nono for gentoo +RESTRICT="test" + +# systemd-socket.patch from Fedora +PATCHES=( + "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" + "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch" + "${FILESDIR}/${PN}-1.4.4-nostrip.patch" + "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" + "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/cups-config +) + +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; this should now work in most cases (bug 501122) + if use usb; then + if linux_chkconfig_present USB_PRINTER; then + elog "Your USB printers will be managed via libusb. In case you run into problems, " + elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" + elog "usblp kernel module." + elog "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() { + default + + # Remove ".SILENT" rule for verbose output (bug 524338). + sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" + + # Fix install-sh, posix sh does not have 'function'. + sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" + + AT_M4DIR=config-scripts eaclocal + eautoconf + + # custom Makefiles + multilib_copy_sources +} + +multilib_src_configure() { + export DSOFLAGS="${LDFLAGS}" + + einfo LINGUAS=\"${LINGUAS}\" + + # explicitly specify compiler wrt bug 524340 + # + # need to override KRB5CONFIG for proper flags + # https://github.com/apple/cups/issues/4423 + local myeconfargs=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config + --libdir="${EPREFIX}"/usr/$(get_libdir) + --localstatedir="${EPREFIX}"/var + --with-exe-file-perm=755 + --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 + --with-xinetd="${EPREFIX}"/etc/xinetd.d + $(multilib_native_use_enable acl) + $(use_enable dbus) + $(use_enable debug) + $(use_enable debug debug-guards) + $(use_enable debug debug-printfs) + $(multilib_native_use_with java) + $(use_enable kerberos gssapi) + $(multilib_native_use_enable pam) + $(multilib_native_use_with python python "${PYTHON}") + $(use_enable static-libs static) + $(use_enable threads) + $(use_enable ssl gnutls) + $(use_enable systemd) + $(multilib_native_use_enable usb libusb) + $(use_enable zeroconf avahi) + --disable-dnssd + --without-perl + --without-php + $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) + ) + + if tc-is-static-only; then + myeconfargs+=( + --disable-shared + ) + fi + + econf "${myeconfargs[@]}" + + # 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 + + # additional path corrections needed for prefix, see bug 597728 + sed \ + -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \ + -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \ + -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \ + -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \ + -i Makedefs || die +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + emake libs + fi +} + +multilib_src_test() { + multilib_is_native_abi && default +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake BUILDROOT="${D}" install + else + emake BUILDROOT="${D}" install-libs install-headers + dobin cups-config + fi +} + +multilib_src_install_all() { + dodoc {CHANGES,CREDITS,README}.md + + # 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-r3 "${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 + # always configure with --with-xinetd= and clean up later, + # bug #525604 + rm -rf "${ED%/}"/etc/xinetd.d + fi + + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ + /var/log/cups /var/spool/cups/tmp + + keepdir /etc/cups/{interfaces,ppd,ssl} + + if ! use X ; then + rm -r "${ED%/}"/usr/share/applications || die + fi + + # create /etc/cups/client.conf, bug #196967 and #266678 + echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED%/}"/etc/cups/client.conf + + # the following file is now provided by cups-filters: + rm -r "${ED%/}"/usr/share/cups/banners || die + + # the following are created by the init script + rm -r "${ED%/}"/var/cache/cups || die + rm -r "${ED%/}"/run || 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 + xdg_desktop_database_update + + local v + + for v in ${REPLACING_VERSIONS}; do + if ! ver_test ${v} -ge 2.2.2-r2 ; then + echo + ewarn "The cupsd init script switched to using pidfiles. Shutting down" + ewarn "cupsd will fail the next time. To fix this, please run once as root" + ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" + echo + break + fi + done + + for v in ${REPLACING_VERSIONS}; do + echo + elog "For information about installing a printer and general cups setup" + elog "take a look at: https://wiki.gentoo.org/wiki/Printing" + echo + break + done +} + +pkg_postrm() { + # Update desktop file database and gtk icon cache (bug 370059) + gnome2_icon_cache_update + xdg_desktop_database_update +} diff --git a/net-print/cups/cups-2.3_beta4.ebuild b/net-print/cups/cups-2.3_beta4.ebuild deleted file mode 100644 index 5a4700f50873..000000000000 --- a/net-print/cups/cups-2.3_beta4.ebuild +++ /dev/null @@ -1,340 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) - -inherit autotools gnome2-utils flag-o-matic linux-info xdg-utils \ - multilib multilib-minimal pam python-single-r1 user versionator \ - systemd toolchain-funcs - -MY_PV="${PV/_rc/rc}" -MY_PV="${MY_PV/_beta/b}" -MY_P="${PN}-${MY_PV}" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/apple/cups.git" - if [[ ${PV} != 9999 ]]; then - EGIT_BRANCH=branch-${PV/.9999} - fi -else - #SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz" - if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" - fi -fi - -DESCRIPTION="The Common Unix Printing System" -HOMEPAGE="https://www.cups.org/" - -LICENSE="Apache-2.0" -SLOT="0" -IUSE="acl dbus debug kerberos lprng-compat pam python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" - -CDEPEND=" - app-text/libpaper - sys-libs/zlib - acl? ( - kernel_linux? ( - sys-apps/acl - sys-apps/attr - ) - ) - dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) - !lprng-compat? ( !net-print/lprng ) - pam? ( virtual/pam ) - python? ( ${PYTHON_DEPS} ) - ssl? ( - >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] - ) - systemd? ( sys-apps/systemd ) - usb? ( virtual/libusb:1 ) - X? ( x11-misc/xdg-utils ) - xinetd? ( sys-apps/xinetd ) - zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) -" - -DEPEND="${CDEPEND} - >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] -" - -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-cups ) -" - -PDEPEND=">=net-print/cups-filters-1.0.43" - -REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) - usb? ( threads ) -" - -# upstream includes an interactive test which is a nono for gentoo -RESTRICT="test" - -# systemd-socket.patch from Fedora -PATCHES=( - "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" - "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch" - "${FILESDIR}/${PN}-1.4.4-nostrip.patch" - "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" - "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/cups-config -) - -S="${WORKDIR}/${MY_P}" - -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; this should now work in most cases (bug 501122) - if use usb; then - if linux_chkconfig_present USB_PRINTER; then - elog "Your USB printers will be managed via libusb. In case you run into problems, " - elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" - elog "usblp kernel module." - elog "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() { - default - - # Remove ".SILENT" rule for verbose output (bug 524338). - sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" - - # Fix install-sh, posix sh does not have 'function'. - sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" - - AT_M4DIR=config-scripts eaclocal - eautoconf - - # custom Makefiles - multilib_copy_sources -} - -multilib_src_configure() { - export DSOFLAGS="${LDFLAGS}" - - einfo LINGUAS=\"${LINGUAS}\" - - # explicitly specify compiler wrt bug 524340 - # - # need to override KRB5CONFIG for proper flags - # https://github.com/apple/cups/issues/4423 - local myeconfargs=( - CC="$(tc-getCC)" - CXX="$(tc-getCXX)" - KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config - --libdir="${EPREFIX}"/usr/$(get_libdir) - --localstatedir="${EPREFIX}"/var - --with-exe-file-perm=755 - --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 - --with-xinetd="${EPREFIX}"/etc/xinetd.d - $(multilib_native_use_enable acl) - $(use_enable dbus) - $(use_enable debug) - $(use_enable debug debug-guards) - $(use_enable debug debug-printfs) - $(use_enable kerberos gssapi) - $(multilib_native_use_enable pam) - $(multilib_native_use_with python python "${PYTHON}") - $(use_enable static-libs static) - $(use_enable threads) - $(use_enable ssl gnutls) - $(use_enable systemd) - $(multilib_native_use_enable usb libusb) - $(use_enable zeroconf avahi) - --disable-dnssd - $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) - ) - - if tc-is-static-only; then - myeconfargs+=( - --disable-shared - ) - fi - - econf "${myeconfargs[@]}" - - # 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 - - # additional path corrections needed for prefix, see bug 597728 - sed \ - -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \ - -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \ - -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \ - -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \ - -i Makedefs || die -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - emake libs - fi -} - -multilib_src_test() { - multilib_is_native_abi && default -} - -multilib_src_install() { - if multilib_is_native_abi; then - emake BUILDROOT="${D}" install - else - emake BUILDROOT="${D}" install-libs install-headers - dobin cups-config - fi -} - -multilib_src_install_all() { - dodoc {CHANGES,CREDITS,README}.md - - # 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-r3 "${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 - # always configure with --with-xinetd= and clean up later, - # bug #525604 - rm -rf "${ED%/}"/etc/xinetd.d - fi - - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ - /var/log/cups /var/spool/cups/tmp - - keepdir /etc/cups/{interfaces,ppd,ssl} - - if ! use X ; then - rm -r "${ED%/}"/usr/share/applications || die - fi - - # create /etc/cups/client.conf, bug #196967 and #266678 - echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED%/}"/etc/cups/client.conf - - # the following file is now provided by cups-filters: - rm -r "${ED%/}"/usr/share/cups/banners || die - - # the following are created by the init script - rm -r "${ED%/}"/var/cache/cups || die - rm -r "${ED%/}"/run || 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 - xdg_desktop_database_update - - local v - - for v in ${REPLACING_VERSIONS}; do - if ! version_is_at_least 2.2.2-r2 ${v}; then - echo - ewarn "The cupsd init script switched to using pidfiles. Shutting down" - ewarn "cupsd will fail the next time. To fix this, please run once as root" - ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" - echo - break - fi - done - - for v in ${REPLACING_VERSIONS}; do - echo - elog "For information about installing a printer and general cups setup" - elog "take a look at: https://wiki.gentoo.org/wiki/Printing" - echo - break - done -} - -pkg_postrm() { - # Update desktop file database and gtk icon cache (bug 370059) - gnome2_icon_cache_update - xdg_desktop_database_update -} diff --git a/net-print/cups/cups-2.3_beta5.ebuild b/net-print/cups/cups-2.3_beta5.ebuild new file mode 100644 index 000000000000..608055933fa8 --- /dev/null +++ b/net-print/cups/cups-2.3_beta5.ebuild @@ -0,0 +1,331 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools eapi7-ver gnome2-utils flag-o-matic linux-info xdg-utils multilib multilib-minimal pam user systemd toolchain-funcs + +MY_PV="${PV/_rc/rc}" +MY_PV="${MY_PV/_beta/b}" +MY_P="${PN}-${MY_PV}" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/apple/cups.git" + if [[ ${PV} != 9999 ]]; then + EGIT_BRANCH=branch-${PV/.9999} + fi +else + #SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz" + if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" + fi +fi + +DESCRIPTION="The Common Unix Printing System" +HOMEPAGE="https://www.cups.org/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="acl dbus debug kerberos lprng-compat pam selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" + +CDEPEND=" + app-text/libpaper + sys-libs/zlib + acl? ( + kernel_linux? ( + sys-apps/acl + sys-apps/attr + ) + ) + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + !lprng-compat? ( !net-print/lprng ) + pam? ( virtual/pam ) + ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd ) + usb? ( virtual/libusb:1 ) + X? ( x11-misc/xdg-utils ) + xinetd? ( sys-apps/xinetd ) + zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) +" + +DEPEND="${CDEPEND} + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-cups ) +" + +PDEPEND=">=net-print/cups-filters-1.0.43" + +REQUIRED_USE=" + usb? ( threads ) +" + +# upstream includes an interactive test which is a nono for gentoo +RESTRICT="test" + +# systemd-socket.patch from Fedora +PATCHES=( + "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" + "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch" + "${FILESDIR}/${PN}-1.4.4-nostrip.patch" + "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" + "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/cups-config +) + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup lp + enewuser lp -1 -1 -1 lp + enewgroup lpadmin 106 + + 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; this should now work in most cases (bug 501122) + if use usb; then + if linux_chkconfig_present USB_PRINTER; then + elog "Your USB printers will be managed via libusb. In case you run into problems, " + elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" + elog "usblp kernel module." + elog "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() { + default + + # Remove ".SILENT" rule for verbose output (bug 524338). + sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" + + # Fix install-sh, posix sh does not have 'function'. + sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" + + AT_M4DIR=config-scripts eaclocal + eautoconf + + # custom Makefiles + multilib_copy_sources +} + +multilib_src_configure() { + export DSOFLAGS="${LDFLAGS}" + + einfo LINGUAS=\"${LINGUAS}\" + + # explicitly specify compiler wrt bug 524340 + # + # need to override KRB5CONFIG for proper flags + # https://github.com/apple/cups/issues/4423 + local myeconfargs=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config + --libdir="${EPREFIX}"/usr/$(get_libdir) + --localstatedir="${EPREFIX}"/var + --with-exe-file-perm=755 + --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 + --with-xinetd="${EPREFIX}"/etc/xinetd.d + $(multilib_native_use_enable acl) + $(use_enable dbus) + $(use_enable debug) + $(use_enable debug debug-guards) + $(use_enable debug debug-printfs) + $(use_enable kerberos gssapi) + $(multilib_native_use_enable pam) + $(use_enable static-libs static) + $(use_enable threads) + $(use_enable ssl gnutls) + $(use_enable systemd) + $(multilib_native_use_enable usb libusb) + $(use_enable zeroconf avahi) + --disable-dnssd + $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) + ) + + if tc-is-static-only; then + myeconfargs+=( + --disable-shared + ) + fi + + econf "${myeconfargs[@]}" + + # 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 + + # additional path corrections needed for prefix, see bug 597728 + sed \ + -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \ + -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \ + -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \ + -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \ + -i Makedefs || die +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + emake libs + fi +} + +multilib_src_test() { + multilib_is_native_abi && default +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake BUILDROOT="${D}" install + else + emake BUILDROOT="${D}" install-libs install-headers + dobin cups-config + fi +} + +multilib_src_install_all() { + dodoc {CHANGES,CREDITS,README}.md + + # 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-r3 "${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 + # always configure with --with-xinetd= and clean up later, + # bug #525604 + rm -rf "${ED%/}"/etc/xinetd.d + fi + + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ + /var/log/cups /var/spool/cups/tmp + + keepdir /etc/cups/{interfaces,ppd,ssl} + + if ! use X ; then + rm -r "${ED%/}"/usr/share/applications || die + fi + + # create /etc/cups/client.conf, bug #196967 and #266678 + echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED%/}"/etc/cups/client.conf + + # the following file is now provided by cups-filters: + rm -r "${ED%/}"/usr/share/cups/banners || die + + # the following are created by the init script + rm -r "${ED%/}"/var/cache/cups || die + rm -r "${ED%/}"/run || 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 + xdg_desktop_database_update + + local v + + for v in ${REPLACING_VERSIONS}; do + if ! ver_test ${v} -ge 2.2.2-r2 ; then + echo + ewarn "The cupsd init script switched to using pidfiles. Shutting down" + ewarn "cupsd will fail the next time. To fix this, please run once as root" + ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" + echo + break + fi + done + + for v in ${REPLACING_VERSIONS}; do + echo + elog "For information about installing a printer and general cups setup" + elog "take a look at: https://wiki.gentoo.org/wiki/Printing" + echo + break + done +} + +pkg_postrm() { + # Update desktop file database and gtk icon cache (bug 370059) + gnome2_icon_cache_update + xdg_desktop_database_update +} diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild index 5a4700f50873..608055933fa8 100644 --- a/net-print/cups/cups-9999.ebuild +++ b/net-print/cups/cups-9999.ebuild @@ -5,9 +5,7 @@ EAPI=6 PYTHON_COMPAT=( python2_7 ) -inherit autotools gnome2-utils flag-o-matic linux-info xdg-utils \ - multilib multilib-minimal pam python-single-r1 user versionator \ - systemd toolchain-funcs +inherit autotools eapi7-ver gnome2-utils flag-o-matic linux-info xdg-utils multilib multilib-minimal pam user systemd toolchain-funcs MY_PV="${PV/_rc/rc}" MY_PV="${MY_PV/_beta/b}" @@ -32,7 +30,7 @@ HOMEPAGE="https://www.cups.org/" LICENSE="Apache-2.0" SLOT="0" -IUSE="acl dbus debug kerberos lprng-compat pam python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" +IUSE="acl dbus debug kerberos lprng-compat pam selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" CDEPEND=" app-text/libpaper @@ -47,10 +45,7 @@ CDEPEND=" kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) !lprng-compat? ( !net-print/lprng ) pam? ( virtual/pam ) - python? ( ${PYTHON_DEPS} ) - ssl? ( - >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] - ) + ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] ) systemd? ( sys-apps/systemd ) usb? ( virtual/libusb:1 ) X? ( x11-misc/xdg-utils ) @@ -69,7 +64,6 @@ RDEPEND="${CDEPEND} PDEPEND=">=net-print/cups-filters-1.0.43" REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) usb? ( threads ) " @@ -96,8 +90,6 @@ pkg_setup() { 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 @@ -176,7 +168,6 @@ multilib_src_configure() { $(use_enable debug debug-printfs) $(use_enable kerberos gssapi) $(multilib_native_use_enable pam) - $(multilib_native_use_with python python "${PYTHON}") $(use_enable static-libs static) $(use_enable threads) $(use_enable ssl gnutls) @@ -314,7 +305,7 @@ pkg_postinst() { local v for v in ${REPLACING_VERSIONS}; do - if ! version_is_at_least 2.2.2-r2 ${v}; then + if ! ver_test ${v} -ge 2.2.2-r2 ; then echo ewarn "The cupsd init script switched to using pidfiles. Shutting down" ewarn "cupsd will fail the next time. To fix this, please run once as root" diff --git a/net-print/cups/files/cups-1.6.0-dont-compress-manpages.patch b/net-print/cups/files/cups-1.6.0-dont-compress-manpages.patch deleted file mode 100644 index a388b4d5e021..000000000000 --- a/net-print/cups/files/cups-1.6.0-dont-compress-manpages.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/config-scripts/cups-manpages.m4 -+++ b/config-scripts/cups-manpages.m4 -@@ -69,10 +69,10 @@ - ;; - Linux* | GNU* | Darwin*) - # Linux, GNU Hurd, and OS X -- MAN1EXT=1.gz -- MAN5EXT=5.gz -- MAN7EXT=7.gz -- MAN8EXT=8.gz -+ MAN1EXT=1 -+ MAN5EXT=5 -+ MAN7EXT=7 -+ MAN8EXT=8 - MAN8DIR=8 - ;; - *) diff --git a/net-print/cups/files/cups-1.6.0-fix-install-perms.patch b/net-print/cups/files/cups-1.6.0-fix-install-perms.patch deleted file mode 100644 index e71934b7d49f..000000000000 --- a/net-print/cups/files/cups-1.6.0-fix-install-perms.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/Makedefs.in -+++ b/Makedefs.in -@@ -40,14 +40,14 @@ - # Installation programs... - # - --INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@ --INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@ -+INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@ -+INSTALL_COMPDATA = $(INSTALL) -c -m 644 @INSTALL_GZIP@ - INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@ --INSTALL_DATA = $(INSTALL) -c -m 444 -+INSTALL_DATA = $(INSTALL) -c -m 644 - INSTALL_DIR = $(INSTALL) -d --INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@ --INSTALL_MAN = $(INSTALL) -c -m 444 --INSTALL_SCRIPT = $(INSTALL) -c -m 555 -+INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@ -+INSTALL_MAN = $(INSTALL) -c -m 644 -+INSTALL_SCRIPT = $(INSTALL) -c -m 755 - - # - # Default user, group, and system groups for the scheduler... diff --git a/net-print/cups/files/cups-2.0.3-cross-compile.patch b/net-print/cups/files/cups-2.0.3-cross-compile.patch deleted file mode 100644 index d0893c31fa7b..000000000000 --- a/net-print/cups/files/cups-2.0.3-cross-compile.patch +++ /dev/null @@ -1,30 +0,0 @@ -we don't actually install the generated html output, so no point in building -them. this also helps cross-compiling because the tool to create the html -uses $CC and has no logic for $BUILD_CC. simpler to disable than fix. - ---- a/man/Makefile -+++ b/man/Makefile -@@ -73,7 +73,7 @@ MAN8 = cupsaccept.$(MAN8EXT) \ - # Make everything... - # - --all: $(MAN1) $(MAN5) $(MAN7) $(MAN8) html -+all: $(MAN1) $(MAN5) $(MAN7) $(MAN8) - - - # - -similarly, the genstrings tool is used to gather all the translatable strings -in the code base for passing to gettext. in our builds, those strings already -exist, so no point in running this tool. - ---- a/ppdc/Makefile -+++ b/ppdc/Makefile -@@ -70,7 +70,6 @@ EXECTARGETS = \ - TARGETS = \ - $(LIBTARGETS) \ - $(EXECTARGETS) \ -- genstrings - - - # diff --git a/net-print/cups/files/cups-2.1.2-systemd-socket.patch b/net-print/cups/files/cups-2.1.2-systemd-socket.patch deleted file mode 100644 index 2f88924ee2d5..000000000000 --- a/net-print/cups/files/cups-2.1.2-systemd-socket.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/scheduler/main.c b/scheduler/main.c -index b1aa503..2f0f5fe 100644 ---- a/scheduler/main.c -+++ b/scheduler/main.c -@@ -656,8 +656,15 @@ main(int argc, /* I - Number of command-line args */ - - #if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD) - if (OnDemand) -+ { - cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand."); -- else -+# ifdef HAVE_SYSTEMD -+ sd_notifyf(0, "READY=1\n" -+ "STATUS=Scheduler is running...\n" -+ "MAINPID=%lu", -+ (unsigned long) getpid()); -+# endif /* HAVE_SYSTEMD */ -+ } else - #endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */ - if (fg) - cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground."); -diff --git a/scheduler/org.cups.cupsd.path.in b/scheduler/org.cups.cupsd.path.in -index 1bccc6f..4564164 100644 ---- a/scheduler/org.cups.cupsd.path.in -+++ b/scheduler/org.cups.cupsd.path.in -@@ -2,7 +2,7 @@ - Description=CUPS Scheduler - - [Path] --PathExists=@CUPS_CACHEDIR@/org.cups.cupsd -+PathExistsGlob=@CUPS_REQUESTS@/d* - - [Install] - WantedBy=multi-user.target -diff --git a/scheduler/org.cups.cupsd.service.in b/scheduler/org.cups.cupsd.service.in -index 0a27c76..0a841a2 100644 ---- a/scheduler/org.cups.cupsd.service.in -+++ b/scheduler/org.cups.cupsd.service.in -@@ -1,10 +1,11 @@ - [Unit] - Description=CUPS Scheduler - Documentation=man:cupsd(8) -+After=network.target - - [Service] - ExecStart=@sbindir@/cupsd -l --Type=simple -+Type=notify - - [Install] - Also=org.cups.cupsd.socket org.cups.cupsd.path diff --git a/net-print/cups/files/cupsd.init.d-r2 b/net-print/cups/files/cupsd.init.d-r2 deleted file mode 100644 index f89263077593..000000000000 --- a/net-print/cups/files/cupsd.init.d-r2 +++ /dev/null @@ -1,19 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation - -description="The Common Unix Printing System daemon" -command="/usr/sbin/cupsd" - -depend() { - use net - @neededservices@ - before nfs - after logger -} - -start_pre() { - checkpath -q -d -m 0775 -o root:lp /var/cache/cups - checkpath -q -d -m 0775 -o root:lp /var/cache/cups/rss - checkpath -q -d -m 0755 -o root:lp /run/cups - checkpath -q -d -m 0511 -o lp:lpadmin /run/cups/certs -} -- cgit v1.2.3