summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/sane-backends/files')
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.31-autoconf-2.70.patch93
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.31-backend_pot_input.patch33
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.31-udev_rules_update.patch55
3 files changed, 181 insertions, 0 deletions
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.31-autoconf-2.70.patch b/media-gfx/sane-backends/files/sane-backends-1.0.31-autoconf-2.70.patch
new file mode 100644
index 000000000000..f1fe4765bdd5
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.31-autoconf-2.70.patch
@@ -0,0 +1,93 @@
+From 445b5bd7e19245c08de6a0e669dd9211d2597bfa Mon Sep 17 00:00:00 2001
+From: Olaf Meeuwissen <paddy-hack@member.fsf.org>
+Date: Fri, 1 Jan 2021 15:53:11 +0900
+Subject: [PATCH] Drop use of obsoleted autoconf AC_HEADER_STDC macro. Fixes
+ #409
+
+Use of the STDC_HEADER pre-processor macro that the autoconf macro
+used to define has been removed. Conditionalized code is now used
+unconditionally. This should be fine as the macro checks for ANSI
+C, i.e. C89 (ISO C90), compliant headers. We already require C99.
+---
+ acinclude.m4 | 3 ---
+ lib/md5.c | 10 ++--------
+ sanei/sanei_pa4s2.c | 8 +++-----
+ sanei/sanei_pp.c | 8 +++-----
+ 4 files changed, 8 insertions(+), 21 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index e10f8ceb2..9393278c2 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -73,9 +73,6 @@ AC_DEFUN([SANE_CHECK_MISSING_HEADERS],
+ if test "${ac_cv_header_unistd_h}" != "yes" ; then
+ MISSING_HEADERS="${MISSING_HEADERS}\"unistd.h\" "
+ fi
+- if test "${ac_cv_header_stdc}" != "yes" ; then
+- MISSING_HEADERS="${MISSING_HEADERS}\"ANSI C headers\" "
+- fi
+ if test "${MISSING_HEADERS}" != "" ; then
+ echo "*** The following essential header files couldn't be found:"
+ echo "*** ${MISSING_HEADERS}"
+diff --git a/lib/md5.c b/lib/md5.c
+index 923a17c78..009c6d9a0 100644
+--- a/lib/md5.c
++++ b/lib/md5.c
+@@ -26,14 +26,8 @@
+
+ #include <sys/types.h>
+
+-#if STDC_HEADERS || defined _LIBC
+-# include <stdlib.h>
+-# include <string.h>
+-#else
+-# ifndef HAVE_MEMCPY
+-# define memcpy(d, s, n) bcopy ((s), (d), (n))
+-# endif
+-#endif
++#include <stdlib.h>
++#include <string.h>
+
+ #include "md5.h"
+
+diff --git a/sanei/sanei_pa4s2.c b/sanei/sanei_pa4s2.c
+index b1d95fe02..5365151fd 100644
+--- a/sanei/sanei_pa4s2.c
++++ b/sanei/sanei_pa4s2.c
+@@ -150,11 +150,9 @@ static int sanei_pa4s2_dbg_init_called = SANE_FALSE;
+
+ #endif /* NDEBUG */
+
+-#if defined(STDC_HEADERS)
+-# include <errno.h>
+-# include <stdio.h>
+-# include <stdlib.h>
+-#endif
++#include <errno.h>
++#include <stdio.h>
++#include <stdlib.h>
+ #if defined(HAVE_STRING_H)
+ # include <string.h>
+ #elif defined(HAVE_STRINGS_H)
+diff --git a/sanei/sanei_pp.c b/sanei/sanei_pp.c
+index 3077342e4..752945a89 100644
+--- a/sanei/sanei_pp.c
++++ b/sanei/sanei_pp.c
+@@ -135,11 +135,9 @@ inb( u_long port )
+ #include "../include/sane/sanei_debug.h"
+ #include "../include/sane/sanei_pp.h"
+
+-#if defined(STDC_HEADERS)
+-# include <errno.h>
+-# include <stdio.h>
+-# include <stdlib.h>
+-#endif
++#include <errno.h>
++#include <stdio.h>
++#include <stdlib.h>
+ #if defined(HAVE_STRING_H)
+ # include <string.h>
+ #elif defined(HAVE_STRINGS_H)
+--
+GitLab
+
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.31-backend_pot_input.patch b/media-gfx/sane-backends/files/sane-backends-1.0.31-backend_pot_input.patch
new file mode 100644
index 000000000000..69585784c252
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.31-backend_pot_input.patch
@@ -0,0 +1,33 @@
+From 4846d36ad1e9ca709cb3a2eaa839c8c79effe34b Mon Sep 17 00:00:00 2001
+From: Olaf Meeuwissen <paddy-hack@member.fsf.org>
+Date: Sun, 13 Sep 2020 17:56:40 +0900
+Subject: [PATCH] po: Make sure all sane-backends.pot input are available
+
+---
+ po/Makevars | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/po/Makevars b/po/Makevars
+index ebff23f90..86f423ef3 100644
+--- a/po/Makevars
++++ b/po/Makevars
+@@ -1,5 +1,6 @@
+ # Makevars -- snippet for inclusion in po/ -*- Makefile -*-
+-# Copyright (C) 2016, 2019 Olaf Meeuwissen and the SANE developers
++# Copyright (C) 2016, 2019, 2020 Olaf Meeuwissen
++# and the SANE developers
+ #
+ # This file is part of the SANE build infra-structure. See the
+ # included LICENSE file for license information.
+@@ -47,3 +48,8 @@ width_options = --width=75
+ # Locale categories, in addition to LC_MESSAGES, for which message
+ # catalogs are to be used.
+ EXTRA_LOCALE_CATEGORIES =
++
++# Selected files in POTFILES.in are generated. Make sure they are
++# available when needed.
++$(top_srcdir)/backend/pixma/pixma_sane_options.c:
++ cd ../backend; make pixma/pixma_sane_options.c
+--
+GitLab
+
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.31-udev_rules_update.patch b/media-gfx/sane-backends/files/sane-backends-1.0.31-udev_rules_update.patch
new file mode 100644
index 000000000000..17ccb60755e0
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.31-udev_rules_update.patch
@@ -0,0 +1,55 @@
+https://gitlab.com/sane-project/backends/-/merge_requests/541
+
+--- sane-backends-1.0.31/testsuite/tools/data/udev+acl.ref
++++ sane-backends-1.0.31/testsuite/tools/data/udev+acl.ref
+@@ -23,7 +23,7 @@
+ # If the scanner is supported by sane-backends, please mail the entry to
+ # the sane-devel mailing list (sane-devel@alioth-lists.debian.net).
+ #
+-ACTION!="add", GOTO="libsane_rules_end"
++ACTION=="remove", GOTO="libsane_rules_end"
+ ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
+ SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
+ SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin"
+--- sane-backends-1.0.31/testsuite/tools/data/udev+hwdb.ref
++++ sane-backends-1.0.31/testsuite/tools/data/udev+hwdb.ref
+@@ -20,7 +20,7 @@
+ # If the scanner is supported by sane-backends, please mail the entry to
+ # the sane-devel mailing list (sane-devel@alioth-lists.debian.net).
+ #
+-ACTION!="add", GOTO="libsane_rules_end"
++ACTION=="remove", GOTO="libsane_rules_end"
+
+ # The following rule will disable USB autosuspend for the device
+ ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"
+--- sane-backends-1.0.31/testsuite/tools/data/udev.ref
++++ sane-backends-1.0.31/testsuite/tools/data/udev.ref
+@@ -23,7 +23,7 @@
+ # If the scanner is supported by sane-backends, please mail the entry to
+ # the sane-devel mailing list (sane-devel@alioth-lists.debian.net).
+ #
+-ACTION!="add", GOTO="libsane_rules_end"
++ACTION=="remove", GOTO="libsane_rules_end"
+ ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
+ SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
+ SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin"
+--- sane-backends-1.0.31/tools/sane-desc.c
++++ sane-backends-1.0.31/tools/sane-desc.c
+@@ -3496,7 +3496,7 @@
+ int i;
+
+ print_udev_header ();
+- printf("ACTION!=\"add\", GOTO=\"libsane_rules_end\"\n"
++ printf("ACTION==\"remove\", GOTO=\"libsane_rules_end\"\n"
+ "ENV{DEVTYPE}==\"usb_device\", GOTO=\"libsane_create_usb_dev\"\n"
+ "SUBSYSTEMS==\"scsi\", GOTO=\"libsane_scsi_rules_begin\"\n"
+ "SUBSYSTEM==\"usb_device\", GOTO=\"libsane_usb_rules_begin\"\n"
+@@ -3679,7 +3679,7 @@
+ int i;
+
+ print_udevhwdb_header ();
+- printf("ACTION!=\"add\", GOTO=\"libsane_rules_end\"\n\n");
++ printf("ACTION==\"remove\", GOTO=\"libsane_rules_end\"\n\n");
+
+ printf("# The following rule will disable USB autosuspend for the device\n");
+ printf("ENV{DEVTYPE}==\"usb_device\", ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n\n");