Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/
Date: Sun, 02 Jun 2019 15:01:04
Message-Id: 1559487645.95a65f55acf95520b5dad46b3f7db11235a23579.pacho@gentoo
1 commit: 95a65f55acf95520b5dad46b3f7db11235a23579
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 2 15:00:45 2019 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 2 15:00:45 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95a65f55
7
8 media-gfx/sane-backends: Drop old
9
10 Package-Manager: Portage-2.3.67, Repoman-2.3.13
11 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
12
13 .../sane-backends/sane-backends-1.0.27-r1.ebuild | 340 ---------------------
14 1 file changed, 340 deletions(-)
15
16 diff --git a/media-gfx/sane-backends/sane-backends-1.0.27-r1.ebuild b/media-gfx/sane-backends/sane-backends-1.0.27-r1.ebuild
17 deleted file mode 100644
18 index d69b29324a2..00000000000
19 --- a/media-gfx/sane-backends/sane-backends-1.0.27-r1.ebuild
20 +++ /dev/null
21 @@ -1,340 +0,0 @@
22 -# Copyright 1999-2018 Gentoo Foundation
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=6
26 -inherit flag-o-matic multilib-minimal systemd toolchain-funcs udev user xdg-utils
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="gphoto2 ipv6 snmp systemd threads usb v4l xinetd zeroconf"
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 -MY_P="${P}"
141 -FRS_ID="4224"
142 -SRC_URI="https://alioth.debian.org/frs/download.php/file/${FRS_ID}/${P}.tar.gz"
143 -
144 -LICENSE="GPL-2 public-domain"
145 -SLOT="0"
146 -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
147 -
148 -RDEPEND="
149 - sane_backends_dc210? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
150 - sane_backends_dc240? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
151 - sane_backends_dell1600n_net? (
152 - >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
153 - >=media-libs/tiff-3.9.7-r1:0=[${MULTILIB_USEDEP}]
154 - )
155 - sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
156 - sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
157 - sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
158 - usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
159 - gphoto2? (
160 - >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
161 - >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
162 - )
163 - v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
164 - xinetd? ( sys-apps/xinetd )
165 - snmp? ( net-analyzer/net-snmp )
166 - systemd? ( sys-apps/systemd:0= )
167 - zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
168 -"
169 -
170 -DEPEND="${RDEPEND}
171 - v4l? ( sys-kernel/linux-headers )
172 - >=sys-devel/gettext-0.18.1
173 - >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
174 -"
175 -
176 -# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
177 -RDEPEND="${RDEPEND}
178 - !<sys-fs/udev-114
179 -"
180 -
181 -MULTILIB_CHOST_TOOLS=(
182 - /usr/bin/sane-config
183 -)
184 -
185 -pkg_setup() {
186 - enewgroup scanner
187 - enewuser saned -1 -1 -1 scanner
188 -}
189 -
190 -src_prepare() {
191 - default
192 -
193 - xdg_environment_reset
194 -
195 - cat >> backend/dll.conf.in <<-EOF
196 - # Add support for the HP-specific backend. Needs net-print/hplip installed.
197 - hpaio
198 - # Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
199 - epkowa
200 - EOF
201 -
202 - eapply "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
203 - eapply "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
204 -
205 - # From Arch
206 - eapply "${FILESDIR}"/${PN}-1.0.27-network.patch
207 -
208 - # From Fedora
209 - # Fix https://bugs.gentoo.org/635348
210 - eapply "${FILESDIR}"/${PN}-1.0.27-canon-lide-100.patch
211 -
212 - # Fix for "make check". Upstream sometimes forgets to update this.
213 - local ver=$(./configure --version | awk '{print $NF; exit 0}')
214 - sed -i \
215 - -e "/by sane-desc 3.5 from sane-backends/s:sane-backends .*:sane-backends ${ver}:" \
216 - testsuite/tools/data/html* || die
217 -}
218 -
219 -src_configure() {
220 - append-flags -fno-strict-aliasing # From Fedora
221 -
222 - # if LINGUAS is set, just use the listed and supported localizations.
223 - if [[ ${LINGUAS+set} == "set" ]]; then
224 - mkdir -p po || die
225 - strip-linguas -u po
226 - printf '%s\n' ${LINGUAS} > po/LINGUAS
227 - fi
228 -
229 - multilib-minimal_src_configure
230 -}
231 -
232 -multilib_src_configure() {
233 - # the blank is intended - an empty string would result in building ALL backends.
234 - local BACKENDS=" "
235 -
236 - use gphoto2 && BACKENDS="gphoto2"
237 - use v4l && BACKENDS="${BACKENDS} v4l"
238 - for backend in ${IUSE_SANE_BACKENDS}; do
239 - if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
240 - BACKENDS="${BACKENDS} ${backend}"
241 - fi
242 - done
243 -
244 - local myconf=(
245 - $(use_with usb)
246 - $(multilib_native_use_with snmp)
247 - )
248 -
249 - # you can only enable this backend, not disable it...
250 - if use sane_backends_pnm; then
251 - myconf+=( --enable-pnm-backend )
252 - fi
253 - if use sane_backends_mustek_pp; then
254 - myconf+=( --enable-parport-directio )
255 - fi
256 - if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then
257 - myconf+=( sane_cv_use_libieee1284=no )
258 - fi
259 -
260 - # relative path must be used for tests to work properly
261 - ECONF_SOURCE=${S} \
262 - SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
263 - BACKENDS="${BACKENDS}" \
264 - econf \
265 - $(use_with gphoto2) \
266 - $(multilib_native_use_with systemd) \
267 - $(use_with v4l) \
268 - $(use_enable ipv6) \
269 - $(use_enable threads pthread) \
270 - $(use_enable zeroconf avahi) \
271 - "${myconf[@]}"
272 -}
273 -
274 -multilib_src_compile() {
275 - emake VARTEXFONTS="${T}/fonts"
276 -
277 - if tc-is-cross-compiler; then
278 - pushd "${BUILD_DIR}"/tools >/dev/null || die
279 -
280 - # The build system sucks and doesn't handle this properly.
281 - # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
282 - tc-export_build_env BUILD_CC
283 - ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
284 - -I. -I../include -I"${S}"/include \
285 - "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
286 - "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
287 - local dirs=( hal hotplug hotplug-ng udev )
288 - local targets=(
289 - hal/libsane.fdi
290 - hotplug/libsane.usermap
291 - hotplug-ng/libsane.db
292 - udev/libsane.rules
293 - )
294 - mkdir -p "${dirs[@]}" || die
295 - emake "${targets[@]}"
296 -
297 - popd >/dev/null
298 - fi
299 -
300 - if use usb; then
301 - sed -i -e '/^$/d' \
302 - tools/hotplug/libsane.usermap || die
303 - fi
304 -}
305 -
306 -multilib_src_install() {
307 - emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
308 - docdir="${EPREFIX}"/usr/share/doc/${PF}
309 -
310 - if multilib_is_native_abi; then
311 - if use usb; then
312 - insinto /etc/hotplug/usb
313 - doins tools/hotplug/libsane.usermap
314 - fi
315 -
316 - udev_newrules tools/udev/libsane.rules 41-libsane.rules
317 - insinto "/usr/share/pkgconfig"
318 - doins tools/sane-backends.pc
319 - fi
320 -}
321 -
322 -multilib_src_install_all() {
323 - keepdir /var/lib/lock/sane
324 - fowners root:scanner /var/lib/lock/sane
325 - fperms g+w /var/lib/lock/sane
326 - dodir /etc/env.d
327 -
328 - if use systemd; then
329 - systemd_newunit "${FILESDIR}"/saned_at.service "saned@.service"
330 - systemd_newunit "${FILESDIR}"/saned.socket saned.socket
331 - fi
332 -
333 - if use usb; then
334 - exeinto /etc/hotplug/usb
335 - doexe tools/hotplug/libusbscanner
336 - newdoc tools/hotplug/README README.hotplug
337 - fi
338 -
339 - dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux
340 - find "${D}" -name '*.la' -delete || die
341 -
342 - if use xinetd; then
343 - insinto /etc/xinetd.d
344 - doins "${FILESDIR}"/saned
345 - fi
346 -
347 - newinitd "${FILESDIR}"/saned.initd saned
348 - newconfd "${FILESDIR}"/saned.confd saned
349 -}
350 -
351 -pkg_postinst() {
352 - if use xinetd; then
353 - elog "If you want remote clients to connect, edit"
354 - elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
355 - fi
356 -
357 - if ! use systemd; then
358 - elog "If you are using a USB scanner, add all users who want"
359 - elog "to access your scanner to the \"scanner\" group."
360 - fi
361 -}