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