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