summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Kursawe <phosphan@gentoo.org>2005-04-27 08:08:38 +0000
committerPatrick Kursawe <phosphan@gentoo.org>2005-04-27 08:08:38 +0000
commit01eb0e2621d7bd7c0a7176ed686996d709c74a6c (patch)
treed33433f08b89e225f5fe0e5ab85f32f93c7a41f7 /media-gfx
parentFixed HOMEPAGE and SRC_URI for bug #90433. (diff)
downloadgentoo-2-01eb0e2621d7bd7c0a7176ed686996d709c74a6c.tar.gz
gentoo-2-01eb0e2621d7bd7c0a7176ed686996d709c74a6c.tar.bz2
gentoo-2-01eb0e2621d7bd7c0a7176ed686996d709c74a6c.zip
Fixes for gt68xx-based scanners (bug #90442)
(Portage version: 2.0.51.19)
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/sane-backends/ChangeLog9
-rw-r--r--media-gfx/sane-backends/Manifest18
-rw-r--r--media-gfx/sane-backends/files/digest-sane-backends-1.0.15-r12
-rw-r--r--media-gfx/sane-backends/files/sane-backend-1.0.15-gt68xx-update67.patch178
-rw-r--r--media-gfx/sane-backends/sane-backends-1.0.15-r1.ebuild106
5 files changed, 305 insertions, 8 deletions
diff --git a/media-gfx/sane-backends/ChangeLog b/media-gfx/sane-backends/ChangeLog
index 121a59f9b496..520cf49b43e5 100644
--- a/media-gfx/sane-backends/ChangeLog
+++ b/media-gfx/sane-backends/ChangeLog
@@ -1,6 +1,13 @@
# 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.64 2005/04/08 17:28:57 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.65 2005/04/27 08:08:38 phosphan Exp $
+
+*sane-backends-1.0.15-r1 (27 Apr 2005)
+
+ 27 Apr 2005; Patrick Kursawe <phosphan@gentoo.org>
+ +files/sane-backend-1.0.15-gt68xx-update67.patch,
+ +sane-backends-1.0.15-r1.ebuild:
+ Fixes for gt68xx-based scanners (bug #90442)
08 Apr 2005; Markus Rothe <corsair@gentoo.org>
sane-backends-1.0.15.ebuild:
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index 622401fb0de9..414ac32bd7f2 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1,14 +1,18 @@
-MD5 3666623a4799d78916bdfe1cbafa4963 ChangeLog 10840
-MD5 b742040acaeddc3798a21739bd59e8aa metadata.xml 224
-MD5 4c8053c87e31c8209998ba49c07d60a5 sane-backends-1.0.13-r3.ebuild 1717
-MD5 c8907f60d5922fb1d60049928b143590 sane-backends-1.0.14-r3.ebuild 2482
MD5 e6269ace86c387b75b472389e0035c9a sane-backends-1.0.14-r6.ebuild 2805
+MD5 6dd8c3bf32403e6683400e8150e043ff patch 401
+MD5 c8907f60d5922fb1d60049928b143590 sane-backends-1.0.14-r3.ebuild 2482
MD5 f24e9a92ca44a1e7ef7e60ac21db70fc sane-backends-1.0.15.ebuild 2593
+MD5 4c8053c87e31c8209998ba49c07d60a5 sane-backends-1.0.13-r3.ebuild 1717
+MD5 a480837cf38bd45b3060bc01e9945b36 sane-backends-1.0.15-r1.ebuild 2661
+MD5 3666623a4799d78916bdfe1cbafa4963 ChangeLog 10840
+MD5 b742040acaeddc3798a21739bd59e8aa metadata.xml 224
+MD5 365f695ec2c079ac06dd5bbf495f87ce files/linux_sg3_err.h 4894
+MD5 f49c8e2b591496e87e91ae243d9864d0 files/sane-backend-1.0.15-gt68xx-update67.patch 5682
+MD5 820e842ff4247de984a89752ac129ceb files/libusbscanner-device.patch 582
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 38efb4d762b212d339caa112194dbf56 files/digest-sane-backends-1.0.14-r3 160
MD5 e8109e4fa602f9e29257c4abea88f69d files/digest-sane-backends-1.0.14-r6 229
+MD5 83640d1e7caa2aa50c676d40b64866c7 files/digest-sane-backends-1.0.15-r1 157
MD5 83640d1e7caa2aa50c676d40b64866c7 files/digest-sane-backends-1.0.15 157
-MD5 cb4dcb744752238bdfed71fdcce81c79 files/libusbscanner-device-r1.patch 681
-MD5 820e842ff4247de984a89752ac129ceb files/libusbscanner-device.patch 582
-MD5 365f695ec2c079ac06dd5bbf495f87ce files/linux_sg3_err.h 4894
diff --git a/media-gfx/sane-backends/files/digest-sane-backends-1.0.15-r1 b/media-gfx/sane-backends/files/digest-sane-backends-1.0.15-r1
new file mode 100644
index 000000000000..4ce538aa12b2
--- /dev/null
+++ b/media-gfx/sane-backends/files/digest-sane-backends-1.0.15-r1
@@ -0,0 +1,2 @@
+MD5 3b804f35cdfbc5ad2d201ffe078bbac9 sane-backends-1.0.15.tar.gz 3231759
+MD5 f2d2c62caf1d4e12005fbb8ee62a5f39 sane-backends-1.0.15-brothermfc.patch.bz2 9753
diff --git a/media-gfx/sane-backends/files/sane-backend-1.0.15-gt68xx-update67.patch b/media-gfx/sane-backends/files/sane-backend-1.0.15-gt68xx-update67.patch
new file mode 100644
index 000000000000..9f8a19a2305e
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backend-1.0.15-gt68xx-update67.patch
@@ -0,0 +1,178 @@
+diff -uNr sane-backends-1.0.15.org/backend/gt68xx.c sane-backends-1.0.15/backend/gt68xx.c
+--- sane-backends-1.0.15.org/backend/gt68xx.c 2004-10-31 18:47:40.000000000 +0100
++++ sane-backends-1.0.15/backend/gt68xx.c 2004-11-14 14:20:30.000000000 +0100
+@@ -48,7 +48,7 @@
+
+ #include "../include/sane/config.h"
+
+-#define BUILD 66
++#define BUILD 67
+ #define MAX_DEBUG
+ #define WARMUP_TIME 60
+ #define CALIBRATION_HEIGHT 2.5
+@@ -1342,7 +1342,7 @@
+
+ RIE (gt68xx_device_get_id (dev));
+
+- if (!(dev->model->flags | GT68XX_FLAG_NO_STOP))
++ if (!(dev->model->flags & GT68XX_FLAG_NO_STOP))
+ RIE (gt68xx_device_stop_scan (dev));
+
+ RIE (gt68xx_device_get_power_status (dev, &power_ok));
+@@ -1736,7 +1736,7 @@
+ }
+
+ s->calib = s->val[OPT_QUALITY_CAL].w;
+- if (!(s->dev->model->flags | GT68XX_FLAG_NO_STOP))
++ if (!(s->dev->model->flags & GT68XX_FLAG_NO_STOP))
+ RIE (gt68xx_device_stop_scan (s->dev));
+
+ RIE (gt68xx_device_carriage_home (s->dev));
+diff -uNr sane-backends-1.0.15.org/backend/gt68xx_devices.c sane-backends-1.0.15/backend/gt68xx_devices.c
+--- sane-backends-1.0.15.org/backend/gt68xx_devices.c 2004-10-05 19:22:53.000000000 +0200
++++ sane-backends-1.0.15/backend/gt68xx_devices.c 2004-11-14 14:16:28.000000000 +0100
+@@ -1074,8 +1074,7 @@
+ SANE_FALSE, /* Is this a CIS scanner? */
+ GT68XX_FLAG_OFFSET_INV | GT68XX_FLAG_NO_POWER_STATUS| GT68XX_FLAG_NO_LINEMODE
+ /* Which flags are needed for this scanner? */
+- /* Untested but as this scanner seems to be very similar to Plustelk U16B it
+- should work. */
++ /* This scanner seems to be very similar to Plustelk U16B and is reported to work. */
+ };
+
+
+@@ -1126,7 +1125,7 @@
+
+ SANE_FALSE, /* Is this a CIS scanner? */
+ GT68XX_FLAG_OFFSET_INV /* Which flags are needed for this scanner? */
+- /* Tested zo some degree, based on the Plustek OpticPro 1248U*/
++ /* Tested to some degree, based on the Plustek OpticPro 1248U*/
+ };
+
+ static GT68xx_Model genius_vivid4x_model = {
+diff -uNr sane-backends-1.0.15.org/backend/gt68xx_gt6801.c sane-backends-1.0.15/backend/gt68xx_gt6801.c
+--- sane-backends-1.0.15.org/backend/gt68xx_gt6801.c 2004-06-17 19:30:02.000000000 +0200
++++ sane-backends-1.0.15/backend/gt68xx_gt6801.c 2004-11-14 13:53:22.000000000 +0100
+@@ -553,7 +553,7 @@
+ GT68xx_Packet req;
+ SANE_Byte motor_mode_1, motor_mode_2;
+
+- if ((dev->model->flags & GT68XX_FLAG_NO_LINEMODE) && line_mode)
++ if ((dev->model->flags & GT68XX_FLAG_NO_LINEMODE) && line_mode && color)
+ {
+ DBG (0, "gt6801_setup_scan: the scanner's memory is too small for "
+ "that combination of resolution, dpi and width\n");
+diff -uNr sane-backends-1.0.15.org/backend/gt68xx_gt6816.c sane-backends-1.0.15/backend/gt68xx_gt6816.c
+--- sane-backends-1.0.15.org/backend/gt68xx_gt6816.c 2004-06-17 20:29:40.000000000 +0200
++++ sane-backends-1.0.15/backend/gt68xx_gt6816.c 2004-11-14 13:52:55.000000000 +0100
+@@ -534,7 +534,7 @@
+ return SANE_STATUS_NO_MEM;
+ }
+
+- if ((dev->model->flags & GT68XX_FLAG_NO_LINEMODE) && line_mode)
++ if ((dev->model->flags & GT68XX_FLAG_NO_LINEMODE) && line_mode && color)
+ {
+ DBG (0, "gt6816_setup_scan: the scanner's memory is too small for "
+ "that combination of resolution, dpi and width\n");
+diff -uNr sane-backends-1.0.15.org/backend/gt68xx-s.c sane-backends-1.0.15/backend/gt68xx-s.c
+--- sane-backends-1.0.15.org/backend/gt68xx-s.c 1970-01-01 01:00:00.000000000 +0100
++++ sane-backends-1.0.15/backend/gt68xx-s.c 2000-08-12 17:09:44.000000000 +0200
+@@ -0,0 +1,83 @@
++#include "sane/sanei_backend.h"
++
++/* Now define the wrappers (we could use aliases here, but go for
++ robustness for now...: */
++
++SANE_Status
++sane_init (SANE_Int *vc, SANE_Auth_Callback cb)
++{
++ return ENTRY(init) (vc, cb);
++}
++
++SANE_Status
++sane_get_devices (const SANE_Device ***dl, SANE_Bool local)
++{
++ return ENTRY(get_devices) (dl, local);
++}
++
++SANE_Status
++sane_open (SANE_String_Const name, SANE_Handle *h)
++{
++ return ENTRY(open) (name, h);
++}
++
++const SANE_Option_Descriptor *
++sane_get_option_descriptor (SANE_Handle h, SANE_Int opt)
++{
++ return ENTRY(get_option_descriptor) (h, opt);
++}
++
++SANE_Status
++sane_control_option (SANE_Handle h, SANE_Int opt, SANE_Action act,
++ void *val, SANE_Word *info)
++{
++ return ENTRY(control_option) (h, opt, act, val, info);
++}
++
++SANE_Status
++sane_get_parameters (SANE_Handle h, SANE_Parameters *parms)
++{
++ return ENTRY(get_parameters) (h, parms);
++}
++
++SANE_Status
++sane_start (SANE_Handle h)
++{
++ return ENTRY(start) (h);
++}
++
++SANE_Status
++sane_read (SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
++{
++ return ENTRY(read) (h, buf, maxlen, lenp);
++}
++
++SANE_Status
++sane_set_io_mode (SANE_Handle h, SANE_Bool non_blocking)
++{
++ return ENTRY(set_io_mode) (h, non_blocking);
++}
++
++SANE_Status
++sane_get_select_fd (SANE_Handle h, SANE_Int *fdp)
++{
++ return ENTRY(get_select_fd) (h, fdp);
++}
++
++void
++sane_cancel (SANE_Handle h)
++{
++ ENTRY(cancel) (h);
++}
++
++void
++sane_close (SANE_Handle h)
++{
++ ENTRY(close) (h);
++}
++
++void
++sane_exit (void)
++{
++ ENTRY(exit) ();
++}
+diff -uNr sane-backends-1.0.15.org/doc/gt68xx/gt68xx.CHANGES sane-backends-1.0.15/doc/gt68xx/gt68xx.CHANGES
+--- sane-backends-1.0.15.org/doc/gt68xx/gt68xx.CHANGES 2004-10-31 18:59:18.000000000 +0100
++++ sane-backends-1.0.15/doc/gt68xx/gt68xx.CHANGES 2004-11-14 13:56:39.000000000 +0100
+@@ -1,5 +1,11 @@
+ gt68xx.CHANGES -*-text-*-
+
++V 1.0.67 (2004-11-14)
++
++* Fixed test to move home sensor at the start of scan.
++* Fixed gray mode linemode test. That stopped e.g. the Plustek OpticPro U 16 B
++ from working in gray mode.
++
+ V 1.0.66 (2004-10-31)
+
+ * Removed unused gain and offset options.
diff --git a/media-gfx/sane-backends/sane-backends-1.0.15-r1.ebuild b/media-gfx/sane-backends/sane-backends-1.0.15-r1.ebuild
new file mode 100644
index 000000000000..2b6af24bbb43
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.15-r1.ebuild
@@ -0,0 +1,106 @@
+# 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.15-r1.ebuild,v 1.1 2005/04/27 08:08:38 phosphan Exp $
+
+inherit eutils
+
+IUSE="usb gphoto2 ipv6"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+
+DEPEND=">=media-libs/jpeg-6b
+ x86? ( sys-libs/libieee1284 )
+ =sys-apps/sed-4*
+ usb? ( dev-libs/libusb )
+ gphoto2? ( media-gfx/gphoto2 )"
+
+BROTHERMFCDRIVER="sane-backends-1.0.15-brothermfc.patch"
+
+SRC_URI="ftp://ftp.mostang.com/pub/sane/${P}/${P}.tar.gz
+ ftp://ftp.mostang.com/pub/sane/old-versions/${P}/${P}.tar.gz
+ usb? ( mirror://gentoo/${BROTHERMFCDRIVER}.bz2 )"
+SLOT="0"
+LICENSE="GPL-2 public-domain"
+KEYWORDS="~x86 ~sparc ~ppc ~ppc64 ~amd64 ~alpha"
+
+
+src_unpack() {
+ unpack ${A}
+ if use usb; then
+ unpack ${BROTHERMFCDRIVER}.bz2
+ fi
+ cp ${FILESDIR}/linux_sg3_err.h ${S}/sanei
+
+ cd ${S}
+
+ epatch ${FILESDIR}/canoscan-focus.patch
+ epatch ${FILESDIR}/sane-backend-1.0.15-gt68xx-update67.patch
+
+ #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
+ use usb && epatch ${WORKDIR}/${BROTHERMFCDRIVER}
+ use usb && epatch ${FILESDIR}/libusbscanner-device-r1.patch
+}
+
+src_compile() {
+ local myconf
+ myconf="$(use_enable usb libusb) $(use_with gphoto2) $(use_enable ipv6)"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --host=${CHOST} ${myconf} || die
+ make || die
+ if use usb; then
+ cd tools/hotplug
+ grep < libsane.usermap -v '^$' > libsane.usermap.new
+ mv libsane.usermap.new libsane.usermap
+ fi
+}
+
+src_install () {
+
+
+ make prefix=${D}/usr \
+ sysconfdir=${D}/etc \
+ mandir=${D}/usr/share/man \
+ docdir=${D}/usr/share/doc/${PF} \
+ libdir=${D}/usr/$(get_libdir) \
+ install || die
+
+ 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
+
+}
+
+pkg_preinst() {
+ enewgroup scanner
+}
+
+pkg_postinst() {
+ if use usb; then
+ einfo "There are some problems with the hotplug script when"
+ einfo "restarting hotplug with some kernel versions."
+ einfo "If you have trouble, please edit"
+ einfo "/etc/hotplug/usb/libusbscanner"
+ einfo "and see bug #50934 for details."
+ fi
+}