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