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