Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/hplip/
Date: Thu, 15 Aug 2019 18:14:54
Message-Id: 1565892879.358a35b990b9daa1bf3c88d3f4dea1b3edda5e0f.mattst88@gentoo
1 commit: 358a35b990b9daa1bf3c88d3f4dea1b3edda5e0f
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 15 18:13:39 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 15 18:14:39 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=358a35b9
7
8 Revert "net-print/hplip: Remove old hplip-3.18.12.ebuild, hplip-3.19.5"
9
10 This reverts commit 29e3ef2a63641f210389c4f70159e563eec106f1.
11
12 3.18.12 was the latest stable. Presumably it was removed by mistake.
13
14 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
15
16 net-print/hplip/Manifest | 2 +
17 net-print/hplip/hplip-3.18.12.ebuild | 274 +++++++++++++++++++++++++++++++++++
18 net-print/hplip/hplip-3.19.5.ebuild | 274 +++++++++++++++++++++++++++++++++++
19 3 files changed, 550 insertions(+)
20
21 diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest
22 index cfc29ba441d..636ed9a8598 100644
23 --- a/net-print/hplip/Manifest
24 +++ b/net-print/hplip/Manifest
25 @@ -1,4 +1,6 @@
26 DIST hplip-3.18.12-patches-1.tar.xz 12032 BLAKE2B 33e6e4e1e0e5b4f998459073cf0742b7c56929b23e6c1cc3ba9df4eafb8007273a5a2e7f27af0d2d4a3a97ebb9cfe462b74dcddd7149088980893b2c66113b7c SHA512 3b0e2b4f7d8da257c6fcf12f2e049276d059426f2d1c626324982ce862efa2323cbb191a373c53fea7880e3b6e44ec62e584091676556d97e6a456edea4c44cf
27 +DIST hplip-3.18.12.tar.gz 24588202 BLAKE2B f2ffa6d0d54e467c03ccf9e74accb62ef69842001a00e8c4e6fd68b40c4daff5896fcdd69d37b5e50be2b837918058a5c9071615ab77c1ce83fffc546ff98c02 SHA512 7197cac325cf40c03f49053a98ee0e8ac6c670d142b2a64df09c0f7afa1d7d3602216c55c825ccbf20a1fbda9c9289173b8708e9f87171a862dae5b6b4ef7635
28 DIST hplip-3.18.3-patches-2.tar.xz 8936 BLAKE2B 58c17f3b6332de1edd88a3b458f1e9f856bc917842f62eee0808469ec14ff5793cd33c7a2ba30593eba624e58c12a6d426fa43a7d375d6ac50b985b895a85b4c SHA512 cbafcd9616f9c86318007b703325d3429ed0698c3fc9d3eddd422e4cd7a16c77320ac168bfa01b5874213e1740cfaae1867d31c3cf96cd57573ad33651a674ed
29 DIST hplip-3.18.6.tar.gz 22590564 BLAKE2B edbc80120bb332de9848e528095839b8f3496404ae83482a17bb8bd196c30dd8d3fca4d3dbb60c048bfbeeddd4384b4d7844798dad993eaf52d5418a9391b4ad SHA512 deb4e6e1c7e9ea7452967f7d7d7fd93e92eb59406b4978bb9b874db93bc5022b25aab012a7420ac3e991259032bc7cb749cd924c93a164544e29a4152962184f
30 +DIST hplip-3.19.5.tar.gz 25263343 BLAKE2B 7a7d2afeadd99dcd9a4a251ef6243f5e33d892b9c2a9f801b92f3d443eed0dad9928010164f2d2778f22dfb92643dc79c06ef25eaddfbf56a7c26a9fd68a2313 SHA512 bee7d64cea10020844b08b78a754ab9fa51aa699b365f2ccd98f18a9286a660e3c32ae1b5a173397c75fe2acafe801f3e6d7eabedcd95f2f064b89afe7726494
31 DIST hplip-3.19.6.tar.gz 25436373 BLAKE2B 9ce8fe6aec475ea6c2c5b25555d311ac498ef34e12e9f7c41900ae88d1ce30939470f8f9a1c29fffceb1f69dd205be25ce6aa381fe9ee3a2f01e86dcbd927c63 SHA512 c99448ad0cef9fc626a0a03147a0d582513cb838ecfbfe29f07c65bbf701dee5c7d02222469b118ccc4e8c230c7a4b4685a72a1e67595ee01150b0472692d654
32
33 diff --git a/net-print/hplip/hplip-3.18.12.ebuild b/net-print/hplip/hplip-3.18.12.ebuild
34 new file mode 100644
35 index 00000000000..41b1749876f
36 --- /dev/null
37 +++ b/net-print/hplip/hplip-3.18.12.ebuild
38 @@ -0,0 +1,274 @@
39 +# Copyright 1999-2019 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +
44 +PYTHON_COMPAT=( python2_7 python3_{5,6} )
45 +PYTHON_REQ_USE="threads,xml"
46 +
47 +# 14 and 15 spit out a lot of warnings about subdirs
48 +WANT_AUTOMAKE="1.13"
49 +
50 +inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev
51 +
52 +DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools"
53 +HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing"
54 +SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz
55 + https://dev.gentoo.org/~billie/distfiles/${PN}-3.18.12-patches-1.tar.xz"
56 +
57 +LICENSE="GPL-2"
58 +SLOT="0"
59 +KEYWORDS="amd64 arm ppc ppc64 x86"
60 +
61 +IUSE="doc fax +hpcups hpijs kde libnotify libressl -libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X"
62 +
63 +COMMON_DEPEND="
64 + net-print/cups
65 + virtual/jpeg:0
66 + hpijs? ( net-print/cups-filters[foomatic] )
67 + !minimal? (
68 + ${PYTHON_DEPS}
69 + sys-apps/dbus
70 + !libusb0? ( virtual/libusb:1 )
71 + libusb0? ( virtual/libusb:0 )
72 + scanner? ( media-gfx/sane-backends )
73 + snmp? (
74 + !libressl? ( dev-libs/openssl:0= )
75 + libressl? ( dev-libs/libressl:= )
76 + net-analyzer/net-snmp
77 + )
78 + )
79 +"
80 +BDEPEND="
81 + virtual/pkgconfig
82 +"
83 +DEPEND="
84 + ${COMMON_DEPEND}
85 +"
86 +RDEPEND="
87 + ${COMMON_DEPEND}
88 + app-text/ghostscript-gpl
89 + !minimal? (
90 + >=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}]
91 + $(python_gen_cond_dep 'dev-python/pygobject:2[${PYTHON_USEDEP}]' 'python2*')
92 + $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]' 'python3*')
93 + fax? ( dev-python/reportlab[${PYTHON_USEDEP}] )
94 + kernel_linux? ( virtual/udev )
95 + qt5? (
96 + >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_USEDEP}]
97 + libnotify? ( dev-python/notify2[${PYTHON_USEDEP}] )
98 + )
99 + scanner? (
100 + >=dev-python/reportlab-3.2[${PYTHON_USEDEP}]
101 + >=dev-python/pillow-3.1.1[${PYTHON_USEDEP}]
102 + X? (
103 + || (
104 + kde? ( kde-misc/skanlite )
105 + media-gfx/xsane
106 + media-gfx/sane-frontends
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 +Any user who wants to print must be in the lp group.
130 +"
131 +
132 +pkg_setup() {
133 + use !minimal && python-single-r1_pkg_setup
134 +
135 + use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
136 +
137 + if ! use hpcups && ! use hpijs ; then
138 + ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
139 + ewarn "which is probably not what you want."
140 + ewarn "You will almost certainly not be able to print."
141 + fi
142 +
143 + if use minimal ; then
144 + ewarn "Installing driver portions only, make sure you know what you are doing."
145 + ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
146 + ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
147 + else
148 + use parport && linux-info_pkg_setup
149 + fi
150 +}
151 +
152 +src_prepare() {
153 + default
154 +
155 + if use !minimal ; then
156 + python_export EPYTHON PYTHON
157 + python_fix_shebang .
158 + fi
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 myconf drv_build minimal_build
186 +
187 + if use libusb0 ; then
188 + myconf="${myconf} --enable-libusb01_build"
189 + else
190 + myconf="${myconf} --disable-libusb01_build"
191 + fi
192 +
193 + if use hpcups ; then
194 + drv_build="$(use_enable hpcups hpcups-install)"
195 + if use static-ppds ; then
196 + drv_build="${drv_build} --enable-cups-ppd-install"
197 + drv_build="${drv_build} --disable-cups-drv-install"
198 + else
199 + drv_build="${drv_build} --enable-cups-drv-install"
200 + drv_build="${drv_build} --disable-cups-ppd-install"
201 + fi
202 + else
203 + drv_build="--disable-hpcups-install"
204 + drv_build="${drv_build} --disable-cups-drv-install"
205 + drv_build="${drv_build} --disable-cups-ppd-install"
206 + fi
207 +
208 + if use hpijs ; then
209 + drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
210 + if use static-ppds ; then
211 + drv_build="${drv_build} --enable-foomatic-ppd-install"
212 + drv_build="${drv_build} --disable-foomatic-drv-install"
213 + else
214 + drv_build="${drv_build} --enable-foomatic-drv-install"
215 + drv_build="${drv_build} --disable-foomatic-ppd-install"
216 + fi
217 + else
218 + drv_build="${drv_build} --disable-hpijs-install"
219 + drv_build="${drv_build} --disable-foomatic-drv-install"
220 + drv_build="${drv_build} --disable-foomatic-ppd-install"
221 + fi
222 +
223 + if use minimal ; then
224 + if use hpijs ; then
225 + minimal_build="--enable-hpijs-only-build"
226 + else
227 + minimal_build="--disable-hpijs-only-build"
228 + fi
229 + if use hpcups ; then
230 + minimal_build="${minimal_build} --enable-hpcups-only-build"
231 + else
232 + minimal_build="${minimal_build} --disable-hpcups-only-build"
233 + fi
234 + fi
235 +
236 + # disable class driver for now
237 + econf \
238 + --disable-cups11-build \
239 + --disable-lite-build \
240 + --disable-foomatic-rip-hplip-install \
241 + --disable-shadow-build \
242 + --disable-qt3 \
243 + --disable-qt4 \
244 + --disable-udev_sysfs_rules \
245 + --with-cupsbackenddir=$(cups-config --serverbin)/backend \
246 + --with-cupsfilterdir=$(cups-config --serverbin)/filter \
247 + --with-docdir=/usr/share/doc/${PF} \
248 + --with-htmldir=/usr/share/doc/${PF}/html \
249 + ${myconf} \
250 + ${drv_build} \
251 + ${minimal_build} \
252 + --enable-hpps-install \
253 + --disable-class-driver \
254 + $(use_enable doc doc-build) \
255 + $(use_enable fax fax-build) \
256 + $(use_enable !minimal gui-build) \
257 + $(use_enable !minimal dbus-build) \
258 + $(use_enable parport pp-build) \
259 + $(use_enable policykit) \
260 + $(use_enable qt5) \
261 + $(use_enable scanner scan-build) \
262 + $(use_enable snmp network-build)
263 +
264 + # hpijs ppds are created at configure time but are not installed (3.17.11)
265 +
266 + # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
267 + # The hpcups driver does not use foomatic-rip
268 + #local i
269 + #for i in ppd/hpijs/*.ppd.gz ; do
270 + # rm -f ${i}.temp || die
271 + # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
272 + # gzip > ${i}.temp || die
273 + # mv ${i}.temp ${i} || die
274 + #done
275 +}
276 +
277 +src_install() {
278 + # Disable parallel install
279 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018
280 + emake -j1 DESTDIR="${D}" install
281 + einstalldocs
282 + # default
283 +
284 + # Installed by sane-backends
285 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
286 + rm -f "${ED}"/etc/sane.d/dll.conf || die
287 +
288 + # Remove desktop and autostart files
289 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770
290 + use qt5 || {
291 + rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg
292 + }
293 +
294 + rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
295 + rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die
296 +
297 + # Remove hal fdi files
298 + rm -rf "${ED}"/usr/share/hal || die
299 +
300 + find "${D}" -name '*.la' -delete || die
301 +
302 + if use !minimal ; then
303 + python_export EPYTHON PYTHON
304 + python_optimize "${ED}"/usr/share/hplip
305 + fi
306 +
307 + readme.gentoo_create_doc
308 +}
309 +
310 +pkg_postinst() {
311 + readme.gentoo_print_elog
312 +}
313
314 diff --git a/net-print/hplip/hplip-3.19.5.ebuild b/net-print/hplip/hplip-3.19.5.ebuild
315 new file mode 100644
316 index 00000000000..0c753a8bdef
317 --- /dev/null
318 +++ b/net-print/hplip/hplip-3.19.5.ebuild
319 @@ -0,0 +1,274 @@
320 +# Copyright 1999-2019 Gentoo Authors
321 +# Distributed under the terms of the GNU General Public License v2
322 +
323 +EAPI=7
324 +
325 +PYTHON_COMPAT=( python2_7 python3_{5,6} )
326 +PYTHON_REQ_USE="threads,xml"
327 +
328 +# 14 and 15 spit out a lot of warnings about subdirs
329 +WANT_AUTOMAKE="1.13"
330 +
331 +inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev
332 +
333 +DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools"
334 +HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing"
335 +SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz
336 + https://dev.gentoo.org/~billie/distfiles/${PN}-3.18.12-patches-1.tar.xz"
337 +
338 +LICENSE="GPL-2"
339 +SLOT="0"
340 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
341 +
342 +IUSE="doc fax +hpcups hpijs kde libnotify libressl -libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X"
343 +
344 +COMMON_DEPEND="
345 + net-print/cups
346 + virtual/jpeg:0
347 + hpijs? ( net-print/cups-filters[foomatic] )
348 + !minimal? (
349 + ${PYTHON_DEPS}
350 + sys-apps/dbus
351 + !libusb0? ( virtual/libusb:1 )
352 + libusb0? ( virtual/libusb:0 )
353 + scanner? ( media-gfx/sane-backends )
354 + snmp? (
355 + !libressl? ( dev-libs/openssl:0= )
356 + libressl? ( dev-libs/libressl:= )
357 + net-analyzer/net-snmp
358 + )
359 + )
360 +"
361 +BDEPEND="
362 + virtual/pkgconfig
363 +"
364 +DEPEND="
365 + ${COMMON_DEPEND}
366 +"
367 +RDEPEND="
368 + ${COMMON_DEPEND}
369 + app-text/ghostscript-gpl
370 + !minimal? (
371 + >=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}]
372 + $(python_gen_cond_dep 'dev-python/pygobject:2[${PYTHON_USEDEP}]' 'python2*')
373 + $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]' 'python3*')
374 + fax? ( dev-python/reportlab[${PYTHON_USEDEP}] )
375 + kernel_linux? ( virtual/udev )
376 + qt5? (
377 + >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_USEDEP}]
378 + libnotify? ( dev-python/notify2[${PYTHON_USEDEP}] )
379 + )
380 + scanner? (
381 + >=dev-python/reportlab-3.2[${PYTHON_USEDEP}]
382 + >=dev-python/pillow-3.1.1[${PYTHON_USEDEP}]
383 + X? (
384 + || (
385 + kde? ( kde-misc/skanlite )
386 + media-gfx/xsane
387 + media-gfx/sane-frontends
388 + )
389 + )
390 + )
391 + )
392 + policykit? ( sys-auth/polkit )
393 +"
394 +
395 +REQUIRED_USE="!minimal? ( ${PYTHON_REQUIRED_USE} )"
396 +
397 +PATCHES=(
398 + "${WORKDIR}/patches"
399 +)
400 +
401 +CONFIG_CHECK="~PARPORT ~PPDEV"
402 +ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
403 +
404 +#DISABLE_AUTOFORMATTING="yes"
405 +DOC_CONTENTS="
406 +For more information on setting up your printer please take
407 +a look at the hplip section of the gentoo printing guide:
408 +https://wiki.gentoo.org/wiki/Printing
409 +
410 +Any user who wants to print must be in the lp group.
411 +"
412 +
413 +pkg_setup() {
414 + use !minimal && python-single-r1_pkg_setup
415 +
416 + use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
417 +
418 + if ! use hpcups && ! use hpijs ; then
419 + ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
420 + ewarn "which is probably not what you want."
421 + ewarn "You will almost certainly not be able to print."
422 + fi
423 +
424 + if use minimal ; then
425 + ewarn "Installing driver portions only, make sure you know what you are doing."
426 + ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
427 + ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
428 + else
429 + use parport && linux-info_pkg_setup
430 + fi
431 +}
432 +
433 +src_prepare() {
434 + default
435 +
436 + if use !minimal ; then
437 + python_export EPYTHON PYTHON
438 + python_fix_shebang .
439 + fi
440 +
441 + # Make desktop files follow the specification
442 + # Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680
443 + # Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324
444 + sed -i -e '/^Categories=/s/Application;//' \
445 + -e '/^Encoding=.*/d' hplip.desktop.in || die
446 + sed -i -e '/^Categories=/s/Application;//' \
447 + -e '/^Version=.*/d' \
448 + -e '/^Comment=.*/d' hplip-systray.desktop.in || die
449 +
450 + # Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725
451 + # Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847,
452 + # https://bugs.launchpad.net/hplip/+bug/500086
453 + local udevdir=$(get_udevdir)
454 + sed -i -e "s|/etc/udev|${udevdir}|g" \
455 + $(find . -type f -exec grep -l /etc/udev {} +) || die
456 +
457 + # Force recognition of Gentoo distro by hp-check
458 + sed -i \
459 + -e "s:file('/etc/issue', 'r').read():'Gentoo':" \
460 + installer/core_install.py || die
461 +
462 + eautoreconf
463 +}
464 +
465 +src_configure() {
466 + local myconf drv_build minimal_build
467 +
468 + if use libusb0 ; then
469 + myconf="${myconf} --enable-libusb01_build"
470 + else
471 + myconf="${myconf} --disable-libusb01_build"
472 + fi
473 +
474 + if use hpcups ; then
475 + drv_build="$(use_enable hpcups hpcups-install)"
476 + if use static-ppds ; then
477 + drv_build="${drv_build} --enable-cups-ppd-install"
478 + drv_build="${drv_build} --disable-cups-drv-install"
479 + else
480 + drv_build="${drv_build} --enable-cups-drv-install"
481 + drv_build="${drv_build} --disable-cups-ppd-install"
482 + fi
483 + else
484 + drv_build="--disable-hpcups-install"
485 + drv_build="${drv_build} --disable-cups-drv-install"
486 + drv_build="${drv_build} --disable-cups-ppd-install"
487 + fi
488 +
489 + if use hpijs ; then
490 + drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
491 + if use static-ppds ; then
492 + drv_build="${drv_build} --enable-foomatic-ppd-install"
493 + drv_build="${drv_build} --disable-foomatic-drv-install"
494 + else
495 + drv_build="${drv_build} --enable-foomatic-drv-install"
496 + drv_build="${drv_build} --disable-foomatic-ppd-install"
497 + fi
498 + else
499 + drv_build="${drv_build} --disable-hpijs-install"
500 + drv_build="${drv_build} --disable-foomatic-drv-install"
501 + drv_build="${drv_build} --disable-foomatic-ppd-install"
502 + fi
503 +
504 + if use minimal ; then
505 + if use hpijs ; then
506 + minimal_build="--enable-hpijs-only-build"
507 + else
508 + minimal_build="--disable-hpijs-only-build"
509 + fi
510 + if use hpcups ; then
511 + minimal_build="${minimal_build} --enable-hpcups-only-build"
512 + else
513 + minimal_build="${minimal_build} --disable-hpcups-only-build"
514 + fi
515 + fi
516 +
517 + # disable class driver for now
518 + econf \
519 + --disable-cups11-build \
520 + --disable-lite-build \
521 + --disable-foomatic-rip-hplip-install \
522 + --disable-shadow-build \
523 + --disable-qt3 \
524 + --disable-qt4 \
525 + --disable-udev_sysfs_rules \
526 + --with-cupsbackenddir=$(cups-config --serverbin)/backend \
527 + --with-cupsfilterdir=$(cups-config --serverbin)/filter \
528 + --with-docdir=/usr/share/doc/${PF} \
529 + --with-htmldir=/usr/share/doc/${PF}/html \
530 + ${myconf} \
531 + ${drv_build} \
532 + ${minimal_build} \
533 + --enable-hpps-install \
534 + --disable-class-driver \
535 + $(use_enable doc doc-build) \
536 + $(use_enable fax fax-build) \
537 + $(use_enable !minimal gui-build) \
538 + $(use_enable !minimal dbus-build) \
539 + $(use_enable parport pp-build) \
540 + $(use_enable policykit) \
541 + $(use_enable qt5) \
542 + $(use_enable scanner scan-build) \
543 + $(use_enable snmp network-build)
544 +
545 + # hpijs ppds are created at configure time but are not installed (3.17.11)
546 +
547 + # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
548 + # The hpcups driver does not use foomatic-rip
549 + #local i
550 + #for i in ppd/hpijs/*.ppd.gz ; do
551 + # rm -f ${i}.temp || die
552 + # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
553 + # gzip > ${i}.temp || die
554 + # mv ${i}.temp ${i} || die
555 + #done
556 +}
557 +
558 +src_install() {
559 + # Disable parallel install
560 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018
561 + emake -j1 DESTDIR="${D}" install
562 + einstalldocs
563 + # default
564 +
565 + # Installed by sane-backends
566 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
567 + rm -f "${ED}"/etc/sane.d/dll.conf || die
568 +
569 + # Remove desktop and autostart files
570 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770
571 + use qt5 || {
572 + rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg
573 + }
574 +
575 + rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
576 + rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die
577 +
578 + # Remove hal fdi files
579 + rm -rf "${ED}"/usr/share/hal || die
580 +
581 + find "${D}" -name '*.la' -delete || die
582 +
583 + if use !minimal ; then
584 + python_export EPYTHON PYTHON
585 + python_optimize "${ED}"/usr/share/hplip
586 + fi
587 +
588 + readme.gentoo_create_doc
589 +}
590 +
591 +pkg_postinst() {
592 + readme.gentoo_print_elog
593 +}