summaryrefslogtreecommitdiff
path: root/net-print
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-29 16:53:27 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-03-29 16:53:27 +0100
commit1173ad5704ce725916e0c332416aff326d850d06 (patch)
treed48d60977ce19864893dfb2222bf2982ffb4262a /net-print
parent8c364c784966be1700ea39ae45028f3e9be9cae0 (diff)
gentoo resync : 29.03.2018
Diffstat (limited to 'net-print')
-rw-r--r--net-print/Manifest.gzbin6753 -> 6748 bytes
-rw-r--r--net-print/cups/Manifest10
-rw-r--r--net-print/cups/cups-2.2.7.ebuild (renamed from net-print/cups/cups-2.2.4.ebuild)60
-rw-r--r--net-print/cups/cups-2.3_beta4.ebuild345
-rw-r--r--net-print/cups/cups-9999.ebuild72
-rw-r--r--net-print/cups/files/cups-2.2.4-fix-install-perms.patch18
-rw-r--r--net-print/cups/files/cups-2.3_rc1-no_pam.patch164
7 files changed, 582 insertions, 87 deletions
diff --git a/net-print/Manifest.gz b/net-print/Manifest.gz
index 230abf59cd5a..eb80864a595b 100644
--- a/net-print/Manifest.gz
+++ b/net-print/Manifest.gz
Binary files differ
diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index a236c5a22b6b..410c92c66d17 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -6,15 +6,17 @@ AUX cups-2.0.2-rename-systemd-service-files.patch 2092 BLAKE2B c34d8d6c5295aea6e
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.4-fix-install-perms.patch 646 BLAKE2B 576fd182ebb1b7a74325871e9782ad9538d33c088b42c872199870fd7a1b0a75dcc0dafd8f608f8b876cefa46fcf0f522ec0e31ed3394f6bb3fbd0d2d59b54e1 SHA512 8ead1792208d0190aff22ec1c648e215ab456435c3ecb135b0318585789009cb27b67de939164637f58563fbed809c25ba1a39e39232e17e9470133ead387a5d
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.4.tar.gz 9984903 BLAKE2B c605c4c9a6b7ae8be5b33392980f18c95bd22e83e2b6707de59accb4b7649c92ca7bc46c747253096e22d07dd8e54c970b787c35fa235bb89d7f5179aadf1474 SHA512 765fe49d1a7a491d7d5db051f73d039d183d0f7a560e9fd89f6732b8a699d3246080e1aaed4ddfed3a9fbdb876b09aa22939d6ee5da2280b1246e4ba933c55f0
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 10275 BLAKE2B b94862bd0d4320f13aeac959a1433a234e544a3a659d45a9426d5245c275252bb1dc1f9f7345fa4126bcfa66665118640de57113ffeafe37518871d78cca8b25 SHA512 344b4afec144bc7c41b6abf05d3edc7bc154bff78ec26c8360f8d22b6ca93d99f4dfbba7dd0601a25cb29286572b082888dca9d94baa9cbbd81726be12549055
-EBUILD cups-2.2.4.ebuild 9962 BLAKE2B cc4e87d5620fbca33d28abf5a0d139b27aae4934964067175be7555044f1cc4bd7d3202255c5cbe3e516ae0960b180f37ef548f1b56034bb12518719d6ef0c26 SHA512 5d665941e7f6dbe3d86e3f3390b29566a267ac38d0501fe5228885a5488c91eee88ed1aeed294b2919a289cba5cbbd3e87feaee7ec5befa483f177a701467eab
EBUILD cups-2.2.6.ebuild 9962 BLAKE2B 3588e4b816ae0f0d60ca5d6f738552a9af92e245de957e8978482ade9f6d1a175c5616cd50b54625a97dbb97245f2c84826370b04db19f5b2d79b7d8dbb69fcc SHA512 7a8573928c49de88d7d14ca997a4eeddd0a96f36a7f00bf8f240425cafc2cef219ce8eaa1239c837d23d3a11694628bb1f9f822ce595dfc5f87b10697c61542c
-EBUILD cups-9999.ebuild 9962 BLAKE2B 3588e4b816ae0f0d60ca5d6f738552a9af92e245de957e8978482ade9f6d1a175c5616cd50b54625a97dbb97245f2c84826370b04db19f5b2d79b7d8dbb69fcc SHA512 7a8573928c49de88d7d14ca997a4eeddd0a96f36a7f00bf8f240425cafc2cef219ce8eaa1239c837d23d3a11694628bb1f9f822ce595dfc5f87b10697c61542c
+EBUILD cups-2.2.7.ebuild 9957 BLAKE2B afa6181c1cf3123eaebc75048dd5f0816415c4c9b5586b69bb84103f62011ff4258c63b5916c85e540f26656ea410f725244f3506e619d879b6577a735a0b4b0 SHA512 425ef7271c595c7a11f134dc8024fc68e1198345bdad4307e001f8e4ed84f9b34064f338bb167f1ce0aec1ddf65bced6995888683b591a15a5bedde0c0005769
+EBUILD cups-2.3_beta4.ebuild 9997 BLAKE2B 07e259552a3b98846b008a9fe97eab0102555a901358f78f914cea30c56ab6b883c2b9c3f2476037afc7c363531af0c5570434ac15b138b64be8112573b8dd6e SHA512 0d7ad1dcc59d1ef25ff5f4c18b71dd46ef41ed3aee3a1ea65dd5ff9146aac9cd3270efbdfd168e4e56c7387153dc5d9633d839b70ff14e55d17ba183340e0652
+EBUILD cups-9999.ebuild 9997 BLAKE2B 07e259552a3b98846b008a9fe97eab0102555a901358f78f914cea30c56ab6b883c2b9c3f2476037afc7c363531af0c5570434ac15b138b64be8112573b8dd6e SHA512 0d7ad1dcc59d1ef25ff5f4c18b71dd46ef41ed3aee3a1ea65dd5ff9146aac9cd3270efbdfd168e4e56c7387153dc5d9633d839b70ff14e55d17ba183340e0652
MISC metadata.xml 677 BLAKE2B ca19e7bd0d56a0a78771a30efcbd867cd0ab1eba7aaf3add8d384721ac70ed8809bc8a171df43887d772f81dcfd54f31bc13267a9a3a88da44b51322aff87c15 SHA512 f7ed769c4f662ea52ed9e24702b91948a376e7d5a59b305f6d89950d0ea40130e6d471cc0bee373a63338f590bce3b6df5a09e56a166ba7fdd960f82e7648717
diff --git a/net-print/cups/cups-2.2.4.ebuild b/net-print/cups/cups-2.2.7.ebuild
index 012595d890aa..23b3b6a01ce3 100644
--- a/net-print/cups/cups-2.2.4.ebuild
+++ b/net-print/cups/cups-2.2.7.ebuild
@@ -21,7 +21,8 @@ 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/${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
@@ -56,10 +57,6 @@ CDEPEND="
X? ( x11-misc/xdg-utils )
xinetd? ( sys-apps/xinetd )
zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
- abi_x86_32? (
- !<=app-emulation/emul-linux-x86-baselibs-20140508
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
- )
"
DEPEND="${CDEPEND}
@@ -83,10 +80,11 @@ RESTRICT="test"
# systemd-socket.patch from Fedora
PATCHES=(
"${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
- "${FILESDIR}/${PN}-2.2.4-fix-install-perms.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"
+ "${FILESDIR}/${PN}-2.3_rc1-no_pam.patch" #651878
)
MULTILIB_CHOST_TOOLS=(
@@ -153,13 +151,11 @@ multilib_src_configure() {
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+=(
+ local myeconfargs=(
CC="$(tc-getCC)"
CXX="$(tc-getCXX)"
KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
@@ -209,10 +205,12 @@ multilib_src_configure() {
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
+ 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() {
@@ -240,11 +238,11 @@ 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
+ 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}
+ rm -rf "${ED%/}"/etc/{init.d/cups,rc*,pam.d/cups}
# install our init script
local neededservices
@@ -253,7 +251,7 @@ multilib_src_install_all() {
[[ -n ${neededservices} ]] && neededservices="need${neededservices}"
cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die
sed -i \
- -e "s/@neededservices@/$neededservices/" \
+ -e "s/@neededservices@/${neededservices}/" \
"${T}"/cupsd || die
doinitd "${T}"/cupsd
@@ -264,16 +262,16 @@ multilib_src_install_all() {
# correct path
sed -i \
-e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
- "${ED}"/etc/xinetd.d/cups-lpd || die
+ "${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 ; }
+ 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
+ rm -rf "${ED%/}"/etc/xinetd.d
fi
keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
@@ -281,24 +279,26 @@ multilib_src_install_all() {
keepdir /etc/cups/{interfaces,ppd,ssl}
- use X || rm -r "${ED}"/usr/share/applications
+ 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
+ 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
+ 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
+ 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*
+ 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."
diff --git a/net-print/cups/cups-2.3_beta4.ebuild b/net-print/cups/cups-2.3_beta4.ebuild
new file mode 100644
index 000000000000..b971a2a2cdcf
--- /dev/null
+++ b/net-print/cups/cups-2.3_beta4.ebuild
@@ -0,0 +1,345 @@
+# 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_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 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
+)
+
+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)
+ $(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 ! 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-9999.ebuild b/net-print/cups/cups-9999.ebuild
index b3f5292bcee6..b971a2a2cdcf 100644
--- a/net-print/cups/cups-9999.ebuild
+++ b/net-print/cups/cups-9999.ebuild
@@ -9,10 +9,9 @@ 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}
+MY_PV="${PV/_rc/rc}"
+MY_PV="${MY_PV/_beta/b}"
+MY_P="${PN}-${MY_PV}"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
@@ -21,14 +20,17 @@ 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"
+ #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="GPL-2"
+LICENSE="Apache-2.0"
SLOT="0"
IUSE="acl dbus debug java kerberos lprng-compat pam
python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
@@ -56,10 +58,6 @@ CDEPEND="
X? ( x11-misc/xdg-utils )
xinetd? ( sys-apps/xinetd )
zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
- abi_x86_32? (
- !<=app-emulation/emul-linux-x86-baselibs-20140508
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
- )
"
DEPEND="${CDEPEND}
@@ -93,6 +91,8 @@ MULTILIB_CHOST_TOOLS=(
/usr/bin/cups-config
)
+S="${WORKDIR}/${MY_P}"
+
pkg_setup() {
enewgroup lp
enewuser lp -1 -1 -1 lp
@@ -153,13 +153,11 @@ multilib_src_configure() {
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+=(
+ local myeconfargs=(
CC="$(tc-getCC)"
CXX="$(tc-getCXX)"
KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
@@ -209,10 +207,12 @@ multilib_src_configure() {
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
+ 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() {
@@ -240,11 +240,11 @@ 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
+ 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}
+ rm -rf "${ED%/}"/etc/{init.d/cups,rc*,pam.d/cups}
# install our init script
local neededservices
@@ -253,7 +253,7 @@ multilib_src_install_all() {
[[ -n ${neededservices} ]] && neededservices="need${neededservices}"
cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die
sed -i \
- -e "s/@neededservices@/$neededservices/" \
+ -e "s/@neededservices@/${neededservices}/" \
"${T}"/cupsd || die
doinitd "${T}"/cupsd
@@ -264,16 +264,16 @@ multilib_src_install_all() {
# correct path
sed -i \
-e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
- "${ED}"/etc/xinetd.d/cups-lpd || die
+ "${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 ; }
+ 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
+ rm -rf "${ED%/}"/etc/xinetd.d
fi
keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
@@ -281,24 +281,26 @@ multilib_src_install_all() {
keepdir /etc/cups/{interfaces,ppd,ssl}
- use X || rm -r "${ED}"/usr/share/applications
+ 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
+ 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
+ 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
+ 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*
+ 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."
diff --git a/net-print/cups/files/cups-2.2.4-fix-install-perms.patch b/net-print/cups/files/cups-2.2.4-fix-install-perms.patch
deleted file mode 100644
index b9fda922d2c6..000000000000
--- a/net-print/cups/files/cups-2.2.4-fix-install-perms.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- cups-2.2.4/Makedefs.in
-+++ cups-2.2.4/Makedefs.in
-@@ -39,12 +39,12 @@
- #
-
- INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
--INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@
-+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 @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
--INSTALL_MAN = $(INSTALL) -c -m 444
-+INSTALL_MAN = $(INSTALL) -c -m 644
- INSTALL_SCRIPT = $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@
-
- #
diff --git a/net-print/cups/files/cups-2.3_rc1-no_pam.patch b/net-print/cups/files/cups-2.3_rc1-no_pam.patch
new file mode 100644
index 000000000000..17e69ab7b0ac
--- /dev/null
+++ b/net-print/cups/files/cups-2.3_rc1-no_pam.patch
@@ -0,0 +1,164 @@
+From 3cd7b5e053f8100da1ca8d8daf93976cca3516ef Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <michael.r.sweet@gmail.com>
+Date: Fri, 23 Feb 2018 13:21:56 -0500
+Subject: [PATCH] Fix builds without PAM (Issue #5253)
+
+--- a/scheduler/auth.c
++++ b/scheduler/auth.c
+@@ -67,9 +68,6 @@ static int check_authref(cupsd_client_t *con, const char *right);
+ static int compare_locations(cupsd_location_t *a,
+ cupsd_location_t *b);
+ static cupsd_authmask_t *copy_authmask(cupsd_authmask_t *am, void *data);
+-#if !HAVE_LIBPAM
+-static char *cups_crypt(const char *pw, const char *salt);
+-#endif /* !HAVE_LIBPAM */
+ static void free_authmask(cupsd_authmask_t *am, void *data);
+ #if HAVE_LIBPAM
+ static int pam_func(int, const struct pam_message **,
+@@ -690,14 +688,14 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
+ * client...
+ */
+
+- pass = cups_crypt(password, pw->pw_passwd);
++ pass = crypt(password, pw->pw_passwd);
+
+ if (!pass || strcmp(pw->pw_passwd, pass))
+ {
+ # ifdef HAVE_SHADOW_H
+ if (spw)
+ {
+- pass = cups_crypt(password, spw->sp_pwdp);
++ pass = crypt(password, spw->sp_pwdp);
+
+ if (pass == NULL || strcmp(spw->sp_pwdp, pass))
+ {
+@@ -1991,129 +1989,6 @@ copy_authmask(cupsd_authmask_t *mask, /* I - Existing auth mask */
+ }
+
+
+-#if !HAVE_LIBPAM
+-/*
+- * 'cups_crypt()' - Encrypt the password using the DES or MD5 algorithms,
+- * as needed.
+- */
+-
+-static char * /* O - Encrypted password */
+-cups_crypt(const char *pw, /* I - Password string */
+- const char *salt) /* I - Salt (key) string */
+-{
+- if (!strncmp(salt, "$1$", 3))
+- {
+- /*
+- * Use MD5 passwords without the benefit of PAM; this is for
+- * Slackware Linux, and the algorithm was taken from the
+- * old shadow-19990827/lib/md5crypt.c source code... :(
+- */
+-
+- int i; /* Looping var */
+- unsigned long n; /* Output number */
+- int pwlen; /* Length of password string */
+- const char *salt_end; /* End of "salt" data for MD5 */
+- char *ptr; /* Pointer into result string */
+- _cups_md5_state_t state; /* Primary MD5 state info */
+- _cups_md5_state_t state2; /* Secondary MD5 state info */
+- unsigned char digest[16]; /* MD5 digest result */
+- static char result[120]; /* Final password string */
+-
+-
+- /*
+- * Get the salt data between dollar signs, e.g. $1$saltdata$md5.
+- * Get a maximum of 8 characters of salt data after $1$...
+- */
+-
+- for (salt_end = salt + 3; *salt_end && (salt_end - salt) < 11; salt_end ++)
+- if (*salt_end == '$')
+- break;
+-
+- /*
+- * Compute the MD5 sum we need...
+- */
+-
+- pwlen = strlen(pw);
+-
+- _cupsMD5Init(&state);
+- _cupsMD5Append(&state, (unsigned char *)pw, pwlen);
+- _cupsMD5Append(&state, (unsigned char *)salt, salt_end - salt);
+-
+- _cupsMD5Init(&state2);
+- _cupsMD5Append(&state2, (unsigned char *)pw, pwlen);
+- _cupsMD5Append(&state2, (unsigned char *)salt + 3, salt_end - salt - 3);
+- _cupsMD5Append(&state2, (unsigned char *)pw, pwlen);
+- _cupsMD5Finish(&state2, digest);
+-
+- for (i = pwlen; i > 0; i -= 16)
+- _cupsMD5Append(&state, digest, i > 16 ? 16 : i);
+-
+- for (i = pwlen; i > 0; i >>= 1)
+- _cupsMD5Append(&state, (unsigned char *)((i & 1) ? "" : pw), 1);
+-
+- _cupsMD5Finish(&state, digest);
+-
+- for (i = 0; i < 1000; i ++)
+- {
+- _cupsMD5Init(&state);
+-
+- if (i & 1)
+- _cupsMD5Append(&state, (unsigned char *)pw, pwlen);
+- else
+- _cupsMD5Append(&state, digest, 16);
+-
+- if (i % 3)
+- _cupsMD5Append(&state, (unsigned char *)salt + 3, salt_end - salt - 3);
+-
+- if (i % 7)
+- _cupsMD5Append(&state, (unsigned char *)pw, pwlen);
+-
+- if (i & 1)
+- _cupsMD5Append(&state, digest, 16);
+- else
+- _cupsMD5Append(&state, (unsigned char *)pw, pwlen);
+-
+- _cupsMD5Finish(&state, digest);
+- }
+-
+- /*
+- * Copy the final sum to the result string and return...
+- */
+-
+- memcpy(result, salt, (size_t)(salt_end - salt));
+- ptr = result + (salt_end - salt);
+- *ptr++ = '$';
+-
+- for (i = 0; i < 5; i ++, ptr += 4)
+- {
+- n = ((((unsigned)digest[i] << 8) | (unsigned)digest[i + 6]) << 8);
+-
+- if (i < 4)
+- n |= (unsigned)digest[i + 12];
+- else
+- n |= (unsigned)digest[5];
+-
+- to64(ptr, n, 4);
+- }
+-
+- to64(ptr, (unsigned)digest[11], 2);
+- ptr += 2;
+- *ptr = '\0';
+-
+- return (result);
+- }
+- else
+- {
+- /*
+- * Use the standard crypt() function...
+- */
+-
+- return (crypt(pw, salt));
+- }
+-}
+-#endif /* !HAVE_LIBPAM */
+-
+-
+ /*
+ * 'free_authmask()' - Free function for auth masks.
+ */