1 |
commit: cdbe640f476bba5820955c25f7ed5c19a26c28db |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 30 21:49:11 2017 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 30 21:49:27 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdbe640f |
7 |
|
8 |
net-print/cups: Removed old. |
9 |
|
10 |
Fixed live ebuild. |
11 |
|
12 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
13 |
|
14 |
net-print/cups/Manifest | 1 - |
15 |
net-print/cups/cups-2.2.2-r1.ebuild | 352 -------------------- |
16 |
net-print/cups/cups-2.2.2-r2.ebuild | 347 -------------------- |
17 |
net-print/cups/cups-2.2.2-r3.ebuild | 353 --------------------- |
18 |
net-print/cups/cups-9999.ebuild | 9 +- |
19 |
.../cups/files/cups-2.2.2-no_kerberos_config.patch | 57 ---- |
20 |
6 files changed, 1 insertion(+), 1118 deletions(-) |
21 |
|
22 |
diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest |
23 |
index ecf1c7b02ab..a2cc1d96677 100644 |
24 |
--- a/net-print/cups/Manifest |
25 |
+++ b/net-print/cups/Manifest |
26 |
@@ -1,4 +1,3 @@ |
27 |
DIST cups-2.1.4.tar.gz 9572653 SHA256 1f182f145489e2454969b221056b6b9bac2beb4e38cd75fa12a9ec15d24d5301 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae WHIRLPOOL 217b9024c34369c8839b0a1b2b3924eb00e9b8d87cfd8d50a59ad0c33c1044f53d479246d67dff4598049efd15259def90e4bcddc6c3c20dff38811e159d2c4b |
28 |
-DIST cups-2.2.2.tar.gz 9489493 SHA256 5e7b396b41f55231dde8dd0465cdd81583cd47ecffe4960c777162fbe3cce03c SHA512 98640b62f706609bbe703318999efb8f78c747e751aafaa1a6f38f4f0dca6fad84ec7e1dfbe9ce17b02ba2ac3fd6e8e480582be5c2cee8eaa707c0ca7eb1978f WHIRLPOOL 745c80114dcac1ed61eec8a8d903ced0d005ec0ad2c05883dcb0aaf9afaf1c410801245ef6bdcb5b77f09a9d96f90e2f94d553b4a19d9425d4005738c8508feb |
29 |
DIST cups-2.2.3.tar.gz 9496214 SHA256 7aa7e8d581f0eb204f75203082403bfa931f8c058bffae71b210800102e5feb5 SHA512 95d8f18fad5b3fd25fe88cc29d159723dcfa735248503d0285949fcd7451f0ccac286719077d0f8a8eda7ee9a053a3d30fa3fd28cb74b59336b6718552d9d2e8 WHIRLPOOL 3aa43f1b83ee62939939bd148c2ab13985143746f7acc3d9c82283e1b096524c7738ae5e1670e717c9329f8d3e917cfcc1c8a7e33af93baa74ea83837d92b5f9 |
30 |
DIST cups-2.2.4.tar.gz 9984903 SHA256 339fb0c0a70a1edf1ef169f2afb21bab92cdd3074adf630352c427b795f20fa7 SHA512 765fe49d1a7a491d7d5db051f73d039d183d0f7a560e9fd89f6732b8a699d3246080e1aaed4ddfed3a9fbdb876b09aa22939d6ee5da2280b1246e4ba933c55f0 WHIRLPOOL 86557f6244b7aa7b19cc67caff7c845291d09699353bd337090111f92b6afb6b9e175ca68df8a15d8915a5a15fd72348805e4ecb7da532a994f46b2c2d4cdada |
31 |
|
32 |
diff --git a/net-print/cups/cups-2.2.2-r1.ebuild b/net-print/cups/cups-2.2.2-r1.ebuild |
33 |
deleted file mode 100644 |
34 |
index 1d638596782..00000000000 |
35 |
--- a/net-print/cups/cups-2.2.2-r1.ebuild |
36 |
+++ /dev/null |
37 |
@@ -1,352 +0,0 @@ |
38 |
-# Copyright 1999-2017 Gentoo Foundation |
39 |
-# Distributed under the terms of the GNU General Public License v2 |
40 |
- |
41 |
-EAPI=6 |
42 |
- |
43 |
-PYTHON_COMPAT=( python2_7 ) |
44 |
- |
45 |
-inherit autotools fdo-mime gnome2-utils flag-o-matic linux-info \ |
46 |
- multilib multilib-minimal pam python-single-r1 user versionator \ |
47 |
- java-pkg-opt-2 systemd toolchain-funcs |
48 |
- |
49 |
-MY_P=${P/_rc/rc} |
50 |
-MY_P=${MY_P/_beta/b} |
51 |
-MY_PV=${PV/_rc/rc} |
52 |
-MY_PV=${MY_PV/_beta/b} |
53 |
- |
54 |
-if [[ ${PV} == *9999 ]]; then |
55 |
- inherit git-r3 |
56 |
- EGIT_REPO_URI="http://www.cups.org/cups.git" |
57 |
- if [[ ${PV} != 9999 ]]; then |
58 |
- EGIT_BRANCH=branch-${PV/.9999} |
59 |
- fi |
60 |
-else |
61 |
- SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
62 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" |
63 |
-fi |
64 |
- |
65 |
-DESCRIPTION="The Common Unix Printing System" |
66 |
-HOMEPAGE="http://www.cups.org/" |
67 |
- |
68 |
-LICENSE="GPL-2" |
69 |
-SLOT="0" |
70 |
-IUSE="acl dbus debug java kerberos lprng-compat pam |
71 |
- python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" |
72 |
- |
73 |
-LANGS="ca cs de es fr it ja ru" |
74 |
-for X in ${LANGS} ; do |
75 |
- IUSE="${IUSE} +linguas_${X}" |
76 |
-done |
77 |
- |
78 |
-CDEPEND=" |
79 |
- app-text/libpaper |
80 |
- sys-libs/zlib |
81 |
- acl? ( |
82 |
- kernel_linux? ( |
83 |
- sys-apps/acl |
84 |
- sys-apps/attr |
85 |
- ) |
86 |
- ) |
87 |
- dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) |
88 |
- java? ( >=virtual/jre-1.6:* ) |
89 |
- kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) |
90 |
- !lprng-compat? ( !net-print/lprng ) |
91 |
- pam? ( virtual/pam ) |
92 |
- python? ( ${PYTHON_DEPS} ) |
93 |
- ssl? ( |
94 |
- >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] |
95 |
- >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] |
96 |
- ) |
97 |
- systemd? ( sys-apps/systemd ) |
98 |
- usb? ( virtual/libusb:1 ) |
99 |
- X? ( x11-misc/xdg-utils ) |
100 |
- xinetd? ( sys-apps/xinetd ) |
101 |
- zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) |
102 |
- abi_x86_32? ( |
103 |
- !<=app-emulation/emul-linux-x86-baselibs-20140508 |
104 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
105 |
- ) |
106 |
-" |
107 |
- |
108 |
-DEPEND="${CDEPEND} |
109 |
- >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
110 |
-" |
111 |
- |
112 |
-RDEPEND="${CDEPEND} |
113 |
- selinux? ( sec-policy/selinux-cups ) |
114 |
-" |
115 |
- |
116 |
-PDEPEND=">=net-print/cups-filters-1.0.43" |
117 |
- |
118 |
-REQUIRED_USE=" |
119 |
- python? ( ${PYTHON_REQUIRED_USE} ) |
120 |
- usb? ( threads ) |
121 |
-" |
122 |
- |
123 |
-# upstream includes an interactive test which is a nono for gentoo |
124 |
-RESTRICT="test" |
125 |
- |
126 |
-# systemd-socket.patch from Fedora |
127 |
-PATCHES=( |
128 |
- "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" |
129 |
- "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch" |
130 |
- "${FILESDIR}/${PN}-1.4.4-nostrip.patch" |
131 |
- "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" |
132 |
- "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" |
133 |
- "${FILESDIR}/${PN}-2.0.3-cross-compile.patch" |
134 |
-) |
135 |
- |
136 |
-MULTILIB_CHOST_TOOLS=( |
137 |
- /usr/bin/cups-config |
138 |
-) |
139 |
- |
140 |
-pkg_setup() { |
141 |
- enewgroup lp |
142 |
- enewuser lp -1 -1 -1 lp |
143 |
- enewgroup lpadmin 106 |
144 |
- |
145 |
- use python && python-single-r1_pkg_setup |
146 |
- |
147 |
- if use kernel_linux; then |
148 |
- linux-info_pkg_setup |
149 |
- if ! linux_config_exists; then |
150 |
- ewarn "Can't check the linux kernel configuration." |
151 |
- ewarn "You might have some incompatible options enabled." |
152 |
- else |
153 |
- # recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug 501122) |
154 |
- if use usb; then |
155 |
- if linux_chkconfig_present USB_PRINTER; then |
156 |
- elog "Your USB printers will be managed via libusb. In case you run into problems, " |
157 |
- elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" |
158 |
- elog "usblp kernel module." |
159 |
- elog "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 |
- if ! use kerberos ; then |
181 |
- PATCHES+=( |
182 |
- "${FILESDIR}/${PN}-2.2.2-no_kerberos_config.patch" |
183 |
- ) |
184 |
- fi |
185 |
- |
186 |
- default |
187 |
- |
188 |
- # Remove ".SILENT" rule for verbose output (bug 524338). |
189 |
- sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" |
190 |
- |
191 |
- # Fix install-sh, posix sh does not have 'function'. |
192 |
- sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" |
193 |
- |
194 |
- AT_M4DIR=config-scripts eaclocal |
195 |
- eautoconf |
196 |
- |
197 |
- # custom Makefiles |
198 |
- multilib_copy_sources |
199 |
-} |
200 |
- |
201 |
-multilib_src_configure() { |
202 |
- export DSOFLAGS="${LDFLAGS}" |
203 |
- |
204 |
- einfo LANGS=\"${LANGS}\" |
205 |
- einfo LINGUAS=\"${LINGUAS}\" |
206 |
- |
207 |
- local myconf=() |
208 |
- |
209 |
- if tc-is-static-only; then |
210 |
- myconf+=( |
211 |
- --disable-shared |
212 |
- ) |
213 |
- fi |
214 |
- |
215 |
- # explicitly specify compiler wrt bug 524340 |
216 |
- # |
217 |
- # need to override KRB5CONFIG for proper flags |
218 |
- # https://www.cups.org/str.php?L4423 |
219 |
- econf \ |
220 |
- CC="$(tc-getCC)" \ |
221 |
- CXX="$(tc-getCXX)" \ |
222 |
- KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \ |
223 |
- --libdir="${EPREFIX}"/usr/$(get_libdir) \ |
224 |
- --localstatedir="${EPREFIX}"/var \ |
225 |
- --with-rundir="${EPREFIX}"/run/cups \ |
226 |
- --with-cups-user=lp \ |
227 |
- --with-cups-group=lp \ |
228 |
- --with-docdir="${EPREFIX}"/usr/share/cups/html \ |
229 |
- --with-languages="${LINGUAS}" \ |
230 |
- --with-system-groups=lpadmin \ |
231 |
- --with-xinetd=/etc/xinetd.d \ |
232 |
- $(multilib_native_use_enable acl) \ |
233 |
- $(use_enable dbus) \ |
234 |
- $(use_enable debug) \ |
235 |
- $(use_enable debug debug-guards) \ |
236 |
- $(use_enable debug debug-printfs) \ |
237 |
- $(multilib_native_use_with java) \ |
238 |
- $(use_enable kerberos gssapi) \ |
239 |
- $(multilib_native_use_enable pam) \ |
240 |
- $(multilib_native_use_with python python "${PYTHON}") \ |
241 |
- $(use_enable static-libs static) \ |
242 |
- $(use_enable threads) \ |
243 |
- $(use_enable ssl gnutls) \ |
244 |
- $(use_enable systemd) \ |
245 |
- $(multilib_native_use_enable usb libusb) \ |
246 |
- $(use_enable zeroconf avahi) \ |
247 |
- --disable-dnssd \ |
248 |
- --without-perl \ |
249 |
- --without-php \ |
250 |
- $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \ |
251 |
- "${myconf[@]}" |
252 |
- |
253 |
- # install in /usr/libexec always, instead of using /usr/lib/cups, as that |
254 |
- # makes more sense when facing multilib support. |
255 |
- sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die |
256 |
- sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die |
257 |
- sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die |
258 |
-} |
259 |
- |
260 |
-multilib_src_compile() { |
261 |
- if multilib_is_native_abi; then |
262 |
- default |
263 |
- else |
264 |
- emake libs |
265 |
- fi |
266 |
-} |
267 |
- |
268 |
-multilib_src_test() { |
269 |
- multilib_is_native_abi && default |
270 |
-} |
271 |
- |
272 |
-multilib_src_install() { |
273 |
- if multilib_is_native_abi; then |
274 |
- emake BUILDROOT="${D}" install |
275 |
- else |
276 |
- emake BUILDROOT="${D}" install-libs install-headers |
277 |
- dobin cups-config |
278 |
- fi |
279 |
-} |
280 |
- |
281 |
-multilib_src_install_all() { |
282 |
- dodoc {CHANGES,CREDITS,README}.txt |
283 |
- |
284 |
- # move the default config file to docs |
285 |
- dodoc "${ED}"/etc/cups/cupsd.conf.default |
286 |
- rm -f "${ED}"/etc/cups/cupsd.conf.default |
287 |
- |
288 |
- # clean out cups init scripts |
289 |
- rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups} |
290 |
- |
291 |
- # install our init script |
292 |
- local neededservices |
293 |
- use zeroconf && neededservices+=" avahi-daemon" |
294 |
- use dbus && neededservices+=" dbus" |
295 |
- [[ -n ${neededservices} ]] && neededservices="need${neededservices}" |
296 |
- cp "${FILESDIR}"/cupsd.init.d-r2 "${T}"/cupsd || die |
297 |
- sed -i \ |
298 |
- -e "s/@neededservices@/$neededservices/" \ |
299 |
- "${T}"/cupsd || die |
300 |
- doinitd "${T}"/cupsd |
301 |
- |
302 |
- # install our pam script |
303 |
- pamd_mimic_system cups auth account |
304 |
- |
305 |
- if use xinetd ; then |
306 |
- # correct path |
307 |
- sed -i \ |
308 |
- -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ |
309 |
- "${ED}"/etc/xinetd.d/cups-lpd || die |
310 |
- # it is safer to disable this by default, bug #137130 |
311 |
- grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \ |
312 |
- { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; } |
313 |
- # write permission for file owner (root), bug #296221 |
314 |
- fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed" |
315 |
- else |
316 |
- # always configure with --with-xinetd= and clean up later, |
317 |
- # bug #525604 |
318 |
- rm -rf "${ED}"/etc/xinetd.d |
319 |
- fi |
320 |
- |
321 |
- keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ |
322 |
- /var/log/cups /var/spool/cups/tmp |
323 |
- |
324 |
- keepdir /etc/cups/{interfaces,ppd,ssl} |
325 |
- |
326 |
- use X || rm -r "${ED}"/usr/share/applications |
327 |
- |
328 |
- # create /etc/cups/client.conf, bug #196967 and #266678 |
329 |
- echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf |
330 |
- |
331 |
- # the following file is now provided by cups-filters: |
332 |
- rm -r "${ED}"/usr/share/cups/banners || die |
333 |
- |
334 |
- # the following are created by the init script |
335 |
- rm -r "${ED}"/var/cache/cups || die |
336 |
- rm -r "${ED}"/run || die |
337 |
- |
338 |
- # for the special case of running lprng and cups together, bug 467226 |
339 |
- if use lprng-compat ; then |
340 |
- rm -fv "${ED}"/usr/bin/{lp*,cancel} |
341 |
- rm -fv "${ED}"/usr/sbin/lp* |
342 |
- rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*} |
343 |
- rm -fv "${ED}"/usr/share/man/man8/lp* |
344 |
- ewarn "Not installing lp... binaries, since the lprng-compat useflag is set." |
345 |
- ewarn "Unless you plan to install an exotic server setup, you most likely" |
346 |
- ewarn "do not want this. Disable the useflag then and all will be fine." |
347 |
- fi |
348 |
-} |
349 |
- |
350 |
-pkg_preinst() { |
351 |
- gnome2_icon_savelist |
352 |
-} |
353 |
- |
354 |
-pkg_postinst() { |
355 |
- # Update desktop file database and gtk icon cache (bug 370059) |
356 |
- gnome2_icon_cache_update |
357 |
- fdo-mime_desktop_database_update |
358 |
- |
359 |
- # not slotted - at most one value |
360 |
- if ! [[ "${REPLACING_VERSIONS}" ]]; then |
361 |
- echo |
362 |
- elog "For information about installing a printer and general cups setup" |
363 |
- elog "take a look at: https://wiki.gentoo.org/wiki/Printing" |
364 |
- echo |
365 |
- fi |
366 |
- |
367 |
- if [[ "${REPLACING_VERSIONS}" ]] && [[ "${REPLACING_VERSIONS}" < "1.6" ]]; then |
368 |
- echo |
369 |
- elog "CUPS-1.6 no longer supports automatic remote printers or implicit classes" |
370 |
- elog "via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\"." |
371 |
- elog "You will have to find printers using zeroconf/avahi instead, enter" |
372 |
- elog "the location manually, or run cups-browsed from net-print/cups-filters" |
373 |
- elog "which re-adds that functionality as a separate daemon." |
374 |
- echo |
375 |
- fi |
376 |
- |
377 |
- if [[ "${REPLACING_VERSIONS}" == "1.6.2-r4" ]]; then |
378 |
- ewarn |
379 |
- ewarn "You are upgrading from the broken version net-print/cups-1.6.2-r4." |
380 |
- ewarn "Please rebuild net-print/cups-filters now to make sure everything is OK." |
381 |
- ewarn |
382 |
- fi |
383 |
-} |
384 |
- |
385 |
-pkg_postrm() { |
386 |
- # Update desktop file database and gtk icon cache (bug 370059) |
387 |
- gnome2_icon_cache_update |
388 |
- fdo-mime_desktop_database_update |
389 |
-} |
390 |
|
391 |
diff --git a/net-print/cups/cups-2.2.2-r2.ebuild b/net-print/cups/cups-2.2.2-r2.ebuild |
392 |
deleted file mode 100644 |
393 |
index 615f690c477..00000000000 |
394 |
--- a/net-print/cups/cups-2.2.2-r2.ebuild |
395 |
+++ /dev/null |
396 |
@@ -1,347 +0,0 @@ |
397 |
-# Copyright 1999-2017 Gentoo Foundation |
398 |
-# Distributed under the terms of the GNU General Public License v2 |
399 |
- |
400 |
-EAPI=6 |
401 |
- |
402 |
-PYTHON_COMPAT=( python2_7 ) |
403 |
- |
404 |
-inherit autotools fdo-mime gnome2-utils flag-o-matic linux-info \ |
405 |
- multilib multilib-minimal pam python-single-r1 user versionator \ |
406 |
- java-pkg-opt-2 systemd toolchain-funcs |
407 |
- |
408 |
-MY_P=${P/_rc/rc} |
409 |
-MY_P=${MY_P/_beta/b} |
410 |
-MY_PV=${PV/_rc/rc} |
411 |
-MY_PV=${MY_PV/_beta/b} |
412 |
- |
413 |
-if [[ ${PV} == *9999 ]]; then |
414 |
- inherit git-r3 |
415 |
- EGIT_REPO_URI="https://github.com/apple/cups.git" |
416 |
- if [[ ${PV} != 9999 ]]; then |
417 |
- EGIT_BRANCH=branch-${PV/.9999} |
418 |
- fi |
419 |
-else |
420 |
- SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
421 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" |
422 |
-fi |
423 |
- |
424 |
-DESCRIPTION="The Common Unix Printing System" |
425 |
-HOMEPAGE="http://www.cups.org/" |
426 |
- |
427 |
-LICENSE="GPL-2" |
428 |
-SLOT="0" |
429 |
-IUSE="acl dbus debug java kerberos lprng-compat pam |
430 |
- python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" |
431 |
- |
432 |
-LANGS="ca cs de es fr it ja ru" |
433 |
-for X in ${LANGS} ; do |
434 |
- IUSE="${IUSE} +linguas_${X}" |
435 |
-done |
436 |
- |
437 |
-CDEPEND=" |
438 |
- app-text/libpaper |
439 |
- sys-libs/zlib |
440 |
- acl? ( |
441 |
- kernel_linux? ( |
442 |
- sys-apps/acl |
443 |
- sys-apps/attr |
444 |
- ) |
445 |
- ) |
446 |
- dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) |
447 |
- java? ( >=virtual/jre-1.6:* ) |
448 |
- kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) |
449 |
- !lprng-compat? ( !net-print/lprng ) |
450 |
- pam? ( virtual/pam ) |
451 |
- python? ( ${PYTHON_DEPS} ) |
452 |
- ssl? ( |
453 |
- >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] |
454 |
- ) |
455 |
- systemd? ( sys-apps/systemd ) |
456 |
- usb? ( virtual/libusb:1 ) |
457 |
- X? ( x11-misc/xdg-utils ) |
458 |
- xinetd? ( sys-apps/xinetd ) |
459 |
- zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) |
460 |
- abi_x86_32? ( |
461 |
- !<=app-emulation/emul-linux-x86-baselibs-20140508 |
462 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
463 |
- ) |
464 |
-" |
465 |
- |
466 |
-DEPEND="${CDEPEND} |
467 |
- >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
468 |
-" |
469 |
- |
470 |
-RDEPEND="${CDEPEND} |
471 |
- selinux? ( sec-policy/selinux-cups ) |
472 |
-" |
473 |
- |
474 |
-PDEPEND=">=net-print/cups-filters-1.0.43" |
475 |
- |
476 |
-REQUIRED_USE=" |
477 |
- python? ( ${PYTHON_REQUIRED_USE} ) |
478 |
- usb? ( threads ) |
479 |
-" |
480 |
- |
481 |
-# upstream includes an interactive test which is a nono for gentoo |
482 |
-RESTRICT="test" |
483 |
- |
484 |
-# systemd-socket.patch from Fedora |
485 |
-PATCHES=( |
486 |
- "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" |
487 |
- "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch" |
488 |
- "${FILESDIR}/${PN}-1.4.4-nostrip.patch" |
489 |
- "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" |
490 |
- "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" |
491 |
- "${FILESDIR}/${PN}-2.0.3-cross-compile.patch" |
492 |
-) |
493 |
- |
494 |
-MULTILIB_CHOST_TOOLS=( |
495 |
- /usr/bin/cups-config |
496 |
-) |
497 |
- |
498 |
-pkg_setup() { |
499 |
- enewgroup lp |
500 |
- enewuser lp -1 -1 -1 lp |
501 |
- enewgroup lpadmin 106 |
502 |
- |
503 |
- use python && python-single-r1_pkg_setup |
504 |
- |
505 |
- if use kernel_linux; then |
506 |
- linux-info_pkg_setup |
507 |
- if ! linux_config_exists; then |
508 |
- ewarn "Can't check the linux kernel configuration." |
509 |
- ewarn "You might have some incompatible options enabled." |
510 |
- else |
511 |
- # recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug 501122) |
512 |
- if use usb; then |
513 |
- if linux_chkconfig_present USB_PRINTER; then |
514 |
- elog "Your USB printers will be managed via libusb. In case you run into problems, " |
515 |
- elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" |
516 |
- elog "usblp kernel module." |
517 |
- elog "Alternatively, just disable the usb useflag for cups (your printer will still work)." |
518 |
- fi |
519 |
- else |
520 |
- #here we should warn user that he should enable it so he can print |
521 |
- if ! linux_chkconfig_present USB_PRINTER; then |
522 |
- ewarn "If you plan to use USB printers you should enable the USB_PRINTER" |
523 |
- ewarn "support in your kernel." |
524 |
- ewarn "Please enable it:" |
525 |
- ewarn " CONFIG_USB_PRINTER=y" |
526 |
- ewarn "in /usr/src/linux/.config or" |
527 |
- ewarn " Device Drivers --->" |
528 |
- ewarn " USB support --->" |
529 |
- ewarn " [*] USB Printer support" |
530 |
- ewarn "Alternatively, enable the usb useflag for cups and use the libusb code." |
531 |
- fi |
532 |
- fi |
533 |
- fi |
534 |
- fi |
535 |
-} |
536 |
- |
537 |
-src_prepare() { |
538 |
- if ! use kerberos ; then |
539 |
- PATCHES+=( |
540 |
- "${FILESDIR}/${PN}-2.2.2-no_kerberos_config.patch" |
541 |
- ) |
542 |
- fi |
543 |
- |
544 |
- default |
545 |
- |
546 |
- # Remove ".SILENT" rule for verbose output (bug 524338). |
547 |
- sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" |
548 |
- |
549 |
- # Fix install-sh, posix sh does not have 'function'. |
550 |
- sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" |
551 |
- |
552 |
- AT_M4DIR=config-scripts eaclocal |
553 |
- eautoconf |
554 |
- |
555 |
- # custom Makefiles |
556 |
- multilib_copy_sources |
557 |
-} |
558 |
- |
559 |
-multilib_src_configure() { |
560 |
- export DSOFLAGS="${LDFLAGS}" |
561 |
- |
562 |
- einfo LANGS=\"${LANGS}\" |
563 |
- einfo LINGUAS=\"${LINGUAS}\" |
564 |
- |
565 |
- local myconf=() |
566 |
- |
567 |
- if tc-is-static-only; then |
568 |
- myconf+=( |
569 |
- --disable-shared |
570 |
- ) |
571 |
- fi |
572 |
- |
573 |
- # explicitly specify compiler wrt bug 524340 |
574 |
- # |
575 |
- # need to override KRB5CONFIG for proper flags |
576 |
- # https://www.cups.org/str.php?L4423 |
577 |
- econf \ |
578 |
- CC="$(tc-getCC)" \ |
579 |
- CXX="$(tc-getCXX)" \ |
580 |
- KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \ |
581 |
- --libdir="${EPREFIX}"/usr/$(get_libdir) \ |
582 |
- --localstatedir="${EPREFIX}"/var \ |
583 |
- --with-rundir="${EPREFIX}"/run/cups \ |
584 |
- --with-cups-user=lp \ |
585 |
- --with-cups-group=lp \ |
586 |
- --with-docdir="${EPREFIX}"/usr/share/cups/html \ |
587 |
- --with-languages="${LINGUAS}" \ |
588 |
- --with-system-groups=lpadmin \ |
589 |
- --with-xinetd=/etc/xinetd.d \ |
590 |
- $(multilib_native_use_enable acl) \ |
591 |
- $(use_enable dbus) \ |
592 |
- $(use_enable debug) \ |
593 |
- $(use_enable debug debug-guards) \ |
594 |
- $(use_enable debug debug-printfs) \ |
595 |
- $(multilib_native_use_with java) \ |
596 |
- $(use_enable kerberos gssapi) \ |
597 |
- $(multilib_native_use_enable pam) \ |
598 |
- $(multilib_native_use_with python python "${PYTHON}") \ |
599 |
- $(use_enable static-libs static) \ |
600 |
- $(use_enable threads) \ |
601 |
- $(use_enable ssl gnutls) \ |
602 |
- $(use_enable systemd) \ |
603 |
- $(multilib_native_use_enable usb libusb) \ |
604 |
- $(use_enable zeroconf avahi) \ |
605 |
- --disable-dnssd \ |
606 |
- --without-perl \ |
607 |
- --without-php \ |
608 |
- $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \ |
609 |
- "${myconf[@]}" |
610 |
- |
611 |
- # install in /usr/libexec always, instead of using /usr/lib/cups, as that |
612 |
- # makes more sense when facing multilib support. |
613 |
- sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die |
614 |
- sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die |
615 |
- sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die |
616 |
-} |
617 |
- |
618 |
-multilib_src_compile() { |
619 |
- if multilib_is_native_abi; then |
620 |
- default |
621 |
- else |
622 |
- emake libs |
623 |
- fi |
624 |
-} |
625 |
- |
626 |
-multilib_src_test() { |
627 |
- multilib_is_native_abi && default |
628 |
-} |
629 |
- |
630 |
-multilib_src_install() { |
631 |
- if multilib_is_native_abi; then |
632 |
- emake BUILDROOT="${D}" install |
633 |
- else |
634 |
- emake BUILDROOT="${D}" install-libs install-headers |
635 |
- dobin cups-config |
636 |
- fi |
637 |
-} |
638 |
- |
639 |
-multilib_src_install_all() { |
640 |
- dodoc {CHANGES,CREDITS,README}.txt |
641 |
- |
642 |
- # move the default config file to docs |
643 |
- dodoc "${ED}"/etc/cups/cupsd.conf.default |
644 |
- rm -f "${ED}"/etc/cups/cupsd.conf.default |
645 |
- |
646 |
- # clean out cups init scripts |
647 |
- rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups} |
648 |
- |
649 |
- # install our init script |
650 |
- local neededservices |
651 |
- use zeroconf && neededservices+=" avahi-daemon" |
652 |
- use dbus && neededservices+=" dbus" |
653 |
- [[ -n ${neededservices} ]] && neededservices="need${neededservices}" |
654 |
- cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die |
655 |
- sed -i \ |
656 |
- -e "s/@neededservices@/$neededservices/" \ |
657 |
- "${T}"/cupsd || die |
658 |
- doinitd "${T}"/cupsd |
659 |
- |
660 |
- # install our pam script |
661 |
- pamd_mimic_system cups auth account |
662 |
- |
663 |
- if use xinetd ; then |
664 |
- # correct path |
665 |
- sed -i \ |
666 |
- -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ |
667 |
- "${ED}"/etc/xinetd.d/cups-lpd || die |
668 |
- # it is safer to disable this by default, bug #137130 |
669 |
- grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \ |
670 |
- { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; } |
671 |
- # write permission for file owner (root), bug #296221 |
672 |
- fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed" |
673 |
- else |
674 |
- # always configure with --with-xinetd= and clean up later, |
675 |
- # bug #525604 |
676 |
- rm -rf "${ED}"/etc/xinetd.d |
677 |
- fi |
678 |
- |
679 |
- keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ |
680 |
- /var/log/cups /var/spool/cups/tmp |
681 |
- |
682 |
- keepdir /etc/cups/{interfaces,ppd,ssl} |
683 |
- |
684 |
- use X || rm -r "${ED}"/usr/share/applications |
685 |
- |
686 |
- # create /etc/cups/client.conf, bug #196967 and #266678 |
687 |
- echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf |
688 |
- |
689 |
- # the following file is now provided by cups-filters: |
690 |
- rm -r "${ED}"/usr/share/cups/banners || die |
691 |
- |
692 |
- # the following are created by the init script |
693 |
- rm -r "${ED}"/var/cache/cups || die |
694 |
- rm -r "${ED}"/run || die |
695 |
- |
696 |
- # for the special case of running lprng and cups together, bug 467226 |
697 |
- if use lprng-compat ; then |
698 |
- rm -fv "${ED}"/usr/bin/{lp*,cancel} |
699 |
- rm -fv "${ED}"/usr/sbin/lp* |
700 |
- rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*} |
701 |
- rm -fv "${ED}"/usr/share/man/man8/lp* |
702 |
- ewarn "Not installing lp... binaries, since the lprng-compat useflag is set." |
703 |
- ewarn "Unless you plan to install an exotic server setup, you most likely" |
704 |
- ewarn "do not want this. Disable the useflag then and all will be fine." |
705 |
- fi |
706 |
-} |
707 |
- |
708 |
-pkg_preinst() { |
709 |
- gnome2_icon_savelist |
710 |
-} |
711 |
- |
712 |
-pkg_postinst() { |
713 |
- # Update desktop file database and gtk icon cache (bug 370059) |
714 |
- gnome2_icon_cache_update |
715 |
- fdo-mime_desktop_database_update |
716 |
- |
717 |
- local v |
718 |
- |
719 |
- for v in ${REPLACING_VERSIONS}; do |
720 |
- if ! version_is_at_least 2.2.2-r2 ${v}; then |
721 |
- echo |
722 |
- ewarn "The cupsd init script switched to using pidfiles. Shutting down" |
723 |
- ewarn "cupsd will fail the next time. To fix this, please run once as root" |
724 |
- ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" |
725 |
- echo |
726 |
- break |
727 |
- fi |
728 |
- done |
729 |
- |
730 |
- for v in ${REPLACING_VERSIONS}; do |
731 |
- echo |
732 |
- elog "For information about installing a printer and general cups setup" |
733 |
- elog "take a look at: https://wiki.gentoo.org/wiki/Printing" |
734 |
- echo |
735 |
- break |
736 |
- done |
737 |
-} |
738 |
- |
739 |
-pkg_postrm() { |
740 |
- # Update desktop file database and gtk icon cache (bug 370059) |
741 |
- gnome2_icon_cache_update |
742 |
- fdo-mime_desktop_database_update |
743 |
-} |
744 |
|
745 |
diff --git a/net-print/cups/cups-2.2.2-r3.ebuild b/net-print/cups/cups-2.2.2-r3.ebuild |
746 |
deleted file mode 100644 |
747 |
index 75fc53e6da9..00000000000 |
748 |
--- a/net-print/cups/cups-2.2.2-r3.ebuild |
749 |
+++ /dev/null |
750 |
@@ -1,353 +0,0 @@ |
751 |
-# Copyright 1999-2017 Gentoo Foundation |
752 |
-# Distributed under the terms of the GNU General Public License v2 |
753 |
- |
754 |
-EAPI=6 |
755 |
- |
756 |
-PYTHON_COMPAT=( python2_7 ) |
757 |
- |
758 |
-inherit autotools fdo-mime gnome2-utils flag-o-matic linux-info \ |
759 |
- multilib multilib-minimal pam python-single-r1 user versionator \ |
760 |
- java-pkg-opt-2 systemd toolchain-funcs |
761 |
- |
762 |
-MY_P=${P/_rc/rc} |
763 |
-MY_P=${MY_P/_beta/b} |
764 |
-MY_PV=${PV/_rc/rc} |
765 |
-MY_PV=${MY_PV/_beta/b} |
766 |
- |
767 |
-if [[ ${PV} == *9999 ]]; then |
768 |
- inherit git-r3 |
769 |
- EGIT_REPO_URI="https://github.com/apple/cups.git" |
770 |
- if [[ ${PV} != 9999 ]]; then |
771 |
- EGIT_BRANCH=branch-${PV/.9999} |
772 |
- fi |
773 |
-else |
774 |
- SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
775 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" |
776 |
-fi |
777 |
- |
778 |
-DESCRIPTION="The Common Unix Printing System" |
779 |
-HOMEPAGE="http://www.cups.org/" |
780 |
- |
781 |
-LICENSE="GPL-2" |
782 |
-SLOT="0" |
783 |
-IUSE="acl dbus debug java kerberos lprng-compat pam |
784 |
- python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" |
785 |
- |
786 |
-LANGS="ca cs de es fr it ja ru" |
787 |
-for X in ${LANGS} ; do |
788 |
- IUSE="${IUSE} +linguas_${X}" |
789 |
-done |
790 |
- |
791 |
-CDEPEND=" |
792 |
- app-text/libpaper |
793 |
- sys-libs/zlib |
794 |
- acl? ( |
795 |
- kernel_linux? ( |
796 |
- sys-apps/acl |
797 |
- sys-apps/attr |
798 |
- ) |
799 |
- ) |
800 |
- dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) |
801 |
- java? ( >=virtual/jre-1.6:* ) |
802 |
- kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) |
803 |
- !lprng-compat? ( !net-print/lprng ) |
804 |
- pam? ( virtual/pam ) |
805 |
- python? ( ${PYTHON_DEPS} ) |
806 |
- ssl? ( |
807 |
- >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] |
808 |
- ) |
809 |
- systemd? ( sys-apps/systemd ) |
810 |
- usb? ( virtual/libusb:1 ) |
811 |
- X? ( x11-misc/xdg-utils ) |
812 |
- xinetd? ( sys-apps/xinetd ) |
813 |
- zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) |
814 |
- abi_x86_32? ( |
815 |
- !<=app-emulation/emul-linux-x86-baselibs-20140508 |
816 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
817 |
- ) |
818 |
-" |
819 |
- |
820 |
-DEPEND="${CDEPEND} |
821 |
- >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
822 |
-" |
823 |
- |
824 |
-RDEPEND="${CDEPEND} |
825 |
- selinux? ( sec-policy/selinux-cups ) |
826 |
-" |
827 |
- |
828 |
-PDEPEND=">=net-print/cups-filters-1.0.43" |
829 |
- |
830 |
-REQUIRED_USE=" |
831 |
- python? ( ${PYTHON_REQUIRED_USE} ) |
832 |
- usb? ( threads ) |
833 |
-" |
834 |
- |
835 |
-# upstream includes an interactive test which is a nono for gentoo |
836 |
-RESTRICT="test" |
837 |
- |
838 |
-# systemd-socket.patch from Fedora |
839 |
-PATCHES=( |
840 |
- "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" |
841 |
- "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch" |
842 |
- "${FILESDIR}/${PN}-1.4.4-nostrip.patch" |
843 |
- "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" |
844 |
- "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" |
845 |
- "${FILESDIR}/${PN}-2.0.3-cross-compile.patch" |
846 |
-) |
847 |
- |
848 |
-MULTILIB_CHOST_TOOLS=( |
849 |
- /usr/bin/cups-config |
850 |
-) |
851 |
- |
852 |
-pkg_setup() { |
853 |
- enewgroup lp |
854 |
- enewuser lp -1 -1 -1 lp |
855 |
- enewgroup lpadmin 106 |
856 |
- |
857 |
- use python && python-single-r1_pkg_setup |
858 |
- |
859 |
- if use kernel_linux; then |
860 |
- linux-info_pkg_setup |
861 |
- if ! linux_config_exists; then |
862 |
- ewarn "Can't check the linux kernel configuration." |
863 |
- ewarn "You might have some incompatible options enabled." |
864 |
- else |
865 |
- # recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug 501122) |
866 |
- if use usb; then |
867 |
- if linux_chkconfig_present USB_PRINTER; then |
868 |
- elog "Your USB printers will be managed via libusb. In case you run into problems, " |
869 |
- elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" |
870 |
- elog "usblp kernel module." |
871 |
- elog "Alternatively, just disable the usb useflag for cups (your printer will still work)." |
872 |
- fi |
873 |
- else |
874 |
- #here we should warn user that he should enable it so he can print |
875 |
- if ! linux_chkconfig_present USB_PRINTER; then |
876 |
- ewarn "If you plan to use USB printers you should enable the USB_PRINTER" |
877 |
- ewarn "support in your kernel." |
878 |
- ewarn "Please enable it:" |
879 |
- ewarn " CONFIG_USB_PRINTER=y" |
880 |
- ewarn "in /usr/src/linux/.config or" |
881 |
- ewarn " Device Drivers --->" |
882 |
- ewarn " USB support --->" |
883 |
- ewarn " [*] USB Printer support" |
884 |
- ewarn "Alternatively, enable the usb useflag for cups and use the libusb code." |
885 |
- fi |
886 |
- fi |
887 |
- fi |
888 |
- fi |
889 |
-} |
890 |
- |
891 |
-src_prepare() { |
892 |
- if ! use kerberos ; then |
893 |
- PATCHES+=( |
894 |
- "${FILESDIR}/${PN}-2.2.2-no_kerberos_config.patch" |
895 |
- ) |
896 |
- fi |
897 |
- |
898 |
- default |
899 |
- |
900 |
- # Remove ".SILENT" rule for verbose output (bug 524338). |
901 |
- sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" |
902 |
- |
903 |
- # Fix install-sh, posix sh does not have 'function'. |
904 |
- sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" |
905 |
- |
906 |
- AT_M4DIR=config-scripts eaclocal |
907 |
- eautoconf |
908 |
- |
909 |
- # custom Makefiles |
910 |
- multilib_copy_sources |
911 |
-} |
912 |
- |
913 |
-multilib_src_configure() { |
914 |
- export DSOFLAGS="${LDFLAGS}" |
915 |
- |
916 |
- einfo LANGS=\"${LANGS}\" |
917 |
- einfo LINGUAS=\"${LINGUAS}\" |
918 |
- |
919 |
- local myconf=() |
920 |
- |
921 |
- if tc-is-static-only; then |
922 |
- myconf+=( |
923 |
- --disable-shared |
924 |
- ) |
925 |
- fi |
926 |
- |
927 |
- # explicitly specify compiler wrt bug 524340 |
928 |
- # |
929 |
- # need to override KRB5CONFIG for proper flags |
930 |
- # https://www.cups.org/str.php?L4423 |
931 |
- econf \ |
932 |
- CC="$(tc-getCC)" \ |
933 |
- CXX="$(tc-getCXX)" \ |
934 |
- KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \ |
935 |
- --libdir="${EPREFIX}"/usr/$(get_libdir) \ |
936 |
- --localstatedir="${EPREFIX}"/var \ |
937 |
- --with-rundir="${EPREFIX}"/run/cups \ |
938 |
- --with-cups-user=lp \ |
939 |
- --with-cups-group=lp \ |
940 |
- --with-docdir="${EPREFIX}"/usr/share/cups/html \ |
941 |
- --with-languages="${LINGUAS}" \ |
942 |
- --with-system-groups=lpadmin \ |
943 |
- --with-xinetd="${EPREFIX}"/etc/xinetd.d \ |
944 |
- $(multilib_native_use_enable acl) \ |
945 |
- $(use_enable dbus) \ |
946 |
- $(use_enable debug) \ |
947 |
- $(use_enable debug debug-guards) \ |
948 |
- $(use_enable debug debug-printfs) \ |
949 |
- $(multilib_native_use_with java) \ |
950 |
- $(use_enable kerberos gssapi) \ |
951 |
- $(multilib_native_use_enable pam) \ |
952 |
- $(multilib_native_use_with python python "${PYTHON}") \ |
953 |
- $(use_enable static-libs static) \ |
954 |
- $(use_enable threads) \ |
955 |
- $(use_enable ssl gnutls) \ |
956 |
- $(use_enable systemd) \ |
957 |
- $(multilib_native_use_enable usb libusb) \ |
958 |
- $(use_enable zeroconf avahi) \ |
959 |
- --disable-dnssd \ |
960 |
- --without-perl \ |
961 |
- --without-php \ |
962 |
- $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \ |
963 |
- "${myconf[@]}" |
964 |
- |
965 |
- # install in /usr/libexec always, instead of using /usr/lib/cups, as that |
966 |
- # makes more sense when facing multilib support. |
967 |
- sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die |
968 |
- sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die |
969 |
- sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die |
970 |
- |
971 |
- # additional path corrections needed for prefix, see bug 597728 |
972 |
- sed -i -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" Makedefs || die |
973 |
- sed -i -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" Makedefs || die |
974 |
- sed -i -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" Makedefs || die |
975 |
- sed -i -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" Makedefs || die |
976 |
-} |
977 |
- |
978 |
-multilib_src_compile() { |
979 |
- if multilib_is_native_abi; then |
980 |
- default |
981 |
- else |
982 |
- emake libs |
983 |
- fi |
984 |
-} |
985 |
- |
986 |
-multilib_src_test() { |
987 |
- multilib_is_native_abi && default |
988 |
-} |
989 |
- |
990 |
-multilib_src_install() { |
991 |
- if multilib_is_native_abi; then |
992 |
- emake BUILDROOT="${D}" install |
993 |
- else |
994 |
- emake BUILDROOT="${D}" install-libs install-headers |
995 |
- dobin cups-config |
996 |
- fi |
997 |
-} |
998 |
- |
999 |
-multilib_src_install_all() { |
1000 |
- dodoc {CHANGES,CREDITS,README}.txt |
1001 |
- |
1002 |
- # move the default config file to docs |
1003 |
- dodoc "${ED}"/etc/cups/cupsd.conf.default |
1004 |
- rm -f "${ED}"/etc/cups/cupsd.conf.default |
1005 |
- |
1006 |
- # clean out cups init scripts |
1007 |
- rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups} |
1008 |
- |
1009 |
- # install our init script |
1010 |
- local neededservices |
1011 |
- use zeroconf && neededservices+=" avahi-daemon" |
1012 |
- use dbus && neededservices+=" dbus" |
1013 |
- [[ -n ${neededservices} ]] && neededservices="need${neededservices}" |
1014 |
- cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die |
1015 |
- sed -i \ |
1016 |
- -e "s/@neededservices@/$neededservices/" \ |
1017 |
- "${T}"/cupsd || die |
1018 |
- doinitd "${T}"/cupsd |
1019 |
- |
1020 |
- # install our pam script |
1021 |
- pamd_mimic_system cups auth account |
1022 |
- |
1023 |
- if use xinetd ; then |
1024 |
- # correct path |
1025 |
- sed -i \ |
1026 |
- -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ |
1027 |
- "${ED}"/etc/xinetd.d/cups-lpd || die |
1028 |
- # it is safer to disable this by default, bug #137130 |
1029 |
- grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \ |
1030 |
- { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; } |
1031 |
- # write permission for file owner (root), bug #296221 |
1032 |
- fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed" |
1033 |
- else |
1034 |
- # always configure with --with-xinetd= and clean up later, |
1035 |
- # bug #525604 |
1036 |
- rm -rf "${ED}"/etc/xinetd.d |
1037 |
- fi |
1038 |
- |
1039 |
- keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ |
1040 |
- /var/log/cups /var/spool/cups/tmp |
1041 |
- |
1042 |
- keepdir /etc/cups/{interfaces,ppd,ssl} |
1043 |
- |
1044 |
- use X || rm -r "${ED}"/usr/share/applications |
1045 |
- |
1046 |
- # create /etc/cups/client.conf, bug #196967 and #266678 |
1047 |
- echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf |
1048 |
- |
1049 |
- # the following file is now provided by cups-filters: |
1050 |
- rm -r "${ED}"/usr/share/cups/banners || die |
1051 |
- |
1052 |
- # the following are created by the init script |
1053 |
- rm -r "${ED}"/var/cache/cups || die |
1054 |
- rm -r "${ED}"/run || die |
1055 |
- |
1056 |
- # for the special case of running lprng and cups together, bug 467226 |
1057 |
- if use lprng-compat ; then |
1058 |
- rm -fv "${ED}"/usr/bin/{lp*,cancel} |
1059 |
- rm -fv "${ED}"/usr/sbin/lp* |
1060 |
- rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*} |
1061 |
- rm -fv "${ED}"/usr/share/man/man8/lp* |
1062 |
- ewarn "Not installing lp... binaries, since the lprng-compat useflag is set." |
1063 |
- ewarn "Unless you plan to install an exotic server setup, you most likely" |
1064 |
- ewarn "do not want this. Disable the useflag then and all will be fine." |
1065 |
- fi |
1066 |
-} |
1067 |
- |
1068 |
-pkg_preinst() { |
1069 |
- gnome2_icon_savelist |
1070 |
-} |
1071 |
- |
1072 |
-pkg_postinst() { |
1073 |
- # Update desktop file database and gtk icon cache (bug 370059) |
1074 |
- gnome2_icon_cache_update |
1075 |
- fdo-mime_desktop_database_update |
1076 |
- |
1077 |
- local v |
1078 |
- |
1079 |
- for v in ${REPLACING_VERSIONS}; do |
1080 |
- if ! version_is_at_least 2.2.2-r2 ${v}; then |
1081 |
- echo |
1082 |
- ewarn "The cupsd init script switched to using pidfiles. Shutting down" |
1083 |
- ewarn "cupsd will fail the next time. To fix this, please run once as root" |
1084 |
- ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" |
1085 |
- echo |
1086 |
- break |
1087 |
- fi |
1088 |
- done |
1089 |
- |
1090 |
- for v in ${REPLACING_VERSIONS}; do |
1091 |
- echo |
1092 |
- elog "For information about installing a printer and general cups setup" |
1093 |
- elog "take a look at: https://wiki.gentoo.org/wiki/Printing" |
1094 |
- echo |
1095 |
- break |
1096 |
- done |
1097 |
-} |
1098 |
- |
1099 |
-pkg_postrm() { |
1100 |
- # Update desktop file database and gtk icon cache (bug 370059) |
1101 |
- gnome2_icon_cache_update |
1102 |
- fdo-mime_desktop_database_update |
1103 |
-} |
1104 |
|
1105 |
diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild |
1106 |
index 75fc53e6da9..575a7911181 100644 |
1107 |
--- a/net-print/cups/cups-9999.ebuild |
1108 |
+++ b/net-print/cups/cups-9999.ebuild |
1109 |
@@ -88,11 +88,10 @@ RESTRICT="test" |
1110 |
# systemd-socket.patch from Fedora |
1111 |
PATCHES=( |
1112 |
"${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" |
1113 |
- "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch" |
1114 |
+ "${FILESDIR}/${PN}-2.2.4-fix-install-perms.patch" |
1115 |
"${FILESDIR}/${PN}-1.4.4-nostrip.patch" |
1116 |
"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" |
1117 |
"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" |
1118 |
- "${FILESDIR}/${PN}-2.0.3-cross-compile.patch" |
1119 |
) |
1120 |
|
1121 |
MULTILIB_CHOST_TOOLS=( |
1122 |
@@ -139,12 +138,6 @@ pkg_setup() { |
1123 |
} |
1124 |
|
1125 |
src_prepare() { |
1126 |
- if ! use kerberos ; then |
1127 |
- PATCHES+=( |
1128 |
- "${FILESDIR}/${PN}-2.2.2-no_kerberos_config.patch" |
1129 |
- ) |
1130 |
- fi |
1131 |
- |
1132 |
default |
1133 |
|
1134 |
# Remove ".SILENT" rule for verbose output (bug 524338). |
1135 |
|
1136 |
diff --git a/net-print/cups/files/cups-2.2.2-no_kerberos_config.patch b/net-print/cups/files/cups-2.2.2-no_kerberos_config.patch |
1137 |
deleted file mode 100644 |
1138 |
index a26b3995c52..00000000000 |
1139 |
--- a/net-print/cups/files/cups-2.2.2-no_kerberos_config.patch |
1140 |
+++ /dev/null |
1141 |
@@ -1,57 +0,0 @@ |
1142 |
-Don't add kerberos policies into cupsd config when no kerberos support was |
1143 |
-compiled in. |
1144 |
- |
1145 |
-https://bugs.gentoo.org/606472 |
1146 |
- |
1147 |
---- cups-2.2.2/conf/cupsd.conf.in |
1148 |
-+++ cups-2.2.2/conf/cupsd.conf.in |
1149 |
-@@ -134,49 +134,3 @@ |
1150 |
- Order deny,allow |
1151 |
- </Limit> |
1152 |
- </Policy> |
1153 |
-- |
1154 |
--# Set the kerberized printer/job policies... |
1155 |
--<Policy kerberos> |
1156 |
-- # Job/subscription privacy... |
1157 |
-- JobPrivateAccess default |
1158 |
-- JobPrivateValues default |
1159 |
-- SubscriptionPrivateAccess default |
1160 |
-- SubscriptionPrivateValues default |
1161 |
-- |
1162 |
-- # Job-related operations must be done by the owner or an administrator... |
1163 |
-- <Limit Create-Job Print-Job Print-URI Validate-Job> |
1164 |
-- AuthType Negotiate |
1165 |
-- Order deny,allow |
1166 |
-- </Limit> |
1167 |
-- |
1168 |
-- <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document> |
1169 |
-- AuthType Negotiate |
1170 |
-- Require user @OWNER @SYSTEM |
1171 |
-- Order deny,allow |
1172 |
-- </Limit> |
1173 |
-- |
1174 |
-- # All administration operations require an administrator to authenticate... |
1175 |
-- <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default> |
1176 |
-- AuthType Default |
1177 |
-- Require user @SYSTEM |
1178 |
-- Order deny,allow |
1179 |
-- </Limit> |
1180 |
-- |
1181 |
-- # All printer operations require a printer operator to authenticate... |
1182 |
-- <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs> |
1183 |
-- AuthType Default |
1184 |
-- Require user @CUPS_DEFAULT_PRINTOPERATOR_AUTH@ |
1185 |
-- Order deny,allow |
1186 |
-- </Limit> |
1187 |
-- |
1188 |
-- # Only the owner or an administrator can cancel or authenticate a job... |
1189 |
-- <Limit Cancel-Job CUPS-Authenticate-Job> |
1190 |
-- AuthType Negotiate |
1191 |
-- Require user @OWNER @CUPS_DEFAULT_PRINTOPERATOR_AUTH@ |
1192 |
-- Order deny,allow |
1193 |
-- </Limit> |
1194 |
-- |
1195 |
-- <Limit All> |
1196 |
-- Order deny,allow |
1197 |
-- </Limit> |
1198 |
--</Policy> |