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