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