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: Thu, 05 Sep 2019 17:19:46
Message-Id: 1567703944.74d2c5d2d2a29683d85a02d0712e291097bbe176.billie@gentoo
1 commit: 74d2c5d2d2a29683d85a02d0712e291097bbe176
2 Author: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 5 17:19:04 2019 +0000
4 Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 5 17:19:04 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74d2c5d2
7
8 net-print/hplip: Version bump to hplip-3.19.8.
9
10 Add support for python-3.7.
11
12 Package-Manager: Portage-2.3.69, Repoman-2.3.16
13 Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org>
14
15 net-print/hplip/Manifest | 1 +
16 net-print/hplip/hplip-3.19.8.ebuild | 274 ++++++++++++++++++++++++++++++++++++
17 2 files changed, 275 insertions(+)
18
19 diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest
20 index 0fc5bbd0781..e4aff19af70 100644
21 --- a/net-print/hplip/Manifest
22 +++ b/net-print/hplip/Manifest
23 @@ -1,3 +1,4 @@
24 DIST hplip-3.18.12-patches-1.tar.xz 12032 BLAKE2B 33e6e4e1e0e5b4f998459073cf0742b7c56929b23e6c1cc3ba9df4eafb8007273a5a2e7f27af0d2d4a3a97ebb9cfe462b74dcddd7149088980893b2c66113b7c SHA512 3b0e2b4f7d8da257c6fcf12f2e049276d059426f2d1c626324982ce862efa2323cbb191a373c53fea7880e3b6e44ec62e584091676556d97e6a456edea4c44cf
25 DIST hplip-3.18.12.tar.gz 24588202 BLAKE2B f2ffa6d0d54e467c03ccf9e74accb62ef69842001a00e8c4e6fd68b40c4daff5896fcdd69d37b5e50be2b837918058a5c9071615ab77c1ce83fffc546ff98c02 SHA512 7197cac325cf40c03f49053a98ee0e8ac6c670d142b2a64df09c0f7afa1d7d3602216c55c825ccbf20a1fbda9c9289173b8708e9f87171a862dae5b6b4ef7635
26 DIST hplip-3.19.6.tar.gz 25436373 BLAKE2B 9ce8fe6aec475ea6c2c5b25555d311ac498ef34e12e9f7c41900ae88d1ce30939470f8f9a1c29fffceb1f69dd205be25ce6aa381fe9ee3a2f01e86dcbd927c63 SHA512 c99448ad0cef9fc626a0a03147a0d582513cb838ecfbfe29f07c65bbf701dee5c7d02222469b118ccc4e8c230c7a4b4685a72a1e67595ee01150b0472692d654
27 +DIST hplip-3.19.8.tar.gz 25473983 BLAKE2B 8778b1b66164e38c1593c55b1a5b762679e82e1ab96249520d02af87e2a55584733ee3c047fad912838571be626f85d6a07335f95b37a28fd7b1015c993ec6b8 SHA512 99b7661c9b1d70f3c762658fcbff1ab0c170be8f8fd6cc8bbc80bb0860ccc6d69d38b662ff8be2bd38986a95385a5e5766f22003ee3e74b764dab3d46c6cb9ac
28
29 diff --git a/net-print/hplip/hplip-3.19.8.ebuild b/net-print/hplip/hplip-3.19.8.ebuild
30 new file mode 100644
31 index 00000000000..ac23a93aaa9
32 --- /dev/null
33 +++ b/net-print/hplip/hplip-3.19.8.ebuild
34 @@ -0,0 +1,274 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
41 +PYTHON_REQ_USE="threads(+),xml"
42 +
43 +# 14 and 15 spit out a lot of warnings about subdirs
44 +WANT_AUTOMAKE="1.13"
45 +
46 +inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev
47 +
48 +DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools"
49 +HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing"
50 +SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz
51 + https://dev.gentoo.org/~billie/distfiles/${PN}-3.18.12-patches-1.tar.xz"
52 +
53 +LICENSE="GPL-2"
54 +SLOT="0"
55 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
56 +
57 +IUSE="doc fax +hpcups hpijs kde libnotify libressl -libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X"
58 +
59 +COMMON_DEPEND="
60 + net-print/cups
61 + virtual/jpeg:0
62 + hpijs? ( net-print/cups-filters[foomatic] )
63 + !minimal? (
64 + ${PYTHON_DEPS}
65 + sys-apps/dbus
66 + !libusb0? ( virtual/libusb:1 )
67 + libusb0? ( virtual/libusb:0 )
68 + scanner? ( media-gfx/sane-backends )
69 + snmp? (
70 + !libressl? ( dev-libs/openssl:0= )
71 + libressl? ( dev-libs/libressl:= )
72 + net-analyzer/net-snmp
73 + )
74 + )
75 +"
76 +BDEPEND="
77 + virtual/pkgconfig
78 +"
79 +DEPEND="
80 + ${COMMON_DEPEND}
81 +"
82 +RDEPEND="
83 + ${COMMON_DEPEND}
84 + app-text/ghostscript-gpl
85 + !minimal? (
86 + >=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}]
87 + $(python_gen_cond_dep 'dev-python/pygobject:2[${PYTHON_USEDEP}]' 'python2*')
88 + $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]' 'python3*')
89 + fax? ( dev-python/reportlab[${PYTHON_USEDEP}] )
90 + kernel_linux? ( virtual/udev )
91 + qt5? (
92 + >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_USEDEP}]
93 + libnotify? ( dev-python/notify2[${PYTHON_USEDEP}] )
94 + )
95 + scanner? (
96 + >=dev-python/reportlab-3.2[${PYTHON_USEDEP}]
97 + >=dev-python/pillow-3.1.1[${PYTHON_USEDEP}]
98 + X? (
99 + || (
100 + kde? ( kde-misc/skanlite )
101 + media-gfx/xsane
102 + media-gfx/sane-frontends
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 +}