Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/sane-backends: sane-backends-1.0.24-r4.ebuild ChangeLog
Date: Wed, 21 May 2014 19:00:11
Message-Id: 20140521190007.DE0BD2004C@flycatcher.gentoo.org
1 mgorny 14/05/21 19:00:07
2
3 Modified: ChangeLog
4 Added: sane-backends-1.0.24-r4.ebuild
5 Log:
6 Enable multilib support, bug #493168.
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.253 media-gfx/sane-backends/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/sane-backends/ChangeLog?rev=1.253&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/sane-backends/ChangeLog?rev=1.253&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/sane-backends/ChangeLog?r1=1.252&r2=1.253
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v
20 retrieving revision 1.252
21 retrieving revision 1.253
22 diff -u -r1.252 -r1.253
23 --- ChangeLog 17 May 2014 14:04:05 -0000 1.252
24 +++ ChangeLog 21 May 2014 19:00:07 -0000 1.253
25 @@ -1,6 +1,11 @@
26 # ChangeLog for media-gfx/sane-backends
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.252 2014/05/17 14:04:05 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.253 2014/05/21 19:00:07 mgorny Exp $
30 +
31 +*sane-backends-1.0.24-r4 (21 May 2014)
32 +
33 + 21 May 2014; Michał Górny <mgorny@g.o> +sane-backends-1.0.24-r4.ebuild:
34 + Enable multilib support, bug #493168.
35
36 17 May 2014; Agostino Sarubbo <ago@g.o> sane-backends-1.0.24-r3.ebuild:
37 Stable for alpha, wrt bug #506928
38
39
40
41 1.1 media-gfx/sane-backends/sane-backends-1.0.24-r4.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/sane-backends/sane-backends-1.0.24-r4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/sane-backends/sane-backends-1.0.24-r4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: sane-backends-1.0.24-r4.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/sane-backends-1.0.24-r4.ebuild,v 1.1 2014/05/21 19:00:07 mgorny Exp $
51
52 EAPI="5"
53
54 inherit autotools eutils flag-o-matic multilib multilib-minimal udev user toolchain-funcs
55
56 # gphoto and v4l are handled by their usual USE flags.
57 # The pint backend was disabled because I could not get it to compile.
58 IUSE_SANE_BACKENDS="
59 abaton
60 agfafocus
61 apple
62 artec
63 artec_eplus48u
64 as6e
65 avision
66 bh
67 canon
68 canon630u
69 canon_dr
70 canon_pp
71 cardscan
72 coolscan
73 coolscan2
74 coolscan3
75 dc210
76 dc240
77 dc25
78 dell1600n_net
79 dmc
80 epjitsu
81 epson
82 epson2
83 fujitsu
84 genesys
85 gt68xx
86 hp
87 hp3500
88 hp3900
89 hp4200
90 hp5400
91 hp5590
92 hpljm1005
93 hpsj5s
94 hs2p
95 ibm
96 kodak
97 kodakaio
98 kvs1025
99 kvs20xx
100 kvs40xx
101 leo
102 lexmark
103 ma1509
104 magicolor
105 matsushita
106 microtek
107 microtek2
108 mustek
109 mustek_pp
110 mustek_usb
111 mustek_usb2
112 nec
113 net
114 niash
115 p5
116 pie
117 pixma
118 plustek
119 plustek_pp
120 pnm
121 qcam
122 ricoh
123 rts8891
124 s9036
125 sceptre
126 sharp
127 sm3600
128 sm3840
129 snapscan
130 sp15c
131 st400
132 stv680
133 tamarack
134 teco1
135 teco2
136 teco3
137 test
138 u12
139 umax
140 umax1220u
141 umax_pp
142 xerox_mfp"
143
144 IUSE="avahi doc gphoto2 ipv6 threads usb v4l xinetd snmp systemd"
145
146 for backend in ${IUSE_SANE_BACKENDS}; do
147 case ${backend} in
148 # Disable backends that require parallel ports as no one has those anymore.
149 canon_pp|hpsj5s|mustek_pp|\
150 pnm)
151 IUSE+=" -sane_backends_${backend}"
152 ;;
153 mustek_usb2|kvs40xx)
154 IUSE+=" sane_backends_${backend}"
155 ;;
156 *)
157 IUSE+=" +sane_backends_${backend}"
158 esac
159 done
160
161 REQUIRED_USE="
162 sane_backends_mustek_usb2? ( threads )
163 sane_backends_kvs40xx? ( threads )
164 "
165
166 DESCRIPTION="Scanner Access Now Easy - Backends"
167 HOMEPAGE="http://www.sane-project.org/"
168 SRC_URI="https://alioth.debian.org/frs/download.php/file/3958/${P}.tar.gz"
169
170 LICENSE="GPL-2 public-domain"
171 SLOT="0"
172 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
173
174 RDEPEND="
175 sane_backends_dc210? ( virtual/jpeg[${MULTILIB_USEDEP}] )
176 sane_backends_dc240? ( virtual/jpeg[${MULTILIB_USEDEP}] )
177 sane_backends_dell1600n_net? ( virtual/jpeg[${MULTILIB_USEDEP}]
178 media-libs/tiff[${MULTILIB_USEDEP}] )
179 avahi? ( >=net-dns/avahi-0.6.24[${MULTILIB_USEDEP}] )
180 sane_backends_canon_pp? ( sys-libs/libieee1284[${MULTILIB_USEDEP}] )
181 sane_backends_hpsj5s? ( sys-libs/libieee1284[${MULTILIB_USEDEP}] )
182 sane_backends_mustek_pp? ( sys-libs/libieee1284[${MULTILIB_USEDEP}] )
183 usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
184 gphoto2? (
185 media-libs/libgphoto2:=[${MULTILIB_USEDEP}]
186 virtual/jpeg[${MULTILIB_USEDEP}]
187 )
188 v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
189 xinetd? ( sys-apps/xinetd )
190 snmp? ( net-analyzer/net-snmp )
191 systemd? ( sys-apps/systemd:0= )
192 "
193
194 DEPEND="${RDEPEND}
195 v4l? ( sys-kernel/linux-headers )
196 doc? (
197 virtual/latex-base
198 dev-texlive/texlive-latexextra
199 )
200 >=sys-apps/sed-4
201
202 virtual/pkgconfig[${MULTILIB_USEDEP}]"
203
204 # We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
205 RDEPEND="${RDEPEND}
206 !<sys-fs/udev-114
207 abi_x86_32? (
208 !<=app-emulation/emul-linux-x86-medialibs-20140508
209 !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
210 )"
211
212 MULTILIB_CHOST_TOOLS=(
213 /usr/bin/sane-config
214 )
215
216 pkg_setup() {
217 enewgroup scanner
218 enewuser saned -1 -1 -1 scanner
219 }
220
221 src_prepare() {
222 cat >> backend/dll.conf.in <<-EOF
223 # Add support for the HP-specific backend. Needs net-print/hplip installed.
224 hpaio
225 # Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
226 epkowa
227 EOF
228 epatch "${FILESDIR}"/niash_array_index.patch \
229 "${FILESDIR}"/${P}-unused-cups.patch \
230 "${FILESDIR}"/${P}-automagic_systemd.patch \
231 "${FILESDIR}"/${P}-systemd_pkgconfig.patch \
232 "${FILESDIR}"/${P}-kodakaio_avahi.patch \
233 "${FILESDIR}"/${P}-saned_pidfile_location.patch
234 # Fix for "make check".
235 sed -i -e 's/sane-backends 1.0.24git/sane-backends 1.0.24/' testsuite/tools/data/html*
236 AT_NOELIBTOOLIZE=yes eautoreconf
237 }
238
239 src_configure() {
240 append-flags -fno-strict-aliasing
241
242 multilib-minimal_src_configure
243 }
244
245 multilib_src_configure() {
246 # the blank is intended - an empty string would result in building ALL backends.
247 local BACKENDS=" "
248
249 use gphoto2 && BACKENDS="gphoto2"
250 use v4l && BACKENDS="${BACKENDS} v4l"
251 for backend in ${IUSE_SANE_BACKENDS}; do
252 if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
253 BACKENDS="${BACKENDS} ${backend}"
254 fi
255 done
256
257 local myconf=(
258 $(use_enable usb libusb_1_0)
259 $(multilib_native_use_with snmp)
260 )
261
262 # you can only enable this backend, not disable it...
263 if use sane_backends_pnm; then
264 myconf+=( --enable-pnm-backend )
265 fi
266 if ! use doc; then
267 myconf+=( --disable-latex )
268 fi
269 if use sane_backends_mustek_pp; then
270 myconf+=( --enable-parport-directio )
271 fi
272 if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then
273 myconf+=( sane_cv_use_libieee1284=no )
274 fi
275 # if LINGUAS is set, just use the listed and supported localizations.
276 if [ "${LINGUAS-NoLocalesSet}" != NoLocalesSet ]; then
277 mkdir -p po || die
278 echo > po/LINGUAS
279 for lang in ${LINGUAS}; do
280 if [ -a "${S}"/po/${lang}.po ]; then
281 echo ${lang} >> po/LINGUAS
282 fi
283 done
284 fi
285
286 # relative path must be used for tests to work properly
287 ECONF_SOURCE=../${P} \
288 SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
289 BACKENDS="${BACKENDS}" \
290 econf \
291 $(use_with gphoto2) \
292 $(multilib_native_use_with systemd) \
293 $(use_with v4l) \
294 $(use_enable avahi) \
295 $(use_enable ipv6) \
296 $(use_enable threads pthread) \
297 ${myconf}
298 }
299
300 multilib_src_compile() {
301 emake VARTEXFONTS="${T}/fonts"
302
303 if use usb; then
304 cd tools/hotplug || die
305 sed -i -e '/^$/d' libsane.usermap || die
306 fi
307
308 if tc-is-cross-compiler; then
309 # The build system sucks and doesn't handle this properly.
310 # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
311 tc-export_build_env BUILD_CC
312 cd "${BUILD_DIR}"/tools || die
313 ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} -I. -I../include -I"${S}"/include \
314 "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
315 "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
316 local dirs=( hal hotplug hotplug-ng udev )
317 local targets=(
318 hal/libsane.fdi
319 hotplug/libsane.usermap
320 hotplug-ng/libsane.db
321 udev/libsane.rules
322 )
323 mkdir -p "${dirs[@]}" || die
324 emake "${targets[@]}"
325 fi
326 }
327
328 multilib_src_install() {
329 emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
330 docdir="${EPREFIX}"/usr/share/doc/${PF}
331
332 if multilib_is_native_abi; then
333 if use usb; then
334 insinto /etc/hotplug/usb
335 doins tools/hotplug/libsane.usermap
336 fi
337
338 udev_newrules tools/udev/libsane.rules 41-libsane.rules
339 insinto "/usr/share/pkgconfig"
340 doins tools/sane-backends.pc
341 fi
342 }
343
344 multilib_src_install_all() {
345 keepdir /var/lib/lock/sane
346 fowners root:scanner /var/lib/lock/sane
347 fperms g+w /var/lib/lock/sane
348 dodir /etc/env.d
349
350 if use usb; then
351 exeinto /etc/hotplug/usb
352 doexe tools/hotplug/libusbscanner
353 newdoc tools/hotplug/README README.hotplug
354 fi
355
356 dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux
357 prune_libtool_files --all
358 if use xinetd; then
359 insinto /etc/xinetd.d
360 doins "${FILESDIR}"/saned
361 fi
362
363 newinitd "${FILESDIR}"/saned.initd saned
364 newconfd "${FILESDIR}"/saned.confd saned
365 }
366
367 pkg_postinst() {
368 if use xinetd; then
369 elog "If you want remote clients to connect, edit"
370 elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
371 fi
372
373 elog "If you are using a USB scanner, add all users who want"
374 elog "to access your scanner to the \"scanner\" group."
375 }