1 |
commit: 33465746a3e53afd8c51096468648165be204bcb |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 26 21:08:19 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 26 22:26:32 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33465746 |
7 |
|
8 |
media-gfx/sane-backends: remove sane-backends-1.0.24-r5 / sane-backends-1.0.25 |
9 |
|
10 |
.../sane-backends/sane-backends-1.0.24-r5.ebuild | 329 ------------------- |
11 |
.../sane-backends/sane-backends-1.0.25.ebuild | 347 --------------------- |
12 |
2 files changed, 676 deletions(-) |
13 |
|
14 |
diff --git a/media-gfx/sane-backends/sane-backends-1.0.24-r5.ebuild b/media-gfx/sane-backends/sane-backends-1.0.24-r5.ebuild |
15 |
deleted file mode 100644 |
16 |
index 75af414..0000000 |
17 |
--- a/media-gfx/sane-backends/sane-backends-1.0.24-r5.ebuild |
18 |
+++ /dev/null |
19 |
@@ -1,329 +0,0 @@ |
20 |
-# Copyright 1999-2015 Gentoo Foundation |
21 |
-# Distributed under the terms of the GNU General Public License v2 |
22 |
-# $Id$ |
23 |
- |
24 |
-EAPI="5" |
25 |
- |
26 |
-inherit autotools eutils flag-o-matic multilib multilib-minimal udev user toolchain-funcs |
27 |
- |
28 |
-# gphoto and v4l are handled by their usual USE flags. |
29 |
-# The pint backend was disabled because I could not get it to compile. |
30 |
-IUSE_SANE_BACKENDS=" |
31 |
- abaton |
32 |
- agfafocus |
33 |
- apple |
34 |
- artec |
35 |
- artec_eplus48u |
36 |
- as6e |
37 |
- avision |
38 |
- bh |
39 |
- canon |
40 |
- canon630u |
41 |
- canon_dr |
42 |
- canon_pp |
43 |
- cardscan |
44 |
- coolscan |
45 |
- coolscan2 |
46 |
- coolscan3 |
47 |
- dc210 |
48 |
- dc240 |
49 |
- dc25 |
50 |
- dell1600n_net |
51 |
- dmc |
52 |
- epjitsu |
53 |
- epson |
54 |
- epson2 |
55 |
- fujitsu |
56 |
- genesys |
57 |
- gt68xx |
58 |
- hp |
59 |
- hp3500 |
60 |
- hp3900 |
61 |
- hp4200 |
62 |
- hp5400 |
63 |
- hp5590 |
64 |
- hpljm1005 |
65 |
- hpsj5s |
66 |
- hs2p |
67 |
- ibm |
68 |
- kodak |
69 |
- kodakaio |
70 |
- kvs1025 |
71 |
- kvs20xx |
72 |
- kvs40xx |
73 |
- leo |
74 |
- lexmark |
75 |
- ma1509 |
76 |
- magicolor |
77 |
- matsushita |
78 |
- microtek |
79 |
- microtek2 |
80 |
- mustek |
81 |
- mustek_pp |
82 |
- mustek_usb |
83 |
- mustek_usb2 |
84 |
- nec |
85 |
- net |
86 |
- niash |
87 |
- p5 |
88 |
- pie |
89 |
- pixma |
90 |
- plustek |
91 |
- plustek_pp |
92 |
- pnm |
93 |
- qcam |
94 |
- ricoh |
95 |
- rts8891 |
96 |
- s9036 |
97 |
- sceptre |
98 |
- sharp |
99 |
- sm3600 |
100 |
- sm3840 |
101 |
- snapscan |
102 |
- sp15c |
103 |
- st400 |
104 |
- stv680 |
105 |
- tamarack |
106 |
- teco1 |
107 |
- teco2 |
108 |
- teco3 |
109 |
- test |
110 |
- u12 |
111 |
- umax |
112 |
- umax1220u |
113 |
- umax_pp |
114 |
- xerox_mfp" |
115 |
- |
116 |
-IUSE="avahi doc gphoto2 ipv6 threads usb v4l xinetd snmp systemd" |
117 |
- |
118 |
-for backend in ${IUSE_SANE_BACKENDS}; do |
119 |
- case ${backend} in |
120 |
- # Disable backends that require parallel ports as no one has those anymore. |
121 |
- canon_pp|hpsj5s|mustek_pp|\ |
122 |
- pnm) |
123 |
- IUSE+=" -sane_backends_${backend}" |
124 |
- ;; |
125 |
- mustek_usb2|kvs40xx) |
126 |
- IUSE+=" sane_backends_${backend}" |
127 |
- ;; |
128 |
- *) |
129 |
- IUSE+=" +sane_backends_${backend}" |
130 |
- esac |
131 |
-done |
132 |
- |
133 |
-REQUIRED_USE=" |
134 |
- sane_backends_mustek_usb2? ( threads ) |
135 |
- sane_backends_kvs40xx? ( threads ) |
136 |
-" |
137 |
- |
138 |
-DESCRIPTION="Scanner Access Now Easy - Backends" |
139 |
-HOMEPAGE="http://www.sane-project.org/" |
140 |
-SRC_URI="https://alioth.debian.org/frs/download.php/file/3958/${P}.tar.gz" |
141 |
- |
142 |
-LICENSE="GPL-2 public-domain" |
143 |
-SLOT="0" |
144 |
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux" |
145 |
- |
146 |
-RDEPEND=" |
147 |
- sane_backends_dc210? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] ) |
148 |
- sane_backends_dc240? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] ) |
149 |
- sane_backends_dell1600n_net? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] |
150 |
- >=media-libs/tiff-3.9.7-r1[${MULTILIB_USEDEP}] ) |
151 |
- avahi? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) |
152 |
- sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
153 |
- sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
154 |
- sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
155 |
- usb? ( >=virtual/libusb-1-r1:1[${MULTILIB_USEDEP}] ) |
156 |
- gphoto2? ( |
157 |
- >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}] |
158 |
- >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] |
159 |
- ) |
160 |
- v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) |
161 |
- xinetd? ( sys-apps/xinetd ) |
162 |
- snmp? ( net-analyzer/net-snmp ) |
163 |
- systemd? ( sys-apps/systemd:0= ) |
164 |
-" |
165 |
- |
166 |
-DEPEND="${RDEPEND} |
167 |
- v4l? ( sys-kernel/linux-headers ) |
168 |
- doc? ( |
169 |
- virtual/latex-base |
170 |
- dev-texlive/texlive-latexextra |
171 |
- ) |
172 |
- >=sys-apps/sed-4 |
173 |
- |
174 |
- >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]" |
175 |
- |
176 |
-# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device) |
177 |
-RDEPEND="${RDEPEND} |
178 |
- !<sys-fs/udev-114 |
179 |
- abi_x86_32? ( |
180 |
- !<=app-emulation/emul-linux-x86-medialibs-20140508 |
181 |
- !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
182 |
- )" |
183 |
- |
184 |
-MULTILIB_CHOST_TOOLS=( |
185 |
- /usr/bin/sane-config |
186 |
-) |
187 |
- |
188 |
-pkg_setup() { |
189 |
- enewgroup scanner |
190 |
- enewuser saned -1 -1 -1 scanner |
191 |
-} |
192 |
- |
193 |
-src_prepare() { |
194 |
- cat >> backend/dll.conf.in <<-EOF |
195 |
- # Add support for the HP-specific backend. Needs net-print/hplip installed. |
196 |
- hpaio |
197 |
- # Add support for the Epson-specific backend. Needs media-gfx/iscan installed. |
198 |
- epkowa |
199 |
- EOF |
200 |
- epatch "${FILESDIR}"/niash_array_index.patch \ |
201 |
- "${FILESDIR}"/${P}-unused-cups.patch \ |
202 |
- "${FILESDIR}"/${P}-automagic_systemd.patch \ |
203 |
- "${FILESDIR}"/${P}-systemd_pkgconfig.patch \ |
204 |
- "${FILESDIR}"/${P}-kodakaio_avahi.patch \ |
205 |
- "${FILESDIR}"/${P}-saned_pidfile_location.patch \ |
206 |
- "${FILESDIR}"/${P}-cross-compile.patch |
207 |
- # Fix for "make check". |
208 |
- sed -i -e 's/sane-backends 1.0.24git/sane-backends 1.0.24/' testsuite/tools/data/html* |
209 |
- AT_NOELIBTOOLIZE=yes eautoreconf |
210 |
-} |
211 |
- |
212 |
-src_configure() { |
213 |
- append-flags -fno-strict-aliasing |
214 |
- |
215 |
- multilib-minimal_src_configure |
216 |
-} |
217 |
- |
218 |
-multilib_src_configure() { |
219 |
- # the blank is intended - an empty string would result in building ALL backends. |
220 |
- local BACKENDS=" " |
221 |
- |
222 |
- use gphoto2 && BACKENDS="gphoto2" |
223 |
- use v4l && BACKENDS="${BACKENDS} v4l" |
224 |
- for backend in ${IUSE_SANE_BACKENDS}; do |
225 |
- if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then |
226 |
- BACKENDS="${BACKENDS} ${backend}" |
227 |
- fi |
228 |
- done |
229 |
- |
230 |
- local myconf=( |
231 |
- $(use_enable usb libusb_1_0) |
232 |
- $(multilib_native_use_with snmp) |
233 |
- ) |
234 |
- |
235 |
- # you can only enable this backend, not disable it... |
236 |
- if use sane_backends_pnm; then |
237 |
- myconf+=( --enable-pnm-backend ) |
238 |
- fi |
239 |
- if ! use doc; then |
240 |
- myconf+=( --disable-latex ) |
241 |
- fi |
242 |
- if use sane_backends_mustek_pp; then |
243 |
- myconf+=( --enable-parport-directio ) |
244 |
- fi |
245 |
- if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then |
246 |
- myconf+=( sane_cv_use_libieee1284=no ) |
247 |
- fi |
248 |
- # if LINGUAS is set, just use the listed and supported localizations. |
249 |
- if [ "${LINGUAS-NoLocalesSet}" != NoLocalesSet ]; then |
250 |
- mkdir -p po || die |
251 |
- echo > po/LINGUAS |
252 |
- for lang in ${LINGUAS}; do |
253 |
- if [ -a "${S}"/po/${lang}.po ]; then |
254 |
- echo ${lang} >> po/LINGUAS |
255 |
- fi |
256 |
- done |
257 |
- fi |
258 |
- |
259 |
- # relative path must be used for tests to work properly |
260 |
- ECONF_SOURCE=../${P} \ |
261 |
- SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \ |
262 |
- BACKENDS="${BACKENDS}" \ |
263 |
- econf \ |
264 |
- $(use_with gphoto2) \ |
265 |
- $(multilib_native_use_with systemd) \ |
266 |
- $(use_with v4l) \ |
267 |
- $(use_enable avahi) \ |
268 |
- $(use_enable ipv6) \ |
269 |
- $(use_enable threads pthread) \ |
270 |
- "${myconf[@]}" |
271 |
-} |
272 |
- |
273 |
-multilib_src_compile() { |
274 |
- emake VARTEXFONTS="${T}/fonts" |
275 |
- |
276 |
- if use usb; then |
277 |
- cd tools/hotplug || die |
278 |
- sed -i -e '/^$/d' libsane.usermap || die |
279 |
- fi |
280 |
- |
281 |
- if tc-is-cross-compiler; then |
282 |
- # The build system sucks and doesn't handle this properly. |
283 |
- # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366 |
284 |
- tc-export_build_env BUILD_CC |
285 |
- cd "${BUILD_DIR}"/tools || die |
286 |
- ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} -I. -I../include -I"${S}"/include \ |
287 |
- "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \ |
288 |
- "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die |
289 |
- local dirs=( hal hotplug hotplug-ng udev ) |
290 |
- local targets=( |
291 |
- hal/libsane.fdi |
292 |
- hotplug/libsane.usermap |
293 |
- hotplug-ng/libsane.db |
294 |
- udev/libsane.rules |
295 |
- ) |
296 |
- mkdir -p "${dirs[@]}" || die |
297 |
- emake "${targets[@]}" |
298 |
- fi |
299 |
-} |
300 |
- |
301 |
-multilib_src_install() { |
302 |
- emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \ |
303 |
- docdir="${EPREFIX}"/usr/share/doc/${PF} |
304 |
- |
305 |
- if multilib_is_native_abi; then |
306 |
- if use usb; then |
307 |
- insinto /etc/hotplug/usb |
308 |
- doins tools/hotplug/libsane.usermap |
309 |
- fi |
310 |
- |
311 |
- udev_newrules tools/udev/libsane.rules 41-libsane.rules |
312 |
- insinto "/usr/share/pkgconfig" |
313 |
- doins tools/sane-backends.pc |
314 |
- fi |
315 |
-} |
316 |
- |
317 |
-multilib_src_install_all() { |
318 |
- keepdir /var/lib/lock/sane |
319 |
- fowners root:scanner /var/lib/lock/sane |
320 |
- fperms g+w /var/lib/lock/sane |
321 |
- dodir /etc/env.d |
322 |
- |
323 |
- if use usb; then |
324 |
- exeinto /etc/hotplug/usb |
325 |
- doexe tools/hotplug/libusbscanner |
326 |
- newdoc tools/hotplug/README README.hotplug |
327 |
- fi |
328 |
- |
329 |
- dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux |
330 |
- prune_libtool_files --all |
331 |
- if use xinetd; then |
332 |
- insinto /etc/xinetd.d |
333 |
- doins "${FILESDIR}"/saned |
334 |
- fi |
335 |
- |
336 |
- newinitd "${FILESDIR}"/saned.initd saned |
337 |
- newconfd "${FILESDIR}"/saned.confd saned |
338 |
-} |
339 |
- |
340 |
-pkg_postinst() { |
341 |
- if use xinetd; then |
342 |
- elog "If you want remote clients to connect, edit" |
343 |
- elog "/etc/sane.d/saned.conf and /etc/hosts.allow" |
344 |
- fi |
345 |
- |
346 |
- elog "If you are using a USB scanner, add all users who want" |
347 |
- elog "to access your scanner to the \"scanner\" group." |
348 |
-} |
349 |
|
350 |
diff --git a/media-gfx/sane-backends/sane-backends-1.0.25.ebuild b/media-gfx/sane-backends/sane-backends-1.0.25.ebuild |
351 |
deleted file mode 100644 |
352 |
index 9604d38..0000000 |
353 |
--- a/media-gfx/sane-backends/sane-backends-1.0.25.ebuild |
354 |
+++ /dev/null |
355 |
@@ -1,347 +0,0 @@ |
356 |
-# Copyright 1999-2015 Gentoo Foundation |
357 |
-# Distributed under the terms of the GNU General Public License v2 |
358 |
-# $Id$ |
359 |
- |
360 |
-EAPI="5" |
361 |
- |
362 |
-inherit eutils flag-o-matic multilib multilib-minimal udev user toolchain-funcs |
363 |
- |
364 |
-# gphoto and v4l are handled by their usual USE flags. |
365 |
-# The pint backend was disabled because I could not get it to compile. |
366 |
-IUSE_SANE_BACKENDS=" |
367 |
- abaton |
368 |
- agfafocus |
369 |
- apple |
370 |
- artec |
371 |
- artec_eplus48u |
372 |
- as6e |
373 |
- avision |
374 |
- bh |
375 |
- canon |
376 |
- canon630u |
377 |
- canon_dr |
378 |
- canon_pp |
379 |
- cardscan |
380 |
- coolscan |
381 |
- coolscan2 |
382 |
- coolscan3 |
383 |
- dc210 |
384 |
- dc240 |
385 |
- dc25 |
386 |
- dell1600n_net |
387 |
- dmc |
388 |
- epjitsu |
389 |
- epson |
390 |
- epson2 |
391 |
- fujitsu |
392 |
- genesys |
393 |
- gt68xx |
394 |
- hp |
395 |
- hp3500 |
396 |
- hp3900 |
397 |
- hp4200 |
398 |
- hp5400 |
399 |
- hp5590 |
400 |
- hpljm1005 |
401 |
- hpsj5s |
402 |
- hs2p |
403 |
- ibm |
404 |
- kodak |
405 |
- kodakaio |
406 |
- kvs1025 |
407 |
- kvs20xx |
408 |
- kvs40xx |
409 |
- leo |
410 |
- lexmark |
411 |
- ma1509 |
412 |
- magicolor |
413 |
- matsushita |
414 |
- microtek |
415 |
- microtek2 |
416 |
- mustek |
417 |
- mustek_pp |
418 |
- mustek_usb |
419 |
- mustek_usb2 |
420 |
- nec |
421 |
- net |
422 |
- niash |
423 |
- p5 |
424 |
- pie |
425 |
- pixma |
426 |
- plustek |
427 |
- plustek_pp |
428 |
- pnm |
429 |
- qcam |
430 |
- ricoh |
431 |
- rts8891 |
432 |
- s9036 |
433 |
- sceptre |
434 |
- sharp |
435 |
- sm3600 |
436 |
- sm3840 |
437 |
- snapscan |
438 |
- sp15c |
439 |
- st400 |
440 |
- stv680 |
441 |
- tamarack |
442 |
- teco1 |
443 |
- teco2 |
444 |
- teco3 |
445 |
- test |
446 |
- u12 |
447 |
- umax |
448 |
- umax1220u |
449 |
- umax_pp |
450 |
- xerox_mfp" |
451 |
- |
452 |
-IUSE="avahi doc gphoto2 ipv6 nls snmp systemd threads usb v4l xinetd" |
453 |
- |
454 |
-for backend in ${IUSE_SANE_BACKENDS}; do |
455 |
- case ${backend} in |
456 |
- # Disable backends that require parallel ports as no one has those anymore. |
457 |
- canon_pp|hpsj5s|mustek_pp|\ |
458 |
- pnm) |
459 |
- IUSE+=" -sane_backends_${backend}" |
460 |
- ;; |
461 |
- mustek_usb2|kvs40xx) |
462 |
- IUSE+=" sane_backends_${backend}" |
463 |
- ;; |
464 |
- *) |
465 |
- IUSE+=" +sane_backends_${backend}" |
466 |
- esac |
467 |
-done |
468 |
- |
469 |
-REQUIRED_USE=" |
470 |
- sane_backends_mustek_usb2? ( threads ) |
471 |
- sane_backends_kvs40xx? ( threads ) |
472 |
-" |
473 |
- |
474 |
-DESCRIPTION="Scanner Access Now Easy - Backends" |
475 |
-HOMEPAGE="http://www.sane-project.org/" |
476 |
-case ${PV} in |
477 |
-9999) |
478 |
- EGIT_REPO_URI="git://anonscm.debian.org/sane/sane-backends.git" |
479 |
- inherit git-r3 autotools |
480 |
- ;; |
481 |
-*_pre*) |
482 |
- MY_P="${PN}-git${PV#*_pre}" |
483 |
- SRC_URI="http://www.sane-project.org/snapshots/${MY_P}.tar.gz |
484 |
- mirror://gentoo/${MY_P}.tar.gz" |
485 |
- S=${WORKDIR}/${MY_P} |
486 |
- ;; |
487 |
-*) |
488 |
- MY_P=${P} |
489 |
- FRS_ID="4146" |
490 |
- SRC_URI="https://alioth.debian.org/frs/download.php/file/${FRS_ID}/${P}.tar.gz" |
491 |
- ;; |
492 |
-esac |
493 |
- |
494 |
-LICENSE="GPL-2 public-domain" |
495 |
-SLOT="0" |
496 |
-if [[ ${PV} != "9999" ]] ; then |
497 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" |
498 |
-fi |
499 |
- |
500 |
-RDEPEND=" |
501 |
- sane_backends_dc210? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] ) |
502 |
- sane_backends_dc240? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] ) |
503 |
- sane_backends_dell1600n_net? ( |
504 |
- >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] |
505 |
- >=media-libs/tiff-3.9.7-r1:0=[${MULTILIB_USEDEP}] |
506 |
- ) |
507 |
- avahi? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) |
508 |
- sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
509 |
- sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
510 |
- sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] ) |
511 |
- usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] ) |
512 |
- gphoto2? ( |
513 |
- >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}] |
514 |
- >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] |
515 |
- ) |
516 |
- v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) |
517 |
- xinetd? ( sys-apps/xinetd ) |
518 |
- snmp? ( net-analyzer/net-snmp ) |
519 |
- systemd? ( sys-apps/systemd:0= ) |
520 |
-" |
521 |
- |
522 |
-DEPEND="${RDEPEND} |
523 |
- v4l? ( sys-kernel/linux-headers ) |
524 |
- doc? ( |
525 |
- virtual/latex-base |
526 |
- dev-texlive/texlive-latexextra |
527 |
- ) |
528 |
- >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]" |
529 |
- |
530 |
-# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device) |
531 |
-RDEPEND="${RDEPEND} |
532 |
- !<sys-fs/udev-114" |
533 |
- |
534 |
-MULTILIB_CHOST_TOOLS=( |
535 |
- /usr/bin/sane-config |
536 |
-) |
537 |
- |
538 |
-pkg_setup() { |
539 |
- enewgroup scanner |
540 |
- enewuser saned -1 -1 -1 scanner |
541 |
-} |
542 |
- |
543 |
-src_prepare() { |
544 |
- cat >> backend/dll.conf.in <<-EOF |
545 |
- # Add support for the HP-specific backend. Needs net-print/hplip installed. |
546 |
- hpaio |
547 |
- # Add support for the Epson-specific backend. Needs media-gfx/iscan installed. |
548 |
- epkowa |
549 |
- EOF |
550 |
- epatch "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch |
551 |
- epatch "${FILESDIR}"/${PN}-1.0.25-disable-usb-tests.patch |
552 |
- if [[ ${PV} == "9999" ]] ; then |
553 |
- mv configure.{in,ac} || die |
554 |
- AT_NOELIBTOOLIZE=yes eautoreconf |
555 |
- fi |
556 |
- |
557 |
- # Fix for "make check". Upstream sometimes forgets to update this. |
558 |
- local ver=$(./configure --version | awk '{print $NF; exit 0}') |
559 |
- sed -i \ |
560 |
- -e "/by sane-desc 3.5 from sane-backends/s:sane-backends .*:sane-backends ${ver}:" \ |
561 |
- testsuite/tools/data/html* || die |
562 |
-} |
563 |
- |
564 |
-src_configure() { |
565 |
- append-flags -fno-strict-aliasing |
566 |
- |
567 |
- # if LINGUAS is set, just use the listed and supported localizations. |
568 |
- if [[ ${LINGUAS+set} == "set" ]]; then |
569 |
- mkdir -p po || die |
570 |
- strip-linguas -u po |
571 |
- printf '%s\n' ${LINGUAS} > po/LINGUAS |
572 |
- fi |
573 |
- |
574 |
- multilib-minimal_src_configure |
575 |
-} |
576 |
- |
577 |
-multilib_src_configure() { |
578 |
- # the blank is intended - an empty string would result in building ALL backends. |
579 |
- local BACKENDS=" " |
580 |
- |
581 |
- use gphoto2 && BACKENDS="gphoto2" |
582 |
- use v4l && BACKENDS="${BACKENDS} v4l" |
583 |
- for backend in ${IUSE_SANE_BACKENDS}; do |
584 |
- if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then |
585 |
- BACKENDS="${BACKENDS} ${backend}" |
586 |
- fi |
587 |
- done |
588 |
- |
589 |
- local myconf=( |
590 |
- $(use_enable usb libusb_1_0) |
591 |
- $(multilib_native_use_with snmp) |
592 |
- ) |
593 |
- |
594 |
- # you can only enable this backend, not disable it... |
595 |
- if use sane_backends_pnm; then |
596 |
- myconf+=( --enable-pnm-backend ) |
597 |
- fi |
598 |
- if ! use doc; then |
599 |
- myconf+=( --disable-latex ) |
600 |
- fi |
601 |
- if use sane_backends_mustek_pp; then |
602 |
- myconf+=( --enable-parport-directio ) |
603 |
- fi |
604 |
- if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then |
605 |
- myconf+=( sane_cv_use_libieee1284=no ) |
606 |
- fi |
607 |
- |
608 |
- # relative path must be used for tests to work properly |
609 |
- ECONF_SOURCE=${S} \ |
610 |
- SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \ |
611 |
- BACKENDS="${BACKENDS}" \ |
612 |
- econf \ |
613 |
- $(use_with gphoto2) \ |
614 |
- $(multilib_native_use_with systemd) \ |
615 |
- $(use_with v4l) \ |
616 |
- $(use_enable avahi) \ |
617 |
- $(use_enable ipv6) \ |
618 |
- $(use_enable nls translations) \ |
619 |
- $(use_enable threads pthread) \ |
620 |
- "${myconf[@]}" |
621 |
-} |
622 |
- |
623 |
-multilib_src_compile() { |
624 |
- emake VARTEXFONTS="${T}/fonts" |
625 |
- |
626 |
- if tc-is-cross-compiler; then |
627 |
- pushd "${BUILD_DIR}"/tools >/dev/null || die |
628 |
- |
629 |
- # The build system sucks and doesn't handle this properly. |
630 |
- # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366 |
631 |
- tc-export_build_env BUILD_CC |
632 |
- ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \ |
633 |
- -I. -I../include -I"${S}"/include \ |
634 |
- "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \ |
635 |
- "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die |
636 |
- local dirs=( hal hotplug hotplug-ng udev ) |
637 |
- local targets=( |
638 |
- hal/libsane.fdi |
639 |
- hotplug/libsane.usermap |
640 |
- hotplug-ng/libsane.db |
641 |
- udev/libsane.rules |
642 |
- ) |
643 |
- mkdir -p "${dirs[@]}" || die |
644 |
- emake "${targets[@]}" |
645 |
- |
646 |
- popd >/dev/null |
647 |
- fi |
648 |
- |
649 |
- if use usb; then |
650 |
- sed -i -e '/^$/d' \ |
651 |
- tools/hotplug/libsane.usermap || die |
652 |
- fi |
653 |
-} |
654 |
- |
655 |
-multilib_src_install() { |
656 |
- emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \ |
657 |
- docdir="${EPREFIX}"/usr/share/doc/${PF} |
658 |
- |
659 |
- if multilib_is_native_abi; then |
660 |
- if use usb; then |
661 |
- insinto /etc/hotplug/usb |
662 |
- doins tools/hotplug/libsane.usermap |
663 |
- fi |
664 |
- |
665 |
- udev_newrules tools/udev/libsane.rules 41-libsane.rules |
666 |
- insinto "/usr/share/pkgconfig" |
667 |
- doins tools/sane-backends.pc |
668 |
- fi |
669 |
-} |
670 |
- |
671 |
-multilib_src_install_all() { |
672 |
- keepdir /var/lib/lock/sane |
673 |
- fowners root:scanner /var/lib/lock/sane |
674 |
- fperms g+w /var/lib/lock/sane |
675 |
- dodir /etc/env.d |
676 |
- |
677 |
- if use usb; then |
678 |
- exeinto /etc/hotplug/usb |
679 |
- doexe tools/hotplug/libusbscanner |
680 |
- newdoc tools/hotplug/README README.hotplug |
681 |
- fi |
682 |
- |
683 |
- dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux |
684 |
- prune_libtool_files --all |
685 |
- if use xinetd; then |
686 |
- insinto /etc/xinetd.d |
687 |
- doins "${FILESDIR}"/saned |
688 |
- fi |
689 |
- |
690 |
- newinitd "${FILESDIR}"/saned.initd saned |
691 |
- newconfd "${FILESDIR}"/saned.confd saned |
692 |
-} |
693 |
- |
694 |
-pkg_postinst() { |
695 |
- if use xinetd; then |
696 |
- elog "If you want remote clients to connect, edit" |
697 |
- elog "/etc/sane.d/saned.conf and /etc/hosts.allow" |
698 |
- fi |
699 |
- |
700 |
- elog "If you are using a USB scanner, add all users who want" |
701 |
- elog "to access your scanner to the \"scanner\" group." |
702 |
-} |