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
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)
8 This is because libdir has a trailing slash which breaks the comparision.
12 Merged a patch received from Gary Thomas <gary@mlbassoc.com>
15 Nitin A Kamble <nitin.a.kamble@intel.com>
18 Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
20 --- a/build-aux/ltmain.in
21 +++ b/build-aux/ltmain.in
22 @@ -2363,8 +2363,15 @@ func_mode_install ()
23 func_append dir "$objdir"
25 if test -n "$relink_command"; then
26 + # Strip any trailing slash from the destination.
27 + func_stripname '' '/' "$libdir"
28 + destlibdir=$func_stripname_result
30 + func_stripname '' '/' "$destdir"
31 + s_destdir=$func_stripname_result
33 # Determine the prefix the user has applied to our future dir.
34 - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
35 + inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
37 # Don't allow the user to place us outside of our expected
38 # location b/c this prevents finding dependent libraries that