sane: update to 1.0.25

Add option for snmp (off).
Removed cups bdep since cups requirement has been dropped upstream.
This commit is contained in:
Alessio Sergi 2015-11-17 11:11:17 +01:00
parent 00e789d15f
commit f85368242c
8 changed files with 140 additions and 143 deletions

View File

@ -58,6 +58,7 @@ desc_option_sdl="Enable support for SDL (1.x)"
desc_option_sdl2="Enable support for SDL (2.x)"
desc_option_smb="Enable support for SMB protocol"
desc_option_sndio="Enable support for the sndio sound server"
desc_option_snmp="Enable support for SNMP"
desc_option_ssh="Enable support for SSH"
desc_option_ssl="Enable support for SSL"
desc_option_startup_notification="Enable support for desktop notification"

View File

@ -1 +0,0 @@
sane

View File

@ -0,0 +1,24 @@
--- include/sane/sanei_backend.h
+++ include/sane/sanei_backend.h
@@ -68,9 +68,11 @@
/* Just enough backwards compatibility that we get by in the backends
without making handstands. */
+#if 0
# ifdef sigset_t
# undef sigset_t
# endif
+#endif
# ifdef sigemptyset
# undef sigemptyset
# endif
@@ -96,7 +98,9 @@
# undef SIG_SETMASK
# endif
+#if 0
# define sigset_t int
+#endif
# define sigemptyset(set) do { *(set) = 0; } while (0)
# define sigfillset(set) do { *(set) = ~0; } while (0)
# define sigaddset(set,signal) do { *(set) |= sigmask (signal); } while (0)

View File

@ -0,0 +1,73 @@
--- include/sane/sanei_udp.h
+++ include/sane/sanei_udp.h
@@ -27,6 +27,9 @@
#include <netinet/in.h>
#include <netdb.h>
#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
extern SANE_Status sanei_udp_open(const char *host, int port, int *fdp);
extern SANE_Status sanei_udp_open_broadcast(int *fdp);
--- backend/kvs20xx_cmd.h
+++ backend/kvs20xx_cmd.h
@@ -9,6 +9,10 @@
Panasonic KV-S20xx USB-SCSI scanners.
*/
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
#define COMMAND_BLOCK 1
#define DATA_BLOCK 2
#define RESPONSE_BLOCK 3
--- backend/kvs40xx.h
+++ backend/kvs40xx.h
@@ -10,6 +10,9 @@
#include "../include/sane/config.h"
#include <semaphore.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#undef BACKEND_NAME
#define BACKEND_NAME kvs40xx
--- backend/hp5400.c
+++ backend/hp5400.c
@@ -67,6 +67,9 @@
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memcpy */
#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#define HP5400_CONFIG_FILE "hp5400.conf"
--- backend/hp5590.c
+++ backend/hp5590.c
@@ -48,6 +48,9 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#include "../include/sane/sane.h"
#define BACKEND_NAME hp5590
--- backend/epsonds-io.c
+++ backend/epsonds-io.c
@@ -16,6 +16,9 @@
#include "sane/config.h"
#include <ctype.h>
#include <unistd.h> /* sleep */
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#include "epsonds.h"
#include "epsonds-io.h"

View File

@ -1,10 +0,0 @@
--- backend/kvs40xx.h.orig 2015-05-08 20:15:52.134639959 +0200
+++ backend/kvs40xx.h 2015-05-08 20:16:00.189632027 +0200
@@ -1,6 +1,7 @@
#ifndef __KVS40XX_H
#define __KVS40XX_H
+#include <pthread.h>
/*
Copyright (C) 2009, Panasonic Russia Ltd.
*/

View File

@ -0,0 +1,12 @@
--- tools/Makefile.in
+++ tools/Makefile.in
@@ -531,7 +531,7 @@ gamma4scanimage$(EXEEXT): $(gamma4scanimage_OBJECTS) $(gamma4scanimage_DEPENDENC
sane-desc$(EXEEXT): $(sane_desc_OBJECTS) $(sane_desc_DEPENDENCIES) $(EXTRA_sane_desc_DEPENDENCIES)
@rm -f sane-desc$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sane_desc_OBJECTS) $(sane_desc_LDADD) $(LIBS)
+ cc -I. sane-desc.c -I../include ../sanei/sanei_config.c ../sanei/sanei_init_debug.c ../sanei/sanei_constrain_value.c ../lib/isfdtype.c -o $@
sane-find-scanner$(EXEEXT): $(sane_find_scanner_OBJECTS) $(sane_find_scanner_DEPENDENCIES) $(EXTRA_sane_find_scanner_DEPENDENCIES)
@rm -f sane-find-scanner$(EXEEXT)

View File

@ -1,98 +0,0 @@
From 37523b867d411c2f82d08128246be7e38bc9812c Mon Sep 17 00:00:00 2001
From: Paul Newall <quandry@ntlworld.com>
Date: Mon, 14 Oct 2013 22:22:53 +0100
Subject: [PATCH] Bugfix in kodakaio.c to fix segfault when non kodak scanners
return unexpected data via avahi auto discovery
---
backend/kodakaio.c | 43 ++++++++++++++++++++++++++++++----------
doc/descriptions/kodakaio.desc | 2 +-
3 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/backend/kodakaio.c b/backend/kodakaio.c
index 8c4583a..b442e50 100644
--- backend/kodakaio.c
+++ backend/kodakaio.c
@@ -127,7 +127,7 @@ for ubuntu 12.10
#define KODAKAIO_VERSION 02
#define KODAKAIO_REVISION 4
-#define KODAKAIO_BUILD 6
+#define KODAKAIO_BUILD 7
/* for usb (but also used for net though it's not required). */
#define MAX_BLOCK_SIZE 32768
@@ -2184,6 +2184,7 @@ static void resolve_callback(
AvahiLookupResultFlags flags,
AVAHI_GCC_UNUSED void* userdata) {
+ AvahiStringList *vid_pair_list = NULL, *pid_pair_list = NULL;
char *pidkey, *pidvalue;
char *vidkey, *vidvalue;
size_t valuesize;
@@ -2204,20 +2205,40 @@ static void resolve_callback(
avahi_address_snprint(a, sizeof(a), address);
/* Output short for Kodak ESP */
- DBG(min(10,DBG_AUTO), "%s:%u %s ", a,port,host_name);
- avahi_string_list_get_pair(avahi_string_list_find(txt, "vid"),
- &vidkey, &vidvalue, &valuesize);
- DBG(min(10,DBG_AUTO), "%s=%s ", vidkey, vidvalue);
- avahi_string_list_get_pair(avahi_string_list_find(txt, "pid"),
- &pidkey, &pidvalue, &valuesize);
- DBG(min(10,DBG_AUTO), "%s=%s\n", pidkey, pidvalue);
+ DBG(min(10,DBG_AUTO), "%s:%u %s\n", a,port,host_name);
+ vid_pair_list = avahi_string_list_find(txt, "vid");
+ if(vid_pair_list != NULL) {
+ avahi_string_list_get_pair(vid_pair_list, &vidkey, &vidvalue, &valuesize);
+ DBG(min(10,DBG_AUTO), "%s=%s ", vidkey, vidvalue);
+ }
+ else DBG(min(10,DBG_AUTO), "failed to find key vid\n");
+
+ pid_pair_list = avahi_string_list_find(txt, "pid");
+ if(pid_pair_list != NULL) {
+ avahi_string_list_get_pair(pid_pair_list, &pidkey, &pidvalue, &valuesize);
+ DBG(min(10,DBG_AUTO), "%s=%s\n", pidkey, pidvalue);
+ }
+ else DBG(min(10,DBG_AUTO), "failed to find key pid\n");
+
+ if(pid_pair_list != NULL && vid_pair_list != NULL) {
ProcessAvahiDevice(name, vidvalue, pidvalue, a);
- avahi_free(vidkey); avahi_free(vidvalue);
- avahi_free(pidkey); avahi_free(pidvalue);
+ }
+ else DBG(min(10,DBG_AUTO), "didn't call ProcessAvahiDevice\n");
+
+ if(vid_pair_list != NULL) {
+ avahi_free(vidkey);
+ avahi_free(vidvalue);
+ DBG(min(15,DBG_AUTO), "vidkey and vidvalue freed\n");
+ }
+ if(pid_pair_list != NULL) {
+ avahi_free(pidkey);
+ avahi_free(pidvalue);
+ DBG(min(15,DBG_AUTO), "pidkey and pidvalue freed\n");
+ }
}
}
-
+ DBG(min(10,DBG_AUTO), "ending resolve_callback\n");
avahi_service_resolver_free(r);
}
diff --git a/doc/descriptions/kodakaio.desc b/doc/descriptions/kodakaio.desc
index 7882513..5fb18ed 100644
--- doc/descriptions/kodakaio.desc
+++ doc/descriptions/kodakaio.desc
@@ -1,6 +1,6 @@
:backend "kodakaio"
:url "http://sourceforge.net/projects/cupsdriverkodak/"
-:version "2.4.6"
+:version "2.4.7"
:manpage "sane-kodakaio"
:comment "Backend for Kodak AiO ESP and Hero printers. Also possibly Advent AWL10"
:devicetype :scanner
--
1.7.10.4

View File

@ -1,16 +1,19 @@
# Template build file for 'sane'.
# Template file for 'sane'
pkgname=sane
version=1.0.24
revision=14
version=1.0.25
revision=1
wrksrc="sane-backends-${version}"
build_pie=yes
build_style=gnu-configure
build_options="snmp"
configure_args="--disable-locking --enable-avahi --disable-latex --enable-ipv6
--with-docdir=/usr/share/doc/sane --enable-libusb_1_0 --enable-pthread
--sbindir=/usr/bin"
$(vopt_with snmp)"
hostmakedepends="pkg-config"
makedepends="avahi-libs-devel libjpeg-turbo-devel tiff-devel libgphoto2-devel
v4l-utils-devel libusb-devel net-snmp-devel libressl-devel cups-devel"
depends="net-snmp sane-udev-rules"
v4l-utils-devel libusb-devel libressl-devel $(vopt_if snmp net-snmp-devel)"
depends="$(vopt_if snmp net-snmp)"
replaces="sane-udev-rules>=0"
conf_files="
/etc/sane.d/abaton.conf
/etc/sane.d/agfafocus.conf
@ -26,15 +29,16 @@ conf_files="
/etc/sane.d/coolscan.conf
/etc/sane.d/coolscan2.conf
/etc/sane.d/coolscan3.conf
/etc/sane.d/dc25.conf
/etc/sane.d/dc210.conf
/etc/sane.d/dc240.conf
/etc/sane.d/dc25.conf
/etc/sane.d/dell1600n_net.conf
/etc/sane.d/dll.conf
/etc/sane.d/dmc.conf
/etc/sane.d/epjitsu.conf
/etc/sane.d/epson.conf
/etc/sane.d/epson2.conf
/etc/sane.d/epsonds.conf
/etc/sane.d/fujitsu.conf
/etc/sane.d/genesys.conf
/etc/sane.d/gphoto2.conf
@ -60,6 +64,7 @@ conf_files="
/etc/sane.d/net.conf
/etc/sane.d/p5.conf
/etc/sane.d/pie.conf
/etc/sane.d/pieusb.conf
/etc/sane.d/pixma.conf
/etc/sane.d/plustek.conf
/etc/sane.d/plustek_pp.conf
@ -90,13 +95,16 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.sane-project.org/"
license="GPL-2"
distfiles="http://ftp.lfs-matrix.net/pub/blfs/conglomeration/sane-backends/sane-backends-${version}.tar.gz"
checksum=27c7085a54f1505d8b551e6f1e69d30e1ee57328b18429bb2225dabf4c45462d
checksum=a4d7ba8d62b2dea702ce76be85699940992daf3f44823ddc128812da33dc6e2c
case "$XBPS_TARGET_MACHINE" in
# musl provides ioperm but not inb/outb for any arch expect
# i386/x32/x86_64 (using bits/io.h included in sys/io.h).
# Then, qcam backend is disabled for arm arch.
armv[67]l-musl) ;;
*) conf_files+=" /etc/sane.d/qcam.conf";;
esac
pre_configure() {
for f in $(find $wrksrc -type f -name *.[ch]); do
sed -e 's,u_char ,unsigned char ,g' -e 's,u_long,unsigned long ,g' -i $f
done
}
post_install() {
# fix hp officejets
echo "#hpaio" >> ${DESTDIR}/etc/sane.d/dll.conf
@ -104,34 +112,22 @@ post_install() {
vinstall ${FILESDIR}/saned.xinetd 644 etc/xinetd.d saned.conf
vinstall ${wrksrc}/tools/sane-backends.pc 644 usr/lib/pkgconfig
if [ -z "$CROSS_BUILD" ]; then
# install udev files
vinstall tools/udev/libsane.rules 644 usr/lib/udev/rules.d 49-sane.rules
# fix udev rules
sed -i 's|NAME="%k", ||g' ${DESTDIR}/usr/lib/udev/rules.d/49-sane.rules
fi
# generate udev file
cd tools
mkdir -p udev
make udev/libsane.rules
# install udev file
vinstall udev/libsane.rules 644 usr/lib/udev/rules.d 49-sane.rules
# fix udev rules
sed -i 's|NAME="%k", ||g' ${DESTDIR}/usr/lib/udev/rules.d/49-sane.rules
}
libsane_package() {
short_desc+=" - runtime shared library"
pkg_install() {
vmove "usr/lib/libsane.so.*"
vmove usr/lib/libsane.so.*
}
}
if [ -z "$CROSS_BUILD" ]; then
sane-udev-rules_package() {
short_desc+=" - udev rules"
noarch=yes
replaces="sane<1.0.24_5"
pkg_install() {
vmove usr/lib/udev/rules.d
}
}
fi
sane-devel_package() {
depends="libsane>=${version}_${revision}"
short_desc+=" - development files"