tools/libtool: add commit messages to patches
[openwrt/openwrt.git] / tools / libtool / patches / 150-trailingslash.patch
1 From 1b45c3c0d6682be7f4876b620780ee246a5acbaa Mon Sep 17 00:00:00 2001
2 From: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 Date: Tue, 20 Jul 2021 16:56:16 -0300
4 Subject: openwrt: remove trailing slash in install destdir
5
6 A command like /bin/sh ../../i586-poky-linux-libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/media/data1/builds/poky1/tmp/work/core2-poky-linux/gnome-keyring-2.26.1-r1/image/usr/lib/gnome-keyring/standalone/' fails (e.g. gnome-keyring or pulseaudio)
7
8 This is because libdir has a trailing slash which breaks the comparision.
9
10 RP 2/1/10
11
12 Merged a patch received from Gary Thomas <gary@mlbassoc.com>
13
14 Date: 2010/07/12
15 Nitin A Kamble <nitin.a.kamble@intel.com>
16
17 Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
18
19 --- a/libltdl/config/ltmain.m4sh
20 +++ b/libltdl/config/ltmain.m4sh
21 @@ -2167,8 +2167,15 @@ func_mode_install ()
22 func_append dir "$objdir"
23
24 if test -n "$relink_command"; then
25 + # Strip any trailing slash from the destination.
26 + func_stripname '' '/' "$libdir"
27 + destlibdir=$func_stripname_result
28 +
29 + func_stripname '' '/' "$destdir"
30 + s_destdir=$func_stripname_result
31 +
32 # Determine the prefix the user has applied to our future dir.
33 - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
34 + inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
35
36 # Don't allow the user to place us outside of our expected
37 # location b/c this prevents finding dependent libraries that
38 --- a/libltdl/config/ltmain.sh
39 +++ b/libltdl/config/ltmain.sh
40 @@ -2954,8 +2954,15 @@ func_mode_install ()
41 func_append dir "$objdir"
42
43 if test -n "$relink_command"; then
44 + # Strip any trailing slash from the destination.
45 + func_stripname '' '/' "$libdir"
46 + destlibdir=$func_stripname_result
47 +
48 + func_stripname '' '/' "$destdir"
49 + s_destdir=$func_stripname_result
50 +
51 # Determine the prefix the user has applied to our future dir.
52 - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
53 + inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
54
55 # Don't allow the user to place us outside of our expected
56 # location b/c this prevents finding dependent libraries that