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: Thu, 30 Sep 2021 17:06:06
Message-Id: 1633021526.a7ed91bccee26284f98e0742c5d8890860aca682.billie@gentoo
1 commit: a7ed91bccee26284f98e0742c5d8890860aca682
2 Author: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 30 17:05:26 2021 +0000
4 Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 30 17:05:26 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7ed91bc
7
8 net-print/hplip: Version bump.
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org>
12
13 net-print/hplip/Manifest | 1 +
14 net-print/hplip/hplip-3.21.8.ebuild | 288 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 289 insertions(+)
16
17 diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest
18 index 721232f8417..78462a3f027 100644
19 --- a/net-print/hplip/Manifest
20 +++ b/net-print/hplip/Manifest
21 @@ -2,3 +2,4 @@ DIST hplip-3.20.11-patches-2.tar.xz 18140 BLAKE2B a0271d0c6fcfaa53c68ab00c4c6cfc
22 DIST hplip-3.20.11.tar.gz 26301441 BLAKE2B 14667f33cc50b2887c8434ada7327a82e16b9acbcdc75d3a50c0261ec9aef3fada9be81e6c0cbdfb4d29914630799c6406893644386db99c0ce86245cca38cc2 SHA512 f583fb4140a29c5e21956c3e51fe3620baa65d33b40447af419d7fc61473a1148a1873216a84e89be785b155ee8e9aebd5e3eb19d2ded82b8415b1a35de1b55d
23 DIST hplip-3.21.4-patches-1.tar.xz 17812 BLAKE2B d38584eb04e5e8d886cd4c8ecd05c31f3a32db185c87eed8a6593f3f2d1368a284bbef36f9d78b2689862165cd132597a3d616aaf5411e875f97de45c57e197e SHA512 fd7438353af8b05e100b5ef16fedcc6bf9257d49fe7d5a12a1a2b3b26965c2ebcd613788e7f585f7c0bd3a97e83381e36f3915eabd16a1e8c4ac50c1129804e8
24 DIST hplip-3.21.6.tar.gz 27026295 BLAKE2B 12588ee31bfad45842bd09f8aa0e653bbdb3c80358150b15d391bb55077e52870a5fb047ae0d4c98d687409b5d244da4ee08ce56a7946ef67088de1493a0455b SHA512 08d0a93089669aa04b158aac8aa339da0278824ff2d9ecfcd967ed21ae5c4a1092910e103696e01dd230b8367471528687a4d4623759a561962116758a0b093c
25 +DIST hplip-3.21.8.tar.gz 27085456 BLAKE2B a3d5dc664c9e87a0a02a4bd5854c6e207a2d661aef70e3ac1cff023bacdd56a004d90caa9897eb9887a16362f73b93b30d8f52e592813e2239448fb22d549b9e SHA512 13802359a2a4510243fa81a27c3047f1fc54c25d53597011a2d5a6933121ae5aa1b020790d7d1a8a0970d5cef18e7e57b60afcbbe079dcf6219e2e64ed6675d4
26
27 diff --git a/net-print/hplip/hplip-3.21.8.ebuild b/net-print/hplip/hplip-3.21.8.ebuild
28 new file mode 100644
29 index 00000000000..e3f7c820026
30 --- /dev/null
31 +++ b/net-print/hplip/hplip-3.21.8.ebuild
32 @@ -0,0 +1,288 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{8,9} )
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.21.4-patches-1.tar.xz"
50 +
51 +LICENSE="GPL-2"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
54 +
55 +IUSE="doc fax +hpcups hpijs kde libnotify libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X"
56 +
57 +COMMON_DEPEND="
58 + net-print/cups
59 + sys-apps/dbus
60 + virtual/jpeg:0
61 + hpijs? ( net-print/cups-filters[foomatic] )
62 + !libusb0? ( virtual/libusb:1 )
63 + libusb0? ( virtual/libusb:0 )
64 + ${PYTHON_DEPS}
65 + !minimal? (
66 + scanner? (
67 + media-gfx/sane-backends
68 + )
69 + snmp? (
70 + dev-libs/openssl:0=
71 + net-analyzer/net-snmp:=
72 + net-dns/avahi[dbus,python,${PYTHON_SINGLE_USEDEP}]
73 + )
74 + )
75 +"
76 +BDEPEND="
77 + virtual/pkgconfig
78 +"
79 +DEPEND="
80 + ${COMMON_DEPEND}
81 +"
82 +RDEPEND="
83 + ${COMMON_DEPEND}
84 + app-text/ghostscript-gpl
85 + !minimal? (
86 + $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]' 'python3*')
87 + kernel_linux? ( virtual/udev )
88 + $(python_gen_cond_dep '
89 + >=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}]
90 + dev-python/distro[${PYTHON_USEDEP}]
91 + fax? ( dev-python/reportlab[${PYTHON_USEDEP}] )
92 + qt5? (
93 + >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_USEDEP}]
94 + libnotify? ( dev-python/notify2[${PYTHON_USEDEP}] )
95 + )
96 + scanner? (
97 + >=dev-python/reportlab-3.2[${PYTHON_USEDEP}]
98 + >=dev-python/pillow-3.1.1[${PYTHON_USEDEP}]
99 + X? (
100 + || (
101 + kde? ( kde-misc/skanlite )
102 + media-gfx/xsane
103 + media-gfx/sane-frontends
104 + )
105 + )
106 + )
107 + ')
108 + )
109 + policykit? ( sys-auth/polkit )
110 +"
111 +
112 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
113 +
114 +PATCHES=(
115 + "${WORKDIR}/patches"
116 +)
117 +
118 +CONFIG_CHECK="~PARPORT ~PPDEV"
119 +ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
120 +
121 +#DISABLE_AUTOFORMATTING="yes"
122 +DOC_CONTENTS="
123 +For more information on setting up your printer please take
124 +a look at the hplip section of the gentoo printing guide:
125 +https://wiki.gentoo.org/wiki/Printing
126 +"
127 +
128 +pkg_setup() {
129 + python-single-r1_pkg_setup
130 +
131 + use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
132 +
133 + use parport && linux-info_pkg_setup
134 +
135 + if use minimal ; then
136 + ewarn "Installing driver portions only, make sure you know what you are doing."
137 + ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
138 + ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
139 + ewarn "This also disables fax, network, scanner and gui support!"
140 + fi
141 +
142 + if ! use hpcups && ! use hpijs ; then
143 + ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
144 + ewarn "which is probably not what you want."
145 + ewarn "You will almost certainly not be able to print."
146 + fi
147 +}
148 +
149 +src_prepare() {
150 + default
151 +
152 + python_fix_shebang .
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 drv_build minimal_build
180 +
181 + if use hpcups ; then
182 + drv_build="$(use_enable hpcups hpcups-install)"
183 + if use static-ppds ; then
184 + drv_build="${drv_build} --enable-cups-ppd-install"
185 + drv_build="${drv_build} --disable-cups-drv-install"
186 + else
187 + drv_build="${drv_build} --enable-cups-drv-install"
188 + drv_build="${drv_build} --disable-cups-ppd-install"
189 + fi
190 + else
191 + drv_build="--disable-hpcups-install"
192 + drv_build="${drv_build} --disable-cups-drv-install"
193 + drv_build="${drv_build} --disable-cups-ppd-install"
194 + fi
195 +
196 + if use hpijs ; then
197 + drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
198 + if use static-ppds ; then
199 + drv_build="${drv_build} --enable-foomatic-ppd-install"
200 + drv_build="${drv_build} --disable-foomatic-drv-install"
201 + else
202 + drv_build="${drv_build} --enable-foomatic-drv-install"
203 + drv_build="${drv_build} --disable-foomatic-ppd-install"
204 + fi
205 + else
206 + drv_build="${drv_build} --disable-hpijs-install"
207 + drv_build="${drv_build} --disable-foomatic-drv-install"
208 + drv_build="${drv_build} --disable-foomatic-ppd-install"
209 + fi
210 +
211 + if use minimal ; then
212 + if use hpijs ; then
213 + minimal_build="--enable-hpijs-only-build"
214 + else
215 + minimal_build="--disable-hpijs-only-build"
216 + fi
217 + if use hpcups ; then
218 + minimal_build="${minimal_build} --enable-hpcups-only-build"
219 + else
220 + minimal_build="${minimal_build} --disable-hpcups-only-build"
221 + fi
222 + minimal_build="${minimal_build} --disable-fax-build"
223 + minimal_build="${minimal_build} --disable-network-build"
224 + minimal_build="${minimal_build} --disable-scan-build"
225 + minimal_build="${minimal_build} --disable-gui-build"
226 + else
227 + if use fax ; then
228 + minimal_build="${minimal_build} --enable-fax-build"
229 + else
230 + minimal_build="${minimal_build} --disable-fax-build"
231 + fi
232 + if use snmp ; then
233 + minimal_build="${minimal_build} --enable-network-build"
234 + else
235 + minimal_build="${minimal_build} --disable-network-build"
236 + fi
237 + if use scanner ; then
238 + minimal_build="${minimal_build} --enable-scan-build"
239 + else
240 + minimal_build="${minimal_build} --disable-scan-build"
241 + fi
242 + if use qt5 ; then
243 + minimal_build="${minimal_build} --enable-qt5"
244 + minimal_build="${minimal_build} --enable-gui-build"
245 + else
246 + minimal_build="${minimal_build} --disable-gui-build"
247 + minimal_build="${minimal_build} --disable-qt5"
248 + fi
249 + fi
250 +
251 + # disable class driver for now
252 + econf \
253 + --disable-class-driver \
254 + --disable-cups11-build \
255 + --disable-foomatic-rip-hplip-install \
256 + --disable-imageProcessor-build \
257 + --disable-lite-build \
258 + --disable-shadow-build \
259 + --disable-qt3 \
260 + --disable-qt4 \
261 + --disable-udev_sysfs_rules \
262 + --with-cupsbackenddir=$(cups-config --serverbin)/backend \
263 + --with-cupsfilterdir=$(cups-config --serverbin)/filter \
264 + --with-docdir=/usr/share/doc/${PF} \
265 + --with-htmldir=/usr/share/doc/${PF}/html \
266 + --enable-hpps-install \
267 + --enable-dbus-build \
268 + ${drv_build} \
269 + ${minimal_build} \
270 + $(use_enable doc doc-build) \
271 + $(use_enable libusb0 libusb01_build) \
272 + $(use_enable parport pp-build) \
273 + $(use_enable policykit)
274 +
275 + # hpijs ppds are created at configure time but are not installed (3.17.11)
276 +
277 + # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
278 + # The hpcups driver does not use foomatic-rip
279 + #local i
280 + #for i in ppd/hpijs/*.ppd.gz ; do
281 + # rm -f ${i}.temp || die
282 + # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
283 + # gzip > ${i}.temp || die
284 + # mv ${i}.temp ${i} || die
285 + #done
286 +}
287 +
288 +src_install() {
289 + # Disable parallel install
290 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018
291 + emake -j1 DESTDIR="${D}" install
292 + einstalldocs
293 + # default
294 +
295 + # Installed by sane-backends
296 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
297 + rm -f "${ED}"/etc/sane.d/dll.conf || die
298 +
299 + # Remove desktop and autostart files
300 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770
301 + use qt5 || {
302 + rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg
303 + }
304 +
305 + rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
306 + rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die
307 +
308 + # Remove hal fdi files
309 + rm -rf "${ED}"/usr/share/hal || die
310 +
311 + find "${D}" -name '*.la' -delete || die
312 +
313 + python_optimize "${ED}"/usr/share/hplip
314 +
315 + readme.gentoo_create_doc
316 +}
317 +
318 +pkg_postinst() {
319 + readme.gentoo_print_elog
320 +}