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.11.7.ebuild hplip-3.11.5-r1.ebuild
Date: Mon, 25 Jul 2011 18:18:06
Message-Id: 20110725181755.B99482004B@flycatcher.gentoo.org
1 billie 11/07/25 18:17:55
2
3 Modified: ChangeLog
4 Added: hplip-3.11.7.ebuild
5 Removed: hplip-3.11.5-r1.ebuild
6 Log:
7 Version bump. Remove old.
8
9 (Portage version: 2.1.10.3/cvs/Linux i686)
10
11 Revision Changes Path
12 1.193 net-print/hplip/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?rev=1.193&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?rev=1.193&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?r1=1.192&r2=1.193
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v
21 retrieving revision 1.192
22 retrieving revision 1.193
23 diff -u -r1.192 -r1.193
24 --- ChangeLog 24 Jul 2011 10:42:56 -0000 1.192
25 +++ ChangeLog 25 Jul 2011 18:17:55 -0000 1.193
26 @@ -1,6 +1,12 @@
27 # ChangeLog for net-print/hplip
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.192 2011/07/24 10:42:56 billie Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.193 2011/07/25 18:17:55 billie Exp $
31 +
32 +*hplip-3.11.7 (25 Jul 2011)
33 +
34 + 25 Jul 2011; Daniel Pielmeier <billie@g.o> -hplip-3.11.5-r1.ebuild,
35 + +hplip-3.11.7.ebuild, +files/hplip-3.11.7-udev-attrs.patch:
36 + Version bump. Remove old.
37
38 24 Jul 2011; Daniel Pielmeier <billie@g.o>
39 -files/hplip-3.9.10-desktop.patch, -files/hplip-3.9.10-htmldir.patch,
40
41
42
43 1.1 net-print/hplip/hplip-3.11.7.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/hplip-3.11.7.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/hplip-3.11.7.ebuild?rev=1.1&content-type=text/plain
47
48 Index: hplip-3.11.7.ebuild
49 ===================================================================
50 # Copyright 1999-2011 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.11.7.ebuild,v 1.1 2011/07/25 18:17:55 billie Exp $
53
54 EAPI=3
55
56 PYTHON_DEPEND="!minimal? 2"
57 PYTHON_USE_WITH="threads xml"
58 PYTHON_USE_WITH_OPT="!minimal"
59
60 inherit fdo-mime linux-info python autotools
61
62 DESCRIPTION="HP Linux Imaging and Printing. Includes printer, scanner, fax drivers and service tools."
63 HOMEPAGE="http://hplipopensource.com/hplip-web/index.html"
64 SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz"
65
66 LICENSE="GPL-2"
67 SLOT="0"
68 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
69
70 # zeroconf does not work properly with >=cups-1.4.
71 # Thus support for it is also disabled in hplip.
72 IUSE="doc fax +hpcups hpijs kde libnotify minimal parport policykit qt4 scanner snmp static-ppds -acl X"
73
74 COMMON_DEPEND="
75 virtual/jpeg
76 hpijs? ( >=net-print/foomatic-filters-3.0.20080507[cups] )
77 acl? ( || ( >=sys-fs/udev-171[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.71-r3
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 dev-python/imaging
100 X? ( || (
101 kde? ( kde-misc/skanlite )
102 media-gfx/xsane
103 media-gfx/sane-frontends
104 ) )
105 )
106 fax? (
107 dev-python/reportlab
108 dev-python/dbus-python
109 )
110 qt4? (
111 dev-python/PyQt4[dbus,X]
112 libnotify? (
113 dev-python/notify-python
114 )
115 policykit? (
116 sys-auth/polkit
117 )
118 )
119 )"
120
121 CONFIG_CHECK="~PARPORT ~PPDEV"
122 ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
123
124 pkg_setup() {
125 if ! use minimal; then
126 python_set_active_version 2
127 python_pkg_setup
128 fi
129
130 ! use qt4 && ewarn "You need USE=qt4 for the hplip GUI."
131
132 use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
133
134 if ! use hpcups && ! use hpijs ; then
135 ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
136 ewarn "which is probably not what you want."
137 ewarn "You will almost certainly not be able to print."
138 ewarn "Recommended USE flags: USE=\"hpcups -hpijs\")."
139 fi
140
141 if use minimal ; then
142 ewarn "Installing driver portions only, make sure you know what you are doing."
143 ewarn "Depending on the USE flags set for hpcups and/or hpijs the appropiate"
144 ewarn "drivers are installed."
145 else
146 use parport && linux-info_pkg_setup
147 fi
148 }
149
150 src_prepare() {
151 python_convert_shebangs -q -r 2 .
152
153 # Fix for Gentoo bug #345725
154 sed -i -e "s|/etc/udev/rules.d|/$(get_libdir)/udev/rules.d|" \
155 $(find ./ -type f -exec grep -l '/etc/udev/rules.d' '{}' '+') \
156 || die "sed udev rules"
157
158 # Do not install desktop files if there is no gui
159 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/452113
160 epatch "${FILESDIR}"/${PN}-3.11.1-desktop.patch
161
162 # Browser detection through xdg-open
163 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/482674
164 epatch "${FILESDIR}"/${PN}-3.9.10-browser.patch
165
166 # Use cups-config when checking for cupsddk
167 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/483136
168 epatch "${FILESDIR}"/${PN}-3.9.12-cupsddk.patch
169
170 # Htmldocs are not installed under docdir/html so enable htmldir configure
171 # switch
172 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/483217
173 epatch "${FILESDIR}"/${PN}-3.11.1-htmldir.patch
174
175 # Increase systray check timeout for slower machines
176 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/335662
177 epatch "${FILESDIR}"/${PN}-3.9.12-systray.patch
178
179 # SYSFS deprecated but kept upstream for compatibility reasons
180 # Upstream bug: https://bugs.launchpad.net/hplip/+bug/346390
181 epatch "${FILESDIR}"/${P}-udev-attrs.patch
182
183 # CVE-2010-4267 SNMP Response Processing Buffer Overflow Vulnerability
184 # http://secunia.com/advisories/42956/
185 # https://bugzilla.redhat.com/show_bug.cgi?id=662740
186 epatch "${FILESDIR}"/${PN}-3.10.9-cve-2010-4267.patch
187
188 # Fix build with cups-1.5
189 epatch "${FILESDIR}"/${PN}-3.11.5-cups-1.5.patch
190
191 # Force recognition of Gentoo distro by hp-check
192 sed -i \
193 -e "s:file('/etc/issue', 'r').read():'Gentoo':" \
194 installer/core_install.py || die
195
196 # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
197 # The hpcups driver does not use foomatic-rip
198 local i
199 for i in ppd/hpijs/*.ppd.gz ; do
200 rm -f ${i}.temp
201 gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
202 gzip > ${i}.temp || die
203 mv ${i}.temp ${i}
204 done
205
206 eautoreconf
207 }
208
209 src_configure() {
210 local gui_build myconf drv_build minimal_build
211
212 if use qt4 ; then
213 gui_build="--enable-gui-build --enable-qt4 --disable-qt3"
214 if use policykit ; then
215 myconf="--enable-policykit"
216 else
217 myconf="--disable-policykit"
218 fi
219 else
220 gui_build="--disable-gui-build --disable-qt3 --disable-qt4"
221 fi
222
223 if use fax || use qt4 ; then
224 myconf="${myconf} --enable-dbus-build"
225 else
226 myconf="${myconf} --disable-dbus-build"
227 fi
228
229 if use hpcups ; then
230 drv_build="$(use_enable hpcups hpcups-install)"
231 if use static-ppds ; then
232 drv_build="${drv_build} --enable-cups-ppd-install"
233 drv_build="${drv_build} --disable-cups-drv-install"
234 else
235 drv_build="${drv_build} --enable-cups-drv-install"
236 drv_build="${drv_build} --disable-cups-ppd-install"
237 fi
238 else
239 drv_build="--disable-hpcups-install --disable-cups-drv-install"
240 drv_build="${drv_build} --disable-cups-ppd-install"
241 fi
242
243 if use hpijs ; then
244 drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
245 if use static-ppds ; then
246 drv_build="${drv_build} --enable-foomatic-ppd-install"
247 drv_build="${drv_build} --disable-foomatic-drv-install"
248 else
249 drv_build="${drv_build} --enable-foomatic-drv-install"
250 drv_build="${drv_build} --disable-foomatic-ppd-install"
251 fi
252 else
253 drv_build="${drv_build} --disable-hpijs-install"
254 drv_build="${drv_build} --disable-foomatic-drv-install"
255 drv_build="${drv_build} --disable-foomatic-ppd-install"
256 fi
257
258 if use minimal ; then
259 if use hpijs ; then
260 minimal_build="--enable-hpijs-only-build"
261 else
262 minimal_build="--disable-hpijs-only-build"
263 fi
264 if use hpcups ; then
265 minimal_build="${minimal_build} --enable-hpcups-only-build"
266 else
267 minimal_build="${minimal_build} --disable-hpcups-only-build"
268 fi
269 fi
270
271 econf \
272 --disable-dependency-tracking \
273 --disable-cups11-build \
274 --disable-lite-build \
275 --disable-foomatic-rip-hplip-install \
276 --disable-shadow-build \
277 --with-cupsbackenddir=$(cups-config --serverbin)/backend \
278 --with-cupsfilterdir=$(cups-config --serverbin)/filter \
279 --with-docdir=/usr/share/doc/${PF} \
280 --with-htmldir=/usr/share/doc/${PF}/html \
281 ${gui_build} \
282 ${myconf} \
283 ${drv_build} \
284 ${minimal_build} \
285 $(use_enable doc doc-build) \
286 $(use_enable fax fax-build) \
287 $(use_enable parport pp-build) \
288 $(use_enable scanner scan-build) \
289 $(use_enable snmp network-build) \
290 $(use_enable acl udev-acl-rules)
291 }
292
293 src_install() {
294 emake DESTDIR="${D}" install || die
295
296 # Installed by sane-backends
297 # Gentoo Bug: #201023
298 rm -f "${D}"/etc/sane.d/dll.conf || die
299 }
300
301 pkg_postinst() {
302 use !minimal && python_mod_optimize /usr/share/${PN}
303 fdo-mime_desktop_database_update
304
305 elog "For more information on setting up your printer please take"
306 elog "a look at the hplip section of the gentoo printing guide:"
307 elog "http://www.gentoo.org/doc/en/printing-howto.xml"
308 }
309
310 pkg_postrm() {
311 use !minimal && python_mod_cleanup /usr/share/${PN}
312 fdo-mime_desktop_database_update
313 }