Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
Date: Thu, 29 Dec 2016 18:52:18
Message-Id: 1483037529.092b1bc43277abe35e537772ff7a404fd9a4a420.polynomial-c@gentoo
1 commit: 092b1bc43277abe35e537772ff7a404fd9a4a420
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 29 18:50:39 2016 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 29 18:52:09 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=092b1bc4
7
8 net-print/cups: Bump to version 2.2.1 (bug #594458).
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 net-print/cups/Manifest | 1 +
13 net-print/cups/cups-2.2.1.ebuild | 351 +++++++++++++++++++++
14 .../files/cups-2.2.0-dont-compress-manpages.patch | 17 +
15 3 files changed, 369 insertions(+)
16
17 diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
18 index 5599f94..6c830a1 100644
19 --- a/net-print/cups/Manifest
20 +++ b/net-print/cups/Manifest
21 @@ -2,3 +2,4 @@ DIST cups-2.0.3-source.tar.bz2 8797220 SHA256 bc3167048690a7379f29a37d9fbd2143cf
22 DIST cups-2.0.4-source.tar.bz2 8799274 SHA256 e1d5e68d9f24faca317aeaebc164c34102813bc0f1d69c00b3a59b49c49f4abd SHA512 d0db3ce729ee893f260b69814343e84af4b934f1783d96049fcf58204a93ac534d0bf0c1626f5ac55371962419b91c857bd872f499e905223069b5103405c4ae WHIRLPOOL cbeb3f61cf534017180aa0d55f60ec81ac082f92d3626b18b4480aaf9e67b425b829ad260dfa1227ba56a79b52959f1e740848d26dc938fc9fc0159f1844a2bb
23 DIST cups-2.1.3-source.tar.bz2 8832400 SHA256 36a70d43584aea2617da914b9331e23341c3501a8254c4d2eae9c11ec01fd4d3 SHA512 5cc715b8521b4d6af29a97a8abf7a1b0973840c00727ee8e7926e89a4a9da8e67565d14cc4b57ab7cfb40b238d4faaed7608b9ab95947cc3671ed87b710f8f36 WHIRLPOOL 161c65b8adc3ab1c65208fe23bf14aefe5dfd84e9b162c69b1a8f977c3a4fc7c31ea92d0c2eaca3c276fa192596a31701052f0c2a1ffd213a09d48c11d446f6f
24 DIST cups-2.1.4.tar.gz 9572653 SHA256 1f182f145489e2454969b221056b6b9bac2beb4e38cd75fa12a9ec15d24d5301 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae WHIRLPOOL 217b9024c34369c8839b0a1b2b3924eb00e9b8d87cfd8d50a59ad0c33c1044f53d479246d67dff4598049efd15259def90e4bcddc6c3c20dff38811e159d2c4b
25 +DIST cups-2.2.1.tar.gz 9485107 SHA256 e5864ac2f984a0f8dcb8c1e3a71740f8e4727da73944f93c7ef84adeccc1d971 SHA512 b7f10fcb0bbf1eb977d1568032f660ad4aedb25c0195fa133e1c5b365df8fc38170d9c3fcfeeac3e1a2541cba5ac7218ea17736c601802cffcfb446a4a578ce8 WHIRLPOOL 14080b7cf9791db12b462eb5a7d05cc4218560b0a95d2caedd1ca71996a524f3ad7ea0d65b14a14414a7359f15b112f8ba2d6f5fa489d6d3f5873a902c0cef4c
26
27 diff --git a/net-print/cups/cups-2.2.1.ebuild b/net-print/cups/cups-2.2.1.ebuild
28 new file mode 100644
29 index 00000000..d795683
30 --- /dev/null
31 +++ b/net-print/cups/cups-2.2.1.ebuild
32 @@ -0,0 +1,351 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=6
38 +
39 +PYTHON_COMPAT=( python2_7 )
40 +
41 +inherit autotools fdo-mime gnome2-utils flag-o-matic linux-info \
42 + multilib multilib-minimal pam python-single-r1 user versionator \
43 + java-pkg-opt-2 systemd toolchain-funcs
44 +
45 +MY_P=${P/_rc/rc}
46 +MY_P=${MY_P/_beta/b}
47 +MY_PV=${PV/_rc/rc}
48 +MY_PV=${MY_PV/_beta/b}
49 +
50 +if [[ ${PV} == *9999 ]]; then
51 + inherit git-r3
52 + EGIT_REPO_URI="http://www.cups.org/cups.git"
53 + if [[ ${PV} != 9999 ]]; then
54 + EGIT_BRANCH=branch-${PV/.9999}
55 + fi
56 +else
57 + SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
58 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
59 +fi
60 +
61 +DESCRIPTION="The Common Unix Printing System"
62 +HOMEPAGE="http://www.cups.org/"
63 +
64 +LICENSE="GPL-2"
65 +SLOT="0"
66 +IUSE="acl dbus debug java kerberos lprng-compat pam
67 + python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
68 +
69 +LANGS="ca cs de es fr it ja ru"
70 +for X in ${LANGS} ; do
71 + IUSE="${IUSE} +linguas_${X}"
72 +done
73 +
74 +CDEPEND="
75 + app-text/libpaper
76 + acl? (
77 + kernel_linux? (
78 + sys-apps/acl
79 + sys-apps/attr
80 + )
81 + )
82 + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
83 + java? ( >=virtual/jre-1.6:* )
84 + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
85 + !lprng-compat? ( !net-print/lprng )
86 + pam? ( virtual/pam )
87 + python? ( ${PYTHON_DEPS} )
88 + ssl? (
89 + >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}]
90 + >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
91 + )
92 + systemd? ( sys-apps/systemd )
93 + usb? ( virtual/libusb:1 )
94 + X? ( x11-misc/xdg-utils )
95 + xinetd? ( sys-apps/xinetd )
96 + zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
97 + abi_x86_32? (
98 + !<=app-emulation/emul-linux-x86-baselibs-20140508
99 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
100 + )
101 +"
102 +
103 +DEPEND="${CDEPEND}
104 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
105 +"
106 +
107 +RDEPEND="${CDEPEND}
108 + selinux? ( sec-policy/selinux-cups )
109 +"
110 +
111 +PDEPEND=">=net-print/cups-filters-1.0.43"
112 +
113 +REQUIRED_USE="
114 + python? ( ${PYTHON_REQUIRED_USE} )
115 + usb? ( threads )
116 +"
117 +
118 +# upstream includes an interactive test which is a nono for gentoo
119 +RESTRICT="test"
120 +
121 +# systemd-socket.patch from Fedora
122 +PATCHES=(
123 + "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
124 + "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch"
125 + "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
126 + "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
127 + "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
128 + "${FILESDIR}/${PN}-2.0.3-cross-compile.patch"
129 +)
130 +
131 +MULTILIB_CHOST_TOOLS=(
132 + /usr/bin/cups-config
133 +)
134 +
135 +pkg_setup() {
136 + enewgroup lp
137 + enewuser lp -1 -1 -1 lp
138 + enewgroup lpadmin 106
139 +
140 + use python && python-single-r1_pkg_setup
141 +
142 + if use kernel_linux; then
143 + linux-info_pkg_setup
144 + if ! linux_config_exists; then
145 + ewarn "Can't check the linux kernel configuration."
146 + ewarn "You might have some incompatible options enabled."
147 + else
148 + # recheck that we don't have usblp to collide with libusb
149 + if use usb; then
150 + if linux_chkconfig_present USB_PRINTER; then
151 + eerror "Your usb printers will be managed via libusb. In this case, "
152 + eerror "${P} requires the USB_PRINTER support disabled."
153 + eerror "Please disable it:"
154 + eerror " CONFIG_USB_PRINTER=n"
155 + eerror "in /usr/src/linux/.config or"
156 + eerror " Device Drivers --->"
157 + eerror " USB support --->"
158 + eerror " [ ] USB Printer support"
159 + eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)."
160 + fi
161 + else
162 + #here we should warn user that he should enable it so he can print
163 + if ! linux_chkconfig_present USB_PRINTER; then
164 + ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
165 + ewarn "support in your kernel."
166 + ewarn "Please enable it:"
167 + ewarn " CONFIG_USB_PRINTER=y"
168 + ewarn "in /usr/src/linux/.config or"
169 + ewarn " Device Drivers --->"
170 + ewarn " USB support --->"
171 + ewarn " [*] USB Printer support"
172 + ewarn "Alternatively, enable the usb useflag for cups and use the libusb code."
173 + fi
174 + fi
175 + fi
176 + fi
177 +}
178 +
179 +src_prepare() {
180 + default
181 +
182 + # Remove ".SILENT" rule for verbose output (bug 524338).
183 + sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed"
184 +
185 + # Fix install-sh, posix sh does not have 'function'.
186 + sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh"
187 +
188 + AT_M4DIR=config-scripts eaclocal
189 + eautoconf
190 +
191 + # custom Makefiles
192 + multilib_copy_sources
193 +}
194 +
195 +multilib_src_configure() {
196 + export DSOFLAGS="${LDFLAGS}"
197 +
198 + einfo LANGS=\"${LANGS}\"
199 + einfo LINGUAS=\"${LINGUAS}\"
200 +
201 + local myconf=()
202 +
203 + if tc-is-static-only; then
204 + myconf+=(
205 + --disable-shared
206 + )
207 + fi
208 +
209 + # explicitly specify compiler wrt bug 524340
210 + #
211 + # need to override KRB5CONFIG for proper flags
212 + # https://www.cups.org/str.php?L4423
213 + econf \
214 + CC="$(tc-getCC)" \
215 + CXX="$(tc-getCXX)" \
216 + KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \
217 + --libdir="${EPREFIX}"/usr/$(get_libdir) \
218 + --localstatedir="${EPREFIX}"/var \
219 + --with-rundir="${EPREFIX}"/run/cups \
220 + --with-cups-user=lp \
221 + --with-cups-group=lp \
222 + --with-docdir="${EPREFIX}"/usr/share/cups/html \
223 + --with-languages="${LINGUAS}" \
224 + --with-system-groups=lpadmin \
225 + --with-xinetd=/etc/xinetd.d \
226 + $(multilib_native_use_enable acl) \
227 + $(use_enable dbus) \
228 + $(use_enable debug) \
229 + $(use_enable debug debug-guards) \
230 + $(use_enable debug debug-printfs) \
231 + $(multilib_native_use_with java) \
232 + $(use_enable kerberos gssapi) \
233 + $(multilib_native_use_enable pam) \
234 + $(multilib_native_use_with python python "${PYTHON}") \
235 + $(use_enable static-libs static) \
236 + $(use_enable threads) \
237 + $(use_enable ssl gnutls) \
238 + $(use_enable systemd) \
239 + $(multilib_native_use_enable usb libusb) \
240 + $(use_enable zeroconf avahi) \
241 + --disable-dnssd \
242 + --without-perl \
243 + --without-php \
244 + $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \
245 + "${myconf[@]}"
246 +
247 + # install in /usr/libexec always, instead of using /usr/lib/cups, as that
248 + # makes more sense when facing multilib support.
249 + sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
250 + sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
251 + sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
252 +}
253 +
254 +multilib_src_compile() {
255 + if multilib_is_native_abi; then
256 + default
257 + else
258 + emake libs
259 + fi
260 +}
261 +
262 +multilib_src_test() {
263 + multilib_is_native_abi && default
264 +}
265 +
266 +multilib_src_install() {
267 + if multilib_is_native_abi; then
268 + emake BUILDROOT="${D}" install
269 + else
270 + emake BUILDROOT="${D}" install-libs install-headers
271 + dobin cups-config
272 + fi
273 +}
274 +
275 +multilib_src_install_all() {
276 + dodoc {CHANGES,CREDITS,README}.txt
277 +
278 + # move the default config file to docs
279 + dodoc "${ED}"/etc/cups/cupsd.conf.default
280 + rm -f "${ED}"/etc/cups/cupsd.conf.default
281 +
282 + # clean out cups init scripts
283 + rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
284 +
285 + # install our init script
286 + local neededservices
287 + use zeroconf && neededservices+=" avahi-daemon"
288 + use dbus && neededservices+=" dbus"
289 + [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
290 + cp "${FILESDIR}"/cupsd.init.d-r2 "${T}"/cupsd || die
291 + sed -i \
292 + -e "s/@neededservices@/$neededservices/" \
293 + "${T}"/cupsd || die
294 + doinitd "${T}"/cupsd
295 +
296 + # install our pam script
297 + pamd_mimic_system cups auth account
298 +
299 + if use xinetd ; then
300 + # correct path
301 + sed -i \
302 + -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
303 + "${ED}"/etc/xinetd.d/cups-lpd || die
304 + # it is safer to disable this by default, bug #137130
305 + grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
306 + { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; }
307 + # write permission for file owner (root), bug #296221
308 + fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed"
309 + else
310 + # always configure with --with-xinetd= and clean up later,
311 + # bug #525604
312 + rm -rf "${ED}"/etc/xinetd.d
313 + fi
314 +
315 + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
316 + /var/log/cups /var/spool/cups/tmp
317 +
318 + keepdir /etc/cups/{interfaces,ppd,ssl}
319 +
320 + use X || rm -r "${ED}"/usr/share/applications
321 +
322 + # create /etc/cups/client.conf, bug #196967 and #266678
323 + echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
324 +
325 + # the following file is now provided by cups-filters:
326 + rm -r "${ED}"/usr/share/cups/banners || die
327 +
328 + # the following are created by the init script
329 + rm -r "${ED}"/var/cache/cups || die
330 + rm -r "${ED}"/run || die
331 +
332 + # for the special case of running lprng and cups together, bug 467226
333 + if use lprng-compat ; then
334 + rm -fv "${ED}"/usr/bin/{lp*,cancel}
335 + rm -fv "${ED}"/usr/sbin/lp*
336 + rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*}
337 + rm -fv "${ED}"/usr/share/man/man8/lp*
338 + ewarn "Not installing lp... binaries, since the lprng-compat useflag is set."
339 + ewarn "Unless you plan to install an exotic server setup, you most likely"
340 + ewarn "do not want this. Disable the useflag then and all will be fine."
341 + fi
342 +}
343 +
344 +pkg_preinst() {
345 + gnome2_icon_savelist
346 +}
347 +
348 +pkg_postinst() {
349 + # Update desktop file database and gtk icon cache (bug 370059)
350 + gnome2_icon_cache_update
351 + fdo-mime_desktop_database_update
352 +
353 + # not slotted - at most one value
354 + if ! [[ "${REPLACING_VERSIONS}" ]]; then
355 + echo
356 + elog "For information about installing a printer and general cups setup"
357 + elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
358 + echo
359 + fi
360 +
361 + if [[ "${REPLACING_VERSIONS}" ]] && [[ "${REPLACING_VERSIONS}" < "1.6" ]]; then
362 + echo
363 + elog "CUPS-1.6 no longer supports automatic remote printers or implicit classes"
364 + elog "via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\"."
365 + elog "You will have to find printers using zeroconf/avahi instead, enter"
366 + elog "the location manually, or run cups-browsed from net-print/cups-filters"
367 + elog "which re-adds that functionality as a separate daemon."
368 + echo
369 + fi
370 +
371 + if [[ "${REPLACING_VERSIONS}" == "1.6.2-r4" ]]; then
372 + ewarn
373 + ewarn "You are upgrading from the broken version net-print/cups-1.6.2-r4."
374 + ewarn "Please rebuild net-print/cups-filters now to make sure everything is OK."
375 + ewarn
376 + fi
377 +}
378 +
379 +pkg_postrm() {
380 + # Update desktop file database and gtk icon cache (bug 370059)
381 + gnome2_icon_cache_update
382 + fdo-mime_desktop_database_update
383 +}
384
385 diff --git a/net-print/cups/files/cups-2.2.0-dont-compress-manpages.patch b/net-print/cups/files/cups-2.2.0-dont-compress-manpages.patch
386 new file mode 100644
387 index 00000000..7b61b39
388 --- /dev/null
389 +++ b/net-print/cups/files/cups-2.2.0-dont-compress-manpages.patch
390 @@ -0,0 +1,17 @@
391 +--- cups-2.2.0/config-scripts/cups-manpages.m4
392 ++++ cups-2.2.0/config-scripts/cups-manpages.m4
393 +@@ -53,10 +53,10 @@
394 + ;;
395 + Linux* | GNU* | Darwin*)
396 + # Linux, GNU Hurd, and macOS
397 +- MAN1EXT=1.gz
398 +- MAN5EXT=5.gz
399 +- MAN7EXT=7.gz
400 +- MAN8EXT=8.gz
401 ++ MAN1EXT=1
402 ++ MAN5EXT=5
403 ++ MAN7EXT=7
404 ++ MAN8EXT=8
405 + MAN8DIR=8
406 + ;;
407 + *)