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