void-packages/srcpkgs/php8.3/patches/php-ltmain-sysroot-support....

40 lines
1.4 KiB
Diff

--- a/build/ltmain.sh 2021-09-09 15:19:14.822208365 +0200
+++ b/build/ltmain.sh 2021-09-09 15:47:55.397011151 +0200
@@ -2375,6 +2375,13 @@ EOF
*) . ./$lib ;;
esac
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ deplib=$(echo "$deplib" | sed "s#^=\(.*\)#$(${CC} --print-sysroot)\1#")
+ newdependency_libs="$newdependency_libs $deplib"
+ done
+ dependency_libs=${newdependency_libs}
+
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then
@@ -5750,6 +5757,13 @@ fi\
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
+
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ deplib=$(echo "$deplib" | sed "s#^$(${CC} --print-sysroot)#=#")
+ newdependency_libs="$newdependency_libs $deplib"
+ done
+
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
@@ -5767,7 +5781,7 @@ library_names='$library_names'
old_library='$old_library'
# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
+dependency_libs='$newdependency_libs'
# Version information for $libname.
current=$current