Gentoo Archives: gentoo-commits

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