Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/
Date: Sat, 11 Feb 2017 23:04:09
Message-Id: 1486854238.e4c1a3223291e023727ee5e516b370b37ae5806f.dilfridge@gentoo
1 commit: e4c1a3223291e023727ee5e516b370b37ae5806f
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 11 22:49:12 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 11 23:03:58 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4c1a322
7
8 net-print/cups: Remove old
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 net-print/cups/Manifest | 2 -
13 net-print/cups/cups-2.1.3-r1.ebuild | 354 ------------------------------------
14 net-print/cups/cups-2.2.1.ebuild | 351 -----------------------------------
15 3 files changed, 707 deletions(-)
16
17 diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
18 index 8c7df15a08..b72b6c00d7 100644
19 --- a/net-print/cups/Manifest
20 +++ b/net-print/cups/Manifest
21 @@ -1,4 +1,2 @@
22 -DIST cups-2.1.3-source.tar.bz2 8832400 SHA256 36a70d43584aea2617da914b9331e23341c3501a8254c4d2eae9c11ec01fd4d3 SHA512 5cc715b8521b4d6af29a97a8abf7a1b0973840c00727ee8e7926e89a4a9da8e67565d14cc4b57ab7cfb40b238d4faaed7608b9ab95947cc3671ed87b710f8f36 WHIRLPOOL 161c65b8adc3ab1c65208fe23bf14aefe5dfd84e9b162c69b1a8f977c3a4fc7c31ea92d0c2eaca3c276fa192596a31701052f0c2a1ffd213a09d48c11d446f6f
23 DIST cups-2.1.4.tar.gz 9572653 SHA256 1f182f145489e2454969b221056b6b9bac2beb4e38cd75fa12a9ec15d24d5301 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae WHIRLPOOL 217b9024c34369c8839b0a1b2b3924eb00e9b8d87cfd8d50a59ad0c33c1044f53d479246d67dff4598049efd15259def90e4bcddc6c3c20dff38811e159d2c4b
24 -DIST cups-2.2.1.tar.gz 9485107 SHA256 e5864ac2f984a0f8dcb8c1e3a71740f8e4727da73944f93c7ef84adeccc1d971 SHA512 b7f10fcb0bbf1eb977d1568032f660ad4aedb25c0195fa133e1c5b365df8fc38170d9c3fcfeeac3e1a2541cba5ac7218ea17736c601802cffcfb446a4a578ce8 WHIRLPOOL 14080b7cf9791db12b462eb5a7d05cc4218560b0a95d2caedd1ca71996a524f3ad7ea0d65b14a14414a7359f15b112f8ba2d6f5fa489d6d3f5873a902c0cef4c
25 DIST cups-2.2.2.tar.gz 9489493 SHA256 5e7b396b41f55231dde8dd0465cdd81583cd47ecffe4960c777162fbe3cce03c SHA512 98640b62f706609bbe703318999efb8f78c747e751aafaa1a6f38f4f0dca6fad84ec7e1dfbe9ce17b02ba2ac3fd6e8e480582be5c2cee8eaa707c0ca7eb1978f WHIRLPOOL 745c80114dcac1ed61eec8a8d903ced0d005ec0ad2c05883dcb0aaf9afaf1c410801245ef6bdcb5b77f09a9d96f90e2f94d553b4a19d9425d4005738c8508feb
26
27 diff --git a/net-print/cups/cups-2.1.3-r1.ebuild b/net-print/cups/cups-2.1.3-r1.ebuild
28 deleted file mode 100644
29 index cf16942e95..0000000000
30 --- a/net-print/cups/cups-2.1.3-r1.ebuild
31 +++ /dev/null
32 @@ -1,354 +0,0 @@
33 -# Copyright 1999-2017 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="http://www.cups.org/software/${MY_PV}/${MY_P}-source.tar.bz2"
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 -S="${WORKDIR}/${MY_P}"
122 -
123 -# systemd-socket.patch from Fedora
124 -PATCHES=(
125 - "${FILESDIR}/${PN}-1.6.0-dont-compress-manpages.patch"
126 - "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch"
127 - "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
128 - "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
129 - "${FILESDIR}/${PN}-2.1.2-systemd-socket.patch"
130 - "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
131 - "${FILESDIR}/${PN}-2.0.3-cross-compile.patch"
132 -)
133 -
134 -MULTILIB_CHOST_TOOLS=(
135 - /usr/bin/cups-config
136 -)
137 -
138 -pkg_setup() {
139 - enewgroup lp
140 - enewuser lp -1 -1 -1 lp
141 - enewgroup lpadmin 106
142 -
143 - use python && python-single-r1_pkg_setup
144 -
145 - if use kernel_linux; then
146 - linux-info_pkg_setup
147 - if ! linux_config_exists; then
148 - ewarn "Can't check the linux kernel configuration."
149 - ewarn "You might have some incompatible options enabled."
150 - else
151 - # recheck that we don't have usblp to collide with libusb
152 - if use usb; then
153 - if linux_chkconfig_present USB_PRINTER; then
154 - eerror "Your usb printers will be managed via libusb. In this case, "
155 - eerror "${P} requires the USB_PRINTER support disabled."
156 - eerror "Please disable it:"
157 - eerror " CONFIG_USB_PRINTER=n"
158 - eerror "in /usr/src/linux/.config or"
159 - eerror " Device Drivers --->"
160 - eerror " USB support --->"
161 - eerror " [ ] USB Printer support"
162 - eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)."
163 - fi
164 - else
165 - #here we should warn user that he should enable it so he can print
166 - if ! linux_chkconfig_present USB_PRINTER; then
167 - ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
168 - ewarn "support in your kernel."
169 - ewarn "Please enable it:"
170 - ewarn " CONFIG_USB_PRINTER=y"
171 - ewarn "in /usr/src/linux/.config or"
172 - ewarn " Device Drivers --->"
173 - ewarn " USB support --->"
174 - ewarn " [*] USB Printer support"
175 - ewarn "Alternatively, enable the usb useflag for cups and use the libusb code."
176 - fi
177 - fi
178 - fi
179 - fi
180 -}
181 -
182 -src_prepare() {
183 - default
184 -
185 - # Remove ".SILENT" rule for verbose output (bug 524338).
186 - sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed"
187 -
188 - # Fix install-sh, posix sh does not have 'function'.
189 - sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh"
190 -
191 - AT_M4DIR=config-scripts eaclocal
192 - eautoconf
193 -
194 - # custom Makefiles
195 - multilib_copy_sources
196 -}
197 -
198 -multilib_src_configure() {
199 - export DSOFLAGS="${LDFLAGS}"
200 -
201 - einfo LANGS=\"${LANGS}\"
202 - einfo LINGUAS=\"${LINGUAS}\"
203 -
204 - local myconf=()
205 -
206 - if tc-is-static-only; then
207 - myconf+=(
208 - --disable-shared
209 - )
210 - fi
211 -
212 - # explicitly specify compiler wrt bug 524340
213 - #
214 - # need to override KRB5CONFIG for proper flags
215 - # https://www.cups.org/str.php?L4423
216 - econf \
217 - CC="$(tc-getCC)" \
218 - CXX="$(tc-getCXX)" \
219 - KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \
220 - --libdir="${EPREFIX}"/usr/$(get_libdir) \
221 - --localstatedir="${EPREFIX}"/var \
222 - --with-rundir="${EPREFIX}"/run/cups \
223 - --with-cups-user=lp \
224 - --with-cups-group=lp \
225 - --with-docdir="${EPREFIX}"/usr/share/cups/html \
226 - --with-languages="${LINGUAS}" \
227 - --with-system-groups=lpadmin \
228 - --with-xinetd=/etc/xinetd.d \
229 - $(multilib_native_use_enable acl) \
230 - $(use_enable dbus) \
231 - $(use_enable debug) \
232 - $(use_enable debug debug-guards) \
233 - $(use_enable debug debug-printfs) \
234 - $(multilib_native_use_with java) \
235 - $(use_enable kerberos gssapi) \
236 - $(multilib_native_use_enable pam) \
237 - $(multilib_native_use_with python python "${PYTHON}") \
238 - $(use_enable static-libs static) \
239 - $(use_enable threads) \
240 - $(use_enable ssl gnutls) \
241 - $(use_enable systemd) \
242 - $(multilib_native_use_enable usb libusb) \
243 - $(use_enable zeroconf avahi) \
244 - --disable-dnssd \
245 - --without-perl \
246 - --without-php \
247 - $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \
248 - "${myconf[@]}"
249 -
250 - # install in /usr/libexec always, instead of using /usr/lib/cups, as that
251 - # makes more sense when facing multilib support.
252 - sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
253 - sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
254 - sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
255 -}
256 -
257 -multilib_src_compile() {
258 - if multilib_is_native_abi; then
259 - default
260 - else
261 - emake libs
262 - fi
263 -}
264 -
265 -multilib_src_test() {
266 - multilib_is_native_abi && default
267 -}
268 -
269 -multilib_src_install() {
270 - if multilib_is_native_abi; then
271 - emake BUILDROOT="${D}" install
272 - else
273 - emake BUILDROOT="${D}" install-libs install-headers
274 - dobin cups-config
275 - fi
276 -}
277 -
278 -multilib_src_install_all() {
279 - dodoc {CHANGES,CREDITS,README}.txt
280 -
281 - # move the default config file to docs
282 - dodoc "${ED}"/etc/cups/cupsd.conf.default
283 - rm -f "${ED}"/etc/cups/cupsd.conf.default
284 -
285 - # clean out cups init scripts
286 - rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
287 -
288 - # install our init script
289 - local neededservices
290 - use zeroconf && neededservices+=" avahi-daemon"
291 - use dbus && neededservices+=" dbus"
292 - [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
293 - cp "${FILESDIR}"/cupsd.init.d-r2 "${T}"/cupsd || die
294 - sed -i \
295 - -e "s/@neededservices@/$neededservices/" \
296 - "${T}"/cupsd || die
297 - doinitd "${T}"/cupsd
298 -
299 - # install our pam script
300 - pamd_mimic_system cups auth account
301 -
302 - if use xinetd ; then
303 - # correct path
304 - sed -i \
305 - -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
306 - "${ED}"/etc/xinetd.d/cups-lpd || die
307 - # it is safer to disable this by default, bug #137130
308 - grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
309 - { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; }
310 - # write permission for file owner (root), bug #296221
311 - fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed"
312 - else
313 - # always configure with --with-xinetd= and clean up later,
314 - # bug #525604
315 - rm -rf "${ED}"/etc/xinetd.d
316 - fi
317 -
318 - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
319 - /var/log/cups /var/spool/cups/tmp
320 -
321 - keepdir /etc/cups/{interfaces,ppd,ssl}
322 -
323 - use X || rm -r "${ED}"/usr/share/applications
324 -
325 - # create /etc/cups/client.conf, bug #196967 and #266678
326 - echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
327 -
328 - # the following file is now provided by cups-filters:
329 - rm -r "${ED}"/usr/share/cups/banners || die
330 -
331 - # the following are created by the init script
332 - rm -r "${ED}"/var/cache/cups || die
333 - rm -r "${ED}"/run || die
334 -
335 - # for the special case of running lprng and cups together, bug 467226
336 - if use lprng-compat ; then
337 - rm -fv "${ED}"/usr/bin/{lp*,cancel}
338 - rm -fv "${ED}"/usr/sbin/lp*
339 - rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*}
340 - rm -fv "${ED}"/usr/share/man/man8/lp*
341 - ewarn "Not installing lp... binaries, since the lprng-compat useflag is set."
342 - ewarn "Unless you plan to install an exotic server setup, you most likely"
343 - ewarn "do not want this. Disable the useflag then and all will be fine."
344 - fi
345 -}
346 -
347 -pkg_preinst() {
348 - gnome2_icon_savelist
349 -}
350 -
351 -pkg_postinst() {
352 - # Update desktop file database and gtk icon cache (bug 370059)
353 - gnome2_icon_cache_update
354 - fdo-mime_desktop_database_update
355 -
356 - # not slotted - at most one value
357 - if ! [[ "${REPLACING_VERSIONS}" ]]; then
358 - echo
359 - elog "For information about installing a printer and general cups setup"
360 - elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
361 - echo
362 - fi
363 -
364 - if [[ "${REPLACING_VERSIONS}" ]] && [[ "${REPLACING_VERSIONS}" < "1.6" ]]; then
365 - echo
366 - elog "CUPS-1.6 no longer supports automatic remote printers or implicit classes"
367 - elog "via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\"."
368 - elog "You will have to find printers using zeroconf/avahi instead, enter"
369 - elog "the location manually, or run cups-browsed from net-print/cups-filters"
370 - elog "which re-adds that functionality as a separate daemon."
371 - echo
372 - fi
373 -
374 - if [[ "${REPLACING_VERSIONS}" == "1.6.2-r4" ]]; then
375 - ewarn
376 - ewarn "You are upgrading from the broken version net-print/cups-1.6.2-r4."
377 - ewarn "Please rebuild net-print/cups-filters now to make sure everything is OK."
378 - ewarn
379 - fi
380 -}
381 -
382 -pkg_postrm() {
383 - # Update desktop file database and gtk icon cache (bug 370059)
384 - gnome2_icon_cache_update
385 - fdo-mime_desktop_database_update
386 -}
387
388 diff --git a/net-print/cups/cups-2.2.1.ebuild b/net-print/cups/cups-2.2.1.ebuild
389 deleted file mode 100644
390 index d7956834c1..0000000000
391 --- a/net-print/cups/cups-2.2.1.ebuild
392 +++ /dev/null
393 @@ -1,351 +0,0 @@
394 -# Copyright 1999-2016 Gentoo Foundation
395 -# Distributed under the terms of the GNU General Public License v2
396 -# $Id$
397 -
398 -EAPI=6
399 -
400 -PYTHON_COMPAT=( python2_7 )
401 -
402 -inherit autotools fdo-mime gnome2-utils flag-o-matic linux-info \
403 - multilib multilib-minimal pam python-single-r1 user versionator \
404 - java-pkg-opt-2 systemd toolchain-funcs
405 -
406 -MY_P=${P/_rc/rc}
407 -MY_P=${MY_P/_beta/b}
408 -MY_PV=${PV/_rc/rc}
409 -MY_PV=${MY_PV/_beta/b}
410 -
411 -if [[ ${PV} == *9999 ]]; then
412 - inherit git-r3
413 - EGIT_REPO_URI="http://www.cups.org/cups.git"
414 - if [[ ${PV} != 9999 ]]; then
415 - EGIT_BRANCH=branch-${PV/.9999}
416 - fi
417 -else
418 - SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
419 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
420 -fi
421 -
422 -DESCRIPTION="The Common Unix Printing System"
423 -HOMEPAGE="http://www.cups.org/"
424 -
425 -LICENSE="GPL-2"
426 -SLOT="0"
427 -IUSE="acl dbus debug java kerberos lprng-compat pam
428 - python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
429 -
430 -LANGS="ca cs de es fr it ja ru"
431 -for X in ${LANGS} ; do
432 - IUSE="${IUSE} +linguas_${X}"
433 -done
434 -
435 -CDEPEND="
436 - app-text/libpaper
437 - acl? (
438 - kernel_linux? (
439 - sys-apps/acl
440 - sys-apps/attr
441 - )
442 - )
443 - dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
444 - java? ( >=virtual/jre-1.6:* )
445 - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
446 - !lprng-compat? ( !net-print/lprng )
447 - pam? ( virtual/pam )
448 - python? ( ${PYTHON_DEPS} )
449 - ssl? (
450 - >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}]
451 - >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
452 - )
453 - systemd? ( sys-apps/systemd )
454 - usb? ( virtual/libusb:1 )
455 - X? ( x11-misc/xdg-utils )
456 - xinetd? ( sys-apps/xinetd )
457 - zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
458 - abi_x86_32? (
459 - !<=app-emulation/emul-linux-x86-baselibs-20140508
460 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
461 - )
462 -"
463 -
464 -DEPEND="${CDEPEND}
465 - >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
466 -"
467 -
468 -RDEPEND="${CDEPEND}
469 - selinux? ( sec-policy/selinux-cups )
470 -"
471 -
472 -PDEPEND=">=net-print/cups-filters-1.0.43"
473 -
474 -REQUIRED_USE="
475 - python? ( ${PYTHON_REQUIRED_USE} )
476 - usb? ( threads )
477 -"
478 -
479 -# upstream includes an interactive test which is a nono for gentoo
480 -RESTRICT="test"
481 -
482 -# systemd-socket.patch from Fedora
483 -PATCHES=(
484 - "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
485 - "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch"
486 - "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
487 - "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
488 - "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
489 - "${FILESDIR}/${PN}-2.0.3-cross-compile.patch"
490 -)
491 -
492 -MULTILIB_CHOST_TOOLS=(
493 - /usr/bin/cups-config
494 -)
495 -
496 -pkg_setup() {
497 - enewgroup lp
498 - enewuser lp -1 -1 -1 lp
499 - enewgroup lpadmin 106
500 -
501 - use python && python-single-r1_pkg_setup
502 -
503 - if use kernel_linux; then
504 - linux-info_pkg_setup
505 - if ! linux_config_exists; then
506 - ewarn "Can't check the linux kernel configuration."
507 - ewarn "You might have some incompatible options enabled."
508 - else
509 - # recheck that we don't have usblp to collide with libusb
510 - if use usb; then
511 - if linux_chkconfig_present USB_PRINTER; then
512 - eerror "Your usb printers will be managed via libusb. In this case, "
513 - eerror "${P} requires the USB_PRINTER support disabled."
514 - eerror "Please disable it:"
515 - eerror " CONFIG_USB_PRINTER=n"
516 - eerror "in /usr/src/linux/.config or"
517 - eerror " Device Drivers --->"
518 - eerror " USB support --->"
519 - eerror " [ ] USB Printer support"
520 - eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)."
521 - fi
522 - else
523 - #here we should warn user that he should enable it so he can print
524 - if ! linux_chkconfig_present USB_PRINTER; then
525 - ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
526 - ewarn "support in your kernel."
527 - ewarn "Please enable it:"
528 - ewarn " CONFIG_USB_PRINTER=y"
529 - ewarn "in /usr/src/linux/.config or"
530 - ewarn " Device Drivers --->"
531 - ewarn " USB support --->"
532 - ewarn " [*] USB Printer support"
533 - ewarn "Alternatively, enable the usb useflag for cups and use the libusb code."
534 - fi
535 - fi
536 - fi
537 - fi
538 -}
539 -
540 -src_prepare() {
541 - default
542 -
543 - # Remove ".SILENT" rule for verbose output (bug 524338).
544 - sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed"
545 -
546 - # Fix install-sh, posix sh does not have 'function'.
547 - sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh"
548 -
549 - AT_M4DIR=config-scripts eaclocal
550 - eautoconf
551 -
552 - # custom Makefiles
553 - multilib_copy_sources
554 -}
555 -
556 -multilib_src_configure() {
557 - export DSOFLAGS="${LDFLAGS}"
558 -
559 - einfo LANGS=\"${LANGS}\"
560 - einfo LINGUAS=\"${LINGUAS}\"
561 -
562 - local myconf=()
563 -
564 - if tc-is-static-only; then
565 - myconf+=(
566 - --disable-shared
567 - )
568 - fi
569 -
570 - # explicitly specify compiler wrt bug 524340
571 - #
572 - # need to override KRB5CONFIG for proper flags
573 - # https://www.cups.org/str.php?L4423
574 - econf \
575 - CC="$(tc-getCC)" \
576 - CXX="$(tc-getCXX)" \
577 - KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \
578 - --libdir="${EPREFIX}"/usr/$(get_libdir) \
579 - --localstatedir="${EPREFIX}"/var \
580 - --with-rundir="${EPREFIX}"/run/cups \
581 - --with-cups-user=lp \
582 - --with-cups-group=lp \
583 - --with-docdir="${EPREFIX}"/usr/share/cups/html \
584 - --with-languages="${LINGUAS}" \
585 - --with-system-groups=lpadmin \
586 - --with-xinetd=/etc/xinetd.d \
587 - $(multilib_native_use_enable acl) \
588 - $(use_enable dbus) \
589 - $(use_enable debug) \
590 - $(use_enable debug debug-guards) \
591 - $(use_enable debug debug-printfs) \
592 - $(multilib_native_use_with java) \
593 - $(use_enable kerberos gssapi) \
594 - $(multilib_native_use_enable pam) \
595 - $(multilib_native_use_with python python "${PYTHON}") \
596 - $(use_enable static-libs static) \
597 - $(use_enable threads) \
598 - $(use_enable ssl gnutls) \
599 - $(use_enable systemd) \
600 - $(multilib_native_use_enable usb libusb) \
601 - $(use_enable zeroconf avahi) \
602 - --disable-dnssd \
603 - --without-perl \
604 - --without-php \
605 - $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \
606 - "${myconf[@]}"
607 -
608 - # install in /usr/libexec always, instead of using /usr/lib/cups, as that
609 - # makes more sense when facing multilib support.
610 - sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
611 - sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
612 - sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
613 -}
614 -
615 -multilib_src_compile() {
616 - if multilib_is_native_abi; then
617 - default
618 - else
619 - emake libs
620 - fi
621 -}
622 -
623 -multilib_src_test() {
624 - multilib_is_native_abi && default
625 -}
626 -
627 -multilib_src_install() {
628 - if multilib_is_native_abi; then
629 - emake BUILDROOT="${D}" install
630 - else
631 - emake BUILDROOT="${D}" install-libs install-headers
632 - dobin cups-config
633 - fi
634 -}
635 -
636 -multilib_src_install_all() {
637 - dodoc {CHANGES,CREDITS,README}.txt
638 -
639 - # move the default config file to docs
640 - dodoc "${ED}"/etc/cups/cupsd.conf.default
641 - rm -f "${ED}"/etc/cups/cupsd.conf.default
642 -
643 - # clean out cups init scripts
644 - rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
645 -
646 - # install our init script
647 - local neededservices
648 - use zeroconf && neededservices+=" avahi-daemon"
649 - use dbus && neededservices+=" dbus"
650 - [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
651 - cp "${FILESDIR}"/cupsd.init.d-r2 "${T}"/cupsd || die
652 - sed -i \
653 - -e "s/@neededservices@/$neededservices/" \
654 - "${T}"/cupsd || die
655 - doinitd "${T}"/cupsd
656 -
657 - # install our pam script
658 - pamd_mimic_system cups auth account
659 -
660 - if use xinetd ; then
661 - # correct path
662 - sed -i \
663 - -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
664 - "${ED}"/etc/xinetd.d/cups-lpd || die
665 - # it is safer to disable this by default, bug #137130
666 - grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
667 - { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; }
668 - # write permission for file owner (root), bug #296221
669 - fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed"
670 - else
671 - # always configure with --with-xinetd= and clean up later,
672 - # bug #525604
673 - rm -rf "${ED}"/etc/xinetd.d
674 - fi
675 -
676 - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
677 - /var/log/cups /var/spool/cups/tmp
678 -
679 - keepdir /etc/cups/{interfaces,ppd,ssl}
680 -
681 - use X || rm -r "${ED}"/usr/share/applications
682 -
683 - # create /etc/cups/client.conf, bug #196967 and #266678
684 - echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
685 -
686 - # the following file is now provided by cups-filters:
687 - rm -r "${ED}"/usr/share/cups/banners || die
688 -
689 - # the following are created by the init script
690 - rm -r "${ED}"/var/cache/cups || die
691 - rm -r "${ED}"/run || die
692 -
693 - # for the special case of running lprng and cups together, bug 467226
694 - if use lprng-compat ; then
695 - rm -fv "${ED}"/usr/bin/{lp*,cancel}
696 - rm -fv "${ED}"/usr/sbin/lp*
697 - rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*}
698 - rm -fv "${ED}"/usr/share/man/man8/lp*
699 - ewarn "Not installing lp... binaries, since the lprng-compat useflag is set."
700 - ewarn "Unless you plan to install an exotic server setup, you most likely"
701 - ewarn "do not want this. Disable the useflag then and all will be fine."
702 - fi
703 -}
704 -
705 -pkg_preinst() {
706 - gnome2_icon_savelist
707 -}
708 -
709 -pkg_postinst() {
710 - # Update desktop file database and gtk icon cache (bug 370059)
711 - gnome2_icon_cache_update
712 - fdo-mime_desktop_database_update
713 -
714 - # not slotted - at most one value
715 - if ! [[ "${REPLACING_VERSIONS}" ]]; then
716 - echo
717 - elog "For information about installing a printer and general cups setup"
718 - elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
719 - echo
720 - fi
721 -
722 - if [[ "${REPLACING_VERSIONS}" ]] && [[ "${REPLACING_VERSIONS}" < "1.6" ]]; then
723 - echo
724 - elog "CUPS-1.6 no longer supports automatic remote printers or implicit classes"
725 - elog "via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\"."
726 - elog "You will have to find printers using zeroconf/avahi instead, enter"
727 - elog "the location manually, or run cups-browsed from net-print/cups-filters"
728 - elog "which re-adds that functionality as a separate daemon."
729 - echo
730 - fi
731 -
732 - if [[ "${REPLACING_VERSIONS}" == "1.6.2-r4" ]]; then
733 - ewarn
734 - ewarn "You are upgrading from the broken version net-print/cups-1.6.2-r4."
735 - ewarn "Please rebuild net-print/cups-filters now to make sure everything is OK."
736 - ewarn
737 - fi
738 -}
739 -
740 -pkg_postrm() {
741 - # Update desktop file database and gtk icon cache (bug 370059)
742 - gnome2_icon_cache_update
743 - fdo-mime_desktop_database_update
744 -}