1 |
commit: 708719b2b0f6c899950e6da443a60d306601cd81 |
2 |
Author: Guillaume Castagnino <casta <AT> xwing <DOT> info> |
3 |
AuthorDate: Mon Oct 18 19:13:44 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 20 01:09:41 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=708719b2 |
7 |
|
8 |
media-gfx/sane-backends: bump to 1.0.32 |
9 |
|
10 |
* fix tarball source |
11 |
(https://gitlab.com/sane-project/backends/-/issues/248) |
12 |
* remove patches not needed anymore |
13 |
|
14 |
Signed-off-by: Guillaume Castagnino <casta <AT> xwing.info> |
15 |
Closes: https://bugs.gentoo.org/818838 |
16 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
17 |
Closes: https://github.com/gentoo/gentoo/pull/22628 |
18 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
19 |
|
20 |
media-gfx/sane-backends/Manifest | 1 + |
21 |
.../sane-backends/sane-backends-1.0.32.ebuild | 352 +++++++++++++++++++++ |
22 |
2 files changed, 353 insertions(+) |
23 |
|
24 |
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest |
25 |
index 789686c7720..7d1b5d8608b 100644 |
26 |
--- a/media-gfx/sane-backends/Manifest |
27 |
+++ b/media-gfx/sane-backends/Manifest |
28 |
@@ -1 +1,2 @@ |
29 |
DIST backends-1.0.31.tar.gz 5731445 BLAKE2B d70691acbd3f5788a26bab6b35eeb243801b435272b57e3fa568127562ff57797452e396e6e5f058c33d3bce0f99b672542fb89bc8eb4d36cbe82ccc20b8f298 SHA512 d8ef05cc3aa9c4fa42c9241e1e61fc93e7959df3746a3a2cfaa6e4fb26dfd0911b4d3227b2da28852f8630fa17ad3432a1230a6f4425340e79a3b82ec5eaa9eb |
30 |
+DIST sane-backends-1.0.32.tar.gz 7349442 BLAKE2B 8841542ffd520b38bbeb532eaae7cce803f0bd868cae7edc28d2138729dcffb5a2a0908b56c16c25ffbba539525331c12c259e1768e105de1bdd1419d29efe83 SHA512 416757d9a69bbc18678d1f16a024ba5a949c571204a68f36009d416be28723886ccea71daaa7da90d20eac9696cd44e567802d6c21c3fc5914b97213bbedb6d5 |
31 |
|
32 |
diff --git a/media-gfx/sane-backends/sane-backends-1.0.32.ebuild b/media-gfx/sane-backends/sane-backends-1.0.32.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..36bb18f0a98 |
35 |
--- /dev/null |
36 |
+++ b/media-gfx/sane-backends/sane-backends-1.0.32.ebuild |
37 |
@@ -0,0 +1,352 @@ |
38 |
+# Copyright 1999-2021 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+ |
43 |
+PYTHON_COMPAT=( python3_{8..9} ) |
44 |
+ |
45 |
+# python-any-r1 required for a script in |
46 |
+# backends/pixma/scripts/ |
47 |
+inherit autotools flag-o-matic multilib-minimal optfeature python-any-r1 systemd toolchain-funcs udev |
48 |
+ |
49 |
+# gphoto and v4l are handled by their usual USE flags. |
50 |
+# The pint backend was disabled because I could not get it to compile. |
51 |
+IUSE_SANE_BACKENDS=( |
52 |
+ abaton |
53 |
+ agfafocus |
54 |
+ apple |
55 |
+ artec |
56 |
+ artec_eplus48u |
57 |
+ as6e |
58 |
+ avision |
59 |
+ bh |
60 |
+ canon |
61 |
+ canon630u |
62 |
+ canon_dr |
63 |
+ canon_lide70 |
64 |
+ canon_pp |
65 |
+ cardscan |
66 |
+ coolscan |
67 |
+ coolscan2 |
68 |
+ coolscan3 |
69 |
+ dc210 |
70 |
+ dc240 |
71 |
+ dc25 |
72 |
+ dell1600n_net |
73 |
+ dmc |
74 |
+ epjitsu |
75 |
+ epson |
76 |
+ epson2 |
77 |
+ escl |
78 |
+ fujitsu |
79 |
+ genesys |
80 |
+ gt68xx |
81 |
+ hp |
82 |
+ hp3500 |
83 |
+ hp3900 |
84 |
+ hp4200 |
85 |
+ hp5400 |
86 |
+ hp5590 |
87 |
+ hpljm1005 |
88 |
+ hpsj5s |
89 |
+ hs2p |
90 |
+ ibm |
91 |
+ kodak |
92 |
+ kodakaio |
93 |
+ kvs1025 |
94 |
+ kvs20xx |
95 |
+ kvs40xx |
96 |
+ leo |
97 |
+ lexmark |
98 |
+ ma1509 |
99 |
+ magicolor |
100 |
+ matsushita |
101 |
+ microtek |
102 |
+ microtek2 |
103 |
+ mustek |
104 |
+ mustek_pp |
105 |
+ mustek_usb |
106 |
+ mustek_usb2 |
107 |
+ nec |
108 |
+ net |
109 |
+ niash |
110 |
+ p5 |
111 |
+ pie |
112 |
+ pieusb |
113 |
+ pixma |
114 |
+ plustek |
115 |
+ plustek_pp |
116 |
+ pnm |
117 |
+ qcam |
118 |
+ ricoh |
119 |
+ ricoh2 |
120 |
+ rts8891 |
121 |
+ s9036 |
122 |
+ sceptre |
123 |
+ sharp |
124 |
+ sm3600 |
125 |
+ sm3840 |
126 |
+ snapscan |
127 |
+ sp15c |
128 |
+ st400 |
129 |
+ stv680 |
130 |
+ tamarack |
131 |
+ teco1 |
132 |
+ teco2 |
133 |
+ teco3 |
134 |
+ test |
135 |
+ u12 |
136 |
+ umax |
137 |
+ umax1220u |
138 |
+ umax_pp |
139 |
+ xerox_mfp |
140 |
+) |
141 |
+ |
142 |
+IUSE="gphoto2 ipv6 snmp systemd threads usb v4l xinetd +zeroconf" |
143 |
+ |
144 |
+for GBACKEND in ${IUSE_SANE_BACKENDS[@]}; do |
145 |
+ case ${GBACKEND} in |
146 |
+ # Disable backends that require parallel ports as no one has those anymore. |
147 |
+ canon_pp|hpsj5s|mustek_pp|\ |
148 |
+ pnm|mustek_usb2|kvs40xx) |
149 |
+ IUSE+=" sane_backends_${GBACKEND}" |
150 |
+ ;; |
151 |
+ *) |
152 |
+ IUSE+=" +sane_backends_${GBACKEND}" |
153 |
+ esac |
154 |
+done |
155 |
+ |
156 |
+REQUIRED_USE=" |
157 |
+ sane_backends_escl? ( zeroconf ) |
158 |
+ sane_backends_kvs40xx? ( threads ) |
159 |
+ sane_backends_mustek_usb2? ( threads ) |
160 |
+" |
161 |
+ |
162 |
+DESCRIPTION="Scanner Access Now Easy - Backends" |
163 |
+HOMEPAGE="http://www.sane-project.org/" |
164 |
+SRC_URI="https://gitlab.com/sane-project/backends/uploads/104f09c07d35519cc8e72e604f11643f/${P}.tar.gz" |
165 |
+ |
166 |
+LICENSE="GPL-2 public-domain" |
167 |
+SLOT="0" |
168 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
169 |
+ |
170 |
+# For pixma: see https://gitlab.com/sane-project/backends/-/releases/1.0.28#build |
171 |
+RDEPEND=" |
172 |
+ acct-group/scanner |
173 |
+ acct-user/saned |
174 |
+ gphoto2? ( |
175 |
+ >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}] |
176 |
+ >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] |
177 |
+ ) |
178 |
+ sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
179 |
+ sane_backends_dc210? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] ) |
180 |
+ sane_backends_dc240? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] ) |
181 |
+ sane_backends_dell1600n_net? ( |
182 |
+ >=media-libs/tiff-3.9.7-r1:0=[${MULTILIB_USEDEP}] |
183 |
+ >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] |
184 |
+ ) |
185 |
+ sane_backends_escl? ( |
186 |
+ app-text/poppler[cairo] |
187 |
+ || ( |
188 |
+ net-dns/avahi[dbus] |
189 |
+ net-dns/avahi[gtk] |
190 |
+ ) |
191 |
+ net-dns/avahi[${MULTILIB_USEDEP}] |
192 |
+ net-misc/curl[${MULTILIB_USEDEP}] |
193 |
+ ) |
194 |
+ sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
195 |
+ sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
196 |
+ sane_backends_pixma? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] ) |
197 |
+ snmp? ( net-analyzer/net-snmp:0= ) |
198 |
+ systemd? ( sys-apps/systemd:0= ) |
199 |
+ usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] ) |
200 |
+ v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) |
201 |
+ xinetd? ( sys-apps/xinetd ) |
202 |
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) |
203 |
+" |
204 |
+ |
205 |
+DEPEND="${RDEPEND} |
206 |
+ dev-libs/libxml2 |
207 |
+ v4l? ( sys-kernel/linux-headers ) |
208 |
+" |
209 |
+BDEPEND=" |
210 |
+ ${PYTHON_DEPS} |
211 |
+ sys-devel/autoconf-archive |
212 |
+ sys-devel/gettext |
213 |
+ virtual/pkgconfig |
214 |
+" |
215 |
+ |
216 |
+PATCHES=( |
217 |
+ "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch |
218 |
+ "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch |
219 |
+ "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch |
220 |
+) |
221 |
+ |
222 |
+MULTILIB_CHOST_TOOLS=( |
223 |
+ /usr/bin/sane-config |
224 |
+) |
225 |
+ |
226 |
+src_prepare() { |
227 |
+ default |
228 |
+ |
229 |
+ # Patch out the git reference so we can run eautoreconf |
230 |
+ sed \ |
231 |
+ -e "s/m4_esyscmd_s(\[git describe --dirty\])/${PV}/" \ |
232 |
+ -e '/^AM_MAINTAINER_MODE/d' \ |
233 |
+ -i configure.ac || die |
234 |
+ eautoreconf |
235 |
+ |
236 |
+ # Fix for "make check". Upstream sometimes forgets to update this. |
237 |
+ local ver=$(./configure --version | awk '{print $NF; exit 0}') |
238 |
+ sed -i \ |
239 |
+ -e "/by sane-desc 3.5 from sane-backends/s:sane-backends .*:sane-backends ${ver}:" \ |
240 |
+ testsuite/tools/data/html* || die |
241 |
+ |
242 |
+ # don't bleed user LDFLAGS into pkgconfig files |
243 |
+ sed 's|@LDFLAGS@ ||' -i tools/*.pc.in || die |
244 |
+} |
245 |
+ |
246 |
+src_configure() { |
247 |
+ # From Fedora |
248 |
+ append-flags -fno-strict-aliasing |
249 |
+ multilib-minimal_src_configure |
250 |
+} |
251 |
+ |
252 |
+multilib_src_configure() { |
253 |
+ # the blank is intended - an empty string would result in building ALL backends. |
254 |
+ local lbackends=" " |
255 |
+ |
256 |
+ use gphoto2 && lbackends="gphoto2" |
257 |
+ use v4l && lbackends+=" v4l" |
258 |
+ use sane_backends_escl && multilib_is_native_abi && lbackends+=" escl" |
259 |
+ local backend |
260 |
+ for backend in ${IUSE_SANE_BACKENDS[@]} ; do |
261 |
+ if use "sane_backends_${backend}" && [[ "${backend}" != pnm ]] && [[ "${backend}" != escl ]] ; then |
262 |
+ lbackends+=" ${backend}" |
263 |
+ fi |
264 |
+ done |
265 |
+ |
266 |
+ local myconf=( |
267 |
+ $(use_with usb) |
268 |
+ $(multilib_native_use_with snmp) |
269 |
+ |
270 |
+ $(multilib_native_use_with sane_backends_escl poppler-glib) |
271 |
+ # you can only enable this backend, not disable it... |
272 |
+ $(usex sane_backends_pnm --enable-pnm-backend '') |
273 |
+ $(usex sane_backends_mustek_pp --enable-parport-directio '') |
274 |
+ ) |
275 |
+ |
276 |
+ if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp ; } ; then |
277 |
+ myconf+=( sane_cv_use_libieee1284=no ) |
278 |
+ fi |
279 |
+ |
280 |
+ # relative path must be used for tests to work properly |
281 |
+ # All distributions pass --disable-locking because /var/lock/sane/ would be a world-writable directory |
282 |
+ # that break in many ways, bug #636202, #668232, #668350 |
283 |
+ # People can refer to the "Programmer's Documentation" at http://www.sane-project.org/docs.html |
284 |
+ myconf+=( |
285 |
+ --disable-locking |
286 |
+ $(use_with gphoto2) |
287 |
+ $(multilib_native_use_with systemd) |
288 |
+ $(use_with v4l) |
289 |
+ $(use_enable ipv6) |
290 |
+ $(use_enable threads pthread) |
291 |
+ $(use_with zeroconf avahi) |
292 |
+ ) |
293 |
+ ECONF_SOURCE="${S}" \ |
294 |
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \ |
295 |
+ BACKENDS="${lbackends}" \ |
296 |
+ econf "${myconf[@]}" |
297 |
+} |
298 |
+ |
299 |
+multilib_src_compile() { |
300 |
+ emake VARTEXFONTS="${T}/fonts" |
301 |
+ |
302 |
+ if tc-is-cross-compiler ; then |
303 |
+ pushd "${BUILD_DIR}"/tools >/dev/null || die |
304 |
+ |
305 |
+ # The build system sucks and doesn't handle this properly. |
306 |
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366 |
307 |
+ tc-export_build_env BUILD_CC |
308 |
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \ |
309 |
+ -I. -I../include -I"${S}"/include \ |
310 |
+ "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \ |
311 |
+ "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die |
312 |
+ local dirs=( hal hotplug hotplug-ng udev ) |
313 |
+ local targets=( |
314 |
+ hal/libsane.fdi |
315 |
+ hotplug/libsane.usermap |
316 |
+ hotplug-ng/libsane.db |
317 |
+ udev/libsane.rules |
318 |
+ ) |
319 |
+ mkdir -p "${dirs[@]}" || die |
320 |
+ emake "${targets[@]}" |
321 |
+ |
322 |
+ popd >/dev/null || die |
323 |
+ fi |
324 |
+ |
325 |
+ if use usb ; then |
326 |
+ sed -i -e '/^$/d' \ |
327 |
+ tools/hotplug/libsane.usermap || die |
328 |
+ fi |
329 |
+} |
330 |
+ |
331 |
+multilib_src_install() { |
332 |
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \ |
333 |
+ docdir="${EPREFIX}"/usr/share/doc/${PF} |
334 |
+ |
335 |
+ if multilib_is_native_abi ; then |
336 |
+ if use usb ; then |
337 |
+ insinto /etc/hotplug/usb |
338 |
+ doins tools/hotplug/libsane.usermap |
339 |
+ fi |
340 |
+ |
341 |
+ udev_newrules tools/udev/libsane.rules 41-libsane.rules |
342 |
+ insinto "/usr/share/pkgconfig" |
343 |
+ doins tools/sane-backends.pc |
344 |
+ fi |
345 |
+} |
346 |
+ |
347 |
+multilib_src_install_all() { |
348 |
+ keepdir /var/lib/lock/sane |
349 |
+ fowners root:scanner /var/lib/lock/sane |
350 |
+ fperms g+w /var/lib/lock/sane |
351 |
+ dodir /etc/env.d |
352 |
+ |
353 |
+ if use systemd ; then |
354 |
+ systemd_newunit "${FILESDIR}"/saned_at.service "saned@.service" |
355 |
+ systemd_newunit "${FILESDIR}"/saned.socket saned.socket |
356 |
+ fi |
357 |
+ |
358 |
+ if use usb ; then |
359 |
+ exeinto /etc/hotplug/usb |
360 |
+ doexe tools/hotplug/libusbscanner |
361 |
+ newdoc tools/hotplug/README README.hotplug |
362 |
+ fi |
363 |
+ |
364 |
+ dodoc NEWS AUTHORS PROBLEMS README README.linux |
365 |
+ find "${ED}" -name '*.la' -delete || die |
366 |
+ |
367 |
+ if use xinetd ; then |
368 |
+ insinto /etc/xinetd.d |
369 |
+ doins "${FILESDIR}"/saned |
370 |
+ fi |
371 |
+ |
372 |
+ newinitd "${FILESDIR}"/saned.initd saned |
373 |
+ newconfd "${FILESDIR}"/saned.confd saned |
374 |
+} |
375 |
+ |
376 |
+pkg_postinst() { |
377 |
+ optfeature "Epson-specific backend" media-gfx/iscan |
378 |
+ optfeature "HP-specific backend" net-print/hplip |
379 |
+ |
380 |
+ if use xinetd ; then |
381 |
+ elog "If you want remote clients to connect, edit" |
382 |
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow" |
383 |
+ fi |
384 |
+ |
385 |
+ if ! use systemd ; then |
386 |
+ elog "If you are using a USB scanner, add all users who want" |
387 |
+ elog "to access your scanner to the \"scanner\" group." |
388 |
+ fi |
389 |
+} |