Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,5 +1,6 @@
# $NetBSD: Makefile,v 1.62 2015/08/16 20:24:23 leot Exp $
# $NetBSD: Makefile,v 1.67 2016/04/09 14:19:25 richard Exp $
PKGREVISION= 4
.include "Makefile.common"
COMMENT= API for access to scanners, digital cameras, frame grabbers, etc
@@ -40,13 +41,13 @@ EGDIR= ${PREFIX}/share/examples/sane
artec_eplus48u.conf avision.conf bh.conf canon.conf canon630u.conf \
canon_dr.conf cardscan.conf coolscan.conf coolscan2.conf coolscan3.conf \
dc210.conf dc240.conf dc25.conf dell1600n_net.conf dll.conf dmc.conf \
epson.conf epjitsu.conf epson2.conf fujitsu.conf \
epjitsu.conf epson.conf epson2.conf epsonds.conf fujitsu.conf \
genesys.conf gt68xx.conf hp.conf hp3900.conf \
hp4200.conf hp5400.conf hs2p.conf ibm.conf kodak.conf leo.conf lexmark.conf \
ma1509.conf matsushita.conf \
microtek.conf microtek2.conf mustek.conf mustek_usb.conf \
nec.conf net.conf \
p5.conf pie.conf pixma.conf plustek.conf plustek_pp.conf \
p5.conf pie.conf pieusb.conf pixma.conf plustek.conf plustek_pp.conf \
ricoh.conf rts8891.conf \
s9036.conf saned.conf sceptre.conf sharp.conf sm3840.conf snapscan.conf \
sp15c.conf st400.conf stv680.conf \
@@ -62,10 +63,8 @@ CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/sane.d/${f}
.endif
.include "options.mk"
.if (${OPSYS} != "SunOS")
.include "../../devel/libusb1/buildlink3.mk"
CONFIGURE_ARGS+= --enable-libusb_1_0
.endif
.if (${OPSYS} == "Linux")
.include "../../graphics/libv4l/buildlink3.mk"
.endif

View File

@@ -1,8 +1,8 @@
# $NetBSD: Makefile.common,v 1.31 2015/08/16 20:24:23 leot Exp $
# $NetBSD: Makefile.common,v 1.32 2015/10/25 10:39:13 wiz Exp $
# used by graphics/sane-frontends/Makefile
CATEGORIES?= graphics
MASTER_SITES?= ${MASTER_SITE_LOCAL}
MASTER_SITES?= https://alioth.debian.org/frs/download.php/file/4146/
# http://alioth.debian.org/frs/?group_id=30186
MAINTAINER?= pkgsrc-users@NetBSD.org
@@ -11,7 +11,7 @@ LICENSE= gnu-gpl-v2
SANE_MAJOR?= 1
SANE_MINOR?= 0
SANE_MICRO?= 24
SANE_MICRO?= 25
SANE_VERSION= ${SANE_MAJOR}.${SANE_MINOR}.${SANE_MICRO}
PLIST_SUBST+= SANE_MAJOR=${SANE_MAJOR:Q}
PLIST_SUBST+= SANE_MINOR=${SANE_MINOR:Q}

View File

@@ -1,8 +1,9 @@
@comment $NetBSD: PLIST,v 1.30 2012/12/12 08:40:27 ryoon Exp $
@comment $NetBSD: PLIST,v 1.31 2015/10/25 10:39:13 wiz Exp $
bin/gamma4scanimage
bin/sane-config
bin/sane-find-scanner
bin/scanimage
bin/umax_pp
include/sane/sane.h
include/sane/saneopts.h
lib/libsane.la
@@ -31,6 +32,7 @@ lib/sane/libsane-dmc.la
lib/sane/libsane-epjitsu.la
lib/sane/libsane-epson.la
lib/sane/libsane-epson2.la
lib/sane/libsane-epsonds.la
lib/sane/libsane-fujitsu.la
lib/sane/libsane-genesys.la
lib/sane/libsane-gt68xx.la
@@ -62,6 +64,7 @@ lib/sane/libsane-net.la
lib/sane/libsane-niash.la
lib/sane/libsane-p5.la
lib/sane/libsane-pie.la
lib/sane/libsane-pieusb.la
${PLIST.pint}lib/sane/libsane-pint.la
lib/sane/libsane-pixma.la
lib/sane/libsane-plustek.la
@@ -114,6 +117,7 @@ man/man5/sane-dmc.5
man/man5/sane-epjitsu.5
man/man5/sane-epson.5
man/man5/sane-epson2.5
man/man5/sane-epsonds.5
man/man5/sane-fujitsu.5
man/man5/sane-genesys.5
man/man5/sane-gt68xx.5
@@ -145,6 +149,7 @@ man/man5/sane-net.5
man/man5/sane-niash.5
man/man5/sane-p5.5
man/man5/sane-pie.5
man/man5/sane-pieusb.5
${PLIST.pint}man/man5/sane-pint.5
man/man5/sane-pixma.5
man/man5/sane-plustek.5
@@ -281,6 +286,7 @@ share/examples/sane/dmc.conf
share/examples/sane/epjitsu.conf
share/examples/sane/epson.conf
share/examples/sane/epson2.conf
share/examples/sane/epsonds.conf
share/examples/sane/fujitsu.conf
share/examples/sane/genesys.conf
share/examples/sane/gt68xx.conf
@@ -305,6 +311,7 @@ share/examples/sane/nec.conf
share/examples/sane/net.conf
share/examples/sane/p5.conf
share/examples/sane/pie.conf
share/examples/sane/pieusb.conf
share/examples/sane/pixma.conf
share/examples/sane/plustek.conf
share/examples/sane/plustek_pp.conf
@@ -339,6 +346,7 @@ share/locale/es/LC_MESSAGES/sane-backends.mo
share/locale/fi/LC_MESSAGES/sane-backends.mo
share/locale/fr/LC_MESSAGES/sane-backends.mo
share/locale/gl/LC_MESSAGES/sane-backends.mo
share/locale/hu/LC_MESSAGES/sane-backends.mo
share/locale/it/LC_MESSAGES/sane-backends.mo
share/locale/ja/LC_MESSAGES/sane-backends.mo
share/locale/nb/LC_MESSAGES/sane-backends.mo

View File

@@ -1,7 +1,11 @@
@comment $NetBSD: PLIST.Linux,v 1.3 2012/01/02 22:26:40 sbd Exp $
@comment $NetBSD: PLIST.Linux,v 1.4 2016/01/29 20:51:20 leot Exp $
lib/sane/libsane-kvs40xx.la
lib/sane/libsane-mustek_usb2.la
lib/sane/libsane-qcam.la
lib/sane/libsane-v4l.la
share/examples/sane/qcam.conf
share/examples/sane/v4l.conf
man/man5/sane-kvs40xx.5
man/man5/sane-mustek_usb2.5
man/man5/sane-qcam.5
man/man5/sane-v4l.5
share/examples/sane/qcam.conf
share/examples/sane/v4l.conf

View File

@@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.18 2015/08/16 22:00:37 leot Exp $
# $NetBSD: buildlink3.mk,v 1.19 2016/04/09 14:19:25 richard Exp $
BUILDLINK_TREE+= sane-backends
@@ -11,9 +11,7 @@ BUILDLINK_PKGSRCDIR.sane-backends?= ../../graphics/sane-backends
.include "../../mk/bsd.fast.prefs.mk"
.if (${OPSYS} != "SunOS")
. include "../../devel/libusb1/buildlink3.mk"
.endif
.include "../../graphics/tiff/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.endif # SANE_BACKENDS_BUILDLINK3_MK

View File

@@ -1,18 +1,19 @@
$NetBSD: distinfo,v 1.36 2015/08/16 20:24:23 leot Exp $
$NetBSD: distinfo,v 1.44 2016/04/09 14:19:25 richard Exp $
SHA1 (sane-backends-1.0.24.tar.gz) = c10bcb30a1b092b2c2fe5a86d6a5efc29123ccf9
RMD160 (sane-backends-1.0.24.tar.gz) = 7a05c5b3d4fc4a88564cb862d4a1b46843026105
Size (sane-backends-1.0.24.tar.gz) = 5778749 bytes
SHA1 (patch-aa) = ff3439b060d6aa78f63d6acd09d87499a4d7f224
SHA1 (patch-ab) = 0462997912869fe3083e1b385a478a31bc3deec0
SHA1 (patch-ac) = 900911de5cde4a6cdc35cbc2d13371b13c596474
SHA1 (patch-ae) = bf9b53fd5c9b74915769afe9e17bed292a8a9ed9
SHA1 (patch-af) = db4ba80826d76363ad28c22eea325e19868fd1e4
SHA1 (patch-ag) = 8155659bce4e1ce569a8a4a74131f21670c0a834
SHA1 (sane-backends-1.0.25.tar.gz) = 05824922d91571e1fc2f5cdd270745783d593754
RMD160 (sane-backends-1.0.25.tar.gz) = 1cfd81eeddf3ef3c2cea98f6ca7640522b249fab
SHA512 (sane-backends-1.0.25.tar.gz) = b9548646fff13558a4da4a4e9e8bad730f05121bcc65b72d24ded3bfddc6fe574e08c39c8651544b8fbfeab036fffd76cc14d76ef5d5d47e7513a2ce3afcc9df
Size (sane-backends-1.0.25.tar.gz) = 5955016 bytes
SHA1 (patch-aa) = 91f5838b7c455dc160ba22d15659c1b19a222668
SHA1 (patch-ab) = f6ec74b90f5499d07117559c7079ba2efccccf17
SHA1 (patch-ac) = 49e0cc0b6e0dfb96e5ee3cfc3f554b7e40492757
SHA1 (patch-ae) = d374c33cad835d56fb9f2fbb2594a85e0a0d7158
SHA1 (patch-ah) = 6e747c3b541c9ebb57db6477ac6b6e48b1df0248
SHA1 (patch-ai) = 74f27b5a66e3dfd96337cb00a4ff3bc48804256b
SHA1 (patch-ai) = 14f5467eb865406cbec00b8d47b5c23c4c89f113
SHA1 (patch-aj) = c2e0733796872f1b074d0491dea4cffa1891bccc
SHA1 (patch-ak) = f00d3773c14f9955565debc0d16231906a2bba76
SHA1 (patch-backend_kodakaio.c) = d15cb7af0a5cc506fc42e3a71fa0998329e6eef9
SHA1 (patch-backend_magicolor.c) = e6cbb54a0ea0e688b0189b3d07d1dff34070a179
SHA1 (patch-backend_xerox__mfp-tcp.c) = 3818b623217f15ed7f30724d1d70b1614befb88f
SHA1 (patch-backend_kodakaio.c) = f96af8b2fb0369f51d2320285253c5e67218e629
SHA1 (patch-backend_pieusb__buffer.c) = 7e7c6dbb0798876532a04a0831be2ab2bd2931ca
SHA1 (patch-m4_byteorder.m4) = 23f4b0256fc9980d3472e77ab558b0e24a9495b4
SHA1 (patch-sanei_sanei__ir.c) = 66e913d7db9d03a42850778aca39da8f0dde02fa
SHA1 (patch-sanei_sanei_usb.c) = b053c94d240580d919c418081fca5c75cf4fb1a7

View File

@@ -1,4 +1,6 @@
$NetBSD: patch-aa,v 1.12 2009/08/15 17:53:11 wiz Exp $
$NetBSD: patch-aa,v 1.13 2015/10/27 11:29:35 wiz Exp $
Adapt installation to pkgsrc example config file location.
--- backend/Makefile.in.orig 2009-04-30 13:41:18.000000000 +0000
+++ backend/Makefile.in

View File

@@ -1,47 +1,64 @@
$NetBSD: patch-ab,v 1.13 2012/12/10 12:06:51 ryoon Exp $
$NetBSD: patch-ab,v 1.16 2016/04/09 14:19:25 richard Exp $
--- configure.orig 2012-08-19 20:45:11.000000000 +0000
add SunOS byteorder needs
--- configure.orig 2015-10-04 13:18:39.000000000 +0000
+++ configure
@@ -7236,13 +7236,13 @@ if test "x$ac_cv_header_pthread_h" = xye
#define HAVE_PTHREAD_H 1
_ACEOF
@@ -5979,6 +5979,36 @@ else
$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
+$as_echo_n "checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... " >&6; }
if ${ac_cv_lib_pthread_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSWAP_32 in sys/byteorder.h" >&5
+$as_echo_n "checking for BSWAP_32 in sys/byteorder.h... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/byteorder.h>
+#ifdef BSWAP_32
+ symbol is present
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "symbol is present|\<BSWAP_32\>" >/dev/null 2>&1; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ cat >> "include/byteorder.h" << EOF
+/* Define generic byte swapping functions */
+EOF
+cat >> "include/byteorder.h" << EOF
+#define swap16(x) BSWAP_16(x)
+#define swap32(x) BSWAP_32(x)
+#define swap64(x) BSWAP_64(x)
+
+EOF
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap32 in machine/endian.h" >&5
$as_echo_n "checking for bswap32 in machine/endian.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6139,6 +6169,11 @@ rm -f conftest*
@@ -7273,7 +7273,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
- PTHREAD_LIBS="-lpthread"
+ PTHREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
fi
have_pthread=yes
@@ -17741,14 +17741,14 @@ for be in ${BACKENDS}; do
;;
mustek_pp)
- if test "${sane_cv_use_libieee1284}" != "yes" && test "${enable_parport_directio}" != "yes"; then
+ if test "${sane_cv_use_libieee1284}" != "yes" || test "${enable_parport_directio}" != "yes"; then
echo "*** $be backend requires libieee1284 and paraport-directio libraries - $DISABLE_MSG"
backend_supported="no"
fi
;;
+fi
+rm -f conftest*
+
+
+
dell1600n_net)
- if test "${sane_cv_use_libjpeg}" != "yes" || test "${sane_cv_use_libtiff}" != "yes"; then
+ if test "${sane_cv_use_libjpeg}" != "yes" && test "${sane_cv_use_libtiff}" != "yes"; then
echo "*** $be backend requires JPEG and/or TIFF library - $DISABLE_MSG"
backend_supported="no"
fi
if test "$HAVE_LE32TOH" != "1"; then
cat >> "$ac_byteorder" << EOF
@@ -9148,6 +9183,8 @@ else
# ifdef _MSC_VER
# include <malloc.h>
# define alloca _alloca
+# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
+# include <stdlib.h>
# else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>

View File

@@ -1,4 +1,7 @@
$NetBSD: patch-ac,v 1.5 2010/09/19 15:06:18 wiz Exp $
$NetBSD: patch-ac,v 1.6 2015/10/27 11:29:35 wiz Exp $
DragonFly support.
https://alioth.debian.org/tracker/index.php?func=detail&aid=315205&group_id=30186&atid=410366
--- sanei/sanei_ab306.c.orig 2010-04-05 13:18:05.000000000 +0000
+++ sanei/sanei_ab306.c

View File

@@ -1,4 +1,7 @@
$NetBSD: patch-ae,v 1.5 2006/08/05 22:41:49 wiz Exp $
$NetBSD: patch-ae,v 1.6 2015/10/27 11:29:35 wiz Exp $
DragonFly support.
https://alioth.debian.org/tracker/index.php?func=detail&aid=315206&group_id=30186&atid=410366
--- tools/sane-find-scanner.c.orig 2006-03-11 12:45:29.000000000 +0000
+++ tools/sane-find-scanner.c

View File

@@ -1,19 +0,0 @@
$NetBSD: patch-af,v 1.5 2011/01/30 18:04:23 rumko Exp $
Fix build on DragonFly, PR pkg/44193.
Upstream bug report:
https://alioth.debian.org/tracker/index.php?func=detail&aid=312965
--- backend/epson2.h.orig 2010-04-05 13:18:04.000000000 +0000
+++ backend/epson2.h
@@ -36,6 +36,10 @@
#include <sys/types.h>
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
#include <string.h> /* for memset and memcpy */
#include <stdio.h>

View File

@@ -1,12 +0,0 @@
$NetBSD: patch-ag,v 1.1 2009/09/04 23:09:06 wiz Exp $
--- include/sane/sane.h.orig 2009-04-23 19:59:23.000000000 +0000
+++ include/sane/sane.h
@@ -115,6 +115,7 @@ SANE_Device;
#define SANE_CAP_AUTOMATIC (1 << 4)
#define SANE_CAP_INACTIVE (1 << 5)
#define SANE_CAP_ADVANCED (1 << 6)
+#define SANE_CAP_ALWAYS_SETTABLE (1 << 7)
#define SANE_OPTION_IS_ACTIVE(cap) (((cap) & SANE_CAP_INACTIVE) == 0)
#define SANE_OPTION_IS_SETTABLE(cap) (((cap) & SANE_CAP_SOFT_SELECT) != 0)

View File

@@ -1,19 +1,19 @@
$NetBSD: patch-ai,v 1.2 2011/07/12 12:19:41 wiz Exp $
$NetBSD: patch-ai,v 1.3 2015/10/25 10:39:13 wiz Exp $
Avoid duplicate symbols in libepson and libepson2.
--- backend/epson_usb.c.orig 2011-01-16 01:01:28.000000000 +0000
--- backend/epson_usb.c.orig 2015-09-20 11:55:39.000000000 +0000
+++ backend/epson_usb.c
@@ -4,7 +4,7 @@
/* generated with epson2usb.pl doc/descriptions/epson2.desc */
/* generated with epson2usb.pl doc/descriptions/epson.desc */
-SANE_Word sanei_epson_usb_product_ids[] = {
+static SANE_Word sanei_epson_usb_product_ids[] = {
0x101, /* GT-7000U, Perfection 636U */
0x103, /* GT-6600U, Perfection 610 */
0x104, /* GT-7600U, GT-7600UF, Perfection 1200U, Perfection 1200U PHOTO */
@@ -85,7 +85,7 @@ SANE_Word sanei_epson_usb_product_ids[]
0x101, /* Perfection 636U */
0x103, /* Perfection 610 */
0x104, /* Perfection 1200U, Perfection 1200Photo */
@@ -45,7 +45,7 @@ SANE_Word sanei_epson_usb_product_ids[]
in the config file as "usb <vendor> <product>" */
};

View File

@@ -1,4 +1,7 @@
$NetBSD: patch-backend_kodakaio.c,v 1.2 2015/08/16 20:24:23 leot Exp $
$NetBSD: patch-backend_kodakaio.c,v 1.3 2015/10/27 11:29:35 wiz Exp $
DragonFly build fix.
https://alioth.debian.org/tracker/index.php?func=detail&aid=315207&group_id=30186&atid=410366
--- backend/kodakaio.c.orig 2013-08-25 21:22:58.000000000 +0000
+++ backend/kodakaio.c

View File

@@ -1,18 +0,0 @@
$NetBSD: patch-backend_magicolor.c,v 1.2 2012/12/10 12:06:51 ryoon Exp $
Fix for pkg/45196. Add sys/socket.h header.
--- backend/magicolor.c.orig 2011-11-21 20:17:48.000000000 +0000
+++ backend/magicolor.c
@@ -50,6 +50,11 @@
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
#include <math.h>
#include <poll.h>
#include <sys/types.h>

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-backend_pieusb__buffer.c,v 1.3 2015/11/11 12:40:03 wiz Exp $
Remove unportable header inclusion.
XXX: should be fixed better, hope upstream does that.
https://alioth.debian.org/tracker/index.php?func=detail&aid=315209&group_id=30186&atid=410366
--- backend/pieusb_buffer.c.orig 2015-09-01 00:31:33.000000000 +0000
+++ backend/pieusb_buffer.c
@@ -100,15 +100,8 @@
#include <stdio.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <endian.h>
-/* When creating the release backend, make complains about unresolved external
- * le16toh, although it finds the include <endian.h> */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- #define le16toh(x) (x)
-#else
- #define le16toh(x) __bswap_16 (x)
-#endif
+#include "byteorder.h"
static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment);

View File

@@ -1,17 +0,0 @@
$NetBSD: patch-backend_xerox__mfp-tcp.c,v 1.2 2012/12/10 12:06:51 ryoon Exp $
Fix for pkg/45196. Add sys/socket.h header.
--- backend/xerox_mfp-tcp.c.orig 2011-11-21 20:17:48.000000000 +0000
+++ backend/xerox_mfp-tcp.c
@@ -32,6 +32,10 @@
#include <sys/socket.h>
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
#include "sane/saneopts.h"
#include "sane/sanei_scsi.h"
#include "sane/sanei_usb.h"

View File

@@ -0,0 +1,35 @@
$NetBSD: patch-m4_byteorder.m4,v 1.1 2016/04/09 14:19:25 richard Exp $
add SunOS byteorder needs
--- m4/byteorder.m4.orig 2013-02-23 02:00:56.000000000 +0000
+++ m4/byteorder.m4
@@ -110,6 +110,20 @@ dnl Linux GLIBC
EOF],
[
+dnl SunOS
+ AC_HAVE_SYMBOL(BSWAP_32,sys/byteorder.h,
+dnl sys/byteorder.h should already be implicitly included
+ [cat >> "$1" << EOF
+/* Define generic byte swapping functions */
+EOF
+cat >> "$1" << EOF
+#define swap16(x) BSWAP_16(x)
+#define swap32(x) BSWAP_32(x)
+#define swap64(x) BSWAP_64(x)
+
+EOF],
+
+ [
dnl NetBSD
AC_HAVE_SYMBOL(bswap32,machine/endian.h,
dnl We're already including machine/endian.h if this test succeeds
@@ -194,6 +208,7 @@ EOF
EOF
fi
])
+])
])
])
])

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-sanei_sanei__ir.c,v 1.3 2015/11/02 18:42:50 leot Exp $
Remove unportable header inclusion.
https://alioth.debian.org/tracker/index.php?func=detail&aid=315208&group_id=30186&atid=410366
--- sanei/sanei_ir.c.orig 2015-09-29 01:10:43.000000000 +0000
+++ sanei/sanei_ir.c
@@ -29,7 +29,8 @@
#include <stdlib.h>
#include <string.h>
-#include <values.h>
+#include <limits.h>
+#include <float.h>
#include <math.h>
#define BACKEND_NAME sanei_ir /* name of this module for debugging */

View File

@@ -0,0 +1,35 @@
$NetBSD: patch-sanei_sanei_usb.c,v 1.1 2016/03/15 09:14:03 martin Exp $
Avoid storing an int (the number of bytes transfered) in the wrong
half of a ssize_t on big endian 64bit platforms.
Reported upstream as:
https://alioth.debian.org/tracker/index.php?func=detail&aid=315337
--- sanei/sanei_usb.c.orig 2014-12-16 14:37:26.000000000 +0100
+++ sanei/sanei_usb.c 2016-03-15 09:12:34.335049822 +0100
@@ -2310,10 +2310,10 @@ sanei_usb_read_bulk (SANE_Int dn, SANE_B
{
if (devices[dn].bulk_in_ep)
{
- int ret;
+ int ret, rsize;
ret = libusb_bulk_transfer (devices[dn].lu_handle,
devices[dn].bulk_in_ep, buffer,
- (int) *size, (int *) &read_size,
+ (int) *size, &rsize,
libusb_timeout);
if (ret < 0)
@@ -2323,6 +2323,10 @@ sanei_usb_read_bulk (SANE_Int dn, SANE_B
read_size = -1;
}
+ else
+ {
+ read_size = rsize;
+ }
}
else
{