1 |
commit: 79ed43dde0d79b213d97f4e7955304c488a8f6f2 |
2 |
Author: Daniel Pielmeier <billie <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 25 13:17:36 2020 +0000 |
4 |
Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 25 13:17:36 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79ed43dd |
7 |
|
8 |
net-print/hplip: Revision bump to hplip-3.20.6-r2. |
9 |
|
10 |
Add python 3.9 support. |
11 |
Add a proper patch for pythoncludes which also repects CFLAGS. |
12 |
Fix build with clang. |
13 |
Do not install systemd service for plugin/firmware handling. |
14 |
|
15 |
Closes: https://bugs.gentoo.org/739526 |
16 |
Closes: https://bugs.gentoo.org/741088 |
17 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
18 |
Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org> |
19 |
|
20 |
net-print/hplip/Manifest | 1 + |
21 |
net-print/hplip/hplip-3.20.6-r2.ebuild | 278 +++++++++++++++++++++++++++++++++ |
22 |
2 files changed, 279 insertions(+) |
23 |
|
24 |
diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest |
25 |
index cebfaf63235..47f295ec2ba 100644 |
26 |
--- a/net-print/hplip/Manifest |
27 |
+++ b/net-print/hplip/Manifest |
28 |
@@ -2,4 +2,5 @@ DIST hplip-3.18.12-patches-1.tar.xz 12032 BLAKE2B 33e6e4e1e0e5b4f998459073cf0742 |
29 |
DIST hplip-3.19.12.tar.gz 25676247 BLAKE2B 1373aa70a2307071c28a22b0ae85e242c3e6bec614ef7490c1ecc0e5e745b81b6c2097948fbd062b5e72e10714cdc8d6f9145aacafc0fedeafde375909cb2cb6 SHA512 5552cd717ae082ee55cdb77d79e8d035d8ecb7cf23c79d659fda43468d8ed414a33c4d869eab4ab83dee836f0d1cceb74c3c4a249e26f904a5ab2350e08a5677 |
30 |
DIST hplip-3.20.3.tar.gz 25672070 BLAKE2B 4c6209a268898de123b2b557d662acddb3ad90b227c0752ebdd1e2afb3fe3d19fddc819aba999347708dd0c098f2b8fea4580dcfb3d5fc7893e47520cae7c1d5 SHA512 a397eb3896292ac956a1969b76707af62c866e47d88148fa75b68574e4639283f7414a2c77e6854c5d22daea49181d4f1bc2daf11fb3058372ff084d591696f1 |
31 |
DIST hplip-3.20.5-patches-1.tar.xz 12716 BLAKE2B 982480185b2decb9f4e857336b474dab585d64aa44a9f0da70ba568e20488f451507aae3bd1427aef4274d36db93dd9bcb1d906f7b393939dfc43c81a1f9a9db SHA512 ae46a6f490253a1112838b08d56199c6257d33911569619483d925798b54a8bc9fe57afd1e86dedb9482d89d42f44bec81db215f37cbcd8fb5982596c80c1117 |
32 |
+DIST hplip-3.20.6-patches-1.tar.xz 14384 BLAKE2B 89436c36478e96f91053a75d65af99d3b32e8d0a60417c26baf4a9ae72070409e7210e1fb9232bd69309b251d2960671020c1203d3e6672b9639e00827c4e4bf SHA512 4b903438a56ca16846a7e940c09e9555d3d2ee54cbb77a7d031027cefd04c37bde6ea1dad4a266f89fd03f0595851db973947b9a363f49972bd02522704c20f8 |
33 |
DIST hplip-3.20.6.tar.gz 25908476 BLAKE2B cd70d00081ff41d36b566d6f6f546b2cddabb46427afafcd2d04ea7769ce5114feff74612e58ffa83dde4e817ffa2804dbf41411187d9cd15ed7b888b87658ad SHA512 ccd82112afb5ee73f5d027819ab89ba8f52ec36a4b061d314565f95d288be24e045050c3368332eeae50c0fb170f8cb015fdd8dde4b32a08e3758f0f0f4e8e96 |
34 |
|
35 |
diff --git a/net-print/hplip/hplip-3.20.6-r2.ebuild b/net-print/hplip/hplip-3.20.6-r2.ebuild |
36 |
new file mode 100644 |
37 |
index 00000000000..6dba4f978f0 |
38 |
--- /dev/null |
39 |
+++ b/net-print/hplip/hplip-3.20.6-r2.ebuild |
40 |
@@ -0,0 +1,278 @@ |
41 |
+# Copyright 1999-2020 Gentoo Authors |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=7 |
45 |
+ |
46 |
+PYTHON_COMPAT=( python3_{6,7,8,9} ) |
47 |
+PYTHON_REQ_USE="threads(+),xml" |
48 |
+ |
49 |
+# 14 and 15 spit out a lot of warnings about subdirs |
50 |
+WANT_AUTOMAKE="1.13" |
51 |
+ |
52 |
+inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev |
53 |
+ |
54 |
+DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools" |
55 |
+HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing" |
56 |
+SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz |
57 |
+ https://dev.gentoo.org/~billie/distfiles/${PN}-3.20.6-patches-1.tar.xz" |
58 |
+ |
59 |
+LICENSE="GPL-2" |
60 |
+SLOT="0" |
61 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
62 |
+ |
63 |
+IUSE="doc fax +hpcups hpijs kde libnotify libressl -libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X" |
64 |
+ |
65 |
+COMMON_DEPEND=" |
66 |
+ net-print/cups |
67 |
+ virtual/jpeg:0 |
68 |
+ hpijs? ( net-print/cups-filters[foomatic] ) |
69 |
+ !minimal? ( |
70 |
+ ${PYTHON_DEPS} |
71 |
+ sys-apps/dbus |
72 |
+ !libusb0? ( virtual/libusb:1 ) |
73 |
+ libusb0? ( virtual/libusb:0 ) |
74 |
+ scanner? ( media-gfx/sane-backends ) |
75 |
+ snmp? ( |
76 |
+ !libressl? ( dev-libs/openssl:0= ) |
77 |
+ libressl? ( dev-libs/libressl:= ) |
78 |
+ net-analyzer/net-snmp:= |
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="!minimal? ( ${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 |
+ use !minimal && python-single-r1_pkg_setup |
136 |
+ |
137 |
+ use scanner && ! use X && ewarn "You need USE=X for the scanner GUI." |
138 |
+ |
139 |
+ if ! use hpcups && ! use hpijs ; then |
140 |
+ ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver," |
141 |
+ ewarn "which is probably not what you want." |
142 |
+ ewarn "You will almost certainly not be able to print." |
143 |
+ fi |
144 |
+ |
145 |
+ if use minimal ; then |
146 |
+ ewarn "Installing driver portions only, make sure you know what you are doing." |
147 |
+ ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver" |
148 |
+ ewarn "is installed. If both USE flags are set hpijs overrides hpcups." |
149 |
+ else |
150 |
+ use parport && linux-info_pkg_setup |
151 |
+ fi |
152 |
+} |
153 |
+ |
154 |
+src_prepare() { |
155 |
+ default |
156 |
+ |
157 |
+ if use !minimal ; then |
158 |
+ python_fix_shebang . |
159 |
+ fi |
160 |
+ |
161 |
+ # Make desktop files follow the specification |
162 |
+ # Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680 |
163 |
+ # Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324 |
164 |
+ sed -i -e '/^Categories=/s/Application;//' \ |
165 |
+ -e '/^Encoding=.*/d' hplip.desktop.in || die |
166 |
+ sed -i -e '/^Categories=/s/Application;//' \ |
167 |
+ -e '/^Version=.*/d' \ |
168 |
+ -e '/^Comment=.*/d' hplip-systray.desktop.in || die |
169 |
+ |
170 |
+ # Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725 |
171 |
+ # Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847, |
172 |
+ # https://bugs.launchpad.net/hplip/+bug/500086 |
173 |
+ local udevdir=$(get_udevdir) |
174 |
+ sed -i -e "s|/etc/udev|${udevdir}|g" \ |
175 |
+ $(find . -type f -exec grep -l /etc/udev {} +) || die |
176 |
+ |
177 |
+ # Force recognition of Gentoo distro by hp-check |
178 |
+ sed -i \ |
179 |
+ -e "s:file('/etc/issue', 'r').read():'Gentoo':" \ |
180 |
+ installer/core_install.py || die |
181 |
+ |
182 |
+ eautoreconf |
183 |
+} |
184 |
+ |
185 |
+src_configure() { |
186 |
+ local myconf drv_build minimal_build |
187 |
+ |
188 |
+ if use libusb0 ; then |
189 |
+ myconf="${myconf} --enable-libusb01_build" |
190 |
+ else |
191 |
+ myconf="${myconf} --disable-libusb01_build" |
192 |
+ fi |
193 |
+ |
194 |
+ if use hpcups ; then |
195 |
+ drv_build="$(use_enable hpcups hpcups-install)" |
196 |
+ if use static-ppds ; then |
197 |
+ drv_build="${drv_build} --enable-cups-ppd-install" |
198 |
+ drv_build="${drv_build} --disable-cups-drv-install" |
199 |
+ else |
200 |
+ drv_build="${drv_build} --enable-cups-drv-install" |
201 |
+ drv_build="${drv_build} --disable-cups-ppd-install" |
202 |
+ fi |
203 |
+ else |
204 |
+ drv_build="--disable-hpcups-install" |
205 |
+ drv_build="${drv_build} --disable-cups-drv-install" |
206 |
+ drv_build="${drv_build} --disable-cups-ppd-install" |
207 |
+ fi |
208 |
+ |
209 |
+ if use hpijs ; then |
210 |
+ drv_build="${drv_build} $(use_enable hpijs hpijs-install)" |
211 |
+ if use static-ppds ; then |
212 |
+ drv_build="${drv_build} --enable-foomatic-ppd-install" |
213 |
+ drv_build="${drv_build} --disable-foomatic-drv-install" |
214 |
+ else |
215 |
+ drv_build="${drv_build} --enable-foomatic-drv-install" |
216 |
+ drv_build="${drv_build} --disable-foomatic-ppd-install" |
217 |
+ fi |
218 |
+ else |
219 |
+ drv_build="${drv_build} --disable-hpijs-install" |
220 |
+ drv_build="${drv_build} --disable-foomatic-drv-install" |
221 |
+ drv_build="${drv_build} --disable-foomatic-ppd-install" |
222 |
+ fi |
223 |
+ |
224 |
+ if use minimal ; then |
225 |
+ if use hpijs ; then |
226 |
+ minimal_build="--enable-hpijs-only-build" |
227 |
+ else |
228 |
+ minimal_build="--disable-hpijs-only-build" |
229 |
+ fi |
230 |
+ if use hpcups ; then |
231 |
+ minimal_build="${minimal_build} --enable-hpcups-only-build" |
232 |
+ else |
233 |
+ minimal_build="${minimal_build} --disable-hpcups-only-build" |
234 |
+ fi |
235 |
+ minimal_build="${minimal_build} --disable-fax-build" |
236 |
+ else |
237 |
+ if use fax ; then |
238 |
+ minimal_build="${minimal_build} --enable-fax-build" |
239 |
+ else |
240 |
+ minimal_build="${minimal_build} --disable-fax-build" |
241 |
+ fi |
242 |
+ fi |
243 |
+ |
244 |
+ # disable class driver for now |
245 |
+ econf \ |
246 |
+ --disable-cups11-build \ |
247 |
+ --disable-lite-build \ |
248 |
+ --disable-foomatic-rip-hplip-install \ |
249 |
+ --disable-shadow-build \ |
250 |
+ --disable-qt3 \ |
251 |
+ --disable-qt4 \ |
252 |
+ --disable-udev_sysfs_rules \ |
253 |
+ --with-cupsbackenddir=$(cups-config --serverbin)/backend \ |
254 |
+ --with-cupsfilterdir=$(cups-config --serverbin)/filter \ |
255 |
+ --with-docdir=/usr/share/doc/${PF} \ |
256 |
+ --with-htmldir=/usr/share/doc/${PF}/html \ |
257 |
+ ${myconf} \ |
258 |
+ ${drv_build} \ |
259 |
+ ${minimal_build} \ |
260 |
+ --enable-hpps-install \ |
261 |
+ --disable-class-driver \ |
262 |
+ $(use_enable doc doc-build) \ |
263 |
+ $(use_enable !minimal gui-build) \ |
264 |
+ $(use_enable !minimal dbus-build) \ |
265 |
+ $(use_enable parport pp-build) \ |
266 |
+ $(use_enable policykit) \ |
267 |
+ $(use_enable qt5) \ |
268 |
+ $(use_enable scanner scan-build) \ |
269 |
+ $(use_enable snmp network-build) |
270 |
+ |
271 |
+ # hpijs ppds are created at configure time but are not installed (3.17.11) |
272 |
+ |
273 |
+ # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip |
274 |
+ # The hpcups driver does not use foomatic-rip |
275 |
+ #local i |
276 |
+ #for i in ppd/hpijs/*.ppd.gz ; do |
277 |
+ # rm -f ${i}.temp || die |
278 |
+ # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \ |
279 |
+ # gzip > ${i}.temp || die |
280 |
+ # mv ${i}.temp ${i} || die |
281 |
+ #done |
282 |
+} |
283 |
+ |
284 |
+src_install() { |
285 |
+ # Disable parallel install |
286 |
+ # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018 |
287 |
+ emake -j1 DESTDIR="${D}" install |
288 |
+ einstalldocs |
289 |
+ # default |
290 |
+ |
291 |
+ # Installed by sane-backends |
292 |
+ # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023 |
293 |
+ rm -f "${ED}"/etc/sane.d/dll.conf || die |
294 |
+ |
295 |
+ # Remove desktop and autostart files |
296 |
+ # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770 |
297 |
+ use qt5 || { |
298 |
+ rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg |
299 |
+ } |
300 |
+ |
301 |
+ rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die |
302 |
+ rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die |
303 |
+ |
304 |
+ # Remove hal fdi files |
305 |
+ rm -rf "${ED}"/usr/share/hal || die |
306 |
+ |
307 |
+ find "${D}" -name '*.la' -delete || die |
308 |
+ |
309 |
+ if use !minimal ; then |
310 |
+ python_optimize "${ED}"/usr/share/hplip |
311 |
+ fi |
312 |
+ |
313 |
+ readme.gentoo_create_doc |
314 |
+} |
315 |
+ |
316 |
+pkg_postinst() { |
317 |
+ readme.gentoo_print_elog |
318 |
+} |