Gentoo Archives: gentoo-commits

From: Daniel Pielmeier <billie@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/hplip/
Date: Sat, 26 Sep 2020 10:28:29
Message-Id: 1601116063.4fc746bdfd337275205f99b79e9eb0db8a7a8b9b.billie@gentoo
1 commit: 4fc746bdfd337275205f99b79e9eb0db8a7a8b9b
2 Author: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 26 10:26:57 2020 +0000
4 Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 26 10:27:43 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fc746bd
7
8 net-print/hplip: Partial revert of commit '9d5803ed869'.
9
10 Restore hplip-3.19.12-r1 to keep a working version for users affected
11 by bug #727688.
12
13 Bug: https://bugs.gentoo.org/727688
14 Package-Manager: Portage-3.0.4, Repoman-3.0.1
15 RepoMan-Options: --force
16 Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org>
17
18 net-print/hplip/Manifest | 2 +
19 net-print/hplip/hplip-3.19.12-r1.ebuild | 275 ++++++++++++++++++++++++++++++++
20 2 files changed, 277 insertions(+)
21
22 diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest
23 index 288d649dd6b..77e169ca644 100644
24 --- a/net-print/hplip/Manifest
25 +++ b/net-print/hplip/Manifest
26 @@ -1,3 +1,5 @@
27 +DIST hplip-3.18.12-patches-1.tar.xz 12032 BLAKE2B 33e6e4e1e0e5b4f998459073cf0742b7c56929b23e6c1cc3ba9df4eafb8007273a5a2e7f27af0d2d4a3a97ebb9cfe462b74dcddd7149088980893b2c66113b7c SHA512 3b0e2b4f7d8da257c6fcf12f2e049276d059426f2d1c626324982ce862efa2323cbb191a373c53fea7880e3b6e44ec62e584091676556d97e6a456edea4c44cf
28 +DIST hplip-3.19.12.tar.gz 25676247 BLAKE2B 1373aa70a2307071c28a22b0ae85e242c3e6bec614ef7490c1ecc0e5e745b81b6c2097948fbd062b5e72e10714cdc8d6f9145aacafc0fedeafde375909cb2cb6 SHA512 5552cd717ae082ee55cdb77d79e8d035d8ecb7cf23c79d659fda43468d8ed414a33c4d869eab4ab83dee836f0d1cceb74c3c4a249e26f904a5ab2350e08a5677
29 DIST hplip-3.20.5-patches-1.tar.xz 12716 BLAKE2B 982480185b2decb9f4e857336b474dab585d64aa44a9f0da70ba568e20488f451507aae3bd1427aef4274d36db93dd9bcb1d906f7b393939dfc43c81a1f9a9db SHA512 ae46a6f490253a1112838b08d56199c6257d33911569619483d925798b54a8bc9fe57afd1e86dedb9482d89d42f44bec81db215f37cbcd8fb5982596c80c1117
30 DIST hplip-3.20.6-patches-1.tar.xz 14384 BLAKE2B 89436c36478e96f91053a75d65af99d3b32e8d0a60417c26baf4a9ae72070409e7210e1fb9232bd69309b251d2960671020c1203d3e6672b9639e00827c4e4bf SHA512 4b903438a56ca16846a7e940c09e9555d3d2ee54cbb77a7d031027cefd04c37bde6ea1dad4a266f89fd03f0595851db973947b9a363f49972bd02522704c20f8
31 DIST hplip-3.20.6.tar.gz 25908476 BLAKE2B cd70d00081ff41d36b566d6f6f546b2cddabb46427afafcd2d04ea7769ce5114feff74612e58ffa83dde4e817ffa2804dbf41411187d9cd15ed7b888b87658ad SHA512 ccd82112afb5ee73f5d027819ab89ba8f52ec36a4b061d314565f95d288be24e045050c3368332eeae50c0fb170f8cb015fdd8dde4b32a08e3758f0f0f4e8e96
32
33 diff --git a/net-print/hplip/hplip-3.19.12-r1.ebuild b/net-print/hplip/hplip-3.19.12-r1.ebuild
34 new file mode 100644
35 index 00000000000..4730c3b7cfa
36 --- /dev/null
37 +++ b/net-print/hplip/hplip-3.19.12-r1.ebuild
38 @@ -0,0 +1,275 @@
39 +# Copyright 1999-2020 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +
44 +PYTHON_COMPAT=( python3_{6,7} )
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 + $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]' 'python3*')
91 + kernel_linux? ( virtual/udev )
92 + $(python_gen_cond_dep '
93 + >=dev-python/dbus-python-1.2.0-r1[${PYTHON_MULTI_USEDEP}]
94 + fax? ( dev-python/reportlab[${PYTHON_MULTI_USEDEP}] )
95 + qt5? (
96 + >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_MULTI_USEDEP}]
97 + libnotify? ( dev-python/notify2[${PYTHON_MULTI_USEDEP}] )
98 + )
99 + scanner? (
100 + >=dev-python/reportlab-3.2[${PYTHON_MULTI_USEDEP}]
101 + >=dev-python/pillow-3.1.1[${PYTHON_MULTI_USEDEP}]
102 + X? (
103 + || (
104 + kde? ( kde-misc/skanlite )
105 + media-gfx/xsane
106 + media-gfx/sane-frontends
107 + )
108 + )
109 + )
110 + ')
111 + )
112 + policykit? ( sys-auth/polkit )
113 +"
114 +
115 +REQUIRED_USE="!minimal? ( ${PYTHON_REQUIRED_USE} )"
116 +
117 +PATCHES=(
118 + "${WORKDIR}/patches"
119 +)
120 +
121 +CONFIG_CHECK="~PARPORT ~PPDEV"
122 +ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
123 +
124 +#DISABLE_AUTOFORMATTING="yes"
125 +DOC_CONTENTS="
126 +For more information on setting up your printer please take
127 +a look at the hplip section of the gentoo printing guide:
128 +https://wiki.gentoo.org/wiki/Printing
129 +
130 +Any user who wants to print must be in the lp group.
131 +"
132 +
133 +pkg_setup() {
134 + use !minimal && python-single-r1_pkg_setup
135 +
136 + use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
137 +
138 + if ! use hpcups && ! use hpijs ; then
139 + ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
140 + ewarn "which is probably not what you want."
141 + ewarn "You will almost certainly not be able to print."
142 + fi
143 +
144 + if use minimal ; then
145 + ewarn "Installing driver portions only, make sure you know what you are doing."
146 + ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
147 + ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
148 + else
149 + use parport && linux-info_pkg_setup
150 + fi
151 +}
152 +
153 +src_prepare() {
154 + default
155 +
156 + if use !minimal ; then
157 + python_export EPYTHON PYTHON
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 + fi
236 +
237 + # disable class driver for now
238 + econf \
239 + --disable-cups11-build \
240 + --disable-lite-build \
241 + --disable-foomatic-rip-hplip-install \
242 + --disable-shadow-build \
243 + --disable-qt3 \
244 + --disable-qt4 \
245 + --disable-udev_sysfs_rules \
246 + --with-cupsbackenddir=$(cups-config --serverbin)/backend \
247 + --with-cupsfilterdir=$(cups-config --serverbin)/filter \
248 + --with-docdir=/usr/share/doc/${PF} \
249 + --with-htmldir=/usr/share/doc/${PF}/html \
250 + ${myconf} \
251 + ${drv_build} \
252 + ${minimal_build} \
253 + --enable-hpps-install \
254 + --disable-class-driver \
255 + $(use_enable doc doc-build) \
256 + $(use_enable fax fax-build) \
257 + $(use_enable !minimal gui-build) \
258 + $(use_enable !minimal dbus-build) \
259 + $(use_enable parport pp-build) \
260 + $(use_enable policykit) \
261 + $(use_enable qt5) \
262 + $(use_enable scanner scan-build) \
263 + $(use_enable snmp network-build)
264 +
265 + # hpijs ppds are created at configure time but are not installed (3.17.11)
266 +
267 + # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
268 + # The hpcups driver does not use foomatic-rip
269 + #local i
270 + #for i in ppd/hpijs/*.ppd.gz ; do
271 + # rm -f ${i}.temp || die
272 + # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
273 + # gzip > ${i}.temp || die
274 + # mv ${i}.temp ${i} || die
275 + #done
276 +}
277 +
278 +src_install() {
279 + # Disable parallel install
280 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018
281 + emake -j1 DESTDIR="${D}" install
282 + einstalldocs
283 + # default
284 +
285 + # Installed by sane-backends
286 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
287 + rm -f "${ED}"/etc/sane.d/dll.conf || die
288 +
289 + # Remove desktop and autostart files
290 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770
291 + use qt5 || {
292 + rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg
293 + }
294 +
295 + rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
296 + rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die
297 +
298 + # Remove hal fdi files
299 + rm -rf "${ED}"/usr/share/hal || die
300 +
301 + find "${D}" -name '*.la' -delete || die
302 +
303 + if use !minimal ; then
304 + python_export EPYTHON PYTHON
305 + python_optimize "${ED}"/usr/share/hplip
306 + fi
307 +
308 + readme.gentoo_create_doc
309 +}
310 +
311 +pkg_postinst() {
312 + readme.gentoo_print_elog
313 +}