Gentoo Archives: gentoo-commits

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