autotools: Restore patch to libtool to change libsane soname

merge-requests/83/head
Povilas Kanapickas 2019-05-25 09:12:18 +03:00
rodzic 72320897d8
commit 61bff8b601
2 zmienionych plików z 45 dodań i 0 usunięć

Wyświetl plik

@ -3,3 +3,4 @@ test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
autoreconf --force --install --verbose --warnings=all "$srcdir"
patch "$srcdir/ltmain.sh" "$srcdir/ltmain.sh.patch"

44
ltmain.sh.patch 100644
Wyświetl plik

@ -0,0 +1,44 @@
Author: Henning Meirer-Geinitz
Use "libsane" soname for every backend (all systems but AIX and mingw)
diff --git a/ltmain.sh b/ltmain.sh
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -9615,6 +9615,23 @@ EOF
dlname=$soname
fi
+ # If -module or -export-dynamic was specified, set the dlname
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+
+ # On sane-backends the internal name for every lib is "libsane"
+ # not "libsane-backendname" so that linking to each backend is possible.
+ case $host in
+ *mingw*)
+ ;;
+ *aix*)
+ ;;
+ *)
+ soname=`echo $soname | sed -e "s/libsane-[A-Za-z_0-9]*/libsane/g"`
+ esac
+
lib=$output_objdir/$realname
linknames=
for link
@@ -10073,12 +10090,6 @@ EOF
func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
fi
done
-
- # If -module or -export-dynamic was specified, set the dlname.
- if test yes = "$module" || test yes = "$export_dynamic"; then
- # On all known operating systems, these are identical.
- dlname=$soname
- fi
fi
;;