1 |
commit: 1eb466dac9d4349a0b925ba4a441e596338ef50d |
2 |
Author: Daniel Pielmeier <billie <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 9 17:30:47 2021 +0000 |
4 |
Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 9 17:30:47 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1eb466da |
7 |
|
8 |
net-print/hplip: Version bump. |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.2 |
11 |
Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org> |
12 |
|
13 |
net-print/hplip/Manifest | 2 + |
14 |
net-print/hplip/hplip-3.21.4.ebuild | 288 ++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 290 insertions(+) |
16 |
|
17 |
diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest |
18 |
index f9e12d7782e..739c4aa5163 100644 |
19 |
--- a/net-print/hplip/Manifest |
20 |
+++ b/net-print/hplip/Manifest |
21 |
@@ -2,3 +2,5 @@ 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.2-patches-1.tar.xz 19212 BLAKE2B c733651a7831b54bec13b5f037b0f00ab53dbec193f73964d7bb3f8ee4e1dcd02a02dd793d7fc322fe34085bbe5ec281076757d8882b4eb7f85fd0e45b1c3200 SHA512 23c696b111fe098358eb609e64cedc2ee85f4a1dac8bce895e3c6bbcb96e62dd5d2d3f1bcc9d12d20ccd6717b23f92b3016c926df7c73f50ba9425542d08ed29 |
24 |
DIST hplip-3.21.2.tar.gz 27014784 BLAKE2B b6a13f0d48f3052ad09b419dbe9b68605c85ed8f1bfb6f1ec9720b9aace4a1c6d17a933b0d55ba20dbbc3d389ba1d2751dbd9a71d364ad2e2e1617cd7613dc2d SHA512 73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474 |
25 |
+DIST hplip-3.21.4-patches-1.tar.xz 17812 BLAKE2B d38584eb04e5e8d886cd4c8ecd05c31f3a32db185c87eed8a6593f3f2d1368a284bbef36f9d78b2689862165cd132597a3d616aaf5411e875f97de45c57e197e SHA512 fd7438353af8b05e100b5ef16fedcc6bf9257d49fe7d5a12a1a2b3b26965c2ebcd613788e7f585f7c0bd3a97e83381e36f3915eabd16a1e8c4ac50c1129804e8 |
26 |
+DIST hplip-3.21.4.tar.gz 27019741 BLAKE2B 8e978488e09d99d136351b84fddd9ac7921b9ad1ca2355bfde4eca89646953c3caada5d45aeeb6e7882c448349e5ccd4b473df6f0f42e9b50d4b057157397d5f SHA512 3f22433b3d35013025b63163ccd879da203adcec821f9f90748ee8399b370a129ecdffb5889efa57da1dc5c3f45c42f7593d2198d9166240156baf839b55fce6 |
27 |
|
28 |
diff --git a/net-print/hplip/hplip-3.21.4.ebuild b/net-print/hplip/hplip-3.21.4.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..84ae3994756 |
31 |
--- /dev/null |
32 |
+++ b/net-print/hplip/hplip-3.21.4.ebuild |
33 |
@@ -0,0 +1,288 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
40 |
+PYTHON_REQ_USE="threads(+),xml" |
41 |
+ |
42 |
+# 14 and 15 spit out a lot of warnings about subdirs |
43 |
+WANT_AUTOMAKE="1.13" |
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.4-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_MULTI_USEDEP}]' 'python3*') |
88 |
+ kernel_linux? ( virtual/udev ) |
89 |
+ $(python_gen_cond_dep ' |
90 |
+ >=dev-python/dbus-python-1.2.0-r1[${PYTHON_MULTI_USEDEP}] |
91 |
+ dev-python/distro[${PYTHON_MULTI_USEDEP}] |
92 |
+ fax? ( dev-python/reportlab[${PYTHON_MULTI_USEDEP}] ) |
93 |
+ qt5? ( |
94 |
+ >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_MULTI_USEDEP}] |
95 |
+ libnotify? ( dev-python/notify2[${PYTHON_MULTI_USEDEP}] ) |
96 |
+ ) |
97 |
+ scanner? ( |
98 |
+ >=dev-python/reportlab-3.2[${PYTHON_MULTI_USEDEP}] |
99 |
+ >=dev-python/pillow-3.1.1[${PYTHON_MULTI_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 |
+} |