diff --git a/srcpkgs/xsane/patches/0001-upstream-configure-fixes.patch b/srcpkgs/xsane/patches/0001-upstream-configure-fixes.patch new file mode 100644 index 00000000000..6876c66ead8 --- /dev/null +++ b/srcpkgs/xsane/patches/0001-upstream-configure-fixes.patch @@ -0,0 +1,1225 @@ +upstream: yes + +git show 11a585fd3b 3cbe146fea 562008027f 3680e9a4f0defa 73748aa79465d -- ':!configure' + + +commit 11a585fd3b8e5b2749cbe67bee4d53baa12035ab +Author: Ralph Little +Date: Thu Aug 29 21:19:17 2019 -0700 + + Apply debian upstream patch 0005-m4 + + Original patch commentary: + + Description: add missing m4 tags + Author: Jörg Frings-Fürst + Last-Update: 2016-10-03 + ---- + Adds some initialisations for gettext related items and auto includes + m4 files. + I'm not convinced that the initialization stuff is the right way to + go, but I will include this patch for the moment. + Something to revisit. + +diff --git a/configure.in b/configure.in +index edc0f4a..7ad347b 100644 +--- a/configure.in ++++ b/configure.in +@@ -1,6 +1,7 @@ + dnl Process this file with autoconf to produce a configure script. -*-sh-*- + AC_INIT(include/config.h.in) + AC_CONFIG_HEADER(include/config.h) ++AC_CONFIG_MACRO_DIRS([m4]) + # AC_PREREQ(2.10)dnl dnl Minimum Autoconf version required. + # AC_ARG_PROGRAM + +@@ -21,12 +22,15 @@ XSANE_PACKAGE_VERSION="$PACKAGE-$VERSION" + AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of the distribution]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define to the version of the distribution]) + AC_DEFINE_UNQUOTED(XSANE_PACKAGE_VERSION, "$XSANE_PACKAGE_VERSION", [Define to name and version of distribution]) ++AC_DEFINE([ENABLE_NLS], [], [Description]) ++AC_DEFINE([HAVE_CATGETS], [], [Description]) ++AC_DEFINE([HAVE_GETTEXT], [], [Description]) ++AC_DEFINE([HAVE_LC_MESSAGES], [], [Description]) + AC_SUBST(PACKAGE) + AC_SUBST(VERSION) + AC_SUBST(XSANE_PACKAGE_VERSION) + AC_SUBST(SANE_MAJOR) + +- + dnl Check args + + echo "" + +commit 3cbe146fea1f7ee38b3675d95d47703bdc879350 +Author: Ralph Little +Date: Thu Aug 29 21:24:23 2019 -0700 + + Apply debian upstream patch 0010-fix_missing_sane-config + + Original patch commentary: + + Description: Fix FTBFS against libsane-dev >= 1.0.25-3 + Fix missing sane-config + Author: Andreas Metzler + Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852840 + Forwarded: https://github.com/nphilipp/xsane/issues/1 + Reviewed-by: Jörg Frings-Fürst + Last-Update: 2017-01-28 + + ---- + This patch removes the reliance on sane-config and uses pkg-config + instead. That's fine because sane-config does the same thing + anyway! :D + We will remove sane.m4 and it's mention in aclocal.m4 later. + +diff --git a/configure.in b/configure.in +index 7ad347b..6fb3d2e 100644 +--- a/configure.in ++++ b/configure.in +@@ -155,8 +155,10 @@ fi + + AC_SUBST(INTLSUB) + +-AM_PATH_SANE(1.0.0, HAVE_SANE=yes, ) +- ++PKG_CHECK_MODULES([SANE], [sane-backends >= 1.0.0]) ++PKG_CHECK_VAR([SANE_PREFIX], [sane-backends >= 1.0.0], [prefix]) ++PKG_CHECK_VAR([SANE_LDFLAGS], [sane-backends >= 1.0.0], [ldflags], ++ [HAVE_SANE=yes]) + if test "${USE_GIMP}" = "yes"; then + if test "${TRY_GIMP_2}" = "yes"; then + AM_PATH_GIMP_2_0(1.3.23, HAVE_GIMP=yes, ) + +commit 562008027f343127d70bae44457cf8f06c666428 +Author: Ralph Little +Date: Thu Aug 29 21:49:08 2019 -0700 + + m4/sane.m4: remove m4/sane.m4 and update aclocal.m4 to suit. + + We are now using pkg-config and it is pretty much a one-liner. + No point in a whole file in m4 for just this feature. + +diff --git a/aclocal.m4 b/aclocal.m4 +index a87bb05..170a208 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -51,4 +51,4 @@ m4_include([m4/gimp-orauch.m4]) + m4_include([m4/gtk-2.0.m4]) + m4_include([m4/gtk.m4]) + m4_include([m4/msnative-struct.m4]) +-m4_include([m4/sane.m4]) ++ +diff --git a/m4/sane.m4 b/m4/sane.m4 +deleted file mode 100644 +index d0dc89c..0000000 +--- a/m4/sane.m4 ++++ /dev/null +@@ -1,149 +0,0 @@ +-# ******************************************************************** +-# Configure paths for SANE +-# Oliver Rauch 2000-10-30 +- +-dnl AM_PATH_SANE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +-dnl Test for SANE, and define SANE_CFLAGS and SANE_LIBS +-dnl +-AC_DEFUN(AM_PATH_SANE, +-[dnl +-dnl Get the cflags and libraries from the sane-config script +-dnl +- AC_ARG_ENABLE(sanetest, [ --disable-sanetest Do not try to compile and run a test SANE program], , enable_sanetest=yes) +- +- AC_PATH_PROG(SANE_CONFIG, sane-config, no) +- min_sane_version=ifelse([$1], ,1.0.0,$1) +- AC_MSG_CHECKING(for SANE - version >= $min_sane_version) +- no_sane="" +- if test "$SANE_CONFIG" = "no" ; then +- no_sane=yes +- else +- SANE_CFLAGS=`$SANE_CONFIG $sane_config_args --cflags` +- SANE_LDFLAGS=`$SANE_CONFIG $sane_config_args --ldflags` +-# SANE_LIBS=`$SANE_CONFIG $sane_config_args --libs` +- SANE_LIBS=`$SANE_CONFIG $sane_config_args --libs | sed -e 's/-lintl//g'` +- SANE_PREFIX=`$SANE_CONFIG $sane_config_args --prefix` +- sane_config_major_version=`$SANE_CONFIG $sane_config_args --version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` +- sane_config_minor_version=`$SANE_CONFIG $sane_config_args --version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` +- sane_config_micro_version=`$SANE_CONFIG $sane_config_args --version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` +- if test "x$enable_sanetest" = "xyes" ; then +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LDFLAGS="$LDFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $SANE_CFLAGS" +- LDFLAGS="$LDFLAGS $SANE_LDFLAGS" +- LIBS="$LIBS $SANE_LIBS" +-dnl +-dnl Now check if the installed SANE is sufficiently new. (Also sanity +-dnl checks the results of sane-config to some extent +-dnl +- rm -f conf.sanetest +- AC_TRY_RUN([ +-#include +-#include +- +-int +-main () +-{ +- int major, minor, micro; +- +- system ("touch conf.sanetest"); +- +- if (sscanf("$min_sane_version", "%d.%d.%d", &major, &minor, µ) != 3) { +- printf("%s, bad version string\n", "$min_sane_version"); +- exit(1); +- } +- +- if ( ($sane_config_major_version == major) && +- ( ($sane_config_minor_version > minor) || +- ( ($sane_config_minor_version == minor) && ($sane_config_micro_version >= micro)))) +- { +- return 0; +- } +- else if ($sane_config_major_version > major) +- { +- printf("\n*** A too new version of SANE (%d.%d.%d) was found.\n", +- $sane_config_major_version, $sane_config_minor_version, $sane_config_micro_version); +- printf("*** You need a version of SANE with the major version number %d.\n", major); +- } +- else +- { +- printf("\n*** An old version of SANE (%d.%d.%d) was found.\n", +- $sane_config_major_version, $sane_config_minor_version, $sane_config_micro_version); +- printf("*** You need a version of SANE newer than %d.%d.%d. The latest version of\n", +- major, minor, micro); +- } +- +- printf("*** SANE is always available from ftp://ftp.mostang.com\n"); +- printf("***\n"); +- printf("*** If you have already installed a sufficient version, this error\n"); +- printf("*** probably means that the wrong copy of the sane-config shell script is\n"); +- printf("*** being found. The easiest way to fix this is to remove the old version\n"); +- printf("*** of SANE, but you can also set the SANE_CONFIG environment to point to the\n"); +- printf("*** correct copy of sane-config. (In this case, you will have to\n"); +- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); +- printf("*** so that the correct libraries are found at run-time))\n"); +- +- return 1; +-} +-],, no_sane=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +- CFLAGS="$ac_save_CFLAGS" +- LDFLAGS="$ac_save_LDFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- fi +- if test "x$no_sane" = x ; then +- AC_MSG_RESULT(yes) +- ifelse([$2], , :, [$2]) +- else +- AC_MSG_RESULT(no) +- if test "$SANE_CONFIG" = "no" ; then +- echo "*** The sane-config script installed by SANE could not be found" +- echo "*** If SANE was installed in PREFIX, make sure PREFIX/bin is in" +- echo "*** your path, or set the SANE_CONFIG environment variable to the" +- echo "*** full path to sane-config." +- else +- if test -f conf.sanetest ; then +- : +- else +- echo "*** Could not run SANE test program, checking why..." +- CFLAGS="$CFLAGS $SANE_CFLAGS" +- LIBS="$LIBS $SANE_LIBS" +- LDFLAGS="$LDFLAGS $SANE_LDFLAGS" +- AC_TRY_LINK([ +-#include +-#include +-], [ return (SANE_CURRENT_MAJOR); ], +- [ echo "*** The test program compiled, but did not run. This usually means" +- echo "*** that the run-time linker is not finding SANE or finding the wrong" +- echo "*** version of SANE. If it is not finding SANE, you'll need to set your" +- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" +- echo "*** to the installed location Also, make sure you have run ldconfig if that" +- echo "*** is required on your system" +- echo "***" +- echo "*** If you have an old version installed, it is best to remove it, although" +- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +- echo "***" ] +- [ echo "*** The test program failed to compile or link. See the file config.log for the" +- echo "*** exact error that occured. This usually means SANE was incorrectly installed" +- echo "*** or that you have moved SANE since it was installed. In the latter case, you" +- echo "*** may want to edit the sane-config script: $SANE_CONFIG" ]) +- CFLAGS="$ac_save_CFLAGS" +- LDFLAGS="$ac_save_LDFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- fi +- SANE_CFLAGS="" +- SANE_LDFLAGS="" +- SANE_LIBS="" +- ifelse([$3], , :, [$3]) +- fi +- AC_SUBST(SANE_LDFLAGS) +- AC_SUBST(SANE_CFLAGS) +- AC_SUBST(SANE_LIBS) +- AC_SUBST(SANE_PREFIX) +- rm -f conf.sanetest +-]) + +commit 3680e9a4f0defa850cff3ddc7fd95496cc81505b +Author: Ralph Little +Date: Sun Sep 1 11:44:23 2019 -0700 + + Apply debian upstream patch 0165-xsane-0.999-lcms2 + + Original patch commentary: + + From 30af0e2edbf061b71bed9536d826894449f0390d Mon Sep 17 00:00:00 2001 + From: Nils Philippsen + Date: Mon, 23 Sep 2013 16:11:31 +0200 + Subject: [PATCH] patch: lcms2 + + Squashed commit of the following: + + commit f975accf7e1a08438b63580ea848457d373200f5 + Author: Nils Philippsen + Date: Mon Sep 23 14:53:45 2013 +0200 + + ------------ + Adds support for detection and implementation of liblcms2. + This supersedes patch 0001-lcms2_configure which just fixes the + generated configure file. Therefore, I will not apply that patch. + +diff --git a/configure.in b/configure.in +index 6fb3d2e..82393e8 100644 +--- a/configure.in ++++ b/configure.in +@@ -134,7 +134,17 @@ if test "${USE_TIFF}" = "yes"; then + fi + + if test "${USE_LCMS}" = "yes"; then +- AC_CHECK_LIB(lcms, cmsOpenProfileFromFile) ++ AC_SEARCH_LIBS(cmsOpenProfileFromFile, [lcms2 lcms]) ++ if test "${ac_cv_search_cmsOpenProfileFromFile}" != "no"; then ++ AC_DEFINE(HAVE_LIBLCMS, 1, [Define if LCMS is to be used.]) ++ fi ++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms2"; then ++ AC_DEFINE(HAVE_LIBLCMS2, 1, [Define if you have liblcms2.]) ++ else ++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms"; then ++ AC_DEFINE(HAVE_LIBLCMS1, 1, [Define if you have liblcms.]) ++ fi ++ fi + fi + + dnl Checks for library functions. +@@ -300,10 +310,14 @@ else + echo "* - PNG support deactivated *" + fi + +-if test "${ac_cv_lib_lcms_cmsOpenProfileFromFile}" = "yes"; then +- echo "* - LCMS (color management) support activated *" ++if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms2"; then ++ echo "* - LCMS (color management) support activated (lcms2) *" + else +- echo "* - LCMS (color management) support deactivated *" ++ if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms"; then ++ echo "* - LCMS (color management) support activated (lcms) *" ++ else ++ echo "* - LCMS (color management) support deactivated *" ++ fi + fi + + echo "* *" +diff --git a/include/config.h.in b/include/config.h.in +index ecc9637..8e7239f 100644 +--- a/include/config.h.in ++++ b/include/config.h.in +@@ -1,306 +1,320 @@ +-#ifndef SANE_CONFIG_H +-#define SANE_CONFIG_H ++/* include/config.h.in. Generated from configure.in by autoheader. */ + +-/* Define if on AIX 3. +- System headers sometimes define this. +- We just want to avoid a redefinition error message. */ +-#ifndef _ALL_SOURCE +-#undef _ALL_SOURCE +-#endif +- +-/* Define if using alloca.c. */ +-#undef C_ALLOCA +- +-/* Define to empty if the keyword does not work. */ +-#undef const +- +-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. +- This function is required for alloca.c support on those systems. */ ++/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP ++ systems. This function is required for `alloca.c' support on those systems. ++ */ + #undef CRAY_STACKSEG_END + +-/* Define if you have alloca, as a function or macro. */ ++/* Define to 1 if using `alloca.c'. */ ++#undef C_ALLOCA ++ ++/* Description */ ++#undef ENABLE_NLS ++ ++/* Define to 1 if you have `alloca', as a function or macro. */ + #undef HAVE_ALLOCA + +-/* Define if you have and it should be used (not on Ultrix). */ ++/* Define to 1 if you have and it should be used (not on Ultrix). ++ */ + #undef HAVE_ALLOCA_H + +-/* Define if you have a working `mmap' system call. */ ++/* Define to 1 if you have gimp - no matter what version. */ ++#undef HAVE_ANY_GIMP ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_ARGZ_H ++ ++/* Define to 1 if you have the `atexit' function. */ ++#undef HAVE_ATEXIT ++ ++/* Description */ ++#undef HAVE_CATGETS ++ ++/* Define to 1 if you have the `dcgettext' function. */ ++#undef HAVE_DCGETTEXT ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_FCNTL_H ++ ++/* Define to 1 if you have the `getcwd' function. */ ++#undef HAVE_GETCWD ++ ++/* Define to 1 if you have the `getpagesize' function. */ ++#undef HAVE_GETPAGESIZE ++ ++/* Description */ ++#undef HAVE_GETTEXT ++ ++/* Define to 1 if you have gimp-2.0. */ ++#undef HAVE_GIMP_2 ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_INTTYPES_H ++ ++/* Description */ ++#undef HAVE_LC_MESSAGES ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_LIBC_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_LIBGIMP_GIMPFEATURES_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_LIBGIMP_GIMP_H ++ ++/* Define to 1 if you have the `i' library (-li). */ ++#undef HAVE_LIBI ++ ++/* Define to 1 if you have the `jpeg' library (-ljpeg). */ ++#undef HAVE_LIBJPEG ++ ++/* Define if LCMS is to be used. */ ++#undef HAVE_LIBLCMS ++ ++/* Define if you have liblcms. */ ++#undef HAVE_LIBLCMS1 ++ ++/* Define if you have liblcms2. */ ++#undef HAVE_LIBLCMS2 ++ ++/* Define to 1 if you have the `m' library (-lm). */ ++#undef HAVE_LIBM ++ ++/* Define to 1 if you have the `png' library (-lpng). */ ++#undef HAVE_LIBPNG ++ ++/* Define to 1 if you have the `tiff' library (-ltiff). */ ++#undef HAVE_LIBTIFF ++ ++/* Define to 1 if you have the `z' library (-lz). */ ++#undef HAVE_LIBZ ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_LIMITS_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_LOCALE_H ++ ++/* Define to 1 if you have the `lstat' function. */ ++#undef HAVE_LSTAT ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_MALLOC_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_MEMORY_H ++ ++/* Define to 1 if you have the `mkdir' function. */ ++#undef HAVE_MKDIR ++ ++/* Define to 1 if you have a working `mmap' system call. */ + #undef HAVE_MMAP + +-/* Define as __inline if that's what the C compiler calls it. */ +-#undef inline ++/* Define to 1 if you have the `munmap' function. */ ++#undef HAVE_MUNMAP + +-/* Define if on MINIX. */ +-#undef _MINIX ++/* Define to 1 if you have the header file. */ ++#undef HAVE_NL_TYPES_H + +-/* Define to `long' if doesn't define. */ +-#undef off_t ++/* Define to 1 if you have the header file. */ ++#undef HAVE_OS2_H + +-/* Define if the system does not provide POSIX.1 features except +- with this defined. */ +-#undef _POSIX_1_SOURCE ++/* Define to 1 if you have the header file. */ ++#undef HAVE_PNG_H + +-/* Define if you need to in order for stat and other things to work. */ +-#undef _POSIX_SOURCE ++/* Define to 1 if you have the `putenv' function. */ ++#undef HAVE_PUTENV + +-/* Define to `unsigned' if doesn't define. */ +-#undef size_t ++/* Define to 1 if you have the `setenv' function. */ ++#undef HAVE_SETENV + +-/* Define to `unsigned char' if doesn't define. */ +-#undef u_char ++/* Define to 1 if you have the `setlocale' function. */ ++#undef HAVE_SETLOCALE + +-/* Define to `unsigned int' if doesn't define. */ +-#undef u_int ++/* Define to 1 if you have the `sigprocmask' function. */ ++#undef HAVE_SIGPROCMASK + +-/* Define to `unsigned long' if doesn't define. */ +-#undef u_long ++/* Define to 1 if you have the `snprintf' function. */ ++#undef HAVE_SNPRINTF + +-/* Define to `long' if doesn't define. */ +-#undef ssize_t ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDINT_H + +-/* Define to `int' if doesn't define. */ +-#undef pid_t ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDLIB_H + +-/* Define scsireq_t as `struct scsireq' if necessary. */ +-#undef scsireq_t ++/* Define to 1 if you have the `stpcpy' function. */ ++#undef HAVE_STPCPY + +-/* Define to the return type of signal handlers. */ ++/* Define to 1 if you have the `strcasecmp' function. */ ++#undef HAVE_STRCASECMP ++ ++/* Define to 1 if you have the `strchr' function. */ ++#undef HAVE_STRCHR ++ ++/* Define to 1 if you have the `strdup' function. */ ++#undef HAVE_STRDUP ++ ++/* Define to 1 if you have the `strftime' function. */ ++#undef HAVE_STRFTIME ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRINGS_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRING_H ++ ++/* Define to 1 if you have the `strncasecmp' function. */ ++#undef HAVE_STRNCASECMP ++ ++/* Define to 1 if you have the `strndup' function. */ ++#undef HAVE_STRNDUP ++ ++/* Define to 1 if you have the `strsep' function. */ ++#undef HAVE_STRSEP ++ ++/* Define to 1 if you have the `strstr' function. */ ++#undef HAVE_STRSTR ++ ++/* Define to 1 if you have the `strtod' function. */ ++#undef HAVE_STRTOD ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_PARAM_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_STAT_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TIME_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TYPES_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_UNISTD_H ++ ++/* Define to 1 if you have the `usleep' function. */ ++#undef HAVE_USLEEP ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_VALUES_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_WINDOWS_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_ZLIB_H ++ ++/* Define to 1 if you have the `__argz_count' function. */ ++#undef HAVE___ARGZ_COUNT ++ ++/* Define to 1 if you have the `__argz_next' function. */ ++#undef HAVE___ARGZ_NEXT ++ ++/* Define to 1 if you have the `__argz_stringify' function. */ ++#undef HAVE___ARGZ_STRINGIFY ++ ++/* Define to the name of the distribution */ ++#undef PACKAGE ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#undef PACKAGE_BUGREPORT ++ ++/* Define to the full name of this package. */ ++#undef PACKAGE_NAME ++ ++/* Define to the full name and version of this package. */ ++#undef PACKAGE_STRING ++ ++/* Define to the one symbol short name of this package. */ ++#undef PACKAGE_TARNAME ++ ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ ++/* Define to the version of this package. */ ++#undef PACKAGE_VERSION ++ ++/* Define as the return type of signal handlers (`int' or `void'). */ + #undef RETSIGTYPE + + /* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be +- automatically deduced at run-time. ++ automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses +- STACK_DIRECTION = 0 => direction of growth unknown +- */ ++ STACK_DIRECTION = 0 => direction of growth unknown */ + #undef STACK_DIRECTION + +-/* Define if you have the ANSI C header files. */ ++/* Define to 1 if you have the ANSI C header files. */ + #undef STDC_HEADERS + +-/* Define to 1 if NLS is requested. */ +-#undef ENABLE_NLS ++/* Enable extensions on AIX 3, Interix. */ ++#ifndef _ALL_SOURCE ++# undef _ALL_SOURCE ++#endif ++/* Enable GNU extensions on systems that have them. */ ++#ifndef _GNU_SOURCE ++# undef _GNU_SOURCE ++#endif ++/* Enable threading extensions on Solaris. */ ++#ifndef _POSIX_PTHREAD_SEMANTICS ++# undef _POSIX_PTHREAD_SEMANTICS ++#endif ++/* Enable extensions on HP NonStop. */ ++#ifndef _TANDEM_SOURCE ++# undef _TANDEM_SOURCE ++#endif ++/* Enable general extensions on Solaris. */ ++#ifndef __EXTENSIONS__ ++# undef __EXTENSIONS__ ++#endif + +-/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +-#undef HAVE_CATGETS + +-/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +-#undef HAVE_GETTEXT +- +-/* Define if your locale.h file contains LC_MESSAGES. */ +-#undef HAVE_LC_MESSAGES +- +-/* Define to 1 if you have the stpcpy function. */ +-#undef HAVE_STPCPY +- +-/* Define to the name of the distribution. */ +-#undef PACKAGE +- +-/* Define to the version of the distribution. */ ++/* Define to the version of the distribution */ + #undef VERSION + +-/* The concatenation of the strings PACKAGE, "-", and VERSION. */ ++/* Define to name and version of distribution */ + #undef XSANE_PACKAGE_VERSION + +-/* Define if you have the __argz_count function. */ +-#undef HAVE___ARGZ_COUNT ++/* Define to 1 if on MINIX. */ ++#undef _MINIX + +-/* Define if you have the __argz_next function. */ +-#undef HAVE___ARGZ_NEXT ++/* Define to 2 if the system does not provide POSIX.1 features except with ++ this defined. */ ++#undef _POSIX_1_SOURCE + +-/* Define if you have the __argz_stringify function. */ +-#undef HAVE___ARGZ_STRINGIFY ++/* Define to 1 if you need to in order for `stat' and other things to work. */ ++#undef _POSIX_SOURCE + +-/* Define if you have the atexit function. */ +-#undef HAVE_ATEXIT ++/* Define to empty if `const' does not conform to ANSI C. */ ++#undef const + +-/* Define if you have the dcgettext function. */ +-#undef HAVE_DCGETTEXT +- +-/* Define if you have the getcwd function. */ +-#undef HAVE_GETCWD +- +-/* Define if you have the getpagesize function. */ +-#undef HAVE_GETPAGESIZE +- +-/* Define if you have the lstat function. */ +-#undef HAVE_LSTAT +- +-/* Define if you have the mkdir function. */ +-#undef HAVE_MKDIR +- +-/* Define if you have the munmap function. */ +-#undef HAVE_MUNMAP +- +-/* Define if you have the putenv function. */ +-#undef HAVE_PUTENV +- +-/* Define if you have the scsireq_enter function. */ +-#undef HAVE_SCSIREQ_ENTER +- +-/* Define if you have the sigprocmask function. */ +-#undef HAVE_SIGPROCMASK +- +-/* Define if you have the setenv function. */ +-#undef HAVE_SETENV +- +-/* Define if you have the setlocale function. */ +-#undef HAVE_SETLOCALE +- +-/* Define if you have the snprintf function. */ +-#undef HAVE_SNPRINTF +- +-/* Define if you have the stpcpy function. */ +-#undef HAVE_STPCPY +- +-/* Define if you have the strcasecmp function. */ +-#undef HAVE_STRCASECMP +- +-/* Define if you have the strchr function. */ +-#undef HAVE_STRCHR +- +-/* Define if you have the strdup function. */ +-#undef HAVE_STRDUP +- +-/* Define if you have the strncasecmp function. */ +-#undef HAVE_STRNCASECMP +- +-/* Define if you have the strndup function. */ +-#undef HAVE_STRNDUP +- +-/* Define if you have the strftime function. */ +-#undef HAVE_STRFTIME +- +-/* Define if you have the strstr function. */ +-#undef HAVE_STRSTR +- +-/* Define if you have the strsep function. */ +-#undef HAVE_STRSEP +- +-/* Define if you have the strtod function. */ +-#undef HAVE_STRTOD +- +-/* Define if you have the valloc function. */ +-#undef HAVE_VALLOC +- +-/* Ignore HAVE_USLEEP under Apollo Domain because the usleep() +- implementation in the Sys5.3 environment is broken. */ +-#ifndef apollo +- /* Define if you have the usleep function. */ +-# undef HAVE_USLEEP ++/* Define to `__inline__' or `__inline' if that's what the C compiler ++ calls it, or to nothing if 'inline' is not supported under any name. */ ++#ifndef __cplusplus ++#undef inline + #endif + +-/* Define if you have the header file. */ +-#undef HAVE_ARGZ_H ++/* Define to `long int' if does not define. */ ++#undef off_t + +-/* Define if you have the header file. */ +-#undef HAVE_FCNTL_H ++/* Define to `int' if does not define. */ ++#undef pid_t + +-/* Define if you have the header file. */ +-#undef HAVE_LIBINTL_H ++/* Define to `unsigned int' if does not define. */ ++#undef size_t + +-/* Define if you have the header file. */ +-#undef HAVE_LIBC_H ++/* Define to `long' if does not define. */ ++#undef ssize_t + +-/* Define if you have the header file. */ +-#undef HAVE_LIMITS_H ++/* Define to `unsigned char' if does not define. */ ++#undef u_char + +-/* Define if you have the header file. */ +-#undef HAVE_LOCALE_H ++/* Define to `unsigned int' if does not define. */ ++#undef u_int + +-/* Define if you have the header file. */ +-#undef HAVE_MALLOC_H +- +-/* Define if you have the header file. */ +-#undef HAVE_NL_TYPES_H +- +-/* Define if you have the header file. */ +-#undef HAVE_STRING_H +- +-/* Define if you have the header file. */ +-#undef HAVE_SYS_SELECT_H +- +-/* Define if you have the header file. */ +-#undef HAVE_SYS_TIME_H +- +-/* Define if you have the header file. */ +-#undef HAVE_SYS_IO_H +- +-/* Define if you have the header file. */ +-#undef HAVE_ASM_IO_H +- +-/* Define if you have the header file. */ +-#undef HAVE_SCSI_H +- +-/* Define if you have the header file. */ +-#undef HAVE_SCSI_SG_H +- +-/* Define if you have the "/usr/src/linux/include/scsi/sg.h" header file. */ +-#undef HAVE__USR_SRC_LINUX_INCLUDE_SCSI_SG_H +- +-/* Define if you have the header file. */ +-#undef HAVE_SYS_DSREQ_H +- +-/* Define if you have the header file. */ +-#undef HAVE_WINDOWS_H +- +-/* Define if you have the header file. */ +-#undef HAVE_OS2_H +- +-/* Define if you have sys/types.h. OS/2 wants them before select.h, etc. */ +-#undef HAVE_SYS_TYPES_H +- +-/* Define if you have the header file. */ +-#undef HAVE_UNISTD_H +- +-/* Define if you have the header file. */ +-#undef HAVE_VALUES_H +- +-/* Define if you have the i library (-li). */ +-#undef HAVE_LIBI +- +-/* Define if you have the intl library (-lintl). */ +-#undef HAVE_LIBINTL +- +-/* Define if you have the m library (-lm). */ +-#undef HAVE_LIBM +- +-/* Define if you have the header file. */ +-#undef HAVE_DLFCN_H +- +-/* Define if you have GIMP installed - no matter what version. */ +-#undef HAVE_ANY_GIMP +- +-/* Define if you have GIMP-2.0 installed. */ +-#undef HAVE_GIMP_2 +- +-/* Define if you have the GIMPfeatures header file. */ +-#undef HAVE_LIBGIMP_GIMPFEATURES_H +- +-/* Define if you have libjpeg. */ +-#undef HAVE_LIBJPEG +- +-/* Define if you have libz. */ +-#undef HAVE_LIBZ +- +-/* Define if you have libpng. */ +-#undef HAVE_LIBPNG +- +-/* Define if you have libtiff. */ +-#undef HAVE_LIBTIFF +- +-/* Define if you have liblcms. */ +-#undef HAVE_LIBLCMS +- +-#ifndef HAVE_STRNCASECMP +- /* OS/2 needs this */ +-# define strncasecmp(a, b, c) strnicmp(a, b, c) +-#endif +- +-#if defined (__sun) && defined (__GNUC__) +-# define _POSIX_SOURCE +-# define __EXTENSIONS__ +-#endif +- +-#endif /* SANE_CONFIG_H */ ++/* Define to `unsigned long' if does not define. */ ++#undef u_long +diff --git a/src/xsane-preview.c b/src/xsane-preview.c +index cacef95..fa464da 100644 +--- a/src/xsane-preview.c ++++ b/src/xsane-preview.c +@@ -6347,8 +6347,8 @@ int preview_do_color_correction(Preview *p) + cmsHPROFILE hOutProfile = NULL; + cmsHPROFILE hProofProfile = NULL; + cmsHTRANSFORM hTransform = NULL; +- DWORD input_format, output_format; +- DWORD cms_flags = 0; ++ cmsUInt32Number input_format, output_format; ++ cmsUInt32Number cms_flags = 0; + int proof = 0; + char *cms_proof_icm_profile = NULL; + int linesize = 0; +@@ -6356,7 +6356,9 @@ int preview_do_color_correction(Preview *p) + + DBG(DBG_proc, "preview_do_color_correction\n"); + ++#ifdef HAVE_LIBLCMS1 + cmsErrorAction(LCMS_ERROR_SHOW); ++#endif + + if (preferences.cms_bpc) + { +diff --git a/src/xsane-save.c b/src/xsane-save.c +index 6c0788a..f14df05 100644 +--- a/src/xsane-save.c ++++ b/src/xsane-save.c +@@ -830,9 +830,9 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio + cmsHPROFILE hInProfile = NULL; + cmsHPROFILE hOutProfile = NULL; + cmsHTRANSFORM hTransform = NULL; +- DWORD cms_input_format; +- DWORD cms_output_format; +- DWORD cms_flags = 0; ++ cmsUInt32Number cms_input_format; ++ cmsUInt32Number cms_output_format; ++ cmsUInt32Number cms_flags = 0; + + if (cms_function == XSANE_CMS_FUNCTION_EMBED_SCANNER_ICM_PROFILE) + { +@@ -841,7 +841,9 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio + + DBG(DBG_info, "Prepare CMS transform\n"); + ++#ifdef HAVE_LIBLCMS1 + cmsErrorAction(LCMS_ERROR_SHOW); ++#endif + + if (cms_bpc) + { +@@ -888,10 +890,18 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio + if (image_info->channels == 1) /* == 1 (grayscale) */ + { + #if 1 /* xxx oli */ ++# ifdef HAVE_LIBLCMS2 ++ cmsToneCurve *Gamma = cmsBuildGamma(NULL, 2.2); ++# else + LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2); ++# endif + + hOutProfile = cmsCreateGrayProfile(cmsD50_xyY(), Gamma); ++# ifdef HAVE_LIBLCMS2 ++ cmsFreeToneCurve(Gamma); ++# else + cmsFreeGamma(Gamma); ++# endif + #endif + } + else +@@ -2894,7 +2904,11 @@ static int xsane_write_CSA(FILE *outfile, char *input_profile, int intent) + return -1; + } + ++#ifdef HAVE_LIBLCMS2 ++ n = cmsGetPostScriptCSA(NULL, hProfile, intent, 0, NULL, 0); ++#else + n = cmsGetPostScriptCSA(hProfile, intent, NULL, 0); ++#endif + if (n == 0) + { + return -2; +@@ -2906,7 +2920,11 @@ static int xsane_write_CSA(FILE *outfile, char *input_profile, int intent) + return -3; + } + ++#ifdef HAVE_LIBLCMS2 ++ cmsGetPostScriptCSA(NULL, hProfile, intent, 0, buffer, n); ++#else + cmsGetPostScriptCSA(hProfile, intent, buffer, n); ++#endif + buffer[n] = 0; + + fprintf(outfile, "%s", buffer); +@@ -2925,7 +2943,7 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int + cmsHPROFILE hProfile; + size_t n; + char* buffer; +- DWORD flags = cmsFLAGS_NODEFAULTRESOURCEDEF; ++ cmsUInt32Number flags = cmsFLAGS_NODEFAULTRESOURCEDEF; + + hProfile = cmsOpenProfileFromFile(output_profile, "r"); + if (!hProfile) +@@ -2938,7 +2956,11 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + } + ++#ifdef HAVE_LIBLCMS2 ++ n = cmsGetPostScriptCRD(NULL, hProfile, intent, flags, NULL, 0); ++#else + n = cmsGetPostScriptCRDEx(hProfile, intent, flags, NULL, 0); ++#endif + if (n == 0) + { + return -2; +@@ -2950,7 +2972,11 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int + return -3; + } + ++#ifdef HAVE_LIBLCMS2 ++ cmsGetPostScriptCRD(NULL, hProfile, intent, flags, buffer, n); ++#else + cmsGetPostScriptCRDEx(hProfile, intent, flags, buffer, n); ++#endif + buffer[n] = 0; + + fprintf(outfile, "%s", buffer); +@@ -4333,7 +4359,7 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const + { + FILE *icm_profile; + size_t size, embed_len; +- LPBYTE embed_buffer; ++ cmsUInt8Number *embed_buffer; + + DBG(DBG_proc, "xsane_jpeg_embed_scanner_icm_profile(%s)\n", icm_filename); + +@@ -4347,7 +4373,7 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const + size = ftell(icm_profile); + fseek(icm_profile, 0, SEEK_SET); + +- embed_buffer = (LPBYTE) malloc(size + 1); ++ embed_buffer = (cmsUInt8Number *) malloc(size + 1); + if (embed_buffer) + { + embed_len = fread(embed_buffer, 1, size, icm_profile); +diff --git a/src/xsane-viewer.c b/src/xsane-viewer.c +index 69a444d..844c077 100644 +--- a/src/xsane-viewer.c ++++ b/src/xsane-viewer.c +@@ -1795,6 +1795,9 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g + { + Viewer *v = (Viewer *) data; + int val; ++#ifdef HAVE_LIBLCMS2 ++ cmsUInt16Number alarm_codes[cmsMAXCHANNELS]; ++#endif + + g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v); + g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v); +@@ -1811,6 +1814,49 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g + v->cms_gamut_alarm_color = val; + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(v->cms_gamut_alarm_color_widget[v->cms_gamut_alarm_color]), TRUE); + ++#ifdef HAVE_LIBLCMS2 ++ switch(v->cms_gamut_alarm_color) ++ { ++ default: ++ case 0: /* black */ ++ alarm_codes[0] = (cmsUInt16Number) 0; ++ alarm_codes[1] = (cmsUInt16Number) 0; ++ alarm_codes[2] = (cmsUInt16Number) 0; ++ break; ++ ++ case 1: /* gray */ ++ alarm_codes[0] = (cmsUInt16Number) 128; ++ alarm_codes[1] = (cmsUInt16Number) 128; ++ alarm_codes[2] = (cmsUInt16Number) 128; ++ break; ++ ++ case 2: /* white */ ++ alarm_codes[0] = (cmsUInt16Number) 255; ++ alarm_codes[1] = (cmsUInt16Number) 255; ++ alarm_codes[2] = (cmsUInt16Number) 255; ++ break; ++ ++ case 3: /* red */ ++ alarm_codes[0] = (cmsUInt16Number) 255; ++ alarm_codes[1] = (cmsUInt16Number) 0; ++ alarm_codes[2] = (cmsUInt16Number) 0; ++ break; ++ ++ case 4: /* green */ ++ alarm_codes[0] = (cmsUInt16Number) 0; ++ alarm_codes[1] = (cmsUInt16Number) 255; ++ alarm_codes[2] = (cmsUInt16Number) 0; ++ break; ++ ++ case 5: /* blue */ ++ alarm_codes[0] = (cmsUInt16Number) 0; ++ alarm_codes[1] = (cmsUInt16Number) 0; ++ alarm_codes[2] = (cmsUInt16Number) 255; ++ break; ++ } ++ ++ cmsSetAlarmCodes(alarm_codes); ++#else + switch(v->cms_gamut_alarm_color) + { + default: +@@ -1838,6 +1884,7 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g + cmsSetAlarmCodes(0, 0, 255); + break; + } ++#endif + + g_signal_handlers_unblock_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v); + g_signal_handlers_unblock_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v); +@@ -2172,9 +2219,9 @@ static int xsane_viewer_read_image(Viewer *v) + cmsHTRANSFORM hTransform = NULL; + int proof = 0; + char *cms_proof_icm_profile = NULL; +- DWORD cms_input_format; +- DWORD cms_output_format; +- DWORD cms_flags = 0; ++ cmsUInt32Number cms_input_format; ++ cmsUInt32Number cms_output_format; ++ cmsUInt32Number cms_flags = 0; + #endif + + /* open imagefile */ +@@ -2203,7 +2250,9 @@ static int xsane_viewer_read_image(Viewer *v) + + if ((v->enable_color_management) && (v->cms_enable)) + { ++#ifdef HAVE_LIBLCMS1 + cmsErrorAction(LCMS_ERROR_SHOW); ++#endif + + if (v->cms_bpc) + { +@@ -2801,6 +2850,9 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red + GtkWidget *scrolled_window; + GtkWidget *zoom_option_menu, *zoom_menu, *zoom_menu_item; + int i, selection; ++#ifdef HAVE_LIBLCMS2 ++ cmsUInt16Number alarm_codes[cmsMAXCHANNELS]; ++#endif + + DBG(DBG_proc, "viewer_new(%s)\n", filename); + +@@ -2830,7 +2882,14 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red + v->cms_proofing_intent = INTENT_ABSOLUTE_COLORIMETRIC; + v->cms_gamut_check = 0; + v->cms_gamut_alarm_color = 3; /* red */ ++#ifdef HAVE_LIBLCMS2 ++ alarm_codes[0] = (cmsUInt16Number) 255; ++ alarm_codes[1] = (cmsUInt16Number) 0; ++ alarm_codes[2] = (cmsUInt16Number) 0; ++ cmsSetAlarmCodes(alarm_codes); ++#else + cmsSetAlarmCodes(255, 0, 0); ++#endif + #endif + if (selection_filetype) + { +diff --git a/src/xsane.h b/src/xsane.h +index fa04418..7875a94 100644 +--- a/src/xsane.h ++++ b/src/xsane.h +@@ -70,7 +70,13 @@ + #include + + #ifdef HAVE_LIBLCMS +-# include "lcms.h" ++# ifdef HAVE_LIBLCMS2 ++# include "lcms2.h" ++# else ++# include "lcms.h" ++typedef BYTE cmsUInt8Number; ++typedef DWORD cmsUInt32Number; ++# endif + #else + # define cmsHTRANSFORM void * + #endif + +commit 73748aa79465dbaba82cbe54ebb663012cf6b5e1 +Author: Maksim Ushakov +Date: Sun Nov 17 23:40:55 2019 +0300 + + fix make process : wrong detection of an installed sane library + +diff --git a/configure.in b/configure.in +index 82393e8..ab7456a 100644 +--- a/configure.in ++++ b/configure.in +@@ -165,10 +165,10 @@ fi + + AC_SUBST(INTLSUB) + +-PKG_CHECK_MODULES([SANE], [sane-backends >= 1.0.0]) ++PKG_CHECK_MODULES([SANE], [sane-backends >= 1.0.0], [HAVE_SANE=yes]) + PKG_CHECK_VAR([SANE_PREFIX], [sane-backends >= 1.0.0], [prefix]) +-PKG_CHECK_VAR([SANE_LDFLAGS], [sane-backends >= 1.0.0], [ldflags], +- [HAVE_SANE=yes]) ++PKG_CHECK_VAR([SANE_LDFLAGS], [sane-backends >= 1.0.0], [ldflags]) ++ + if test "${USE_GIMP}" = "yes"; then + if test "${TRY_GIMP_2}" = "yes"; then + AM_PATH_GIMP_2_0(1.3.23, HAVE_GIMP=yes, ) diff --git a/srcpkgs/xsane/patches/gcc14.patch b/srcpkgs/xsane/patches/gcc14.patch new file mode 100644 index 00000000000..315761da12e --- /dev/null +++ b/srcpkgs/xsane/patches/gcc14.patch @@ -0,0 +1,73 @@ +source: alpine + +Fix -Wimplicit-function-declaration and -Wincompatible-pointer-type error with +gcc 14. + +``` +getopt.c: In function '_getopt_initialize': +getopt.c:354:54: error: implicit declaration of function 'getpid' [-Wimplicit-function-declaration] + 354 | sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ()); + | ^~~~~~ +getopt.c:359:31: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] + 359 | nonoption_flags_len = strlen (nonoption_flags); + | ^~~~~~ +getopt.c:104:1: note: include '' or provide a declaration of 'strlen' + 103 | #include "getopt.h" + +++ |+#include +``` + +``` +xsane-save.c: In function 'open_socket': +xsane-save.c:7531:26: error: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types] + 7531 | if (connect(fd_socket, &sin, sizeof(sin))) + | ^~~~ + | | + | struct sockaddr_in * +In file included from /usr/include/fortify/sys/socket.h:23, + from xsane-save.c:36: +/usr/include/sys/socket.h:386:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_in *' + 386 | int connect (int, const struct sockaddr *, socklen_t); + | ^~~~~~~~~~~~~~~~~~~~~~~ +``` + +``` +xsane.c: In function 'xsane_device_dialog': +xsane.c:4949:5: error: implicit declaration of function 'bind_textdomain_codeset'; did you mean 'bindtextdomain__'? [-Wimplicit-function-declaration] + 4949 | bind_textdomain_codeset(xsane.backend_translation, "UTF-8"); + | ^~~~~~~~~~~~~~~~~~~~~~~ + | bindtextdomain__ +``` + +--- a/lib/getopt.c ++++ b/lib/getopt.c +@@ -39,6 +39,8 @@ + #endif + + #include ++#include /* for strlen, strcmp */ ++#include /* for getpid */ + + /* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C +--- a/src/xsane-save.c ++++ b/src/xsane-save.c +@@ -7528,7 +7536,7 @@ + sin.sin_family = AF_INET; + memcpy(&sin.sin_addr, he->h_addr_list[0], he->h_length); + +- if (connect(fd_socket, &sin, sizeof(sin))) ++ if (connect(fd_socket, (struct sockaddr *)&sin, sizeof(sin))) + { + DBG(DBG_error, "open_socket: Could not connect with port %d of socket: %s\n", ntohs(sin.sin_port), strerror(errno)); + return -1; +--- a/src/xsane.c ++++ b/src/xsane.c +@@ -50,6 +50,8 @@ + + /* ---------------------------------------------------------------------------------------------------------------------- */ + ++char *bind_textdomain_codeset(const char *, const char *); ++ + struct option long_options[] = + { + {"help", no_argument, 0, 'h'}, diff --git a/srcpkgs/xsane/template b/srcpkgs/xsane/template index f75bd7888b1..674c0131dde 100644 --- a/srcpkgs/xsane/template +++ b/srcpkgs/xsane/template @@ -1,21 +1,26 @@ # Template file for 'xsane' pkgname=xsane version=0.999 -revision=6 +revision=7 build_style="gnu-configure" configure_args="--disable-gimp" -hostmakedepends="pkg-config sane-devel gettext" -makedepends="gtk+-devel lcms-devel sane-devel" +hostmakedepends="automake autoconf-archive pkg-config gettext" +makedepends="gtk+-devel lcms2-devel sane-devel" depends="sane" short_desc="GTK-based X11 frontend for SANE" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="http://www.xsane.org" -distfiles="${DEBIAN_SITE}/main/x/xsane/xsane_${version}.orig.tar.gz" -checksum=5782d23e67dc961c81eef13a87b17eb0144cae3d1ffc5cf7e0322da751482b4b +distfiles="https://gitlab.com/sane-project/frontend/xsane/-/archive/${version}/xsane-${version}.tar.gz" -post_patch() { - vsed -i -e 's/DATADIRNAME=.*/DATADIRNAME=share/' \ - -e 's,/usr/local/include,/usr/include,' \ - configure +checksum=05359707effe1547ff123bb34443a95a4c54bd4888b91a3556c69875b64989b6 + +pre_configure() { + autoreconf -vfi + + # m4/gettext.m4 tests '_nl_msg_cat_cntr' and sets bogus DATADIRNAME so + # locale ends up in /usr/lib/locale + vsed -i -e 's/DATADIRNAME=lib/DATADIRNAME=share/' configure + vsed -i -e 's,/usr/local/include,/usr/include,' configure + # vsed -i '/^localedir =/s/libdir/datadir/' po/Makefile.in }