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: hplip-3.10.2-r3.ebuild ChangeLog hplip-3.10.2-r2.ebuild
Date: Wed, 31 Mar 2010 19:17:24
Message-Id: E1Nx2zg-0005Xb-LI@stork.gentoo.org
1 billie 10/03/31 18:50:24
2
3 Modified: ChangeLog
4 Added: hplip-3.10.2-r3.ebuild
5 Removed: hplip-3.10.2-r2.ebuild
6 Log:
7 Revision bump. Add systray segfault patch from upstream reported by netfab in bug #312301. Remove needless rules file.
8 (Portage version: 2.1.7.17/cvs/Linux i686)
9
10 Revision Changes Path
11 1.153 net-print/hplip/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/hplip/ChangeLog?rev=1.153&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/hplip/ChangeLog?rev=1.153&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/hplip/ChangeLog?r1=1.152&r2=1.153
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v
20 retrieving revision 1.152
21 retrieving revision 1.153
22 diff -u -r1.152 -r1.153
23 --- ChangeLog 30 Mar 2010 17:32:44 -0000 1.152
24 +++ ChangeLog 31 Mar 2010 18:50:24 -0000 1.153
25 @@ -1,6 +1,14 @@
26 # ChangeLog for net-print/hplip
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.152 2010/03/30 17:32:44 billie Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.153 2010/03/31 18:50:24 billie Exp $
30 +
31 +*hplip-3.10.2-r3 (31 Mar 2010)
32 +
33 + 31 Mar 2010; Daniel Pielmeier <billie@g.o> -files/70-hpmud.rules,
34 + -hplip-3.10.2-r2.ebuild, +hplip-3.10.2-r3.ebuild,
35 + +files/hplip-3.10.2-systray-segfault.patch:
36 + Revision bump. Add systray segfault patch from upstream reported by netfab
37 + in bug #312301. Remove needless rules file.
38
39 *hplip-3.10.2-r2 (30 Mar 2010)
40
41
42
43
44 1.1 net-print/hplip/hplip-3.10.2-r3.ebuild
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/hplip/hplip-3.10.2-r3.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/hplip/hplip-3.10.2-r3.ebuild?rev=1.1&content-type=text/plain
48
49 Index: hplip-3.10.2-r3.ebuild
50 ===================================================================
51 # Copyright 1999-2010 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-3.10.2-r3.ebuild,v 1.1 2010/03/31 18:50:24 billie Exp $
54
55 EAPI=2
56
57 PYTHON_DEPEND="!minimal? 2"
58 PYTHON_USE_WITH="threads xml"
59 PYTHON_USE_WITH_OPT="!minimal"
60
61 inherit fdo-mime linux-info python autotools
62
63 DESCRIPTION="HP Linux Imaging and Printing System. Includes printer, scanner, fax drivers and service tools."
64 HOMEPAGE="http://hplipopensource.com/hplip-web/index.html"
65 SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz"
66
67 LICENSE="GPL-2"
68 SLOT="0"
69 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
70
71 # zeroconf does not work properly with >=cups-1.4. thus support for it is also disabled in hplip.
72 IUSE="doc fax gtk +hpcups hpijs libnotify minimal -new-hpcups parport policykit qt4 scanner snmp static-ppds -udev-acl"
73
74 COMMON_DEPEND="
75 media-libs/jpeg
76 hpijs? ( >=net-print/foomatic-filters-3.0.20080507[cups] )
77 udev-acl? ( >=sys-fs/udev-145[extras] )
78 snmp? (
79 net-analyzer/net-snmp
80 dev-libs/openssl
81 )
82 !minimal? (
83 net-print/cups
84 virtual/libusb:0
85 scanner? ( >=media-gfx/sane-backends-1.0.19-r1 )
86 fax? ( sys-apps/dbus )
87 )"
88
89 DEPEND="${COMMON_DEPEND}
90 dev-util/pkgconfig"
91
92 RDEPEND="${COMMON_DEPEND}
93 >=app-text/ghostscript-gpl-8.70
94 !static-ppds? ( || ( >=net-print/cups-1.4.0 net-print/cupsddk ) )
95 !minimal? (
96 dev-python/pygobject
97 kernel_linux? ( >=sys-fs/udev-114 )
98 scanner? (
99 gtk? ( media-gfx/xsane )
100 !gtk? ( || ( media-gfx/sane-frontends dev-python/imaging ) )
101 )
102 fax? (
103 dev-python/reportlab
104 dev-python/dbus-python
105 )
106 qt4? (
107 dev-python/PyQt4[dbus,X]
108 libnotify? (
109 dev-python/notify-python
110 )
111 policykit? (
112 sys-auth/policykit
113 )
114 )
115 )"
116
117 CONFIG_CHECK="~PARPORT ~PPDEV"
118 ERROR_PARPORT="Please make sure parallel port support is enabled in your kernel (PARPORT and PPDEV)."
119
120 pkg_setup() {
121 if ! use minimal; then
122 python_set_active_version 2
123 python_pkg_setup
124 fi
125
126 ! use qt4 && ewarn "You need USE=qt4 for the hplip GUI."
127
128 use scanner && ! use gtk && ewarn "You need USE=gtk for the scanner GUI."
129
130 if ! use hpcups && ! use hpijs ; then
131 ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
132 ewarn "which is probably not what you want."
133 ewarn "You will almost certainly not be able to print."
134 ewarn "Recommended USE flags: USE=\"hpcups -hpijs\")."
135 fi
136
137 if use minimal ; then
138 ewarn "Installing driver portions only, make sure you know what you are doing."
139 ewarn "Depending on the USE flags set for hpcups and/or hpijs the appropiate"
140 ewarn "drivers are installed."
141 else
142 use parport && linux-info_pkg_setup
143 fi
144 }
145
146 src_prepare() {
147 python_convert_shebangs -q -r 2 .
148
149 # Do not install desktop files if there is no gui
150 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/452113
151 epatch "${FILESDIR}"/${PN}-3.9.10-desktop.patch
152
153 # Browser detection through xdg-open
154 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/482674
155 epatch "${FILESDIR}"/${PN}-3.9.10-browser.patch
156
157 # Use cups-config when checking for cupsddk
158 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/483136
159 epatch "${FILESDIR}"/${PN}-3.9.12-cupsddk.patch
160
161 # Htmldocs are not installed under docdir/html so enable htmldir configure switch
162 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/483217
163 epatch "${FILESDIR}"/${PN}-3.9.10-htmldir.patch
164
165 # Increase systray check timeout for slower machines
166 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/335662
167 epatch "${FILESDIR}"/${PN}-3.9.12-systray.patch
168
169 # Make hp-plugin work if gui_mode is disabled
170 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/399522
171 epatch "${FILESDIR}"/${P}-plugin.patch
172
173 # SYSFS deprecated but kept upstream for compatibility reasons
174 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/346390
175 epatch "${FILESDIR}"/${P}-udev-attrs.patch
176
177 # Fix crash when trying to close the systray
178 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/486698
179 epatch "${FILESDIR}"/${P}-systray-segfault.patch
180
181 # Force recognition of Gentoo distro by hp-check
182 sed -i \
183 -e "s:file('/etc/issue', 'r').read():'Gentoo':" \
184 installer/core_install.py || die
185
186 # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
187 # The hpcups driver does not use foomatic-rip
188 local i
189 for i in ppd/hpijs/*.ppd.gz
190 do
191 rm -f ${i}.temp
192 gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | gzip > ${i}.temp || die
193 mv ${i}.temp ${i}
194 done
195
196 eautoreconf
197 }
198
199 src_configure() {
200 local gui_build myconf drv_build minimal_build
201
202 if use qt4 ; then
203 gui_build="--enable-gui-build --enable-qt4 --disable-qt3"
204 if use policykit ; then
205 myconf="--enable-policykit"
206 else
207 myconf="--disable-policykit"
208 fi
209 else
210 gui_build="--disable-gui-build --disable-qt3 --disable-qt4"
211 fi
212
213 if use fax || use qt4 ; then
214 myconf="${myconf} --enable-dbus-build"
215 else
216 myconf="${myconf} --disable-dbus-build"
217 fi
218
219 if use hpcups ; then
220 drv_build="$(use_enable hpcups hpcups-install)"
221 if use static-ppds ; then
222 drv_build="${drv_build} --enable-cups-ppd-install"
223 drv_build="${drv_build} --disable-cups-drv-install"
224 else
225 drv_build="${drv_build} --enable-cups-drv-install"
226 drv_build="${drv_build} --disable-cups-ppd-install"
227 fi
228 else
229 drv_build="--disable-hpcups-install --disable-cups-drv-install"
230 drv_build="${drv_build} --disable-cups-ppd-install"
231 fi
232
233 if use hpijs ; then
234 drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
235 if use static-ppds ; then
236 drv_build="${drv_build} --enable-foomatic-ppd-install"
237 drv_build="${drv_build} --disable-foomatic-drv-install"
238 else
239 drv_build="${drv_build} --enable-foomatic-drv-install"
240 drv_build="${drv_build} --disable-foomatic-ppd-install"
241 fi
242 else
243 drv_build="${drv_build} --disable-hpijs-install"
244 drv_build="${drv_build} --disable-foomatic-drv-install"
245 drv_build="${drv_build} --disable-foomatic-ppd-install"
246 fi
247
248 if use minimal ; then
249 if use hpijs ; then
250 minimal_build="--enable-hpijs-only-build"
251 else
252 minimal_build="--disable-hpijs-only-build"
253 fi
254 if use hpcups ; then
255 minimal_build="${minimal_build} --enable-hpcups-only-build"
256 else
257 minimal_build="${minimal_build} --disable-hpcups-only-build"
258 fi
259 fi
260
261 econf \
262 --disable-dependency-tracking \
263 --disable-cups11-build \
264 --disable-lite-build \
265 --disable-foomatic-rip-hplip-install \
266 --disable-shadow-build \
267 --with-cupsbackenddir=$(cups-config --serverbin)/backend \
268 --with-cupsfilterdir=$(cups-config --serverbin)/filter \
269 --with-htmldir=/usr/share/doc/${P}/html \
270 ${gui_build} \
271 ${myconf} \
272 ${drv_build} \
273 ${minimal_build} \
274 $(use_enable new-hpcups new-hpcups) \
275 $(use_enable doc doc-build) \
276 $(use_enable fax fax-build) \
277 $(use_enable parport pp-build) \
278 $(use_enable scanner scan-build) \
279 $(use_enable snmp network-build) \
280 $(use_enable udev-acl udev-acl-rules)
281 }
282
283 src_install() {
284 emake DESTDIR="${D}" install || die
285
286 # Installed by sane-backends
287 # Gentoo Bug: #201023
288 rm -f "${D}"/etc/sane.d/dll.conf || die
289 }
290
291 pkg_postinst() {
292 use !minimal && python_mod_optimize /usr/share/${PN}
293 fdo-mime_desktop_database_update
294
295 elog "You should run hp-setup as root if you are installing hplip for the first time,"
296 elog "and may also need to run it if you are upgrading from an earlier version."
297 elog
298 elog "If your device is connected using USB, users will need to be in the lp group to"
299 elog "access it."
300 elog
301 elog "Starting with versions of hplip >=3.9.8 mDNS is the default network search"
302 elog "mechanism. To make use of it you need to activate the zeroconf flag on cups."
303 elog "If you prefer the SLP method you have to choose this when configuring the"
304 elog "device."
305 }
306
307 pkg_postrm() {
308 use !minimal && python_mod_cleanup /usr/share/${PN}
309 fdo-mime_desktop_database_update
310 }