summaryrefslogtreecommitdiff
path: root/debian/patches/multiarch_dll_search_path.patch
blob: 7c24d214dd6228426973a563e141ccd3183bf934 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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: experimental/backend/dll.c
===================================================================
--- experimental.orig/backend/dll.c
+++ experimental/backend/dll.c
@@ -430,7 +430,7 @@ load (struct backend *be)
 
   if (path)
     {
-      src_len = strlen (path) + strlen (STRINGIFY (LIBDIR)) + 1 + 1;
+      src_len = strlen (path) + strlen (DEB_DLL_LIBDIR) + 1 + 1;
       src = malloc (src_len);
       if (!src)
 	{
@@ -438,12 +438,11 @@ load (struct backend *be)
 	  return SANE_STATUS_NO_MEM;
 	}
       orig_src = src;
-      snprintf (src, src_len, "%s:%s", path, STRINGIFY (LIBDIR));
+      snprintf (src, src_len, "%s:%s", path, DEB_DLL_LIBDIR);
     }
   else
     {
-      src = STRINGIFY (LIBDIR);
-      src = strdup (src);
+      src = strdup (DEB_DLL_LIBDIR);
       if (!src)
 	{
 	  DBG (1, "load: strdup failed: %s\n", strerror (errno));
Index: experimental/backend/Makefile.in
===================================================================
--- experimental.orig/backend/Makefile.in
+++ experimental/backend/Makefile.in
@@ -1887,7 +1887,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -DLIBDIR="$(libdir)/sane"
+AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -DLIBDIR="$(libdir)/sane" -DDEB_DLL_LIBDIR="\"$(libdir)/sane:$(prefix)/lib/sane\""
 AM_LDFLAGS = @STRICT_LDFLAGS@
 # The -rpath option is added because we are creating _LTLIBRARIES based
 # on configure substitution.  This causes automake to not know the