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