Gentoo Archives: gentoo-commits

From: "Daniel Pielmeier (billie)" <billie@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-print/hplip: ChangeLog hplip-3.12.11.ebuild
Date: Fri, 30 Nov 2012 15:47:16
Message-Id: 20121130154705.D476E20C65@flycatcher.gentoo.org
1 billie 12/11/30 15:47:05
2
3 Modified: ChangeLog
4 Added: hplip-3.12.11.ebuild
5 Log:
6 Version bump. Switch to EAPI 5.
7
8 (Portage version: 2.1.11.31/cvs/Linux i686, signed Manifest commit with key 215AD14D)
9
10 Revision Changes Path
11 1.255 net-print/hplip/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?rev=1.255&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?rev=1.255&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?r1=1.254&r2=1.255
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v
20 retrieving revision 1.254
21 retrieving revision 1.255
22 diff -u -r1.254 -r1.255
23 --- ChangeLog 28 Nov 2012 20:20:27 -0000 1.254
24 +++ ChangeLog 30 Nov 2012 15:47:05 -0000 1.255
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-print/hplip
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.254 2012/11/28 20:20:27 ranger Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.255 2012/11/30 15:47:05 billie Exp $
30 +
31 +*hplip-3.12.11 (30 Nov 2012)
32 +
33 + 30 Nov 2012; Daniel Pielmeier <billie@g.o> +hplip-3.12.11.ebuild:
34 + Version bump. Switch to EAPI 5.
35
36 28 Nov 2012; Brent Baude <ranger@g.o> hplip-3.12.10a.ebuild:
37 Marking hplip-3.12.10a ppc for bug 439032
38
39
40
41 1.1 net-print/hplip/hplip-3.12.11.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/hplip-3.12.11.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/hplip-3.12.11.ebuild?rev=1.1&content-type=text/plain
45
46 Index: hplip-3.12.11.ebuild
47 ===================================================================
48 # Copyright 1999-2012 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-3.12.11.ebuild,v 1.1 2012/11/30 15:47:05 billie Exp $
51
52 EAPI=5
53
54 PYTHON_DEPEND="!minimal? 2"
55 PYTHON_USE_WITH="threads xml"
56 PYTHON_USE_WITH_OPT="!minimal"
57
58 inherit eutils fdo-mime linux-info python autotools toolchain-funcs
59
60 DESCRIPTION="HP Linux Imaging and Printing. Includes printer, scanner, fax drivers and service tools."
61 HOMEPAGE="http://hplipopensource.com/hplip-web/index.html"
62 SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz
63 http://dev.gentoo.org/~billie/distfiles/${PN}-3.12.10-patches-1.tar.xz"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
68
69 # zeroconf does not work properly with >=cups-1.4.
70 # Thus support for it is also disabled in hplip.
71 IUSE="doc fax +hpcups hpijs kde libnotify -libusb0 minimal parport policykit qt4 scanner snmp static-ppds X"
72
73 COMMON_DEPEND="
74 virtual/jpeg
75 hpijs? ( >=net-print/foomatic-filters-3.0.20080507[cups] )
76 !minimal? (
77 >=net-print/cups-1.4.0
78 !libusb0? ( virtual/libusb:1 )
79 libusb0? ( virtual/libusb:0 )
80 scanner? ( >=media-gfx/sane-backends-1.0.19-r1 )
81 fax? ( sys-apps/dbus )
82 snmp? (
83 net-analyzer/net-snmp
84 dev-libs/openssl:0
85 )
86 )"
87
88 DEPEND="${COMMON_DEPEND}
89 virtual/pkgconfig"
90
91 RDEPEND="${COMMON_DEPEND}
92 >=app-text/ghostscript-gpl-8.71-r3
93 dev-python/dbus-python
94 policykit? (
95 sys-auth/polkit
96 )
97 !minimal? (
98 dev-python/pygobject:2
99 kernel_linux? ( >=sys-fs/udev-114 )
100 scanner? (
101 dev-python/imaging
102 X? ( || (
103 kde? ( kde-misc/skanlite )
104 media-gfx/xsane
105 media-gfx/sane-frontends
106 ) )
107 )
108 fax? (
109 dev-python/reportlab
110 dev-python/dbus-python
111 )
112 qt4? (
113 dev-python/PyQt4[dbus,X]
114 libnotify? (
115 dev-python/notify-python
116 )
117 )
118 )"
119
120 CONFIG_CHECK="~PARPORT ~PPDEV"
121 ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
122
123 pkg_setup() {
124 if ! use minimal; then
125 python_set_active_version 2
126 python_pkg_setup
127 fi
128
129 ! use qt4 && ewarn "You need USE=qt4 for the hplip GUI."
130
131 use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
132
133 if ! use hpcups && ! use hpijs ; then
134 ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
135 ewarn "which is probably not what you want."
136 ewarn "You will almost certainly not be able to print."
137 fi
138
139 if use minimal ; then
140 ewarn "Installing driver portions only, make sure you know what you are doing."
141 ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
142 ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
143 else
144 use parport && linux-info_pkg_setup
145 fi
146 }
147
148 src_prepare() {
149 use !minimal && python_convert_shebangs -q -r 2 .
150
151 EPATCH_SUFFIX="patch" \
152 EPATCH_FORCE="yes" \
153 epatch "${WORKDIR}"
154
155 # Make desktop files follow the specification
156 # Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680
157 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324
158 sed -i -e '/^Categories=/s/Application;//' \
159 -e '/^Encoding=.*/d' hplip.desktop.in || die
160 sed -i -e '/^Categories=/s/Application;//' \
161 -e '/^Version=.*/d' \
162 -e '/^Comment=.*/d' hplip-systray.desktop.in || die
163
164 # Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725
165 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847,
166 # https://bugs.launchpad.net/hplip/+bug/500086
167 local udevdir=/lib/udev
168 has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
169 sed -i -e "s|/etc/udev|${udevdir}|g" \
170 $(find . -type f -exec grep -l /etc/udev {} +) || die
171
172 # Force recognition of Gentoo distro by hp-check
173 sed -i \
174 -e "s:file('/etc/issue', 'r').read():'Gentoo':" \
175 installer/core_install.py || die
176
177 # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
178 # The hpcups driver does not use foomatic-rip
179 local i
180 for i in ppd/hpijs/*.ppd.gz ; do
181 rm -f ${i}.temp || die
182 gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
183 gzip > ${i}.temp || die
184 mv ${i}.temp ${i} || die
185 done
186
187 eautoreconf
188 }
189
190 src_configure() {
191 local myconf drv_build minimal_build
192
193 if use fax || use qt4 ; then
194 myconf="${myconf} --enable-dbus-build"
195 else
196 myconf="${myconf} --disable-dbus-build"
197 fi
198
199 if use libusb0 ; then
200 myconf="${myconf} --enable-libusb01_build"
201 else
202 myconf="${myconf} --disable-libusb01_build"
203 fi
204
205 if use hpcups ; then
206 drv_build="$(use_enable hpcups hpcups-install)"
207 if use static-ppds ; then
208 drv_build="${drv_build} --enable-cups-ppd-install"
209 drv_build="${drv_build} --disable-cups-drv-install"
210 else
211 drv_build="${drv_build} --enable-cups-drv-install"
212 drv_build="${drv_build} --disable-cups-ppd-install"
213 fi
214 else
215 drv_build="--disable-hpcups-install"
216 drv_build="${drv_build} --disable-cups-drv-install"
217 drv_build="${drv_build} --disable-cups-ppd-install"
218 fi
219
220 if use hpijs ; then
221 drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
222 if use static-ppds ; then
223 drv_build="${drv_build} --enable-foomatic-ppd-install"
224 drv_build="${drv_build} --disable-foomatic-drv-install"
225 else
226 drv_build="${drv_build} --enable-foomatic-drv-install"
227 drv_build="${drv_build} --disable-foomatic-ppd-install"
228 fi
229 else
230 drv_build="${drv_build} --disable-hpijs-install"
231 drv_build="${drv_build} --disable-foomatic-drv-install"
232 drv_build="${drv_build} --disable-foomatic-ppd-install"
233 fi
234
235 if use minimal ; then
236 if use hpijs ; then
237 minimal_build="--enable-hpijs-only-build"
238 else
239 minimal_build="--disable-hpijs-only-build"
240 fi
241 if use hpcups ; then
242 minimal_build="${minimal_build} --enable-hpcups-only-build"
243 else
244 minimal_build="${minimal_build} --disable-hpcups-only-build"
245 fi
246 fi
247
248 econf \
249 --disable-cups11-build \
250 --disable-lite-build \
251 --disable-foomatic-rip-hplip-install \
252 --disable-shadow-build \
253 --disable-qt3 \
254 --disable-udev_sysfs_rules \
255 --disable-udev-acl-rules \
256 --with-cupsbackenddir=$(cups-config --serverbin)/backend \
257 --with-cupsfilterdir=$(cups-config --serverbin)/filter \
258 --with-docdir=/usr/share/doc/${PF} \
259 --with-htmldir=/usr/share/doc/${PF}/html \
260 ${myconf} \
261 ${drv_build} \
262 ${minimal_build} \
263 $(use_enable doc doc-build) \
264 $(use_enable fax fax-build) \
265 $(use_enable parport pp-build) \
266 $(use_enable scanner scan-build) \
267 $(use_enable snmp network-build) \
268 $(use_enable qt4 gui-build) \
269 $(use_enable qt4) \
270 $(use_enable policykit)
271 }
272
273 src_install() {
274 default
275
276 # Installed by sane-backends
277 # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
278 rm -f "${D}"/etc/sane.d/dll.conf || die
279
280 rm -f "${D}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
281 rmdir --ignore-fail-on-non-empty "${D}"/usr/share/doc/${PF}/ || die
282
283 # Remove hal fdi files
284 rm -rf "${D}"/usr/share/hal || die
285
286 find "${D}" -name '*.la' -exec rm -rf {} + || die
287 }
288
289 pkg_postinst() {
290 use !minimal && python_mod_optimize /usr/share/${PN}
291 fdo-mime_desktop_database_update
292
293 if [[ -z "${REPLACING_VERSIONS}" ]]; then
294 elog "For more information on setting up your printer please take"
295 elog "a look at the hplip section of the gentoo printing guide:"
296 elog "http://www.gentoo.org/doc/en/printing-howto.xml"
297 elog
298 elog "Any user who wants to print must be in the lp group."
299 fi
300 }
301
302 pkg_postrm() {
303 use !minimal && python_mod_cleanup /usr/share/${PN}
304 fdo-mime_desktop_database_update
305 }