summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Brannon <teiresias@gentoo.org>2013-10-16 01:21:25 +0000
committerChristopher Brannon <teiresias@gentoo.org>2013-10-16 01:21:25 +0000
commit4d86696d625faaf784333d2e65edb9381e9bc99b (patch)
tree43b1109dbf7c79089a70ddfbc8ae6c4e383843b6 /media-gfx
parentVersion bump to 6.30.223.141; proxied commit for M. B. (tomboy64), fixes bug ... (diff)
downloadhistorical-4d86696d625faaf784333d2e65edb9381e9bc99b.tar.gz
historical-4d86696d625faaf784333d2e65edb9381e9bc99b.tar.bz2
historical-4d86696d625faaf784333d2e65edb9381e9bc99b.zip
Version bump: 1.0.24.
Package-Manager: portage-2.2.1/cvs/Linux x86_64 Manifest-Sign-Key: 0x6521E06D
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/sane-backends/ChangeLog10
-rw-r--r--media-gfx/sane-backends/Manifest20
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch40
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.24-saned_pidfile_location.patch11
-rw-r--r--media-gfx/sane-backends/sane-backends-1.0.24.ebuild289
5 files changed, 361 insertions, 9 deletions
diff --git a/media-gfx/sane-backends/ChangeLog b/media-gfx/sane-backends/ChangeLog
index 0e49536c993e..5304a571cfb9 100644
--- a/media-gfx/sane-backends/ChangeLog
+++ b/media-gfx/sane-backends/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-gfx/sane-backends
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.228 2013/08/27 12:03:20 teiresias Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.229 2013/10/16 01:21:17 teiresias Exp $
+
+*sane-backends-1.0.24 (16 Oct 2013)
+
+ 16 Oct 2013; Christopher Brannon <teiresias@gentoo.org>
+ +sane-backends-1.0.24.ebuild,
+ +files/sane-backends-1.0.24-automagic_systemd.patch,
+ +files/sane-backends-1.0.24-saned_pidfile_location.patch:
+ Version bump.
*sane-backends-1.0.23-r2 (27 Aug 2013)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index ea8e31a0c6e7..8937551702c9 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -7,25 +7,29 @@ AUX parallel-install-1.0.19.patch 1117 SHA256 5c3cb9747058df277eb6d7db8574252149
AUX sane-backends-1.0.23-automagic-cups.patch 1145 SHA256 1b60de2224dcec2e393683153dc75be96179a85ad2059ddef784390ee74bd88d SHA512 e0ae1baf0eb29a26b3608bd807f2d31005d09320e403ce3d06adb3048ba335eb231c6376db19d6990224957060589396bc08cb3c0a31517da54e135dd2ccc2d9 WHIRLPOOL b334e8c05b8cfc8e51211a2cedd0603832896129c54c67bf35cc81096e744cd3081db1ad8d329c991506bd3dacfa782ee5eac07bee0dc47d04cbb09d7d713cdb
AUX sane-backends-1.0.23-automagic-v4l.patch 632 SHA256 aceb6e72ac7a8d15fefaa4c5c464d9e5c7f5829e1946206bf8f06cc9f3580566 SHA512 ff2a44e6b7b86c9276e4f60ccae97ecd28b3ddaa622c0236e8d579acc6ee9cb82599047cc2dabcdb264b9c7cc05bc563b0aec8f512eaa0ba46169328974b7324 WHIRLPOOL 5475a8b44783ddca60b5ce5e2b4e39261fe2eeb9f4d520701b7ebe4bcda4f124c8a3f2ccf026e770c3e3969af4fe250dc68ea9886314d8050074eecd7dd0a51f
AUX sane-backends-1.0.23-saned_pidfile_location.patch 345 SHA256 c95f305d01fd0dfb63944788f450d798a8882412f1d3e6da5c7e49f33cceba51 SHA512 49519b8fea68292b8cbd7bdcaf5b4803a1b890800e17015ace1d662e4503cc0844f191793c8f42cd6aa7e9922ee9f961d4784e30f22abc497973be1978bf1b24 WHIRLPOOL d72b314c7e4898c83a4c79e6fa39af978bd60e2b78afa58c1f8e1709b5f597292e965d330a58cd4109780fb2051dcd7880008f65d2b204fe476cbf3ce898e22b
+AUX sane-backends-1.0.24-automagic_systemd.patch 1310 SHA256 5461cb3aa8bad1b299cd92c525cf6af5a3af5a82e81a74549a7f660d026ee610 SHA512 1edf28a2d106cf05df92a55ef3bf4ea530c9ee69a2517f14a33a5ff30ba69702d818677da1715ab19169a4d5575f1c7c2755431193d48a40d4f80d11e6308120 WHIRLPOOL 9404f9938567bec86487969fa0e1af21cf83c8aa88344983c09a2380c279c3de7b9c4bcd8a41836ffc3ab9628bfe4f8a38c0c165f5d933adefc66fb589fdf5d6
+AUX sane-backends-1.0.24-saned_pidfile_location.patch 345 SHA256 c95f305d01fd0dfb63944788f450d798a8882412f1d3e6da5c7e49f33cceba51 SHA512 49519b8fea68292b8cbd7bdcaf5b4803a1b890800e17015ace1d662e4503cc0844f191793c8f42cd6aa7e9922ee9f961d4784e30f22abc497973be1978bf1b24 WHIRLPOOL d72b314c7e4898c83a4c79e6fa39af978bd60e2b78afa58c1f8e1709b5f597292e965d330a58cd4109780fb2051dcd7880008f65d2b204fe476cbf3ce898e22b
AUX saned 150 SHA256 d18856d6dd26fac11988fea5217c8616686ad3c0c024ad5437efbf0fd24984f5 SHA512 26f3d66c6b1e75d87d7d430518aa878c77d5ab8d76a45847cef3ff15566341938eedf46c50d0fa8cdeef828df9cddefdd6fdd767c5de30d3aa7d64ed1911d910 WHIRLPOOL 5bdd707daeba740b980ce6dd51096716eec2c2939681f6abd9e7f73b50d8d384a68a07dcc11e9295cd123cc5d2a53d02def52133a559c3e33d63612028d2aac5
AUX saned.confd 76 SHA256 197e44ba1f438a18f5f7d9f5858feb19c1ece4286d82a5e63caf9be5b964aa76 SHA512 8f4a99ef24c19b3a7213b3d25ea16f5bca8623735cf25d21e3a706e9e0135ac8cce5d0b8fb8728845977f41dcefe6bd858076d755515fc91b00e05ee5817d751 WHIRLPOOL ede920bf5eb1ee59263296a2ccce1ab2da2b04669c2f8a58de1fc4fa76cc1eee501290eb4fdaece464bc184cc0cfb17d100e9309a33d79c06142a3f03c91b837
AUX saned.initd 411 SHA256 4dd4e7fa07bf2ab2d4f5753156f5df0ad2277523f6755b0eab3d2db3480989e2 SHA512 ec9c11c84dc405981fd854f99007a5fcae5403685894acd1d1108fc772147a54d9fad9103dcff708765efff644e972260459c19fe439af17db76562dc1b5ba84 WHIRLPOOL bec23753fc557a36a6990ed565519bb62e1bc9a6bd81c0c16cc956cd6dbc1c6fd661775b8c8bf05faa1f5bbbef2406498094a0adc48c9fd81e89f4531669c4e8
DIST sane-backends-1.0.23.tar.gz.1 1792000 SHA256 551d7e0c89d18ca438bfce4f1c242b59485195c493c5f935a3b11e724ee39537 SHA512 afc64b9a8232e6d0aaf22e05450ecf814f64c0065bd683f135053d46ef80c42f208eba8642fc8e8f1ded46cb1aa50010987422fd275ea95555f329c76118fa1e WHIRLPOOL 104f820972a23be93c241fb55e4129ab5c2d889cc011f3aa69ddd23e9b4da3ae7b59d8741e9763e3bdcc18f8f1dfe273aaa59ca3dc56dc7f9b78ae6d2b5a3518
DIST sane-backends-1.0.23.tar.gz.2 1792000 SHA256 b487df0d8dc921803577ee34ceaa676a4a3b6715cd4d9a229b43d6a501a1baab SHA512 ba8723060c3eede0ae68d12d29de180bce012999fcb57774c68f9c9cbf220f069a6b2c4f1d930bd4ad248e4431cfd6e78d20b1f3cbb54e5006fb3b4c4196f9b8 WHIRLPOOL ea67e56ce76dff5a29354f758cb5c9d4b4bae28ffd7197ee066262779412a3a36d733fdcb17ce5ae61d123f395b28640124f7a7a7d28baaae1cb9f24e9299ae6
DIST sane-backends-1.0.23.tar.gz.3 1758350 SHA256 af91e84cb72dc2b1fa4c7eaba948ae6ab8e2ab353f79805a21de4ac52de5b81a SHA512 887864509fc6676b42d59dce5b77441c56893dc70f4b0184379b08cf74e77aa0f6413c76f5132882e8d0b8c7fac4963a63879753a57eaaca74035274b3ca8199 WHIRLPOOL 5d9a6de6494f214350463919dba4be4f58b9c376f2a38558033fe8ecdcda03b40a0dff8044af4b8d76f59b04c8e7420c6159a4bfc593785202b0c11a9932f054
+DIST sane-backends-1.0.24.tar.gz 5778749 SHA256 27c7085a54f1505d8b551e6f1e69d30e1ee57328b18429bb2225dabf4c45462d SHA512 1e9f962bb9d27f17067eb662dabfc0a1aa0d06e16bec4bd28868124b468578d82f14f6d2c1f5de63d2cec57ca4584ec12d3b2c2b1de20f1199aece581453ebc5 WHIRLPOOL 19b939c920a3c157044c85a941debdc664d8781562fa3fc04f061b9d216b089be80edfd43479069382adf13e68160518fdbd5c84a5f4c506a46f8521d4ed2a1c
EBUILD sane-backends-1.0.23-r1.ebuild 6716 SHA256 e32dfb1d2487652cf2977f79f6744fc7e2da676daeab2d9ba21fb75f70c97488 SHA512 3802f885e17cfa90e1dc4b7c91a16db4eb1fa4e803b655799557e8207cddc8b9cd0d548fdbc34e9ab9b28916b2e6d96905ec1d0d1648b760fe7e2617218dd2c6 WHIRLPOOL a38682c1b6a7212253f2bb0f9dea5adcd995908d2009bee548cfd0699dec2297f7940333e349f502cc66c4faf9ece869ff5453f28e7ba6efd3cd692b2155a311
EBUILD sane-backends-1.0.23-r2.ebuild 6994 SHA256 0dad30427f3d982aaaf5bb0e34d9d370d50ad43179f4000543e7ff2b4dcab6ec SHA512 a9e5c521a087dccb61385a9ec73be611f84ef61a90f289c49e169d22e0db88dc8997acde18c0fa7e014b7812f962d76f2780dc45409d17945287d411e0789de6 WHIRLPOOL 2e0c37396f2583c6d728ccd27ebe55a9890be416c397459f6ca16172c205dd473fe85829eed270f00f01d7ee9cfabeb4b2d91c28ac2480992c6a96514a74e41c
EBUILD sane-backends-1.0.23.ebuild 6453 SHA256 f8f16bc95d192d4ab4d509d67585d7ef423c0b68488f209ccea2fc843ad1aaa7 SHA512 2aa779439770a7993466b113555106c122e989b9226fb15e2b616f17d0ebf50da22154eff751043fec828fe529191fffe3e1d5b3465ce522d155f83f45284f8b WHIRLPOOL a6e07f218cfb297dd99a3bcbc28186b79ad81e2309dd4049e1c70922cb6b0583d0f1f598c136ce09c45a27d964aeaefa34b0fabff12c0452b936cb2af62c625f
-MISC ChangeLog 40089 SHA256 4e495ecb76066f0fdfebc0fb3cfeddd2695fb9d8a0ccb95157cc921ca87f0888 SHA512 fd22d0783b1f10bfaa3223e15c2e58880b77c090b995694455a12359295925f96bdfa7913c40bfc9a517b15aecf8e8e7bae91756bd2c1d78f9724c7bc94a88c9 WHIRLPOOL 46eed2f16392e59a767d526152cd8dc91725eb38189c62c7661e1132c4d738201c2296df5117093f46c32ab04d40cf59ca7483a9bc799fb2fa28862d64e4745c
+EBUILD sane-backends-1.0.24.ebuild 6551 SHA256 f4f8819488e4075a9252b772cb99ac4d10bce5f53d791263ed2d3ae8047a03f4 SHA512 44ff846eba1163878a2471d0e963a3f5990d60f4093739c3506e66a13f028c837632dcbfcb2e7bfddab5afe8b20be80553ac40b794a70d50ff37d4ff47f317b7 WHIRLPOOL 58abb601fb1db66e037a1db6b1185c8abeb26bd57007a7724bbd017940ef2686f79407fa74dc4575a6e598473a3cea8647c6297ad59356aeb7ff2e788415cfc1
+MISC ChangeLog 40348 SHA256 d58683f8805a805dbfbcd960809eb814892f7cc0fb009cc65d74564936b049ad SHA512 d25c673998b915d75c5259b6fc6fbfb6e3db59895f3b9fa440e511f8bd2c376a1bcdd6bf721b0e771ac2fdfb52b2e4395a77a8c483e4bd0200cba5c6413d3add WHIRLPOOL 5740cdc22343e665d403ddb0c85b5218b5d416e0b556b2fa900df2ddfb9066aa9eed455f1de13d0555b3c18c870b1d1f809b78ed2ab5d81297c0cee57357ddc6
MISC metadata.xml 233 SHA256 c5f5ebf692f6c9e98fb12ac750be2e67f8b316b820dc6d36dfa3f22fead02ca4 SHA512 76ddd2dcdfdb17b98cd96ee032935125b95ee8b78722c1049b9beaef6cf482760c6bd7791d77ef5ca52c4185a5c01222a5f874c033ec3788cce2b4906ed18682 WHIRLPOOL 30cd038d04c297199c5d1d340f3612ce5e4226c099e1272b6c3257c2f9ff61cac32b577ffbcbdee7f888f8ededa9fa6d5aec6801249b2db53586531788f39229
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
-iQEcBAEBCAAGBQJSHJWRAAoJEH8qFnJlIeBtsA0H/1BaOs1k0AFzvJfjJ5qFVJe2
-qrBgxCMEl8R+6U2l6umytbDp5PTKOCXCIljR83iI09pKn4B2OCbi7SZfWH2jhhdZ
-R3iFIi/C7ZLohSBxGSDvwg+fMUSNPfqYlXmyEinFhwdZH0mQxQku7swCjRfV0uW2
-g8TIuxGrY4nZ0qxkp1CFaqIgbXur5jpkY3S8RJ/aHWYnNVHXjNdQomt2rhqu2XBH
-tJoZ9nMB+ReG5geWKwm2ifII4EjHg8PgOm87gKQbajrp8DY553bb7Na+6EVpiPnZ
-Xi14PNGdUt2inUVdNq9cEJfZTMlxp2FvpqZuyFdlmH88Mz0ZkM4F2Plxe211PNY=
-=HgeV
+iQEcBAEBCAAGBQJSXeoUAAoJEH8qFnJlIeBtqlEH/A7VxviJ3qGOLrOpX2zCIc35
+8dbFa00mb2T5ApMELUpeFQTpEjgjTN/RiRqysc3+SsZgExz5V6omEpCfh4wSDIh2
+m55TuU1XQQtTHAd3ynDmuBeGiAVFbzkbwwCb9d96QUXfIRZ+thL8E+gjJlXEea6i
+Cz7yDo/DItWAo4AYtf7ovd4gKgzBrrJr4ldFY6ws2k4aAtxOvkMo8K7nKOmhHMS0
+dWrBbpiCpuRQL99ffzPf9roGASnDnJCDD5eZ3vHypiWPOfMnxsXM/8UqL1n84JFx
+GwvLeDVjxWGBcMtSddzmDEGXr6jWpHd3Co7ooYxcvUKFZknIju85M9jsEjD5YLU=
+=9gz4
-----END PGP SIGNATURE-----
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch
new file mode 100644
index 000000000000..c0dfe3c50e7c
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch
@@ -0,0 +1,40 @@
+diff --git a/configure.in b/configure.in
+index 4365868..7413646 100644
+--- a/configure.in
++++ b/configure.in
+@@ -344,17 +344,24 @@ dnl $as_echo "in order to autodetect network scanners in kodakaio."
+ dnl with_cups="no"
+ dnl fi
+
+-dnl added by llagendijk 12/7/2012 to detect systemd for saned
+-$as_echo_n "Checking for systemd..."
+-if test -e /usr/include/systemd/sd-daemon.h ; then
+- AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
+- with_systemd="yes"
+- SYSTEMD_LIBS=" -lsystemd-daemon"
+- AC_SUBST(SYSTEMD_LIBS)
+- $as_echo "yes"
+-else
+- with_systemd="no"
+- $as_echo "no"
++AC_ARG_WITH(systemd,
++ AC_HELP_STRING([--with-systemd], [enable systemd support @<:@default=yes@:>@]))
++if test "x$with_systemd" != xno ; then
++ dnl added by llagendijk 12/7/2012 to detect systemd for saned
++ $as_echo_n "Checking for systemd..."
++ if test -e /usr/include/systemd/sd-daemon.h ; then
++ AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
++ have_systemd="yes"
++ SYSTEMD_LIBS=" -lsystemd-daemon"
++ AC_SUBST(SYSTEMD_LIBS)
++ $as_echo "yes"
++ else
++ have_systemd="no"
++ $as_echo "no"
++ if test "x$with_systemd" = xyes; then
++ AC_MSG_ERROR([Systemd support was requested but systemd was not found])
++ fi
++ fi
+ fi
+
+ dnl ***********
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-saned_pidfile_location.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-saned_pidfile_location.patch
new file mode 100644
index 000000000000..c682961f7c3f
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.24-saned_pidfile_location.patch
@@ -0,0 +1,11 @@
+--- sane-backends-1.0.23/frontend/saned.c
++++ sane-backends-1.0.23/frontend/saned.c
+@@ -221,7 +221,7 @@
+ int numchildren;
+
+ #define SANED_CONFIG_FILE "saned.conf"
+-#define SANED_PID_FILE "/var/run/saned.pid"
++#define SANED_PID_FILE "/var/run/saned/saned.pid"
+
+ #define SANED_SERVICE_NAME "sane-port"
+ #define SANED_SERVICE_PORT 6566
diff --git a/media-gfx/sane-backends/sane-backends-1.0.24.ebuild b/media-gfx/sane-backends/sane-backends-1.0.24.ebuild
new file mode 100644
index 000000000000..fe77b43eb82d
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.24.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/sane-backends-1.0.24.ebuild,v 1.1 2013/10/16 01:21:17 teiresias Exp $
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib udev user toolchain-funcs
+
+# gphoto and v4l are handled by their usual USE flags.
+# The pint backend was disabled because I could not get it to compile.
+IUSE_SANE_BACKENDS="
+ abaton
+ agfafocus
+ apple
+ artec
+ artec_eplus48u
+ as6e
+ avision
+ bh
+ canon
+ canon630u
+ canon_dr
+ canon_pp
+ cardscan
+ coolscan
+ coolscan2
+ coolscan3
+ dc210
+ dc240
+ dc25
+ dell1600n_net
+ dmc
+ epjitsu
+ epson
+ epson2
+ fujitsu
+ genesys
+ gt68xx
+ hp
+ hp3500
+ hp3900
+ hp4200
+ hp5400
+ hp5590
+ hpljm1005
+ hpsj5s
+ hs2p
+ ibm
+ kodak
+ kodakaio
+ kvs1025
+ kvs20xx
+ kvs40xx
+ leo
+ lexmark
+ ma1509
+ magicolor
+ matsushita
+ microtek
+ microtek2
+ mustek
+ mustek_pp
+ mustek_usb
+ mustek_usb2
+ nec
+ net
+ niash
+ p5
+ pie
+ pixma
+ plustek
+ plustek_pp
+ pnm
+ qcam
+ ricoh
+ rts8891
+ s9036
+ sceptre
+ sharp
+ sm3600
+ sm3840
+ snapscan
+ sp15c
+ st400
+ stv680
+ tamarack
+ teco1
+ teco2
+ teco3
+ test
+ u12
+ umax
+ umax1220u
+ umax_pp
+ xerox_mfp"
+
+IUSE="avahi doc gphoto2 ipv6 threads usb v4l xinetd snmp systemd"
+
+for backend in ${IUSE_SANE_BACKENDS}; do
+ if [ ${backend} = pnm ]; then
+ IUSE="${IUSE} -sane_backends_pnm"
+ elif [ ${backend} = mustek_usb2 -o ${backend} = kvs40xx ]; then
+ IUSE="${IUSE} sane_backends_${backend}"
+ else
+ IUSE="${IUSE} +sane_backends_${backend}"
+ fi
+done
+
+REQUIRED_USE="
+ sane_backends_mustek_usb2? ( threads )
+ sane_backends_kvs40xx? ( threads )
+"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+SRC_URI="https://alioth.debian.org/frs/download.php/file/3958/${P}.tar.gz"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ sane_backends_dc210? ( virtual/jpeg )
+ sane_backends_dc240? ( virtual/jpeg )
+ sane_backends_dell1600n_net? ( virtual/jpeg
+ media-libs/tiff )
+ avahi? ( >=net-dns/avahi-0.6.24 )
+ sane_backends_canon_pp? ( sys-libs/libieee1284 )
+ sane_backends_hpsj5s? ( sys-libs/libieee1284 )
+ sane_backends_mustek_pp? ( sys-libs/libieee1284 )
+ usb? ( virtual/libusb:1 )
+ gphoto2? (
+ media-libs/libgphoto2:=
+ virtual/jpeg
+ )
+ v4l? ( media-libs/libv4l )
+ xinetd? ( sys-apps/xinetd )
+ snmp? ( net-analyzer/net-snmp )
+ systemd? ( sys-apps/systemd )
+"
+
+DEPEND="${RDEPEND}
+ v4l? ( sys-kernel/linux-headers )
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )
+ >=sys-apps/sed-4
+
+ virtual/pkgconfig"
+
+# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
+RDEPEND="${RDEPEND}
+ !<sys-fs/udev-114"
+
+pkg_setup() {
+ enewgroup scanner
+ enewuser saned -1 -1 -1 scanner
+}
+
+src_prepare() {
+ cat >> backend/dll.conf.in <<-EOF
+ # Add support for the HP-specific backend. Needs net-print/hplip installed.
+ hpaio
+ # Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
+ epkowa
+ EOF
+ epatch "${FILESDIR}"/niash_array_index.patch \
+ "${FILESDIR}"/${P}-automagic_systemd.patch \
+ "${FILESDIR}"/${P}-saned_pidfile_location.patch
+ AT_NOELIBTOOLIZE=yes eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # the blank is intended - an empty string would result in building ALL backends.
+ local BACKENDS=" "
+
+ use gphoto2 && BACKENDS="gphoto2"
+ use v4l && BACKENDS="${BACKENDS} v4l"
+ for backend in ${IUSE_SANE_BACKENDS}; do
+ if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
+ BACKENDS="${BACKENDS} ${backend}"
+ fi
+ done
+
+ local myconf="$(use_enable usb libusb_1_0) $(use_with snmp)"
+ # you can only enable this backend, not disable it...
+ if use sane_backends_pnm; then
+ myconf="${myconf} --enable-pnm-backend"
+ fi
+ if ! use doc; then
+ myconf="${myconf} --disable-latex"
+ fi
+ if use sane_backends_mustek_pp; then
+ myconf="${myconf} --enable-parport-directio"
+ fi
+ if ! ( use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp ); then
+ myconf="${myconf} sane_cv_use_libieee1284=no"
+ fi
+ # if LINGUAS is set, just use the listed and supported localizations.
+ if [ "${LINGUAS-NoLocalesSet}" != NoLocalesSet ]; then
+ echo > po/LINGUAS
+ for lang in ${LINGUAS}; do
+ if [ -a po/${lang}.po ]; then
+ echo ${lang} >> po/LINGUAS
+ fi
+ done
+ fi
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${BACKENDS}" econf \
+ $(use_with gphoto2) \
+ $(use_with systemd) \
+ $(use_with v4l) \
+ $(use_enable avahi) \
+ $(use_enable ipv6) \
+ $(use_enable threads pthread) \
+ ${myconf}
+}
+
+src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if use usb; then
+ cd tools/hotplug
+ grep -v '^$' libsane.usermap > libsane.usermap.new
+ mv libsane.usermap.new libsane.usermap
+ fi
+
+ if tc-is-cross-compiler; then
+ # The build system sucks and doesn't handle this properly.
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
+ tc-export_build_env BUILD_CC
+ cd "${S}"/tools
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} -I. -I../include \
+ ../sanei/sanei_config.c ../sanei/sanei_constrain_value.c \
+ ../sanei/sanei_init_debug.c sane-desc.c -o sane-desc || die
+ local dirs=( hal hotplug hotplug-ng udev )
+ local targets=(
+ hal/libsane.fdi
+ hotplug/libsane.usermap
+ hotplug-ng/libsane.db
+ udev/libsane.rules
+ )
+ mkdir -p "${dirs[@]}" || die
+ emake "${targets[@]}"
+ fi
+}
+
+src_install () {
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}
+ keepdir /var/lib/lock/sane
+ fowners root:scanner /var/lib/lock/sane
+ fperms g+w /var/lib/lock/sane
+ dodir /etc/env.d
+
+ if use usb; then
+ insinto /etc/hotplug/usb
+ exeinto /etc/hotplug/usb
+ doins tools/hotplug/libsane.usermap
+ doexe tools/hotplug/libusbscanner
+ newdoc tools/hotplug/README README.hotplug
+ fi
+ udev_newrules tools/udev/libsane.rules 41-libsane.rules
+ insinto "/usr/share/pkgconfig"
+ doins tools/sane-backends.pc
+
+ dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux
+ find "${ED}" -name "*.la" | while read file; do rm "${file}"; done
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/saned
+ fi
+
+ newinitd "${FILESDIR}"/saned.initd saned
+ newconfd "${FILESDIR}"/saned.confd saned
+}
+
+pkg_postinst() {
+ if use xinetd; then
+ elog "If you want remote clients to connect, edit"
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
+ fi
+
+ elog "If you are using an USB scanner, add all users who want"
+ elog "to access your scanner to the \"scanner\" group."
+}