Accepting request 39641 from graphics

checked in (request 39641)

OBS-URL: https://build.opensuse.org/request/show/39641
OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=24
This commit is contained in:
OBS User autobuild 2010-05-07 13:48:25 +00:00 committed by Git OBS Bridge
parent 1819da9e0c
commit f8d5e63693
13 changed files with 257 additions and 240 deletions

View File

@ -1,6 +1,8 @@
--- configure.in.orig 2010-04-26 02:55:27.000000000 +0200
+++ configure.in 2010-05-07 12:14:59.000000000 +0200
@@ -155,16 +155,22 @@ AC_CHECK_HEADERS([asm/io.h],,,[#include
Index: configure.in
===================================================================
--- configure.in.orig
+++ configure.in
@@ -155,15 +155,21 @@ AC_CHECK_HEADERS([asm/io.h],,,[#include
SANE_CHECK_MISSING_HEADERS
@ -9,27 +11,25 @@
- resmgr,
- rsm_open_device,[
- AC_DEFINE(HAVE_RESMGR,1,[define if you have the resmgr library])
- RESMGR_LIBS="-lresmgr"
- LIBS="$LIBS -lresmgr"
- ]
- )
-])
-AC_SUBST(RESMGR_LIBS)
+# Since Suse Linux 10.0 resmgr installs ACLs on device nodes.
+# Therefore there is no need to patch applications with special resmgr
+# support anymore.
+# As the "rsm_open_device" calls in sanei_scsi.c and sanei_usb.c
+# are optionally via "ifdef HAVE_RESMGR" with fallback "open" calls,
+# the special resmgr support is not removed but only disabled here:
+# AC_CHECK_HEADER(resmgr.h,[
+# AC_CHECK_LIB(
+# resmgr,
+# rsm_open_device,[
+# AC_DEFINE(HAVE_RESMGR,1,[define if you have the resmgr library])
+# RESMGR_LIBS="-lresmgr"
+# ]
+# )
+# ])
+# AC_SUBST(RESMGR_LIBS)
+#AC_CHECK_HEADER(resmgr.h,[
+# AC_CHECK_LIB(
+# resmgr,
+# rsm_open_device,[
+# AC_DEFINE(HAVE_RESMGR,1,[define if you have the resmgr library])
+# LIBS="$LIBS -lresmgr"
+# ]
+# )
+#])
dnl ***********************************************************************
dnl Checks for types and structures

View File

@ -1,11 +0,0 @@
--- backend/genesys.c.orig 2010-04-05 15:18:04.000000000 +0200
+++ backend/genesys.c 2010-05-07 13:06:07.000000000 +0200
@@ -5436,7 +5436,7 @@ init_gamma_vector_option (Genesys_Scanne
* @param size maximum size of the range
* @return a poiter to a valid range or NULL
*/
-static create_range(SANE_Fixed size)
+static SANE_Range *create_range(SANE_Fixed size)
{
SANE_Range *range=NULL;

11
fix-hp3900_config.c.patch Normal file
View File

@ -0,0 +1,11 @@
--- backend/hp3900_config.c.orig 2009-02-23 15:37:00.000000000 +0100
+++ backend/hp3900_config.c 2009-07-29 15:03:46.000000000 +0200
@@ -935,7 +935,7 @@ static void ua4900_offset(SANE_Int resol
{
SANE_Int a;
- for (a = 0; a < 12; a++)
+ for (a = 0; a < 6; a++)
{
if (myreg[a].resolution == resolution)
{

View File

@ -0,0 +1,36 @@
--- a/backend/hp3900_sane.c
+++ b/backend/hp3900_sane.c
@@ -1189,6 +1189,7 @@ options_init (TScanner * scanner)
scanner->rng_vertical.quant = 1;
/* allocate option lists */
+ bknd_info (scanner);
bknd_colormodes (scanner, RTS_Debug->dev_model);
bknd_depths (scanner, RTS_Debug->dev_model);
bknd_models (scanner);
@@ -1562,6 +1563,7 @@ options_init (TScanner * scanner)
pDesc->constraint_type = SANE_CONSTRAINT_NONE;
pDesc->cap = SANE_CAP_ADVANCED | SANE_CAP_SOFT_DETECT;
pVal->s = strdup (SANE_I18N ("Unknown"));
+ pDesc->size = strlen(pVal->s) + 1;
break;
case opt_chipid:
@@ -1981,7 +1983,8 @@ option_get (TScanner * scanner, SANE_Int optid, void *result)
case opt_scantype:
case opt_model:
case opt_chipname:
- strcpy (result, scanner->aValues[optid].s);
+ strncpy (result, scanner->aValues[optid].s, scanner->aOptions[optid].size);
+ ((char*)result)[scanner->aOptions[optid].size-1] = '\0';
break;
/* scanner buttons */
@@ -2113,6 +2116,7 @@ option_set (TScanner * scanner, SANE_Int optid, void *value, SANE_Int * pInfo)
Load_Config (device);
/* update options according to selected device */
+ bknd_info (scanner);
bknd_colormodes (scanner, model);
bknd_depths (scanner, model);
bknd_resolutions (scanner, model);

View File

@ -0,0 +1,11 @@
--- backend/lexmark_low.c.orig 2009-02-26 17:11:17.000000000 +0100
+++ backend/lexmark_low.c 2009-09-30 12:38:02.000000000 +0200
@@ -2560,6 +2560,8 @@ sanei_lexmark_low_find_start_line (Lexma
}
} /* end for buffer */
+ free (buffer);
+
DBG (2, "sanei_lexmark_low_find_start_line: end.\n");
return whiteLineCount;
}

View File

@ -1,10 +1,10 @@
--- doc/Makefile.am.orig 2010-04-05 15:18:05.000000000 +0200
+++ doc/Makefile.am 2010-05-07 12:38:51.000000000 +0200
@@ -202,7 +202,6 @@ DESC_EXT_FILES = descriptions-external/b
--- doc/Makefile.am.orig 2009-03-24 14:36:37.000000000 +0100
+++ doc/Makefile.am 2009-06-10 14:47:53.000000000 +0200
@@ -201,7 +201,6 @@ DESC_EXT_FILES = descriptions-external/b
descriptions-external/hp3770.desc \
descriptions-external/hp8200.desc \
descriptions-external/hpaio.desc \
- descriptions-external/hpoj.desc \
descriptions-external/kodak-twain.desc \
descriptions-external/lhii.desc \
descriptions-external/mustek_a3p1.desc \
descriptions-external/primascan.desc \

View File

@ -0,0 +1,139 @@
backport post 1.0.20 xerox_mfp changes
Index: sane-backends-1.0.20/backend/xerox_mfp.conf.in
===================================================================
--- sane-backends-1.0.20.orig/backend/xerox_mfp.conf.in
+++ sane-backends-1.0.20/backend/xerox_mfp.conf.in
@@ -5,3 +5,25 @@ usb 0x413c 0x5124
#Xerox Phaser 6110MFP
usb 0x0924 0x3d5d
+
+#Samsung CLX-3170fn
+usb 0x04e8 0x342a
+
+#Samsung SCX-4200
+usb 0x04e8 0x341b
+
+#Samsung SCX4725-FN
+usb 0x04e8 0x341f
+
+#Samsung SCX-4500
+usb 0x04e8 0x3426
+
+# Samsung SCX-4500W
+usb 0x04e8 0x342b
+
+# Samsung SCX-4300
+usb 0x04e8 0x342e
+
+#Xerox WorkCentre 3119 Series
+usb 0x0924 0x4265
+
Index: sane-backends-1.0.20/doc/descriptions/xerox_mfp.desc
===================================================================
--- sane-backends-1.0.20.orig/doc/descriptions/xerox_mfp.desc
+++ sane-backends-1.0.20/doc/descriptions/xerox_mfp.desc
@@ -1,23 +1,25 @@
:backend "xerox_mfp"
-:version "1.0-9"
+:version "1.0-11"
:manpage "sane-xerox_mfp"
-:comment "Could be compatible with other Samsung manufactured devices"
:devicetype :scanner
-:new :yes
:mfg "Xerox"
:url "http://www.office.xerox.com/"
+:model "Phaser 6110MFP"
+:interface "USB"
+:usbid "0x0924" "0x3d5d"
+:status :good
+
:model "Phaser 3200MFP"
:interface "USB"
:usbid "0x0924" "0x3da4"
-:status :good
+:status :complete
:url "http://www.office.xerox.com/multifunction-printer/multifunction-under-30ppm/phaser-3200mfp/spec-enus.html"
-:comment "All features of device I know of"
-:model "Phaser 6110MFP"
+:model "WorkCentre 3119 Series"
:interface "USB"
-:usbid "0x0924" "0x3d5d"
+:usbid "0x0924" "0x4265"
:status :good
:mfg "Dell"
@@ -28,3 +30,30 @@
:usbid "0x413c" "0x5124"
:status :good
+:mfg "Samsung"
+:url "http://www.samsung.com"
+
+:model "SCX-4200"
+:interface "USB"
+:usbid "0x04e8" "0x341b"
+:status :good
+
+:model "SCX4725-FN"
+:interface "USB"
+:usbid "0x04e8" "0x341f"
+:status :good
+
+:model "SCX-4500"
+:interface "USB"
+:usbid "0x04e8" "0x3426"
+:status :good
+
+:model "CLX-3170fn"
+:interface "USB"
+:usbid "0x04e8" "0x342a"
+:status :good
+
+:model "SCX-4300"
+:interface "USB"
+:usbid "0x04e8" "0x342e"
+:status :good
Index: sane-backends-1.0.20/backend/xerox_mfp.c
===================================================================
--- sane-backends-1.0.20.orig/backend/xerox_mfp.c
+++ sane-backends-1.0.20/backend/xerox_mfp.c
@@ -26,7 +26,7 @@
#include <sane/sanei_backend.h>
#include "xerox_mfp.h"
-#define BACKEND_BUILD 10
+#define BACKEND_BUILD 11
#define XEROX_CONFIG_FILE "xerox_mfp.conf"
static const SANE_Device **devlist = NULL; /* sane_get_devices array */
@@ -802,7 +802,7 @@ sane_control_option (SANE_Handle h, SANE
}
DBG (4, "%s: %d, <%d> => %08x, %x\n", __FUNCTION__, opt, act,
- *(SANE_Word *)val, info? *info : 0);
+ val? *(SANE_Word *)val : 0, info? *info : 0);
return SANE_STATUS_GOOD;
}
@@ -1319,14 +1319,15 @@ sane_start (SANE_Handle h)
dev->reserved++;
}
- if (!dev_set_window(dev))
+ if (!dev_set_window(dev) ||
+ (dev->state && dev->state != SANE_STATUS_DEVICE_BUSY))
return dev_stop(dev);
if (!dev_cmd_wait(dev, CMD_OBJECT_POSITION))
return dev_stop(dev);
if (!dev_cmd(dev, CMD_READ) ||
- dev->state != SANE_STATUS_DEVICE_BUSY)
+ (dev->state && dev->state != SANE_STATUS_DEVICE_BUSY))
return dev_stop(dev);
dev->scanning = 1;

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba4eb97b177fe5b4168c4bad94457dea1194ddb37985b048bec1fd82a3cf5d8d
size 3714555

View File

@ -1,129 +0,0 @@
diff -Nur sane-backends-1.0.21/po/LINGUAS sane-backends-1.0.21.mod/po/LINGUAS
--- sane-backends-1.0.21/po/LINGUAS 1969-12-31 19:00:00.000000000 -0500
+++ sane-backends-1.0.21.mod/po/LINGUAS 2010-04-27 03:38:23.000000000 -0400
@@ -0,0 +1,21 @@
+# List of languages
+# try to keep this list ordered
+bg
+cs
+da
+de
+en_GB
+eo
+es
+fi
+fr
+gl
+it
+ja
+nb
+nl
+pl
+pt
+ru
+sv
+uk
diff -Nur sane-backends-1.0.21/po/POTFILES sane-backends-1.0.21.mod/po/POTFILES
--- sane-backends-1.0.21/po/POTFILES 1969-12-31 19:00:00.000000000 -0500
+++ sane-backends-1.0.21.mod/po/POTFILES 2010-04-27 03:38:16.000000000 -0400
@@ -0,0 +1,100 @@
+# List of source files containing translatable strings
+# paths relative to po
+../include/sane/saneopts.h
+../backend/sane_strstatus.c
+
+../backend/artec_eplus48u.c
+
+../backend/avision.h
+
+../backend/canon630u.c
+../backend/canon.c
+../backend/canon-sane.c
+
+../backend/canon_dr.c
+../backend/canon_dr.h
+
+../backend/cardscan.c
+../backend/cardscan.h
+
+../backend/epjitsu.c
+../backend/epjitsu.h
+
+../backend/epson.c
+../backend/epson.h
+../backend/epson2.c
+../backend/epson2.h
+
+../backend/fujitsu.c
+../backend/fujitsu.h
+
+../backend/genesys.c
+
+../backend/kodak.c
+../backend/kodak.h
+
+../backend/gt68xx.c
+../backend/gt68xx_low.h
+
+../backend/hp3500.c
+../backend/hp3900_sane.c
+../backend/hp5400_sane.c
+../backend/hp5590.c
+../backend/hp-option.c
+../backend/hp-option.h
+
+../backend/leo.c
+../backend/leo.h
+
+../backend/lexmark.c
+
+../backend/ma1509.c
+
+../backend/matsushita.c
+../backend/matsushita.h
+
+../backend/microtek2.c
+../backend/microtek2.h
+
+../backend/mustek.c
+../backend/mustek_usb.c
+../backend/mustek_usb2.c
+
+../backend/niash.c
+
+../backend/pixma.c
+../backend/pixma_sane_options.c
+
+../backend/plustek.c
+../backend/plustek_pp.c
+
+../backend/pnm.c
+
+../backend/rts8891.c
+
+../backend/sceptre.c
+../backend/sceptre.h
+
+../backend/sm3840.c
+
+../backend/snapscan.c
+../backend/snapscan-options.c
+
+../backend/stv680.c
+../backend/stv680.h
+
+../backend/teco1.c
+../backend/teco1.h
+../backend/teco2.c
+../backend/teco2.h
+../backend/teco3.c
+../backend/teco3.h
+
+../backend/test.c
+
+../backend/u12.c
+
+../backend/umax1220u.c
+../backend/umax.c
+../backend/umax_pp.c
+

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:042428a962f43562b7f1d31948ab0b14a7eec55373ccb7b5b174fa1d8d7275a2
size 3911050

View File

@ -1,40 +1,3 @@
-------------------------------------------------------------------
Fri May 7 11:43:41 CEST 2010 - jsmeix@suse.de
- Upgraded to sane-backends version 1.0.21:
New backends:
kodak (Kodak i18xx), kvs1025 (Panasonic KV-S10xx),
p5 (Primax PagePartner)
Many backends updated.
224 more scanner models supported.
More consistent option naming.
Scanimage no longer writes image to tty.
Modern translation infrastructure.
Improved saned network daemon.
Internal SCSI, USB, threading, TCP & UDP code updates.
Updated HAL and udev support.
New sanei_magic image processing library.
Documentation updates.
Bugfixes.
Note:
This is one more release of the SANE 1.0 series, compare
the below entry dated "Thu Feb 28 13:56:15 CET 2008".
- fix-hp3900_config.c.patch, sane-desc_closedir.patch,
fix-lexmark_low-memory-leak.patch, and
fix-hp3900_sane-string-option-sizes.diff are obsolete since
sane-backends-1.0.21 because it is fixed in the source.
- sane-backends-1.0.20-xerox_mfp.diff backported post 1.0.20
xerox_mfp changes and is therefore removed since
sane-backends-1.0.21 which contains those changes, compare
the below entry dated "Thu Oct 8 09:35:17 UTC 2009".
- Slightly adapted disable-resmgr-support.patch and
no-descriptions-external-hpoj.patch to apply to the
sane-backends-1.0.21 sources.
- fix-genesys-create_range-type.patch lets in genesys.c
the create_range function be of type 'SANE_Range *'
to fix 'assignment makes pointer from integer' bugs
wherever the create_range function is called.
-------------------------------------------------------------------
Wed Apr 28 11:27:50 CEST 2010 - jsmeix@suse.de

View File

@ -24,12 +24,12 @@ License: GPLv2 ; GPLv2+ ; LGPLv2.1+ ; Public Domain, Freeware
Group: Hardware/Scanner
AutoReqProv: on
Summary: SANE (Scanner Access Now Easy) Scanner Drivers
Version: 1.0.21
Version: 1.0.20
Release: 11
Url: http://www.sane-project.org/
# URL for Source0: https://alioth.debian.org/frs/download.php/3258/sane-backends-1.0.21.tar.gz
# MD5 sum for upstream sane-backends-1.0.21.tar.gz (not our .bz2): be586a23633949cf2ecf0c9c6d769130
# URL for Source0: http://alioth.debian.org/frs/download.php/2318/sane-backends-1.0.19.tar.gz
Source0: sane-backends-%{version}.tar.bz2
Source1: baselibs.conf
# Source100... is SUSE specific stuff:
# Source100 is the evil-hack init-script "sane-dev" to grant scanner access permissions.
# Source100 is no longer provided because sane-backends-1.0.19 has udev and HAL support.
@ -53,9 +53,6 @@ Source105: epkowa.desc
# We create our hpaio.desc file directly from the models.dat file of HPLIP:
Source109: create_hpaio.desc_from_models.dat
Source110: models.dat
# Was initially just dumped in as Source1 to "package baselibs.conf"
# (see the matching explanatory entry in the RPM changelog):
Source190: baselibs.conf
# Source200... is scanner autoconfiguration stuff:
# Source200 and Source201 generate the 56-sane-backends-autoconfig.rules file
# for automated scanner driver activation via udev ("scanner autoconfiguration").
@ -85,41 +82,24 @@ Patch2: fix-buffer-overflow.patch
# Patch8 re-adds SANE_CAP_ALWAYS_SETTABLE to sane.h which was erroneously
# removed in sane-backends-1.0.20 so that sane-frontends and xsane can no longer build,
# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=527675
# SANE_CAP_ALWAYS_SETTABLE is still missing in sane-backends-1.0.21
Patch8: re-add-SANE_CAP_ALWAYS_SETTABLE.patch
# Patch9 fix-hp3900_config.c.patch fixes a possible for loop overflow in hp3900_config.c
# Patch9 fixes a possible for loop overflow in hp3900_config.c
# see https://bugzilla.novell.com/show_bug.cgi?id=517281
# and https://alioth.debian.org/tracker/index.php?func=detail&aid=311856&group_id=30186&atid=410366
# which is obsolete since sane-backends-1.0.21 because it is fixed in the source.
Patch9: fix-hp3900_config.c.patch
# Patch10 fixes undefined 'foo = ++foo modulo bar' operations in mustek_pp_ccd300.c
# see https://bugzilla.novell.com/show_bug.cgi?id=498435
# and https://alioth.debian.org/tracker/index.php?func=detail&aid=311857&group_id=30186&atid=410366
# where the upstream maintainer did not understand what is wrong and closed it as "Wont Fix"
# so that we have to keep this patch:
Patch10: fix-mustek_pp_ccd300.c.patch
# Patch11 sane-desc_closedir.patch adds missing call to closedir to sane-desc.c
# Patch11 adds missing call to closedir to sane-desc.c
# see https://bugzilla.novell.com/show_bug.cgi?id=530313
# and https://alioth.debian.org/tracker/index.php?func=detail&aid=311880&group_id=30186&atid=410366
# which is obsolete since sane-backends-1.0.21 because it is fixed in the source.
# Patch12 fix-lexmark_low-memory-leak.patch adds a missing call to free in backend/lexmark_low.c
Patch11: sane-desc_closedir.patch
# Patch12 adds a missing call to free in backend/lexmark_low.c
# in the sanei_lexmark_low_find_start_line function
# see https://bugzilla.novell.com/show_bug.cgi?id=542341
# and https://alioth.debian.org/tracker/index.php?func=detail&aid=311990&group_id=30186&atid=410366
# which is obsolete since sane-backends-1.0.21 because it is fixed in the source.
# Patch13 fix-hp3900_sane-string-option-sizes.diff fixes option sizes in backend/hp3900_sane.c
Patch12: fix-lexmark_low-memory-leak.patch
# Patch13 fixes option sizes in backend/hp3900_sane.c
# because otherwise the frontend (e.g. xsane) may crash
# see https://bugzilla.novell.com/show_bug.cgi?id=535752
# and https://alioth.debian.org/tracker/index.php?func=detail&aid=311991&group_id=30186&atid=410366
# which is obsolete since sane-backends-1.0.21 because it is fixed in the source.
# Patch14 is an upstream patch which adds two files required to build translations
# which are missing in the upstream sane-backends-1.0.21 source tar ball.
# URL for Patch14: https://alioth.debian.org/frs/download.php/3261/sane-backends-1.0.21-i18n.patch
Patch14: sane-backends-1.0.21-i18n.patch
# Patch15 fix-genesys-create_range-type.patch lets in genesys.c the create_range function
# be of type 'SANE_Range *' to fix 'assignment makes pointer from integer' bugs
# wherever the create_range function is called
# see https://alioth.debian.org/tracker/index.php?func=detail&aid=312492&group_id=30186&atid=410366
Patch15: fix-genesys-create_range-type.patch
Patch13: fix-hp3900_sane-string-option-sizes.diff
# Patch100... is SUSE specific stuff:
# Patch100 lets the "canon" backend do scanner auto-recognition:
Patch100: canon-backend-autoprobing.patch
@ -143,8 +123,8 @@ Patch103: install-umax_pp-tool.patch
# Patch104 removes descriptions-external/hpoj.desc from doc/Makefile.am
# because it is intentionally removed from the sources in the prep section:
Patch104: no-descriptions-external-hpoj.patch
# Patch105 sane-backends-1.0.20-xerox_mfp.diff backports post 1.0.20 xerox_mfp changes
# and is therefore removed since sane-backends-1.0.21 which contains those changes.
# backport post 1.0.20 xerox_mfp changes. remove with next sane version
Patch105: sane-backends-1.0.20-xerox_mfp.diff
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# The postinstall script requires this:
@ -323,19 +303,20 @@ Authors:
%prep
%setup -q
# Apply upstream patches first of all:
# Patch14 is an upstream patch for sane-backends-1.0.21
# which adds two files required to build translations:
%patch14 -p1
# Then apply non-upstream patches:
# Patch2 fixes too small arrays in backend/niash.c:
%patch2
# Patch8 re-adds SANE_CAP_ALWAYS_SETTABLE to sane.h which was erroneously removed:
%patch8
# Patch9 fixes a possible for loop overflow in hp3900_config.c:
%patch9
# Patch10 fixes undefined 'foo = ++foo modulo bar' operations in mustek_pp_ccd300.c:
%patch10
# Patch15 lets in genesys.c the create_range function be of type 'SANE_Range *':
%patch15
# Patch11 adds missing call to closedir to sane-desc.c:
%patch11
# Patch12 adds a missing call to free in backend/lexmark_low.c:
%patch12
# Patch13 fixes option sizes in backend/hp3900_sane.c
%patch13 -p1
# Patch100... is SUSE specific stuff:
# Patch100 lets the "canon" backend do scanner auto-recognition:
%patch100
@ -346,6 +327,7 @@ Authors:
# Patch104 removes descriptions-external/hpoj.desc from doc/Makefile.am
# because it is intentionally removed from the sources in the prep section:
%patch104
%patch105 -p1
# Source100... is SUSE specific stuff:
# Remove hpoj.desc completely to avoid confusion with its successor hpaio.desc
# because since openSUSE 10.3 the package hp-officeJet (for hpoj.desc) is dropped.

15
sane-desc_closedir.patch Normal file
View File

@ -0,0 +1,15 @@
--- tools/sane-desc.c.orig 2009-04-15 03:47:56.000000000 +0200
+++ tools/sane-desc.c 2009-08-13 13:12:13.000000000 +0200
@@ -1523,6 +1523,12 @@ read_files (void)
fclose (fp);
} /* if (strlen) */
} /* while (direntry) */
+ if (closedir(dir) != 0)
+ {
+ DBG_ERR ("cannot close directory `%s' (%s)\n", search_dir,
+ strerror (errno));
+ return SANE_FALSE;
+ }
if (end)
search_dir = end + 1;
else