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: ChangeLog cups-1.5.0-r4.ebuild cups-1.5.0-r3.ebuild
Date: Sat, 28 Jan 2012 20:43:24
Message-Id: 20120128204310.5FE2B2004C@flycatcher.gentoo.org
1 dilfridge 12/01/28 20:43:10
2
3 Modified: ChangeLog
4 Added: cups-1.5.0-r4.ebuild
5 Removed: cups-1.5.0-r3.ebuild
6 Log:
7 Add systemd support, bug 376021
8
9 (Portage version: 2.1.10.44/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.448 net-print/cups/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?rev=1.448&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?rev=1.448&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?r1=1.447&r2=1.448
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v
21 retrieving revision 1.447
22 retrieving revision 1.448
23 diff -u -r1.447 -r1.448
24 --- ChangeLog 27 Jan 2012 22:18:20 -0000 1.447
25 +++ ChangeLog 28 Jan 2012 20:43:10 -0000 1.448
26 @@ -1,6 +1,12 @@
27 # ChangeLog for net-print/cups
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.447 2012/01/27 22:18:20 dilfridge Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.448 2012/01/28 20:43:10 dilfridge Exp $
31 +
32 +*cups-1.5.0-r4 (28 Jan 2012)
33 +
34 + 28 Jan 2012; Andreas K. Huettel <dilfridge@g.o> -cups-1.5.0-r3.ebuild,
35 + +cups-1.5.0-r4.ebuild, +files/cups-1.5.0-systemd-socket.patch:
36 + Add systemd support, bug 376021
37
38 27 Jan 2012; Andreas K. Huettel <dilfridge@g.o> cups-1.5.0-r3.ebuild:
39 Re-add usb useflag / kernel configuration checks, but only on linux, bug
40
41
42
43 1.1 net-print/cups/cups-1.5.0-r4.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-1.5.0-r4.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-1.5.0-r4.ebuild?rev=1.1&content-type=text/plain
47
48 Index: cups-1.5.0-r4.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.5.0-r4.ebuild,v 1.1 2012/01/28 20:43:10 dilfridge Exp $
53
54 EAPI=4
55
56 PYTHON_DEPEND="python? 2:2.5"
57
58 inherit autotools eutils fdo-mime gnome2-utils flag-o-matic linux-info multilib pam perl-module python versionator java-pkg-opt-2
59
60 MY_P=${P/_}
61 MY_PV=${PV/_}
62
63 DESCRIPTION="The Common Unix Printing System"
64 HOMEPAGE="http://www.cups.org/"
65 SRC_URI="mirror://easysw/${PN}/${MY_PV}/${MY_P}-source.tar.bz2"
66
67 LICENSE="GPL-2"
68 SLOT="0"
69 KEYWORDS="~amd64 ~x86"
70 IUSE="acl dbus debug +filters gnutls java +jpeg kerberos ldap pam perl php +png python slp +ssl static-libs +threads +tiff usb X xinetd"
71
72 LANGS="da de es eu fi fr id it ja ko nl no pl pt pt_BR ru sv zh zh_TW"
73 for X in ${LANGS} ; do
74 IUSE="${IUSE} linguas_${X}"
75 done
76
77 RDEPEND="
78 app-text/libpaper
79 acl? (
80 kernel_linux? (
81 sys-apps/acl
82 sys-apps/attr
83 )
84 )
85 dbus? ( sys-apps/dbus )
86 java? ( >=virtual/jre-1.6 )
87 jpeg? ( virtual/jpeg:0 )
88 kerberos? ( virtual/krb5 )
89 ldap? ( net-nds/openldap[ssl?,gnutls?] )
90 pam? ( virtual/pam )
91 perl? ( dev-lang/perl )
92 php? ( dev-lang/php )
93 png? ( >=media-libs/libpng-1.4.3:0 )
94 slp? ( >=net-libs/openslp-1.0.4 )
95 ssl? (
96 gnutls? (
97 dev-libs/libgcrypt
98 net-libs/gnutls
99 )
100 !gnutls? ( >=dev-libs/openssl-0.9.8g )
101 )
102 tiff? ( >=media-libs/tiff-3.5.5:0 )
103 usb? ( virtual/libusb:0 )
104 X? ( x11-misc/xdg-utils )
105 xinetd? ( sys-apps/xinetd )
106 "
107
108 DEPEND="${RDEPEND}
109 dev-util/pkgconfig
110 "
111
112 PDEPEND="
113 app-text/ghostscript-gpl[cups]
114 >=app-text/poppler-0.12.3-r3[utils]
115 filters? ( net-print/foomatic-filters )
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 pkg_setup() {
124 enewgroup lp
125 enewuser lp -1 -1 -1 lp
126 enewgroup lpadmin 106
127
128 # python 3 is no-go
129 if use python; then
130 python_set_active_version 2
131 python_pkg_setup
132 fi
133
134 if use kernel_linux; then
135 linux-info_pkg_setup
136 if ! linux_config_exists; then
137 ewarn "Can't check the linux kernel configuration."
138 ewarn "You might have some incompatible options enabled."
139 else
140 # recheck that we don't have usblp to collide with libusb
141 if use usb; then
142 if linux_chkconfig_present USB_PRINTER; then
143 eerror "Your usb printers will be managed via libusb. In this case, "
144 eerror "${P} requires the USB_PRINTER support disabled."
145 eerror "Please disable it:"
146 eerror " CONFIG_USB_PRINTER=n"
147 eerror "in /usr/src/linux/.config or"
148 eerror " Device Drivers --->"
149 eerror " USB support --->"
150 eerror " [ ] USB Printer support"
151 eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)."
152 fi
153 else
154 #here we should warn user that he should enable it so he can print
155 if ! linux_chkconfig_present USB_PRINTER; then
156 ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
157 ewarn "support in your kernel."
158 ewarn "Please enable it:"
159 ewarn " CONFIG_USB_PRINTER=y"
160 ewarn "in /usr/src/linux/.config or"
161 ewarn " Device Drivers --->"
162 ewarn " USB support --->"
163 ewarn " [*] USB Printer support"
164 ewarn "Alternatively, enable the usb useflag for cups and use the libusb code."
165 fi
166 fi
167 fi
168 fi
169 }
170
171 src_prepare() {
172 # various build time fixes
173 epatch "${FILESDIR}/${PN}-1.4.4-dont-compress-manpages.patch"
174 epatch "${FILESDIR}/${PN}-1.4.4-fix-install-perms.patch"
175 epatch "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
176 epatch "${FILESDIR}/${PN}-1.4.4-php-destdir.patch"
177 epatch "${FILESDIR}/${PN}-1.4.4-perl-includes.patch"
178 epatch "${FILESDIR}/${PN}-1.4.8-largeimage.patch"
179
180 # security fixes
181 epatch "${FILESDIR}/${PN}-1.4.8-CVE-2011-3170.patch"
182
183 # systemd support
184 epatch "${FILESDIR}/${PN}-1.5.0-systemd-socket.patch"
185
186 AT_M4DIR=config-scripts eaclocal
187 eautoconf
188 }
189
190 src_configure() {
191 export DSOFLAGS="${LDFLAGS}"
192
193 # locale support
194 strip-linguas ${LANGS}
195 if [ -z "${LINGUAS}" ] ; then
196 export LINGUAS=none
197 fi
198
199 local myconf
200 if use ssl || use gnutls ; then
201 myconf+="
202 $(use_enable gnutls)
203 $(use_enable !gnutls openssl)
204 "
205 else
206 myconf+="
207 --disable-gnutls
208 --disable-openssl
209 "
210 fi
211
212 econf \
213 --libdir=/usr/$(get_libdir) \
214 --localstatedir=/var \
215 --with-cups-user=lp \
216 --with-cups-group=lp \
217 --with-docdir=/usr/share/cups/html \
218 --with-languages="${LINGUAS}" \
219 --with-pdftops=/usr/bin/pdftops \
220 --with-system-groups=lpadmin \
221 $(use_enable acl) \
222 $(use_enable dbus) \
223 $(use_enable debug) \
224 $(use_enable debug debug-guards) \
225 $(use_enable jpeg) \
226 $(use_enable kerberos gssapi) \
227 $(use_enable ldap) \
228 $(use_enable pam) \
229 $(use_enable png) \
230 $(use_enable slp) \
231 $(use_enable static-libs static) \
232 $(use_enable threads) \
233 $(use_enable tiff) \
234 $(use_enable usb libusb) \
235 $(use_with java) \
236 $(use_with perl) \
237 $(use_with php) \
238 $(use_with python) \
239 $(use_with xinetd xinetd /etc/xinetd.d) \
240 --enable-libpaper \
241 --disable-dnssd \
242 ${myconf}
243
244 # install in /usr/libexec always, instead of using /usr/lib/cups, as that
245 # makes more sense when facing multilib support.
246 sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs || die
247 sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h || die
248 sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config || die
249 }
250
251 src_compile() {
252 emake
253
254 if use perl ; then
255 cd "${S}"/scripting/perl
256 perl-module_src_prep
257 perl-module_src_compile
258 fi
259
260 if use php ; then
261 cd "${S}"/scripting/php
262 emake
263 fi
264 }
265
266 src_install() {
267 emake BUILDROOT="${D}" install
268 dodoc {CHANGES,CREDITS,README}.txt
269
270 if use perl ; then
271 cd "${S}"/scripting/perl
272 perl-module_src_install
273 fixlocalpod
274 fi
275
276 if use php ; then
277 cd "${S}"/scripting/php
278 emake DESTDIR="${D}" install || die "emake install for php bindings failed"
279 fi
280
281 # clean out cups init scripts
282 rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
283
284 # install our init script
285 local neededservices
286 use dbus && neededservices+=" dbus"
287 [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
288 cp "${FILESDIR}"/cupsd.init.d "${T}"/cupsd || die
289 sed -i \
290 -e "s/@neededservices@/$neededservices/" \
291 "${T}"/cupsd || die
292 doinitd "${T}"/cupsd
293
294 # install our pam script
295 pamd_mimic_system cups auth account
296
297 if use xinetd ; then
298 # correct path
299 sed -i \
300 -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
301 "${D}"/etc/xinetd.d/cups-lpd || die
302 # it is safer to disable this by default, bug #137130
303 grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
304 { sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd || die ; }
305 # write permission for file owner (root), bug #296221
306 fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed"
307 else
308 rm -rf "${D}"/etc/xinetd.d
309 fi
310
311 keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
312 /var/cache/cups /var/cache/cups/rss /var/log/cups \
313 /var/spool/cups/tmp
314
315 keepdir /etc/cups/{interfaces,ppd,ssl}
316
317 use X || rm -r "${D}"/usr/share/applications
318
319 # create /etc/cups/client.conf, bug #196967 and #266678
320 echo "ServerName /var/run/cups/cups.sock" >> "${D}"/etc/cups/client.conf
321 }
322
323 pkg_preinst() {
324 gnome2_icon_savelist
325 }
326
327 pkg_postinst() {
328 # Update desktop file database and gtk icon cache (bug 370059)
329 gnome2_icon_cache_update
330 fdo-mime_desktop_database_update
331
332 echo
333 elog "For information about installing a printer and general cups setup"
334 elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
335 echo
336 }
337
338 pkg_postrm() {
339 # Update desktop file database and gtk icon cache (bug 370059)
340 gnome2_icon_cache_update
341 fdo-mime_desktop_database_update
342 }