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, 08 Dec 2018 16:05:49
Message-Id: 1544285125.9afe07438cf3f01dccdf1ebfba4eedc703172d24.billie@gentoo
1 commit: 9afe07438cf3f01dccdf1ebfba4eedc703172d24
2 Author: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 8 16:05:25 2018 +0000
4 Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 8 16:05:25 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9afe0743
7
8 net-print/hplip: Version bump to hplip-3.18.12.
9
10 Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 net-print/hplip/Manifest | 2 +
14 net-print/hplip/hplip-3.18.12.ebuild | 274 +++++++++++++++++++++++++++++++++++
15 2 files changed, 276 insertions(+)
16
17 diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest
18 index 894f31cfca9..fe519c44376 100644
19 --- a/net-print/hplip/Manifest
20 +++ b/net-print/hplip/Manifest
21 @@ -1,4 +1,6 @@
22 DIST hplip-3.18.10-patches-1.tar.xz 12344 BLAKE2B e557798ae4b9b23c85cf7084233bb403f1f5ec03e36ee91bcf44c4be4f810db7119d997857c1e1ac27ab2e39e62fd148b85e93bdf2379fe62218fb86c9fc21cf SHA512 99a185ec87c8a75f302764a3f1e19dda601779bf002e08552a6fc8bb7a270e4348817c90b42ab7ae7d9e7a270dff1aa1596ca8051cbd831435ffc980b7fd3999
23 DIST hplip-3.18.10.tar.gz 24572132 BLAKE2B a0bfd40c61f3d08c5ef30fbe88bcc78a73081f806cec1c3456f44cc80156cb2470f9b9d97cd9bd43674e6c0ff6756033fe9427c6e67a7a626ad3f00741a39ae5 SHA512 8e744608f1da0e24afbeea814973363d95bbff15a7430c8471d5a53c4a9e772b141e5cd7e69ea03826d1b2e4544e9aabaedc148f2b6577339ef9b2a6d4431c96
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.18.3-patches-2.tar.xz 8936 BLAKE2B 58c17f3b6332de1edd88a3b458f1e9f856bc917842f62eee0808469ec14ff5793cd33c7a2ba30593eba624e58c12a6d426fa43a7d375d6ac50b985b895a85b4c SHA512 cbafcd9616f9c86318007b703325d3429ed0698c3fc9d3eddd422e4cd7a16c77320ac168bfa01b5874213e1740cfaae1867d31c3cf96cd57573ad33651a674ed
27 DIST hplip-3.18.6.tar.gz 22590564 BLAKE2B edbc80120bb332de9848e528095839b8f3496404ae83482a17bb8bd196c30dd8d3fca4d3dbb60c048bfbeeddd4384b4d7844798dad993eaf52d5418a9391b4ad SHA512 deb4e6e1c7e9ea7452967f7d7d7fd93e92eb59406b4978bb9b874db93bc5022b25aab012a7420ac3e991259032bc7cb749cd924c93a164544e29a4152962184f
28
29 diff --git a/net-print/hplip/hplip-3.18.12.ebuild b/net-print/hplip/hplip-3.18.12.ebuild
30 new file mode 100644
31 index 00000000000..b652a5c8e62
32 --- /dev/null
33 +++ b/net-print/hplip/hplip-3.18.12.ebuild
34 @@ -0,0 +1,274 @@
35 +# Copyright 1999-2018 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_{4,5,6} )
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 ~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 +}