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, 18 Oct 2020 15:55:00
Message-Id: 1603036453.2eb24007fce9fd2ca72e316d4343780723bb150b.billie@gentoo
1 commit: 2eb24007fce9fd2ca72e316d4343780723bb150b
2 Author: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 18 15:52:59 2020 +0000
4 Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 18 15:54:13 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2eb24007
7
8 net-print/hplip: Version bump to hplip-3.20.9.
9
10 Closes: https://bugs.gentoo.org/746332
11 Package-Manager: Portage-3.0.8, Repoman-3.0.1
12 Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org>
13
14 net-print/hplip/Manifest | 2 +
15 net-print/hplip/hplip-3.20.9.ebuild | 280 ++++++++++++++++++++++++++++++++++++
16 2 files changed, 282 insertions(+)
17
18 diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest
19 index 160daf5e3c9..6aa93ada4b6 100644
20 --- a/net-print/hplip/Manifest
21 +++ b/net-print/hplip/Manifest
22 @@ -3,3 +3,5 @@ DIST hplip-3.19.12.tar.gz 25676247 BLAKE2B 1373aa70a2307071c28a22b0ae85e242c3e6b
23 DIST hplip-3.20.5-patches-1.tar.xz 12716 BLAKE2B 982480185b2decb9f4e857336b474dab585d64aa44a9f0da70ba568e20488f451507aae3bd1427aef4274d36db93dd9bcb1d906f7b393939dfc43c81a1f9a9db SHA512 ae46a6f490253a1112838b08d56199c6257d33911569619483d925798b54a8bc9fe57afd1e86dedb9482d89d42f44bec81db215f37cbcd8fb5982596c80c1117
24 DIST hplip-3.20.6-patches-2.tar.xz 14308 BLAKE2B b9982387364344e90d87769f4f5da2eae06ca9a21685d8d17aa8a0ac446285f806f8fdbc9c0aa3a7fdf6a2daee6440955974c2c34053d3e160931e327a2681da SHA512 e611be1eba5bc0d9c53b0563b5c42e2a06e73031431a40db9c360dc28106736eafa645be7fca86bbcfddf54efe6885369548cea508d51d03125f1807c18a62e3
25 DIST hplip-3.20.6.tar.gz 25908476 BLAKE2B cd70d00081ff41d36b566d6f6f546b2cddabb46427afafcd2d04ea7769ce5114feff74612e58ffa83dde4e817ffa2804dbf41411187d9cd15ed7b888b87658ad SHA512 ccd82112afb5ee73f5d027819ab89ba8f52ec36a4b061d314565f95d288be24e045050c3368332eeae50c0fb170f8cb015fdd8dde4b32a08e3758f0f0f4e8e96
26 +DIST hplip-3.20.9-patches-1.tar.xz 17804 BLAKE2B 912f3e0ad8f3081255df3dbe7e4e2e64099890a0af56ff338f45a00dd1f26f26ee9417adff037895764ce12787d5923351c9df4c7642d1ed1f89d3fc9b66a271 SHA512 74986e7952bc1a990c49ec7e551f03f07fbbf518778d9dafa815b613c9b984f94bc0d390d90e91c37c28f3a6c3d78ec6c176759326fb0a0bc86afe4a098fdc45
27 +DIST hplip-3.20.9.tar.gz 26141198 BLAKE2B 3aa353343ee79ae04dbe94cb9e135469586a50c2052a21ffcff6907be40522a1605f1174b0b8891dea25abb83a3b836350e1e6c9d12ab2798aa826f1d3ce4069 SHA512 d2981cf51f6d893a576c51808710ac9815aa6ac5fdc617d95cc372518731a48b0aca09af721c1792e1531df6cf8fc0ebf5ebd7e9c96950602a830ceed3d441ae
28
29 diff --git a/net-print/hplip/hplip-3.20.9.ebuild b/net-print/hplip/hplip-3.20.9.ebuild
30 new file mode 100644
31 index 00000000000..395120a2cff
32 --- /dev/null
33 +++ b/net-print/hplip/hplip-3.20.9.ebuild
34 @@ -0,0 +1,280 @@
35 +# Copyright 1999-2020 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +PYTHON_COMPAT=( python3_{6,7,8} )
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.20.9-patches-1.tar.xz"
52 +
53 +LICENSE="GPL-2"
54 +SLOT="0"
55 +KEYWORDS="~amd64 ~arm ~arm64 ~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 + $(python_gen_cond_dep 'net-dns/avahi[${PYTHON_MULTI_USEDEP}]')
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 + $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]' 'python3*')
88 + kernel_linux? ( virtual/udev )
89 + $(python_gen_cond_dep '
90 + >=dev-python/dbus-python-1.2.0-r1[${PYTHON_MULTI_USEDEP}]
91 + dev-python/distro[${PYTHON_MULTI_USEDEP}]
92 + fax? ( dev-python/reportlab[${PYTHON_MULTI_USEDEP}] )
93 + qt5? (
94 + >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_MULTI_USEDEP}]
95 + libnotify? ( dev-python/notify2[${PYTHON_MULTI_USEDEP}] )
96 + )
97 + scanner? (
98 + >=dev-python/reportlab-3.2[${PYTHON_MULTI_USEDEP}]
99 + >=dev-python/pillow-3.1.1[${PYTHON_MULTI_USEDEP}]
100 + net-dns/avahi[${PYTHON_MULTI_USEDEP}]
101 + X? (
102 + || (
103 + kde? ( kde-misc/skanlite )
104 + media-gfx/xsane
105 + media-gfx/sane-frontends
106 + )
107 + )
108 + )
109 + ')
110 + )
111 + policykit? ( sys-auth/polkit )
112 +"
113 +
114 +REQUIRED_USE="!minimal? ( ${PYTHON_REQUIRED_USE} )"
115 +
116 +PATCHES=(
117 + "${WORKDIR}/patches"
118 +)
119 +
120 +CONFIG_CHECK="~PARPORT ~PPDEV"
121 +ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
122 +
123 +#DISABLE_AUTOFORMATTING="yes"
124 +DOC_CONTENTS="
125 +For more information on setting up your printer please take
126 +a look at the hplip section of the gentoo printing guide:
127 +https://wiki.gentoo.org/wiki/Printing
128 +"
129 +
130 +pkg_setup() {
131 + use !minimal && python-single-r1_pkg_setup
132 +
133 + use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
134 +
135 + if ! use hpcups && ! use hpijs ; then
136 + ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
137 + ewarn "which is probably not what you want."
138 + ewarn "You will almost certainly not be able to print."
139 + fi
140 +
141 + if use minimal ; then
142 + ewarn "Installing driver portions only, make sure you know what you are doing."
143 + ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
144 + ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
145 + else
146 + use parport && linux-info_pkg_setup
147 + fi
148 +}
149 +
150 +src_prepare() {
151 + default
152 +
153 + if use !minimal ; then
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 + minimal_build="${minimal_build} --disable-fax-build"
232 + else
233 + if use fax ; then
234 + minimal_build="${minimal_build} --enable-fax-build"
235 + else
236 + minimal_build="${minimal_build} --disable-fax-build"
237 + fi
238 + fi
239 +
240 + # disable class driver for now
241 + econf \
242 + --disable-cups11-build \
243 + --disable-lite-build \
244 + --disable-foomatic-rip-hplip-install \
245 + --disable-shadow-build \
246 + --disable-qt3 \
247 + --disable-qt4 \
248 + --disable-udev_sysfs_rules \
249 + --with-cupsbackenddir=$(cups-config --serverbin)/backend \
250 + --with-cupsfilterdir=$(cups-config --serverbin)/filter \
251 + --with-docdir=/usr/share/doc/${PF} \
252 + --with-htmldir=/usr/share/doc/${PF}/html \
253 + ${myconf} \
254 + ${drv_build} \
255 + ${minimal_build} \
256 + --enable-hpps-install \
257 + --disable-class-driver \
258 + $(use_enable doc doc-build) \
259 + $(use_enable !minimal gui-build) \
260 + $(use_enable !minimal dbus-build) \
261 + $(use_enable parport pp-build) \
262 + $(use_enable policykit) \
263 + $(use_enable qt5) \
264 + $(use_enable scanner scan-build) \
265 + $(use_enable snmp network-build)
266 +
267 + # hpijs ppds are created at configure time but are not installed (3.17.11)
268 +
269 + # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
270 + # The hpcups driver does not use foomatic-rip
271 + #local i
272 + #for i in ppd/hpijs/*.ppd.gz ; do
273 + # rm -f ${i}.temp || die
274 + # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
275 + # gzip > ${i}.temp || die
276 + # mv ${i}.temp ${i} || die
277 + #done
278 +}
279 +
280 +src_install() {
281 + # Disable parallel install
282 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018
283 + emake -j1 DESTDIR="${D}" install
284 + einstalldocs
285 + # default
286 +
287 + # Installed by sane-backends
288 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
289 + rm -f "${ED}"/etc/sane.d/dll.conf || die
290 +
291 + # Remove desktop and autostart files
292 + # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770
293 + use qt5 || {
294 + rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg
295 + }
296 +
297 + rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
298 + rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die
299 +
300 + # Remove hal fdi files
301 + rm -rf "${ED}"/usr/share/hal || die
302 +
303 + find "${D}" -name '*.la' -delete || die
304 +
305 + if use !minimal ; then
306 + python_optimize "${ED}"/usr/share/hplip
307 + fi
308 +
309 + readme.gentoo_create_doc
310 +}
311 +
312 +pkg_postinst() {
313 + readme.gentoo_print_elog
314 +}