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.3.ebuild
Date: Wed, 10 Oct 2007 21:17:07
Message-Id: E1Ifily-0004Mw-GW@stork.gentoo.org
1 tgurr 07/10/10 21:07:18
2
3 Modified: ChangeLog
4 Added: cups-1.3.3.ebuild
5 Log:
6 Add cups-1.3.3.ebuild, fixes bug #188993 and also has a patch applied for bug #192294.
7 (Portage version: 2.1.3.12)
8
9 Revision Changes Path
10 1.249 net-print/cups/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.249&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.249&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?r1=1.248&r2=1.249
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v
19 retrieving revision 1.248
20 retrieving revision 1.249
21 diff -u -r1.248 -r1.249
22 --- ChangeLog 9 Oct 2007 18:46:50 -0000 1.248
23 +++ ChangeLog 10 Oct 2007 21:07:17 -0000 1.249
24 @@ -1,6 +1,13 @@
25 # ChangeLog for net-print/cups
26 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.248 2007/10/09 18:46:50 genstef Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.249 2007/10/10 21:07:17 tgurr Exp $
29 +
30 +*cups-1.3.3 (10 Oct 2007)
31 +
32 + 10 Oct 2007; Timo Gurr <tgurr@g.o> +files/cups-1.3.0-bindnow.patch,
33 + +files/cups-1.3.0-configure.patch, +cups-1.3.3.ebuild:
34 + Add cups-1.3.3.ebuild, fixes bug #188993 and also has a patch applied for
35 + bug #192294.
36
37 *cups-1.2.12-r1 (09 Oct 2007)
38
39
40
41
42 1.1 net-print/cups/cups-1.3.3.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.3.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.3.ebuild?rev=1.1&content-type=text/plain
46
47 Index: cups-1.3.3.ebuild
48 ===================================================================
49 # Copyright 1999-2007 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.3.3.ebuild,v 1.1 2007/10/10 21:07:17 tgurr Exp $
52
53 inherit autotools eutils flag-o-matic multilib pam
54
55 MY_P=${P/_}
56
57 DESCRIPTION="The Common Unix Printing System"
58 HOMEPAGE="http://www.cups.org/"
59 SRC_URI="mirror://sourceforge/cups/${MY_P}-source.tar.bz2"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
64 IUSE="acl bonjour bluetooth dbus java jpeg kerberos ldap nls pam perl php png ppds python samba slp ssl static tiff X"
65
66 COMMON_DEPEND="acl? ( kernel_linux? ( sys-apps/acl sys-apps/attr ) )
67 bonjour? ( || ( net-misc/mDNSResponder net-dns/avahi ) )
68 dbus? ( sys-apps/dbus )
69 java? ( >=virtual/jre-1.4 )
70 jpeg? ( >=media-libs/jpeg-6b )
71 kerberos? ( virtual/krb5 )
72 ldap? ( net-nds/openldap )
73 pam? ( virtual/pam )
74 perl? ( dev-lang/perl )
75 php? ( dev-lang/php )
76 png? ( >=media-libs/libpng-1.2.1 )
77 python? ( dev-lang/python )
78 slp? ( >=net-libs/openslp-1.0.4 )
79 ssl? ( net-libs/gnutls )
80 tiff? ( >=media-libs/tiff-3.5.5 )
81 app-text/libpaper
82 dev-libs/libgcrypt"
83
84 DEPEND="${COMMON_DEPEND}
85 !<net-print/foomatic-filters-ppds-20070501
86 !<net-print/hplip-1.7.4a-r1
87 nls? ( sys-devel/gettext )"
88
89 RDEPEND="${COMMON_DEPEND}
90 !virtual/lpr
91 nls? ( virtual/libintl )
92 X? ( x11-misc/xdg-utils )
93 >=app-text/poppler-0.4.3-r1"
94
95 PDEPEND="
96 bluetooth? ( net-wireless/bluez-utils )
97 ppds? ( || (
98 (
99 net-print/foomatic-filters-ppds
100 net-print/foomatic-db-ppds
101 )
102 net-print/foomatic-filters-ppds
103 net-print/foomatic-db-ppds
104 net-print/hplip
105 media-gfx/gimp-print
106 net-print/foo2zjs
107 net-print/cups-pdf
108 ) )
109 samba? ( >=net-fs/samba-3.0.8 )
110 virtual/ghostscript"
111
112 PROVIDE="virtual/lpr"
113
114 # upstream includes an interactive test which is a nono for gentoo.
115 # therefore, since the printing herd has bigger fish to fry, for now,
116 # we just leave it out, even if FEATURES=test
117 RESTRICT="test"
118
119 S="${WORKDIR}/${MY_P}"
120
121 LANGS="de en es et fr he it ja pl sv zh_TW"
122 for X in ${LANGS} ; do
123 IUSE="${IUSE} linguas_${X}"
124 done
125
126 pkg_setup() {
127 enewgroup lp
128 enewuser lp -1 -1 -1 lp
129
130 enewgroup lpadmin 106
131 }
132
133 src_unpack() {
134 unpack ${A}
135 cd "${S}"
136
137 # upstream does not acknowledge bindnow as a solution
138 epatch "${FILESDIR}/${PN}-1.3.0-bindnow.patch"
139
140 # disable configure automagic for acl/attr
141 epatch "${FILESDIR}/${PN}-1.3.0-configure.patch"
142
143 # cups does not use autotools "the usual way" and ship a static config.h.in
144 eaclocal
145 eautoconf
146 }
147
148 src_compile() {
149
150 # locale support
151 strip-linguas ${LANGS}
152
153 if [ -z "${LINGUAS}" ] ; then
154 export LINGUAS=all
155 fi
156
157 export DSOFLAGS="${LDFLAGS}"
158 cd "${S}"
159 econf \
160 --localstatedir=/var \
161 --with-bindnow=$(bindnow-flags) \
162 --with-cups-user=lp \
163 --with-cups-group=lp \
164 --with-docdir=/usr/share/cups/html \
165 --with-languages=${LINGUAS} \
166 --with-system-groups=lpadmin \
167 $(use_enable acl) \
168 $(use_enable bonjour dnssd) \
169 $(use_enable dbus) \
170 $(use_enable jpeg) \
171 $(use_enable kerberos gssapi) \
172 $(use_enable ldap) \
173 $(use_enable nls) \
174 $(use_enable pam) \
175 $(use_enable png) \
176 $(use_enable slp) \
177 $(use_enable ssl) \
178 $(use_enable static) \
179 $(use_enable tiff) \
180 $(use_with java) \
181 $(use_with perl) \
182 $(use_with php) \
183 $(use_with python) \
184 --enable-gnutls \
185 --enable-libpaper \
186 --enable-threads \
187 --disable-pdftops \
188 || die "econf failed"
189
190 # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
191 # makes more sense when facing multilib support.
192 sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs
193 sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h
194 sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config
195
196 emake || die "emake failed"
197 }
198
199 src_install() {
200 emake BUILDROOT="${D}" install || die "emake install failed"
201 dodoc {CHANGES{,-1.{0,1}},CREDITS,LICENSE,README}.txt || die "dodoc install failed"
202
203 # clean out cups init scripts
204 rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
205 # install our init scripts
206 newinitd "${FILESDIR}"/cupsd.init cupsd
207 # install our pam script
208 pamd_mimic_system cups auth account
209
210 # correct path
211 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" "${D}"/etc/xinetd.d/cups-lpd
212 # it is safer to disable this by default, bug 137130
213 grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
214 sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd
215
216 # install pdftops filter
217 exeinto /usr/libexec/cups/filter/
218 newexe "${FILESDIR}"/pdftops.pl pdftops
219
220 # only for gs-esp this is correct, see bug 163897
221 if has_version app-text/ghostscript-gpl || has_version app-text/ghostscript-gnu; then
222 sed -i -e "s:#application/vnd.cups-postscript:application/vnd.cups-postscript:" "${D}"/etc/cups/mime.convs
223 fi
224
225 keepdir /usr/share/cups/profiles /usr/libexec/cups/driver /var/log/cups \
226 /var/run/cups/certs /var/cache/cups /var/spool/cups/tmp /etc/cups/ssl
227
228 # .desktop handling. X useflag. xdg-open from freedesktop is preferred
229 if use X; then
230 sed -i -e "s:htmlview:xdg-open:" "${D}"/usr/share/applications/cups.desktop
231 else
232 rm -r "${D}"/usr/share/applications
233 fi
234
235 # Fix a symlink collision, see bug #172341
236 dodir /usr/share/ppd
237 dosym /usr/share/ppd /usr/share/cups/model/foomatic-ppds
238 }
239
240 pkg_preinst() {
241 # cleanups
242 [ -n "${PN}" ] && rm -fR "${ROOT}"/usr/share/doc/"${PN}"-*
243 }
244
245 pkg_postinst() {
246 echo
247 elog "For information about installing a printer and general cups setup"
248 elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
249 echo
250
251 local good_gs=false
252 for x in app-text/ghostscript-gpl app-text/ghostscript-gnu app-text/ghostscript-esp; do
253 if has_version ${x} && built_with_use ${x} cups; then
254 good_gs=true
255 break
256 fi
257 done;
258 if ! ${good_gs}; then
259 echo
260 ewarn "You need to emerge ghostscript with the \"cups\" USE flag turned on"
261 echo
262 fi
263
264 if has_version =net-print/cups-1.1*; then
265 echo
266 ewarn "The configuration changed with cups-1.3, you may want to save the old"
267 ewarn "one and start from scratch:"
268 ewarn "# mv /etc/cups /etc/cups.orig; emerge -va1 cups"
269 echo
270 ewarn "You need to rebuild kdelibs for kdeprinter to work with cups-1.3"
271 echo
272 fi
273
274 if [ -e "${ROOT}"/usr/lib/cups ]; then
275 echo
276 ewarn "/usr/lib/cups exists - You need to remerge every ebuild that"
277 ewarn "installed into /usr/lib/cups and /etc/cups, qfile is in portage-utils:"
278 ewarn "# FEATURES=-collision-protect emerge -va1 \$(qfile -qC /usr/lib/cups /etc/cups | sed \"s:net-print/cups$::\")"
279 echo
280 ewarn "FEATURES=-collision-protect is needed to overwrite the compatibility"
281 ewarn "symlinks installed by this package, it won't be needed on later merges."
282 ewarn "You should also run revdep-rebuild"
283 echo
284
285 # place symlinks to make the update smoothless
286 for i in "${ROOT}"/usr/lib/cups/{backend,filter}/*; do
287 if [ "${i/\*}" == "${i}" ] && ! [ -e ${i/lib/libexec} ]; then
288 ln -s ${i} ${i/lib/libexec}
289 fi
290 done
291 fi
292 }
293
294
295
296 --
297 gentoo-commits@g.o mailing list