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.11-r1.ebuild
Date: Sat, 30 Nov 2013 11:50:50
Message-Id: 20131130115042.595A02004B@flycatcher.gentoo.org
1 billie 13/11/30 11:50:42
2
3 Modified: ChangeLog
4 Added: hplip-3.13.11-r1.ebuild
5 Log:
6 Revision bump to fix bug #492486. Thanks to BT for the report and the patch.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 215AD14D)
9
10 Revision Changes Path
11 1.285 net-print/hplip/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?rev=1.285&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?rev=1.285&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/ChangeLog?r1=1.284&r2=1.285
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v
20 retrieving revision 1.284
21 retrieving revision 1.285
22 diff -u -r1.284 -r1.285
23 --- ChangeLog 7 Nov 2013 17:09:49 -0000 1.284
24 +++ ChangeLog 30 Nov 2013 11:50:42 -0000 1.285
25 @@ -1,6 +1,11 @@
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.284 2013/11/07 17:09:49 billie Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.285 2013/11/30 11:50:42 billie Exp $
30 +
31 +*hplip-3.13.11-r1 (30 Nov 2013)
32 +
33 + 30 Nov 2013; Daniel Pielmeier <billie@g.o> +hplip-3.13.11-r1.ebuild:
34 + Revision bump to fix bu #492486. Thanks to BT for the report and the patch.
35
36 *hplip-3.13.11 (07 Nov 2013)
37
38
39
40
41 1.1 net-print/hplip/hplip-3.13.11-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/hplip-3.13.11-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/hplip/hplip-3.13.11-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: hplip-3.13.11-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2013 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.13.11-r1.ebuild,v 1.1 2013/11/30 11:50:42 billie Exp $
51
52 EAPI=5
53
54 PYTHON_COMPAT=( python{2_6,2_7} )
55 PYTHON_REQ_USE="threads,xml"
56
57 inherit eutils fdo-mime linux-info python-single-r1 udev autotools toolchain-funcs
58
59 DESCRIPTION="HP Linux Imaging and Printing. Includes printer, scanner, fax drivers and service tools."
60 HOMEPAGE="http://hplipopensource.com/hplip-web/index.html"
61 SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz
62 http://dev.gentoo.org/~billie/distfiles/${PN}-3.13.11-patches-1.tar.xz"
63
64 LICENSE="GPL-2"
65 SLOT="0"
66 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
67
68 # zeroconf does not work properly with >=cups-1.4.
69 # Thus support for it is also disabled in hplip.
70 IUSE="doc fax +hpcups hpijs kde libnotify -libusb0 minimal parport policykit qt4 scanner snmp static-ppds X"
71
72 # TODO: check if net-print/cups, net-analyzer/net-snmp
73 # are migrated to python-r1
74
75 COMMON_DEPEND="
76 virtual/jpeg
77 hpijs? ( >=net-print/foomatic-filters-3.0.20080507[cups] )
78 !minimal? (
79 ${PYTHON_DEPS}
80 >=net-print/cups-1.4.0
81 !libusb0? ( virtual/libusb:1 )
82 libusb0? ( virtual/libusb:0 )
83 scanner? ( >=media-gfx/sane-backends-1.0.19-r1 )
84 fax? ( >=sys-apps/dbus-1.6.8-r1 )
85 snmp? (
86 net-analyzer/net-snmp
87 dev-libs/openssl:0
88 )
89 )"
90
91 DEPEND="${COMMON_DEPEND}
92 virtual/pkgconfig"
93
94 RDEPEND="${COMMON_DEPEND}
95 >=app-text/ghostscript-gpl-8.71-r3
96 >=dev-python/dbus-python-1.1.1-r1[${PYTHON_USEDEP}]
97 policykit? (
98 sys-auth/polkit
99 )
100 !minimal? (
101 >=dev-python/pygobject-2.28.6-r53:2[${PYTHON_USEDEP}]
102 kernel_linux? ( virtual/udev !<sys-fs/udev-114 )
103 scanner? (
104 >=dev-python/reportlab-2.6[${PYTHON_USEDEP}]
105 >=virtual/python-imaging-1[${PYTHON_USEDEP}]
106 X? ( || (
107 kde? ( kde-misc/skanlite )
108 media-gfx/xsane
109 media-gfx/sane-frontends
110 ) )
111 )
112 fax? (
113 >=dev-python/reportlab-2.6[${PYTHON_USEDEP}]
114 >=dev-python/dbus-python-1.1.1-r1[${PYTHON_USEDEP}]
115 )
116 qt4? (
117 >=dev-python/PyQt4-4.9.6-r2[dbus,X,${PYTHON_USEDEP}]
118 libnotify? (
119 >=dev-python/notify-python-0.1.1-r3[${PYTHON_USEDEP}]
120 )
121 )
122 )"
123
124 REQUIRED_USE="!minimal? ( ${PYTHON_REQUIRED_USE} )"
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_postinst() {
300 if [[ -z "${REPLACING_VERSIONS}" ]]; then
301 elog "For more information on setting up your printer please take"
302 elog "a look at the hplip section of the gentoo printing guide:"
303 elog "http://www.gentoo.org/doc/en/printing-howto.xml"
304 elog
305 elog "Any user who wants to print must be in the lp group."
306 fi
307 }