diff options
Diffstat (limited to 'debian/patches/0125-multiarch_dll_search_path.patch')
-rw-r--r-- | debian/patches/0125-multiarch_dll_search_path.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches/0125-multiarch_dll_search_path.patch b/debian/patches/0125-multiarch_dll_search_path.patch new file mode 100644 index 0000000..67b9484 --- /dev/null +++ b/debian/patches/0125-multiarch_dll_search_path.patch @@ -0,0 +1,44 @@ +Description: Keep /usr/lib/sane as a fallback for SANE backends + Make /usr/lib/arch_triplet/sane the default location for SANE backends, + but keep /usr/lib/sane as a fallback for now. +Author: Julien BLACHE <jblache@debian.org> + +Index: trunk/backend/dll.c +=================================================================== +--- trunk.orig/backend/dll.c ++++ trunk/backend/dll.c +@@ -468,18 +468,18 @@ load (struct backend *be) + + if (path) + { +- src_len = strlen (path) + strlen (DIR_SEP) + strlen(LIBDIR) + 1; ++ src_len = strlen (path) + strlen (DIR_SEP) + strlen(DEB_DLL_LIBDIR) + 1; + src = malloc (src_len); + if (!src) + { + DBG (1, "load: malloc failed: %s\n", strerror (errno)); + return SANE_STATUS_NO_MEM; + } +- snprintf (src, src_len, "%s%s%s", path, DIR_SEP, LIBDIR); ++ snprintf (src, src_len, "%s%s%s", path, DIR_SEP, DEB_DLL_LIBDIR); + } + else + { +- src = LIBDIR; ++ src = DEB_DLL_LIBDIR; + src = strdup (src); + if (!src) + { +Index: trunk/backend/Makefile.am +=================================================================== +--- trunk.orig/backend/Makefile.am ++++ trunk/backend/Makefile.am +@@ -5,7 +5,7 @@ + ## This file is part of the "Sane" build infra-structure. See + ## included LICENSE file for license information. + +-AM_CPPFLAGS += -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include $(USB_CFLAGS) -DLIBDIR="\"$(libdir)/sane\"" ++AM_CPPFLAGS += -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include $(USB_CFLAGS) -DLIBDIR="\"$(libdir)/sane\"" -DDEB_DLL_LIBDIR="\"$(libdir)/sane:$(prefix)/lib/sane\:$(prefix)/lib64/sane\"" + + AM_LDFLAGS += $(STRICT_LDFLAGS) + # The -rpath option is added because we are creating _LTLIBRARIES based |