Gentoo Archives: gentoo-commits

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