Gentoo Archives: gentoo-commits

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