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