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