Gentoo Archives: gentoo-commits

From: "Andreas HAttel (dilfridge)" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-print/cups: cups-9999.ebuild ChangeLog cups-1.7.3.ebuild cups-1.7.2-r1.ebuild cups-1.7.2.ebuild
Date: Fri, 06 Jun 2014 22:29:54
Message-Id: 20140606222948.EDFEF2004F@flycatcher.gentoo.org
1 dilfridge 14/06/06 22:29:48
2
3 Modified: cups-9999.ebuild ChangeLog
4 Added: cups-1.7.3.ebuild
5 Removed: cups-1.7.2-r1.ebuild cups-1.7.2.ebuild
6 Log:
7 Version bump, remove old; fixes also bug 511994
8
9 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EBE6A336BE19039C!)
10
11 Revision Changes Path
12 1.58 net-print/cups/cups-9999.ebuild
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-9999.ebuild?rev=1.58&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-9999.ebuild?rev=1.58&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-9999.ebuild?r1=1.57&r2=1.58
17
18 Index: cups-9999.ebuild
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/cups-9999.ebuild,v
21 retrieving revision 1.57
22 retrieving revision 1.58
23 diff -u -r1.57 -r1.58
24 --- cups-9999.ebuild 2 Jun 2014 15:03:36 -0000 1.57
25 +++ cups-9999.ebuild 6 Jun 2014 22:29:48 -0000 1.58
26 @@ -1,6 +1,6 @@
27 # Copyright 1999-2014 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-9999.ebuild,v 1.57 2014/06/02 15:03:36 mgorny Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-9999.ebuild,v 1.58 2014/06/06 22:29:48 dilfridge Exp $
31
32 EAPI=5
33
34 @@ -35,7 +35,7 @@
35 IUSE="acl dbus debug gnutls java kerberos lprng-compat pam
36 python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
37
38 -LANGS="ca es fr it ja ru"
39 +LANGS="ca es fr it ja pt_BR ru"
40 for X in ${LANGS} ; do
41 IUSE="${IUSE} +linguas_${X}"
42 done
43
44
45
46 1.615 net-print/cups/ChangeLog
47
48 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?rev=1.615&view=markup
49 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?rev=1.615&content-type=text/plain
50 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?r1=1.614&r2=1.615
51
52 Index: ChangeLog
53 ===================================================================
54 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v
55 retrieving revision 1.614
56 retrieving revision 1.615
57 diff -u -r1.614 -r1.615
58 --- ChangeLog 2 Jun 2014 15:03:36 -0000 1.614
59 +++ ChangeLog 6 Jun 2014 22:29:48 -0000 1.615
60 @@ -1,6 +1,13 @@
61 # ChangeLog for net-print/cups
62 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
63 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.614 2014/06/02 15:03:36 mgorny Exp $
64 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.615 2014/06/06 22:29:48 dilfridge Exp $
65 +
66 +*cups-1.7.3 (06 Jun 2014)
67 +
68 + 06 Jun 2014; Andreas K. Huettel <dilfridge@g.o> -cups-1.7.2.ebuild,
69 + -cups-1.7.2-r1.ebuild, +cups-1.7.3.ebuild, cups-9999.ebuild,
70 + +files/cups-1.7.3-noavahi.patch:
71 + Version bump, remove old; fixes also bug 511994
72
73 02 Jun 2014; Michał Górny <mgorny@g.o> cups-1.7.1-r2.ebuild,
74 cups-1.7.2-r1.ebuild, cups-9999.ebuild:
75
76
77
78 1.1 net-print/cups/cups-1.7.3.ebuild
79
80 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-1.7.3.ebuild?rev=1.1&view=markup
81 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-1.7.3.ebuild?rev=1.1&content-type=text/plain
82
83 Index: cups-1.7.3.ebuild
84 ===================================================================
85 # Copyright 1999-2014 Gentoo Foundation
86 # Distributed under the terms of the GNU General Public License v2
87 # $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.7.3.ebuild,v 1.1 2014/06/06 22:29:48 dilfridge Exp $
88
89 EAPI=5
90
91 PYTHON_COMPAT=( python{2_6,2_7} )
92
93 inherit autotools base fdo-mime gnome2-utils flag-o-matic linux-info \
94 multilib multilib-minimal pam python-single-r1 user versionator \
95 java-pkg-opt-2 systemd toolchain-funcs
96
97 MY_P=${P/_rc/rc}
98 MY_P=${MY_P/_beta/b}
99 MY_PV=${PV/_rc/rc}
100 MY_PV=${MY_PV/_beta/b}
101
102 if [[ ${PV} == *9999 ]]; then
103 inherit git-2
104 EGIT_REPO_URI="http://www.cups.org/cups.git"
105 if [[ ${PV} != 9999 ]]; then
106 EGIT_BRANCH=branch-${PV/.9999}
107 fi
108 KEYWORDS=""
109 else
110 SRC_URI="http://www.cups.org/software/${MY_PV}/${MY_P}-source.tar.bz2"
111 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
112 fi
113
114 DESCRIPTION="The Common Unix Printing System"
115 HOMEPAGE="http://www.cups.org/"
116
117 LICENSE="GPL-2"
118 SLOT="0"
119 IUSE="acl dbus debug gnutls java kerberos lprng-compat pam
120 python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
121
122 LANGS="ca es fr it ja pt_BR ru"
123 for X in ${LANGS} ; do
124 IUSE="${IUSE} +linguas_${X}"
125 done
126
127 RDEPEND="
128 app-text/libpaper
129 acl? (
130 kernel_linux? (
131 sys-apps/acl
132 sys-apps/attr
133 )
134 )
135 dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
136 java? ( >=virtual/jre-1.6 )
137 kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
138 !lprng-compat? ( !net-print/lprng )
139 pam? ( virtual/pam )
140 python? ( ${PYTHON_DEPS} )
141 selinux? ( sec-policy/selinux-cups )
142 ssl? (
143 gnutls? (
144 dev-libs/libgcrypt:0[${MULTILIB_USEDEP}]
145 net-libs/gnutls[${MULTILIB_USEDEP}]
146 )
147 !gnutls? ( >=dev-libs/openssl-0.9.8g[${MULTILIB_USEDEP}] )
148 )
149 usb? ( virtual/libusb:1 )
150 X? ( x11-misc/xdg-utils )
151 xinetd? ( sys-apps/xinetd )
152 zeroconf? ( net-dns/avahi[${MULTILIB_USEDEP}] )
153 abi_x86_32? (
154 !<=app-emulation/emul-linux-x86-baselibs-20140508
155 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
156 )
157 "
158
159 DEPEND="${RDEPEND}
160 virtual/pkgconfig[${MULTILIB_USEDEP}]
161 "
162
163 PDEPEND="
164 app-text/ghostscript-gpl[cups]
165 app-text/poppler[utils]
166 >=net-print/cups-filters-1.0.43
167 "
168
169 REQUIRED_USE="
170 gnutls? ( ssl )
171 python? ( ${PYTHON_REQUIRED_USE} )
172 usb? ( threads )
173 "
174
175 # upstream includes an interactive test which is a nono for gentoo
176 RESTRICT="test"
177
178 S="${WORKDIR}/${MY_P}"
179
180 PATCHES=(
181 "${FILESDIR}/${PN}-1.6.0-dont-compress-manpages.patch"
182 "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch"
183 "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
184 "${FILESDIR}/${PN}-1.7.3-noavahi.patch"
185 )
186
187 MULTILIB_CHOST_TOOLS=(
188 /usr/bin/cups-config
189 )
190
191 pkg_setup() {
192 enewgroup lp
193 enewuser lp -1 -1 -1 lp
194 enewgroup lpadmin 106
195
196 use python && python-single-r1_pkg_setup
197
198 if use kernel_linux; then
199 linux-info_pkg_setup
200 if ! linux_config_exists; then
201 ewarn "Can't check the linux kernel configuration."
202 ewarn "You might have some incompatible options enabled."
203 else
204 # recheck that we don't have usblp to collide with libusb
205 if use usb; then
206 if linux_chkconfig_present USB_PRINTER; then
207 eerror "Your usb printers will be managed via libusb. In this case, "
208 eerror "${P} requires the USB_PRINTER support disabled."
209 eerror "Please disable it:"
210 eerror " CONFIG_USB_PRINTER=n"
211 eerror "in /usr/src/linux/.config or"
212 eerror " Device Drivers --->"
213 eerror " USB support --->"
214 eerror " [ ] USB Printer support"
215 eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)."
216 fi
217 else
218 #here we should warn user that he should enable it so he can print
219 if ! linux_chkconfig_present USB_PRINTER; then
220 ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
221 ewarn "support in your kernel."
222 ewarn "Please enable it:"
223 ewarn " CONFIG_USB_PRINTER=y"
224 ewarn "in /usr/src/linux/.config or"
225 ewarn " Device Drivers --->"
226 ewarn " USB support --->"
227 ewarn " [*] USB Printer support"
228 ewarn "Alternatively, enable the usb useflag for cups and use the libusb code."
229 fi
230 fi
231 fi
232 fi
233 }
234
235 src_prepare() {
236 base_src_prepare
237 use systemd && epatch "${FILESDIR}/${PN}-1.7.2-systemd-socket-2.patch"
238
239 # Fix install-sh, posix sh does not have 'function'.
240 sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh"
241
242 AT_M4DIR=config-scripts eaclocal
243 eautoconf
244
245 # custom Makefiles
246 multilib_copy_sources
247 }
248
249 multilib_src_configure() {
250 export DSOFLAGS="${LDFLAGS}"
251
252 einfo LANGS=\"${LANGS}\"
253 einfo LINGUAS=\"${LINGUAS}\"
254
255 local myconf=()
256 if use ssl ; then
257 myconf+=(
258 $(use_enable gnutls)
259 $(use_enable !gnutls openssl)
260 )
261 else
262 myconf+=(
263 --disable-gnutls
264 --disable-openssl
265 )
266 fi
267
268 if tc-is-static-only; then
269 myconf+=(
270 --disable-shared
271 )
272 fi
273
274 if use systemd; then
275 myconf+=(
276 --with-systemdsystemunitdir="$(systemd_get_unitdir)"
277 )
278 fi
279
280 # need to override KRB5CONFIG for proper flags
281 # https://www.cups.org/str.php?L4423
282 econf \
283 KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \
284 --libdir="${EPREFIX}"/usr/$(get_libdir) \
285 --localstatedir="${EPREFIX}"/var \
286 --with-rundir="${EPREFIX}"/run/cups \
287 --with-cups-user=lp \
288 --with-cups-group=lp \
289 --with-docdir="${EPREFIX}"/usr/share/cups/html \
290 --with-languages="${LINGUAS}" \
291 --with-system-groups=lpadmin \
292 $(multilib_native_use_enable acl) \
293 $(use_enable zeroconf avahi) \
294 $(use_enable dbus) \
295 $(use_enable debug) \
296 $(use_enable debug debug-guards) \
297 $(use_enable kerberos gssapi) \
298 $(multilib_native_use_enable pam) \
299 $(use_enable static-libs static) \
300 $(use_enable threads) \
301 $(multilib_native_use_enable usb libusb) \
302 --disable-dnssd \
303 $(multilib_native_use_with java) \
304 --without-perl \
305 --without-php \
306 $(multilib_native_use_with python python "${PYTHON}") \
307 $(multilib_native_use_with xinetd xinetd /etc/xinetd.d) \
308 $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \
309 "${myconf[@]}"
310
311 # install in /usr/libexec always, instead of using /usr/lib/cups, as that
312 # makes more sense when facing multilib support.
313 sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
314 sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
315 sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
316 }
317
318 multilib_src_compile() {
319 if multilib_is_native_abi; then
320 default
321 else
322 emake libs
323 fi
324 }
325
326 multilib_src_test() {
327 multilib_is_native_abi && default
328 }
329
330 multilib_src_install() {
331 if multilib_is_native_abi; then
332 emake BUILDROOT="${D}" install
333 else
334 emake BUILDROOT="${D}" install-libs install-headers
335 dobin cups-config
336 fi
337 }
338
339 multilib_src_install_all() {
340 dodoc {CHANGES,CREDITS,README}.txt
341
342 # move the default config file to docs
343 dodoc "${ED}"/etc/cups/cupsd.conf.default
344 rm -f "${ED}"/etc/cups/cupsd.conf.default
345
346 # clean out cups init scripts
347 rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
348
349 # install our init script
350 local neededservices
351 use zeroconf && neededservices+=" avahi-daemon"
352 use dbus && neededservices+=" dbus"
353 [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
354 cp "${FILESDIR}"/cupsd.init.d-r1 "${T}"/cupsd || die
355 sed -i \
356 -e "s/@neededservices@/$neededservices/" \
357 "${T}"/cupsd || die
358 doinitd "${T}"/cupsd
359
360 # install our pam script
361 pamd_mimic_system cups auth account
362
363 if use xinetd ; then
364 # correct path
365 sed -i \
366 -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
367 "${ED}"/etc/xinetd.d/cups-lpd || die
368 # it is safer to disable this by default, bug #137130
369 grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
370 { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; }
371 # write permission for file owner (root), bug #296221
372 fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed"
373 else
374 rm -rf "${ED}"/etc/xinetd.d
375 fi
376
377 keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
378 /var/log/cups /var/spool/cups/tmp
379
380 keepdir /etc/cups/{interfaces,ppd,ssl}
381
382 use X || rm -r "${ED}"/usr/share/applications
383
384 # create /etc/cups/client.conf, bug #196967 and #266678
385 echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
386
387 # the following files are now provided by cups-filters:
388 rm -r "${ED}"/usr/share/cups/banners || die
389 rm -r "${ED}"/usr/share/cups/data/testprint || die
390
391 # the following are created by the init script
392 rm -r "${ED}"/var/cache/cups || die
393 rm -r "${ED}"/run || die
394
395 # for the special case of running lprng and cups together, bug 467226
396 if use lprng-compat ; then
397 rm -fv "${ED}"/usr/bin/{lp*,cancel}
398 rm -fv "${ED}"/usr/sbin/lp*
399 rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*}
400 rm -fv "${ED}"/usr/share/man/man8/lp*
401 ewarn "Not installing lp... binaries, since the lprng-compat useflag is set."
402 ewarn "Unless you plan to install an exotic server setup, you most likely"
403 ewarn "do not want this. Disable the useflag then and all will be fine."
404 fi
405 }
406
407 pkg_preinst() {
408 gnome2_icon_savelist
409 }
410
411 pkg_postinst() {
412 # Update desktop file database and gtk icon cache (bug 370059)
413 gnome2_icon_cache_update
414 fdo-mime_desktop_database_update
415
416 # not slotted - at most one value
417 if ! [[ "${REPLACING_VERSIONS}" ]]; then
418 echo
419 elog "For information about installing a printer and general cups setup"
420 elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
421 echo
422 fi
423
424 if [[ "${REPLACING_VERSIONS}" ]] && [[ "${REPLACING_VERSIONS}" < "1.6" ]]; then
425 echo
426 elog "CUPS-1.6 no longer supports automatic remote printers or implicit classes"
427 elog "via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\"."
428 elog "You will have to find printers using zeroconf/avahi instead, enter"
429 elog "the location manually, or run cups-browsed from net-print/cups-filters"
430 elog "which re-adds that functionality as a separate daemon."
431 echo
432 fi
433
434 if [[ "${REPLACING_VERSIONS}" == "1.6.2-r4" ]]; then
435 ewarn
436 ewarn "You are upgrading from the broken version net-print/cups-1.6.2-r4."
437 ewarn "Please rebuild net-print/cups-filters now to make sure everything is OK."
438 ewarn
439 fi
440 }
441
442 pkg_postrm() {
443 # Update desktop file database and gtk icon cache (bug 370059)
444 gnome2_icon_cache_update
445 fdo-mime_desktop_database_update
446 }