Gentoo Archives: gentoo-commits

From: "Timo Gurr (tgurr)" <tgurr@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-print/cups: ChangeLog cups-1.3.10-r1.ebuild cups-1.3.10.ebuild
Date: Sat, 25 Apr 2009 12:59:34
Message-Id: E1LxhTg-0007Bm-4Y@stork.gentoo.org
1 tgurr 09/04/25 12:59:32
2
3 Modified: ChangeLog
4 Added: cups-1.3.10-r1.ebuild
5 Removed: cups-1.3.10.ebuild
6 Log:
7 Revbump fixing local printing problems caused by client.conf settings due to changed CUPS behaviour.
8 (Portage version: 2.2_rc31/cvs/Linux x86_64, RepoMan options: --force)
9
10 Revision Changes Path
11 1.353 net-print/cups/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.353&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.353&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?r1=1.352&r2=1.353
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v
20 retrieving revision 1.352
21 retrieving revision 1.353
22 diff -u -r1.352 -r1.353
23 --- ChangeLog 21 Apr 2009 19:31:00 -0000 1.352
24 +++ ChangeLog 25 Apr 2009 12:59:32 -0000 1.353
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-print/cups
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.352 2009/04/21 19:31:00 klausman Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.353 2009/04/25 12:59:32 tgurr Exp $
30 +
31 +*cups-1.3.10-r1 (25 Apr 2009)
32 +
33 + 25 Apr 2009; Timo Gurr <tgurr@g.o> -cups-1.3.10.ebuild,
34 + +cups-1.3.10-r1.ebuild:
35 + Revbump fixing local printing problems caused by client.conf settings due
36 + to changed CUPS behaviour.
37
38 21 Apr 2009; Tobias Klausmann <klausman@g.o> cups-1.3.10:
39 Stable on alpha, bug #263070
40
41
42
43 1.1 net-print/cups/cups-1.3.10-r1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.10-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.10-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: cups-1.3.10-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2009 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.3.10-r1.ebuild,v 1.1 2009/04/25 12:59:32 tgurr Exp $
53
54 inherit autotools eutils flag-o-matic multilib pam
55
56 MY_P=${P/_}
57
58 DESCRIPTION="The Common Unix Printing System"
59 HOMEPAGE="http://www.cups.org/"
60 SRC_URI="http://ftp.easysw.com/pub/cups/${PV}/${MY_P}-source.tar.bz2"
61
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
65 IUSE="acl avahi dbus gnutls java jpeg kerberos ldap pam perl php png ppds python samba slp ssl static tiff X xinetd zeroconf"
66
67 COMMON_DEPEND="acl? ( kernel_linux? ( sys-apps/acl sys-apps/attr ) )
68 avahi? ( net-dns/avahi )
69 dbus? ( sys-apps/dbus )
70 gnutls? ( net-libs/gnutls )
71 java? ( >=virtual/jre-1.4 )
72 jpeg? ( >=media-libs/jpeg-6b )
73 kerberos? ( virtual/krb5 )
74 ldap? ( net-nds/openldap )
75 pam? ( virtual/pam )
76 perl? ( dev-lang/perl )
77 php? ( dev-lang/php )
78 png? ( >=media-libs/libpng-1.2.1 )
79 python? ( dev-lang/python )
80 slp? ( >=net-libs/openslp-1.0.4 )
81 ssl? ( !gnutls? ( >=dev-libs/openssl-0.9.8g ) )
82 tiff? ( >=media-libs/tiff-3.5.5 )
83 xinetd? ( sys-apps/xinetd )
84 zeroconf? ( !avahi? ( net-misc/mDNSResponder ) )
85 app-text/libpaper
86 dev-libs/libgcrypt"
87
88 DEPEND="${COMMON_DEPEND}
89 !<net-print/foomatic-filters-ppds-20070501
90 !<net-print/hplip-1.7.4a-r1"
91
92 RDEPEND="${COMMON_DEPEND}
93 !virtual/lpr
94 X? ( x11-misc/xdg-utils )
95 >=virtual/poppler-utils-0.4.3-r1
96 "
97
98 PDEPEND="
99 ppds? ( || (
100 (
101 net-print/foomatic-filters-ppds
102 net-print/foomatic-db-ppds
103 )
104 net-print/foomatic-filters-ppds
105 net-print/foomatic-db-ppds
106 net-print/hplip
107 net-print/gutenprint
108 net-print/foo2zjs
109 net-print/cups-pdf
110 ) )
111 samba? ( >=net-fs/samba-3.0.8 )
112 virtual/ghostscript"
113
114 PROVIDE="virtual/lpr"
115
116 # upstream includes an interactive test which is a nono for gentoo.
117 # therefore, since the printing herd has bigger fish to fry, for now,
118 # we just leave it out, even if FEATURES=test
119 RESTRICT="test"
120
121 S="${WORKDIR}/${MY_P}"
122
123 LANGS="de en es et fr he id it ja pl sv zh_TW"
124 for X in ${LANGS} ; do
125 IUSE="${IUSE} linguas_${X}"
126 done
127
128 pkg_setup() {
129 if use avahi && ! built_with_use net-dns/avahi mdnsresponder-compat ; then
130 echo
131 eerror "In order to have cups working with avahi zeroconf support, you need"
132 eerror "to have net-dns/avahi emerged with \"mdnsresponder-compat\" in your USE"
133 eerror "flag. Please add that flag, re-emerge avahi, and then emerge cups again."
134 die "net-dns/avahi is missing the mdnsresponder-compat feature."
135 fi
136
137 enewgroup lp
138 enewuser lp -1 -1 -1 lp
139
140 enewgroup lpadmin 106
141 }
142
143 src_unpack() {
144 unpack ${A}
145 cd "${S}"
146
147 # disable configure automagic for acl/attr, upstream bug STR #2723
148 epatch "${FILESDIR}/${PN}-1.3.0-configure.patch"
149
150 # create a missing symlink to allow https printing via IPP, bug #217293
151 epatch "${FILESDIR}/${PN}-1.3.7-backend-https.patch"
152
153 # cups does not use autotools "the usual way" and ship a static config.h.in
154 eaclocal
155 eautoconf
156 }
157
158 src_compile() {
159 # Fails to compile on SH
160 use sh && replace-flags -O? -O0
161
162 # needed to prevent ghostscript compile failures
163 use kerberos && strip-flags
164
165 # locale support
166 strip-linguas ${LANGS}
167
168 if [ -z "${LINGUAS}" ] ; then
169 export LINGUAS=all
170 fi
171
172 export DSOFLAGS="${LDFLAGS}"
173
174 if use ldap ; then
175 append-flags -DLDAP_DEPRECATED
176 fi
177
178 local myconf
179
180 if use avahi || use zeroconf ; then
181 myconf="${myconf} --enable-dnssd"
182 else
183 myconf="${myconf} --disable-dnssd"
184 fi
185
186 if use ssl || use gnutls ; then
187 myconf="${myconf} \
188 $(use_enable gnutls) \
189 $(use_enable !gnutls openssl)"
190 else
191 myconf="${myconf} \
192 --disable-gnutls \
193 --disable-openssl"
194 fi
195
196 econf \
197 --libdir=/usr/$(get_libdir) \
198 --localstatedir=/var \
199 --with-cups-user=lp \
200 --with-cups-group=lp \
201 --with-docdir=/usr/share/cups/html \
202 --with-languages=${LINGUAS} \
203 --with-pdftops=pdftops \
204 --with-system-groups=lpadmin \
205 --with-xinetd=/etc/xinetd.d \
206 $(use_enable acl) \
207 $(use_enable dbus) \
208 $(use_enable jpeg) \
209 $(use_enable kerberos gssapi) \
210 $(use_enable ldap) \
211 $(use_enable pam) \
212 $(use_enable png) \
213 $(use_enable slp) \
214 $(use_enable static) \
215 $(use_enable tiff) \
216 $(use_with java) \
217 $(use_with perl) \
218 $(use_with php) \
219 $(use_with python) \
220 --enable-libpaper \
221 --enable-pdftops \
222 --enable-threads \
223 ${myconf}
224
225 # install in /usr/libexec always, instead of using /usr/lib/cups, as that
226 # makes more sense when facing multilib support.
227 sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs
228 sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h
229 sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config
230
231 emake || die "emake failed"
232 }
233
234 src_install() {
235 emake BUILDROOT="${D}" install || die "emake install failed"
236 dodoc {CHANGES{,-1.{0,1}},CREDITS,README}.txt || die "dodoc install failed"
237
238 # clean out cups init scripts
239 rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
240
241 # install our init script
242 local neededservices
243 use avahi && neededservices="$neededservices avahi-daemon"
244 use dbus && neededservices="$neededservices dbus"
245 use zeroconf && ! use avahi && neededservices="$neededservices mDNSResponderPosix"
246 [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
247 sed -e "s/@neededservices@/$neededservices/" "${FILESDIR}"/cupsd.init.d > "${T}"/cupsd
248 doinitd "${T}"/cupsd
249
250 # install our pam script
251 pamd_mimic_system cups auth account
252
253 if use xinetd ; then
254 # correct path
255 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" "${D}"/etc/xinetd.d/cups-lpd
256 # it is safer to disable this by default, bug #137130
257 grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
258 sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd
259 else
260 rm -rf "${D}"/etc/xinetd.d
261 fi
262
263 keepdir /usr/share/cups/profiles /usr/libexec/cups/driver /var/log/cups \
264 /var/run/cups/certs /var/cache/cups /var/spool/cups/tmp /etc/cups/ssl
265
266 # .desktop handling. X useflag. xdg-open from freedesktop is preferred, upstream bug STR #2724.
267 if use X ; then
268 sed -i -e "s:htmlview:xdg-open:" "${D}"/usr/share/applications/cups.desktop
269 else
270 rm -r "${D}"/usr/share/applications
271 fi
272
273 # fix a symlink collision, see bug #172341
274 dodir /usr/share/ppd
275 dosym /usr/share/ppd /usr/share/cups/model/foomatic-ppds
276
277 # create RSS feed directory
278 diropts -m 0740 -o lp -g lp
279 dodir /var/cache/cups/rss
280
281 # create /etc/cups/client.conf, bug #196967 and #266678
282 echo "ServerName /var/run/cups/cups.sock" >> "${D}"/etc/cups/client.conf
283 }
284
285 pkg_preinst() {
286 # cleanups
287 [ -n "${PN}" ] && rm -fR "${ROOT}"/usr/share/doc/"${PN}"-*
288 has_version "=${CATEGORY}/${PN}-1.2*"
289 upgrade_from_1_2=$?
290 }
291
292 pkg_postinst() {
293 echo
294 elog "For information about installing a printer and general cups setup"
295 elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
296 echo
297
298 local good_gs=false
299 for x in app-text/ghostscript-gpl app-text/ghostscript-gnu app-text/ghostscript-esp ; do
300 if has_version ${x} && built_with_use ${x} cups ; then
301 good_gs=true
302 break
303 fi
304 done
305 if ! ${good_gs} ; then
306 echo
307 ewarn "You need to emerge ghostscript with the \"cups\" USE flag turned on."
308 echo
309 fi
310
311 if [[ $upgrade_from_1_2 = 0 ]] ; then
312 echo
313 ewarn "You have upgraded from an older cups version. Please make sure"
314 ewarn "to run \"etc-update\" and \"revdep-rebuild\" NOW."
315 echo
316 fi
317
318 if [ -e "${ROOT}"/usr/lib/cups ] ; then
319 echo
320 ewarn "/usr/lib/cups exists - You need to remerge every ebuild that"
321 ewarn "installed into /usr/lib/cups and /etc/cups, qfile is in portage-utils:"
322 ewarn "# FEATURES=-collision-protect emerge -va1 \$(qfile -qC /usr/lib/cups /etc/cups | sed \"s:net-print/cups$::\")"
323 echo
324 ewarn "FEATURES=-collision-protect is needed to overwrite the compatibility"
325 ewarn "symlinks installed by this package, it won't be needed on later merges."
326 ewarn "You should also run revdep-rebuild"
327 echo
328
329 # place symlinks to make the update smoothless
330 for i in "${ROOT}"/usr/lib/cups/{backend,filter}/* ; do
331 if [ "${i/\*}" == "${i}" ] && ! [ -e ${i/lib/libexec} ] ; then
332 ln -s ${i} ${i/lib/libexec}
333 fi
334 done
335 fi
336 }