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