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