Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/hplip/
Date: Mon, 26 Sep 2016 20:06:34
Message-Id: 1474920373.ff7d6616af2702ae8ed1a5a074522ed4e13762c6.mrueg@gentoo
1 commit: ff7d6616af2702ae8ed1a5a074522ed4e13762c6
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 26 20:06:13 2016 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 26 20:06:13 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff7d6616
7
8 net-print/hplip: Version bump to 3.16.9
9
10 Package-Manager: portage-2.3.1
11
12 net-print/hplip/Manifest | 1 +
13 net-print/hplip/hplip-3.16.9.ebuild | 268 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 269 insertions(+)
15
16 diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest
17 index 84ab6d5..7f75fb5 100644
18 --- a/net-print/hplip/Manifest
19 +++ b/net-print/hplip/Manifest
20 @@ -5,3 +5,4 @@ DIST hplip-3.16.3.tar.gz 22408596 SHA256 42d2302ee38bda41caa0f2f9524a91f531e3aa4
21 DIST hplip-3.16.5-patches-1.tar.xz 8200 SHA256 98866e57a247e7a30d9cd584ed9411aa79a6185294a73b4cc5961efe9a5e5fa6 SHA512 36d33da5fc4105183cbc5137845ddccd8ab2b6abbff053a3a51f3da61c26c2d9d48dcb735345fb453abd67b6a0797aa337102c366cce037bc7006599b20b1646 WHIRLPOOL 8ac91bdefeb177c092b1d6de16474e8e1da57ad046dbc579f14fd40a27d1837d9bf142573137ef8d91c37dc7b03ca908fd5bfad23a9815af2015b521091c2700
22 DIST hplip-3.16.7.tar.gz 22872438 SHA256 9dfe0642636f2b40cb7f1c178e7ab8a794f4d0be8f75be348d1b681793f3ffc2 SHA512 68fb6748bd04809c58f0739c31487b79042f8ae89a642aa3fdcb9ee4474a319ab880c3e95b318465a70ff2ee112b576a398ef98ae3a0de45e60fba3357af6abb WHIRLPOOL 9a7a5ea51214ffd4b1604e613ccbf726ebca9cdc3ef0fe2c221611d67da9b97dcdfa01079396339e7f2382d2040f3d4e7da7782cdc5372c08a25e0c66d83f9c3
23 DIST hplip-3.16.8.tar.gz 22942175 SHA256 a9da67ae51c17487a8d725eb9c0bf9c6f0416e1fffa7db6cdff5302b1c556ceb SHA512 213a39739834eca4e8b247706394cbeb6cf4ada547711d7b3e9187a43e8da8988b1b3efebdffb709cb73bc9ca863200d1405297d5797260eafae6a68531dc15f WHIRLPOOL ce6c00b8602589c7c16e6e6efb4ac47999c45f95519817f728be2bcdc1269916a5ff6e1f67a45a8f51cd16834ecdf599dfbd0ac18946aa68532b286560ba9956
24 +DIST hplip-3.16.9.tar.gz 23057361 SHA256 cc8cf2a7baa1403cddd6503f120c58780c786b42fad073da6caec7535d3797a6 SHA512 801bf6578759b1204eb8ede376ee0a22a12c7821ceafeb8c84a2aa5596bfccef222a15af896c33ba46c53b3e4776629efee264b6d67487cbf197b028d22b68ff WHIRLPOOL 3374e43630a39c245541180ac9e6b76431687f5b977271a4bc09cd8de897bfc992ab43ab5235bb4806da33a65d22aeb0ea2783fa52501aaafdd142e229621492
25
26 diff --git a/net-print/hplip/hplip-3.16.9.ebuild b/net-print/hplip/hplip-3.16.9.ebuild
27 new file mode 100644
28 index 00000000..e991e1ff
29 --- /dev/null
30 +++ b/net-print/hplip/hplip-3.16.9.ebuild
31 @@ -0,0 +1,268 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python{2_7,3_3,3_4} )
39 +PYTHON_REQ_USE="threads,xml"
40 +
41 +inherit eutils linux-info python-single-r1 readme.gentoo-r1 udev autotools
42 +
43 +DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools"
44 +HOMEPAGE="http://hplipopensource.com/hplip-web/index.html"
45 +SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz
46 + https://dev.gentoo.org/~billie/distfiles/${PN}-3.16.5-patches-1.tar.xz"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
51 +
52 +IUSE="doc fax +hpcups hpijs kde -libusb0 minimal parport policykit +qt4 qt5 scanner +snmp static-ppds X"
53 +
54 +# dependency on dev-python/notify-python dropped due to python 3 incompatibility
55 +# possible replacement notify2 (https://pypi.python.org/pypi/notify2/0.3) not in tree
56 +
57 +COMMON_DEPEND="
58 + virtual/jpeg:0
59 + hpijs? (
60 + || ( >=net-print/cups-filters-1.0.43-r1[foomatic] >=net-print/foomatic-filters-3.0.20080507[cups] )
61 + )
62 + >=net-print/cups-1.4.0
63 + !minimal? (
64 + ${PYTHON_DEPS}
65 + !libusb0? ( virtual/libusb:1 )
66 + libusb0? ( virtual/libusb:0 )
67 + scanner? ( >=media-gfx/sane-backends-1.0.19-r1 )
68 + fax? ( >=sys-apps/dbus-1.6.8-r1 )
69 + snmp? (
70 + net-analyzer/net-snmp
71 + dev-libs/openssl:0
72 + )
73 + )"
74 +
75 +DEPEND="${COMMON_DEPEND}
76 + virtual/pkgconfig"
77 +
78 +RDEPEND="${COMMON_DEPEND}
79 + >=app-text/ghostscript-gpl-8.71-r3
80 + policykit? ( sys-auth/polkit )
81 + !minimal? (
82 + >=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}]
83 + dev-python/pygobject[${PYTHON_USEDEP}]
84 + kernel_linux? ( virtual/udev )
85 + scanner? (
86 + >=dev-python/reportlab-3.1.44-r2[${PYTHON_USEDEP}]
87 + >=dev-python/pillow-3.1.1[${PYTHON_USEDEP}]
88 + X? ( || (
89 + kde? ( kde-misc/skanlite )
90 + media-gfx/xsane
91 + media-gfx/sane-frontends
92 + ) )
93 + )
94 + fax? ( >=dev-python/reportlab-3.1.44-r2[${PYTHON_USEDEP}] )
95 + qt4? ( >=dev-python/PyQt4-4.11.1[dbus,X,${PYTHON_USEDEP}] )
96 + qt5? ( >=dev-python/PyQt5-5.5.1[dbus,gui,${PYTHON_USEDEP}] )
97 + )"
98 +
99 +REQUIRED_USE="
100 + !minimal? ( ${PYTHON_REQUIRED_USE} )
101 + !minimal? ( qt4? ( !qt5 ) )
102 +"
103 +
104 +CONFIG_CHECK="~PARPORT ~PPDEV"
105 +ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
106 +
107 +#DISABLE_AUTOFORMATTING="yes"
108 +DOC_CONTENTS="
109 +For more information on setting up your printer please take
110 +a look at the hplip section of the gentoo printing guide:
111 +https://wiki.gentoo.org/wiki/Printing
112 +
113 +Any user who wants to print must be in the lp group.
114 +"
115 +
116 +pkg_setup() {
117 + use !minimal && python-single-r1_pkg_setup
118 +
119 + ! use qt4 && ! use qt5 && ewarn "You need USE=qt4 or USE=qt5 for the hplip GUI."
120 +
121 + use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
122 +
123 + if ! use hpcups && ! use hpijs ; then
124 + ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
125 + ewarn "which is probably not what you want."
126 + ewarn "You will almost certainly not be able to print."
127 + fi
128 +
129 + if use minimal ; then
130 + ewarn "Installing driver portions only, make sure you know what you are doing."
131 + ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
132 + ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
133 + else
134 + use parport && linux-info_pkg_setup
135 + fi
136 +}
137 +
138 +src_prepare() {
139 + eapply "${WORKDIR}/patches"
140 +
141 + default
142 +
143 + if use !minimal ; then
144 + python_export EPYTHON PYTHON
145 + python_fix_shebang .
146 + fi
147 +
148 + # Make desktop files follow the specification
149 + # Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680
150 + # Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324
151 + sed -i -e '/^Categories=/s/Application;//' \
152 + -e '/^Encoding=.*/d' hplip.desktop.in || die
153 + sed -i -e '/^Categories=/s/Application;//' \
154 + -e '/^Version=.*/d' \
155 + -e '/^Comment=.*/d' hplip-systray.desktop.in || die
156 +
157 + # Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725
158 + # Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847,
159 + # https://bugs.launchpad.net/hplip/+bug/500086
160 + local udevdir=$(get_udevdir)
161 + sed -i -e "s|/etc/udev|${udevdir}|g" \
162 + $(find . -type f -exec grep -l /etc/udev {} +) || die
163 +
164 + # Force recognition of Gentoo distro by hp-check
165 + sed -i \
166 + -e "s:file('/etc/issue', 'r').read():'Gentoo':" \
167 + installer/core_install.py || die
168 +
169 + # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
170 + # The hpcups driver does not use foomatic-rip
171 + local i
172 + for i in ppd/hpijs/*.ppd.gz ; do
173 + rm -f ${i}.temp || die
174 + gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
175 + gzip > ${i}.temp || die
176 + mv ${i}.temp ${i} || die
177 + done
178 +
179 + eautoreconf
180 +}
181 +
182 +src_configure() {
183 + local myconf drv_build minimal_build
184 +
185 + if use qt4 || use qt5 ; then
186 + myconf="${myconf} --enable-gui-build"
187 + else
188 + myconf="${myconf} --disable-gui-build"
189 + fi
190 +
191 + if use fax || use qt4 || use qt5 ; then
192 + myconf="${myconf} --enable-dbus-build"
193 + else
194 + myconf="${myconf} --disable-dbus-build"
195 + fi
196 +
197 + if use libusb0 ; then
198 + myconf="${myconf} --enable-libusb01_build"
199 + else
200 + myconf="${myconf} --disable-libusb01_build"
201 + fi
202 +
203 + if use hpcups ; then
204 + drv_build="$(use_enable hpcups hpcups-install)"
205 + if use static-ppds ; then
206 + drv_build="${drv_build} --enable-cups-ppd-install"
207 + drv_build="${drv_build} --disable-cups-drv-install"
208 + else
209 + drv_build="${drv_build} --enable-cups-drv-install"
210 + drv_build="${drv_build} --disable-cups-ppd-install"
211 + fi
212 + else
213 + drv_build="--disable-hpcups-install"
214 + drv_build="${drv_build} --disable-cups-drv-install"
215 + drv_build="${drv_build} --disable-cups-ppd-install"
216 + fi
217 +
218 + if use hpijs ; then
219 + drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
220 + if use static-ppds ; then
221 + drv_build="${drv_build} --enable-foomatic-ppd-install"
222 + drv_build="${drv_build} --disable-foomatic-drv-install"
223 + else
224 + drv_build="${drv_build} --enable-foomatic-drv-install"
225 + drv_build="${drv_build} --disable-foomatic-ppd-install"
226 + fi
227 + else
228 + drv_build="${drv_build} --disable-hpijs-install"
229 + drv_build="${drv_build} --disable-foomatic-drv-install"
230 + drv_build="${drv_build} --disable-foomatic-ppd-install"
231 + fi
232 +
233 + if use minimal ; then
234 + if use hpijs ; then
235 + minimal_build="--enable-hpijs-only-build"
236 + else
237 + minimal_build="--disable-hpijs-only-build"
238 + fi
239 + if use hpcups ; then
240 + minimal_build="${minimal_build} --enable-hpcups-only-build"
241 + else
242 + minimal_build="${minimal_build} --disable-hpcups-only-build"
243 + fi
244 + fi
245 +
246 + econf \
247 + --disable-cups11-build \
248 + --disable-lite-build \
249 + --disable-foomatic-rip-hplip-install \
250 + --disable-shadow-build \
251 + --disable-qt3 \
252 + --disable-udev_sysfs_rules \
253 + --with-cupsbackenddir=$(cups-config --serverbin)/backend \
254 + --with-cupsfilterdir=$(cups-config --serverbin)/filter \
255 + --with-docdir=/usr/share/doc/${PF} \
256 + --with-htmldir=/usr/share/doc/${PF}/html \
257 + ${myconf} \
258 + ${drv_build} \
259 + ${minimal_build} \
260 + $(use_enable doc doc-build) \
261 + $(use_enable fax fax-build) \
262 + $(use_enable parport pp-build) \
263 + $(use_enable scanner scan-build) \
264 + $(use_enable snmp network-build) \
265 + $(use_enable qt4) \
266 + $(use_enable qt5) \
267 + $(use_enable policykit)
268 +}
269 +
270 +src_install() {
271 + # disable parallel install
272 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018
273 + emake -j1 DESTDIR="${D}" install
274 + einstalldocs
275 + # default
276 +
277 + # Installed by sane-backends
278 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
279 + rm -f "${D}"/etc/sane.d/dll.conf || die
280 +
281 + rm -f "${D}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
282 + rmdir --ignore-fail-on-non-empty "${D}"/usr/share/doc/${PF}/ || die
283 +
284 + # Remove hal fdi files
285 + rm -rf "${D}"/usr/share/hal || die
286 +
287 + prune_libtool_files --all
288 +
289 + if use !minimal ; then
290 + python_export EPYTHON PYTHON
291 + python_optimize "${D}"/usr/share/hplip
292 + fi
293 +
294 + readme.gentoo_create_doc
295 +}
296 +
297 +pkg_postinst() {
298 + readme.gentoo_print_elog
299 +}