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