summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Kursawe <phosphan@gentoo.org>2005-10-31 13:31:16 +0000
committerPatrick Kursawe <phosphan@gentoo.org>2005-10-31 13:31:16 +0000
commitf9feaccf866c94b28d35f9c949f3ddf50c0b0c8f (patch)
tree923e1446fe093f0dad7b051f75dddd67c3e8f306 /media-gfx/sane-backends
parentFixed dodoc not to install COPYING. (diff)
downloadhistorical-f9feaccf866c94b28d35f9c949f3ddf50c0b0c8f.tar.gz
historical-f9feaccf866c94b28d35f9c949f3ddf50c0b0c8f.tar.bz2
historical-f9feaccf866c94b28d35f9c949f3ddf50c0b0c8f.zip
Updated lide25 patch (bug #104026)
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'media-gfx/sane-backends')
-rw-r--r--media-gfx/sane-backends/ChangeLog8
-rw-r--r--media-gfx/sane-backends/Manifest39
-rw-r--r--media-gfx/sane-backends/files/digest-sane-backends-1.0.16-r32
-rw-r--r--media-gfx/sane-backends/files/lide25-r1.patch180
-rw-r--r--media-gfx/sane-backends/sane-backends-1.0.16-r3.ebuild146
5 files changed, 351 insertions, 24 deletions
diff --git a/media-gfx/sane-backends/ChangeLog b/media-gfx/sane-backends/ChangeLog
index 5fd2bd2fe353..d995dd567daf 100644
--- a/media-gfx/sane-backends/ChangeLog
+++ b/media-gfx/sane-backends/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-gfx/sane-backends
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.80 2005/10/18 01:20:17 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.81 2005/10/31 13:31:16 phosphan Exp $
+
+*sane-backends-1.0.16-r3 (31 Oct 2005)
+
+ 31 Oct 2005; Patrick Kursawe <phosphan@gentoo.org> +files/lide25-r1.patch,
+ +sane-backends-1.0.16-r3.ebuild:
+ Updated lide25 patch (bug #104026)
18 Oct 2005; Aron Griffis <agriffis@gentoo.org>
sane-backends-1.0.15-r3.ebuild:
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index 184c9a9f881b..0ee5db1b0a96 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1,32 +1,25 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 b742040acaeddc3798a21739bd59e8aa metadata.xml 224
-MD5 531409932020eb0aae035507a6660688 ChangeLog 13931
-MD5 61d573be9593ba3be2da335586ac7eb2 sane-backends-1.0.16-r1.ebuild 3743
MD5 a89929370bb0df2da7a794efc7811785 sane-backends-1.0.16-r2.ebuild 4297
MD5 ebd00143bfe66f76d0d0da95cbc84923 sane-backends-1.0.15.ebuild 2598
-MD5 d04dce955a1bf3c5436bc517f2e2070c sane-backends-1.0.15-r3.ebuild 3973
+MD5 544c2bc7c5a23b2ae8280b879eac1fbb sane-backends-1.0.15-r2.ebuild 3912
MD5 4c8053c87e31c8209998ba49c07d60a5 sane-backends-1.0.13-r3.ebuild 1717
+MD5 61d573be9593ba3be2da335586ac7eb2 sane-backends-1.0.16-r1.ebuild 3743
+MD5 54cad14b24bc825f61130e50ea2238f8 sane-backends-1.0.16-r3.ebuild 4300
MD5 e73a3bf54c049342701898a62ea3b301 sane-backends-1.0.15-r1.ebuild 2674
-MD5 544c2bc7c5a23b2ae8280b879eac1fbb sane-backends-1.0.15-r2.ebuild 3912
-MD5 d5d1e4a4c8d3839c16329c105f2580d3 files/digest-sane-backends-1.0.16-r2 151
+MD5 c08c9580f02bb55d91eec66932716362 ChangeLog 14121
+MD5 b742040acaeddc3798a21739bd59e8aa metadata.xml 224
+MD5 d04dce955a1bf3c5436bc517f2e2070c sane-backends-1.0.15-r3.ebuild 3973
+MD5 365f695ec2c079ac06dd5bbf495f87ce files/linux_sg3_err.h 4894
+MD5 bd0e1ecf807f1e676c4466f12cac215a files/lide25-r1.patch 7949
+MD5 f49c8e2b591496e87e91ae243d9864d0 files/sane-backend-1.0.15-gt68xx-update67.patch 5682
MD5 820e842ff4247de984a89752ac129ceb files/libusbscanner-device.patch 582
-MD5 d16f7594dad0db0c268e143c3676041e files/digest-sane-backends-1.0.15-r3 220
+MD5 026dc517ef9d45268cd506ec83519a0e files/canoscan-focus.patch 472
+MD5 cb4dcb744752238bdfed71fdcce81c79 files/libusbscanner-device-r1.patch 681
+MD5 01607471a4380f74f7b9da650e5ca5ad files/digest-sane-backends-1.0.13-r3 160
MD5 83640d1e7caa2aa50c676d40b64866c7 files/digest-sane-backends-1.0.15-r1 157
MD5 83640d1e7caa2aa50c676d40b64866c7 files/digest-sane-backends-1.0.15-r2 157
-MD5 365f695ec2c079ac06dd5bbf495f87ce files/linux_sg3_err.h 4894
-MD5 01607471a4380f74f7b9da650e5ca5ad files/digest-sane-backends-1.0.13-r3 160
-MD5 026dc517ef9d45268cd506ec83519a0e files/canoscan-focus.patch 472
+MD5 d16f7594dad0db0c268e143c3676041e files/digest-sane-backends-1.0.15-r3 220
+MD5 d5d1e4a4c8d3839c16329c105f2580d3 files/digest-sane-backends-1.0.16-r1 151
+MD5 d5d1e4a4c8d3839c16329c105f2580d3 files/digest-sane-backends-1.0.16-r2 151
+MD5 d5d1e4a4c8d3839c16329c105f2580d3 files/digest-sane-backends-1.0.16-r3 151
MD5 0bc1f6b8682b5585c8e87a325f983ade files/lide25.patch 5565
-MD5 cb4dcb744752238bdfed71fdcce81c79 files/libusbscanner-device-r1.patch 681
-MD5 f49c8e2b591496e87e91ae243d9864d0 files/sane-backend-1.0.15-gt68xx-update67.patch 5682
MD5 83640d1e7caa2aa50c676d40b64866c7 files/digest-sane-backends-1.0.15 157
-MD5 d5d1e4a4c8d3839c16329c105f2580d3 files/digest-sane-backends-1.0.16-r1 151
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFDVE3dJrHF4yAQTrARAppgAJ9G4mxKNDKAuO2sFOiz+iUFVLW+lACfWESf
-uO7/nw2SsOsyAxlCCjh6tMA=
-=VzzM
------END PGP SIGNATURE-----
diff --git a/media-gfx/sane-backends/files/digest-sane-backends-1.0.16-r3 b/media-gfx/sane-backends/files/digest-sane-backends-1.0.16-r3
new file mode 100644
index 000000000000..c28bef8f1d50
--- /dev/null
+++ b/media-gfx/sane-backends/files/digest-sane-backends-1.0.16-r3
@@ -0,0 +1,2 @@
+MD5 bec9b9262246316b4ebfe2bc7451aa28 sane-backends-1.0.16.tar.gz 3409799
+MD5 321ec37f7229dda4dc86b06301cfad8e sane-1.0.16-brother-driver.diff.bz2 8224
diff --git a/media-gfx/sane-backends/files/lide25-r1.patch b/media-gfx/sane-backends/files/lide25-r1.patch
new file mode 100644
index 000000000000..ba750f014240
--- /dev/null
+++ b/media-gfx/sane-backends/files/lide25-r1.patch
@@ -0,0 +1,180 @@
+diff -Nur sane-backends-1.0.16/backend/plustek-usb.c sane-backends-lide25v2/backend/plustek-usb.c
+--- sane-backends-1.0.16/backend/plustek-usb.c 2005-07-04 18:59:54.000000000 +0200
++++ sane-backends-lide25v2/backend/plustek-usb.c 2005-10-25 12:19:03.601593864 +0200
+@@ -880,11 +880,13 @@
+
+ if( si->ImgDef.wDataType == COLOR_256GRAY ) {
+
+- if( !(si->ImgDef.dwFlag & SCANDEF_Adf ) &&
+- (dev->usbDev.Caps.OpticDpi.x == 1200 && si->ImgDef.xyDpi.x <= 300)) {
+- dev->scanning.fGrayFromColor = 2;
+- si->ImgDef.wDataType = COLOR_TRUE24;
+- DBG( _DBG_INFO, "* Gray from color set!\n" );
++ if((dev->usbDev.vendor != 0x04A9) && (dev->usbDev.product != 0x2220)) {
++ if( !(si->ImgDef.dwFlag & SCANDEF_Adf ) &&
++ (dev->usbDev.Caps.OpticDpi.x==1200 && si->ImgDef.xyDpi.x<=300)) {
++ dev->scanning.fGrayFromColor = 2;
++ si->ImgDef.wDataType = COLOR_TRUE24;
++ DBG( _DBG_INFO, "* Gray from color set!\n" );
++ }
+ }
+
+ if( caps->workaroundFlag & _WAF_GRAY_FROM_COLOR ) {
+@@ -1094,7 +1096,8 @@
+ /* the CanoScan CIS devices need special handling... */
+ if((dev->usbDev.vendor == 0x04A9) &&
+ (dev->usbDev.product==0x2206 || dev->usbDev.product==0x2207 ||
+- dev->usbDev.product==0x220D || dev->usbDev.product==0x220E)) {
++ dev->usbDev.product==0x220D || dev->usbDev.product==0x220E ||
++ dev->usbDev.product==0x2220)) {
+ use_alt_cal = SANE_TRUE;
+
+ } else {
+diff -Nur sane-backends-1.0.16/backend/plustek-usbdevs.c sane-backends-lide25v2/backend/plustek-usbdevs.c
+--- sane-backends-1.0.16/backend/plustek-usbdevs.c 2005-07-04 18:59:54.000000000 +0200
++++ sane-backends-lide25v2/backend/plustek-usbdevs.c 2005-10-25 12:19:03.598594320 +0200
+@@ -702,6 +702,24 @@
+ _WAF_MISC_IO_LAMPS | _WAF_BLACKFINE, _NO_MIO
+ };
+
++/* Canon LiDE25
++ */
++static DCapsDef Cap0x04A9_0x2220 =
++{
++ {{ 0, 100}, 50, 10, {2550, 3508}, {75, 75}, COLOR_BW },
++ {{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
++ {{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
++ {{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
++ {1200, 1200},
++ 0,
++ SENSORORDER_rgb,
++ 16, /* sensor distance */
++ 3, /* number of buttons */
++ kCIS1240, /* use default settings during calibration */
++ 0, /* not used here... */
++ _WAF_MISC_IO_LAMPS | _WAF_BLACKFINE, _NO_MIO
++};
++
+ /******************* additional Hardware descriptions ************************/
+
+ /** U24, UT12 and UT16
+@@ -2279,6 +2297,75 @@
+ 2.0
+ };
+
++/** Canon LiDE25 */
++static HWDef Hw0x04A9_0x2220 =
++{
++ 0.70, /* dMaxMotorSpeed (Max_Speed) */
++ 0.25, /* dMaxMoveSpeed (Max_Speed) */
++ 0.85, /* dHighSpeed */
++ 100, /* wIntegrationTimeLowLamp */
++ 100, /* wIntegrationTimeHighLamp */
++ 1200, /* wMotorDpi (Full step DPI) */
++ 512, /* wRAMSize (KB) */
++ 3.75, /* dMinIntegrationTimeLowres (ms) */
++ 5.75, /* dMinIntegrationTimeHighres (ms) */
++ 0, /* wGreenPWMDutyCycleLow (reg 0x2a + 0x2b) */
++ 0, /* wGreenPWMDutyCycleHigh (reg 0x2a + 0x2b) */
++
++ 0x11, /* bSensorConfiguration (0x0b) */
++ 0x4d, /* sensor control settings (reg 0x0c) */
++ 0x2f, /* sensor control settings (reg 0x0d) */
++ 0x00, /* sensor control settings (reg 0x0e) */
++
++ {0x00, 0x00, 0x04, 0x05, 0x06, 0x07, 0x00, 0x00, 0x00, 0x07},
++ /* mono (reg 0x0f to 0x18) */
++
++ {0x00, 0x00, 0x04, 0x05, 0x06, 0x07, 0x00, 0x00, 0x00, 0x07},
++ /* color (reg 0x0f to 0x18) */
++
++ (_BLUE_CH | _ONE_CH_COLOR), /* bReg_0x26 color mode */
++
++ 0x00, /* bReg 0x27 color mode */
++ 2, /* bReg 0x29 illumination mode */
++
++ { 3, 0, 0, 50, 3700, 0, 0 },
++ { 2, 50, 5600, 50, 7100, 50, 4600 },
++
++ 1, /* StepperPhaseCorrection (reg 0x1a + 0x1b) */
++ 0, /* bOpticBlackStart (reg 0x1c) */
++ 0, /* bOpticBlackEnd (reg 0x1d) */
++ 0x7f, /* wActivePixelsStart (reg 0x1e + 0x1f) */
++ 10559, /* wLineEnd (reg 0x20 + 0x21) */
++
++ 50, /* red lamp on (reg 0x2c + 0x2d) */
++ 5600, /* red lamp off (reg 0x2e + 0x2f) */
++ 50, /* green lamp on (reg 0x30 + 0x31) */
++ 7100, /* green lamp off (reg 0x32 + 0x33) */
++ 50, /* blue lamp on (reg 0x34 + 0x35) */
++ 4600, /* blue lamp off (reg 0x36 + 0x37) */
++
++ 3, /* stepper motor control (reg 0x45) */
++ 0, /* wStepsAfterPaperSensor2 (reg 0x4c + 0x4d) */
++ 0x20, /* steps to reverse when buffer is full reg 0x50) */
++ 0xfc, /* acceleration profile (reg 0x51) */
++ 0, /* lines to process (reg 0x54) */
++ 0x0f, /* kickstart (reg 0x55) */
++ 0x08, /* pwm freq (reg 0x56) */
++ 0x1f, /* pwm duty cycle (reg 0x57) */
++
++ 0x04, /* Paper sense (reg 0x58) */
++
++ 0x66, /* misc io12 (reg 0x59) */
++ 0x16, /* misc io34 (reg 0x5a) */
++ 0x91, /* misc io56 (reg 0x5b) */
++ 0x01, /* test mode ADC Output CODE MSB (reg 0x5c) */
++ 0, /* test mode ADC Output CODE LSB (reg 0x5d) */
++ 0, /* test mode (reg 0x5e) */
++ _LM9833,
++ MODEL_CANON_LIDE25,
++ 2.0
++};
++
+ /******************** all available combinations *****************************/
+
+ /** here we have all supported devices and their settings...
+@@ -2348,6 +2435,7 @@
+ {"0x04A9-0x2208", &Cap0x04A9_0x2208, &Hw0x04A9_0x2208, "D660U" },
+ {"0x04A9-0x220D", &Cap0x04A9_0x220D, &Hw0x04A9_0x220D, "N670U/N676U/LiDE20" },
+ {"0x04A9-0x220E", &Cap0x04A9_0x220E, &Hw0x04A9_0x220E, "N1240U/LiDE30" },
++ {"0x04A9-0x2220", &Cap0x04A9_0x2220, &Hw0x04A9_0x2220, "LiDE25" },
+
+ /* Please add other devices here...
+ * The first entry is a string, composed out of the vendor and product id,
+@@ -2546,7 +2634,23 @@
+ /* Gray mode MCLK settings */
+ { 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0 },
+ { 6.5, 6.5, 6.5, 7.0, 8.0, 8.0, 8.0, 10.0, 10.0, 10.0 }
+- }
++ },
++
++ { MODEL_CANON_LIDE25, 8, 51, 9,
++ /* Motor settings (PWM and PWM_Duty) */
++ /* <=75dpi <=100dpi <=150dpi <=200dpi <=300dpi */
++ {{ 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 },
++
++ /* <=400dpi <=600dpi <=800dpi <=1200dpi <=2400dpi */
++ { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }},
++ /* Color mode MCLK settings */
++ { 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0 },
++ { 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 5.0, 6.0, 6.0, 6.0 },
++ /* Gray mode MCLK settings */
++ { 8.5, 7.0, 4.0, 4.0, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5 },
++ { 6.5, 6.5, 6.0, 6.0, 6.0, 6.0, 8.0, 12.0, 12.0, 12.0 }
++ }
++
+ };
+
+ /* END PLUSTEK-USBDEVS.C ....................................................*/
+diff -Nur sane-backends-1.0.16/backend/plustek-usb.h sane-backends-lide25v2/backend/plustek-usb.h
+--- sane-backends-1.0.16/backend/plustek-usb.h 2005-07-04 18:59:54.000000000 +0200
++++ sane-backends-lide25v2/backend/plustek-usb.h 2005-10-25 12:18:56.802627464 +0200
+@@ -278,6 +278,7 @@
+ MODEL_CANON600 , /**< for CanoScan 600dpi models */
+ MODEL_CANON1200, /**< for Canon 1200dpi models */
+ MODEL_CANONCCD1200, /**< for Canon CCD 1200dpi models */
++ MODEL_CANON_LIDE25, /**< for CanoScan LiDE25 */
+ MODEL_UMAX, /**< for UMAX 3400/3450 */
+ MODEL_UMAX1200, /**< for UMAX 5400 */
+ MODEL_LAST
diff --git a/media-gfx/sane-backends/sane-backends-1.0.16-r3.ebuild b/media-gfx/sane-backends/sane-backends-1.0.16-r3.ebuild
new file mode 100644
index 000000000000..e6f78ebbf5af
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.16-r3.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2005 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.16-r3.ebuild,v 1.1 2005/10/31 13:31:16 phosphan Exp $
+
+inherit eutils flag-o-matic
+
+IUSE="usb gphoto2 ipv6 v4l"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+
+RDEPEND=">=media-libs/jpeg-6b
+ amd64? ( sys-libs/libieee1284 )
+ x86? ( sys-libs/libieee1284 )
+ usb? ( dev-libs/libusb )
+ gphoto2? ( media-libs/libgphoto2 )
+ v4l? ( sys-kernel/linux-headers )"
+
+DEPEND="${DEPEND}
+ >=sys-apps/sed-4"
+
+BROTHERMFCDRIVER="sane-${PV}-brother-driver.diff"
+
+SRC_URI="ftp://ftp.sane-project.org/pub/sane/${P}/${P}.tar.gz
+ ftp://ftp.sane-project.org/pub/sane/old-versions/${P}/${P}.tar.gz
+ usb? ( mirror://gentoo/${BROTHERMFCDRIVER}.bz2
+ http://dev.gentoo.org/~phosphan/${BROTHERMFCDRIVER}.bz2 )"
+SLOT="0"
+LICENSE="GPL-2 public-domain"
+KEYWORDS="~x86 ~sparc ~ppc ~ppc64 ~amd64 ~alpha ~ia64"
+
+# To enable specific backends, define SANE_BACKENDS with the backends you want
+# in those:
+# abaton agfafocus apple artec as6e avision bh canon canon630u coolscan
+# coolscan2 dc25 dmc epson fujitsu genesys gt68xx hp leo matsushita microtek
+# microtek2 mustek mustek_usb nec pie plustek plustek_pp ricoh s9036
+# sceptre sharp sp15c st400 tamarack test teco1 teco2 teco3 umax umax_pp
+# umax1220u artec_eplus48u ma1509 ibm hp5400 u12 sm3840 snapscan niash dc210 dc240
+# pint net
+#
+# Note that some backends has specific dependencies which make the compilation
+# fail because not supported on your current platform.
+pkg_setup() {
+ enewgroup scanner
+
+ IEEE1284_BACKENDS="canon_pp hpsj5s mustek_pp"
+
+ if [[ "${SANE_BACKENDS}" != "" ]]; then
+ use gphoto2 && SANE_BACKENDS="${SANE_BACKENDS} gphoto2"
+ use v4l && SANE_BACKENDS="${SANE_BACKENDS} v4l"
+ use usb && SANE_BACKENDS="${SANE_BACKENDS} sm3600"
+ fi
+
+ if ! use x86 && ! use amd64; then
+ tmp="${SANE_BACKENDS}"
+ for backend in ${IEEE1284_BACKENDS}; do
+ if [[ "${tmp/$backend/}" != "${SANE_BACKENDS}" ]]; then
+ ewarn "You selected a backend which is disabled because it's not usable in your arch."
+ fi
+ done
+ fi
+}
+
+src_unpack() {
+ if [ -z "${SANE_BACKENDS}" ]; then
+ einfo "You can use the variable SANE_BACKENDS to pick backends"
+ einfo "instead of building all of them."
+ fi
+ unpack ${A}
+ if use usb; then
+ unpack ${BROTHERMFCDRIVER}.bz2
+ fi
+
+ cd ${S}
+
+ #only generate the .ps and not the fonts
+ sed -i -e 's:$(DVIPS) sane.dvi -o sane.ps:$(DVIPS) sane.dvi -M1 -o sane.ps:' \
+ doc/Makefile.in
+ #compile errors when using NDEBUG otherwise
+ sed -i -e 's:function_name:__FUNCTION__:g' backend/artec_eplus48u.c \
+ || die "function_name fix failed"
+
+ if use usb; then
+ epatch ${WORKDIR}/${BROTHERMFCDRIVER}
+ sed -e 's/bh canon/bh brother canon/' -i configure || \
+ die "could not add 'brother' to backend list"
+ epatch ${FILESDIR}/libusbscanner-device-r1.patch
+ :
+ fi
+ epatch ${FILESDIR}/lide25-r1.patch
+
+ # trouble with -ffast-math, see bug #103118
+ for file in backend/matsushita.c backend/sceptre.c backend/leo.c \
+ backend/sp15c.h backend/teco1.c backend/teco2.c backend/teco3.c \
+ backend/sp15c-scsi.h backend/dc210.c include/sane/sanei_backend.h; do
+ sed -e 's/__unused__/sane_unused__/g' -i ${file} || \
+ die "Could not apply __unused__-fix for ${file}"
+ done
+
+}
+
+src_compile() {
+ if use amd64; then
+ filter-flags -fstack-protector
+ fi
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${SANE_BACKENDS}" \
+ econf \
+ $(use_enable usb libusb) \
+ $(use_with gphoto2) \
+ $(use_enable ipv6) \
+ ${myconf} || die "econf failed"
+
+ emake || die
+
+ if use usb; then
+ cd tools/hotplug
+ grep -v '^$' libsane.usermap > libsane.usermap.new
+ mv libsane.usermap.new libsane.usermap
+ fi
+}
+
+src_install () {
+ einstall docdir=${D}/usr/share/doc/${PF}
+ keepdir /var/lib/lock/sane
+ fowners root:scanner /var/lib/lock/sane
+ fperms g+w /var/lib/lock/sane
+ if use usb; then
+ cd tools/hotplug
+ insinto /etc/hotplug/usb
+ exeinto /etc/hotplug/usb
+ doins libsane.usermap
+ doexe libusbscanner
+ newdoc README README.hotplug
+ cd ../..
+ fi
+
+ docinto backend
+ cd backend
+ dodoc GUIDE *.README *.BUGS *.CHANGES *.FAQ *.TODO
+
+ echo "SANE_CONFIG_DIR=/etc/sane.d" > 30sane
+ insinto /etc/env.d
+ doins 30sane
+
+}