diff --git a/Ports/php/patches/0001-Build-Disable-pharcmd.patch b/Ports/php/patches/0001-Build-Disable-pharcmd.patch index 4ffb3500d3c..e2be317a7dc 100644 --- a/Ports/php/patches/0001-Build-Disable-pharcmd.patch +++ b/Ports/php/patches/0001-Build-Disable-pharcmd.patch @@ -10,7 +10,7 @@ not try to run phar locally. 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index b54abe3..d9a8d0b 100644 +index ee2d248105f6af61540dfde3eb9e7297c515f0ea..6190cfb73f01cc68d439cb99fdfc9f18341a4cd6 100644 --- a/configure.ac +++ b/configure.ac @@ -1567,8 +1567,8 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag" diff --git a/Ports/php/patches/0002-Build-Force-inet_aton-detection.patch b/Ports/php/patches/0002-Build-Force-inet_aton-detection.patch index 71543f2cf63..3c1ea450a32 100644 --- a/Ports/php/patches/0002-Build-Force-inet_aton-detection.patch +++ b/Ports/php/patches/0002-Build-Force-inet_aton-detection.patch @@ -11,7 +11,7 @@ and tries to redefine it with its own implementation in 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index d9a8d0b..687c2d8 100644 +index 6190cfb73f01cc68d439cb99fdfc9f18341a4cd6..b5b8bcc21dd2330adbe81bbc5ad0b6ec256b1ce9 100644 --- a/configure.ac +++ b/configure.ac @@ -365,8 +365,7 @@ if test "$ac_cv_func_dlopen" = "yes"; then diff --git a/Ports/php/patches/0003-Build-Patch-Serenity-root-directory-into-libtool.patch b/Ports/php/patches/0003-Build-Patch-Serenity-root-directory-into-libtool.patch new file mode 100644 index 00000000000..7c739997974 --- /dev/null +++ b/Ports/php/patches/0003-Build-Patch-Serenity-root-directory-into-libtool.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jelle Raaijmakers +Date: Fri, 21 Oct 2022 14:16:37 +0200 +Subject: [PATCH] Build: Patch Serenity root directory into libtool + +PHP's libtool does not have sysroot support; this is the minimum change +to get PHP to build. +--- + build/ltmain.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/build/ltmain.sh b/build/ltmain.sh +index 2f1c8c9dc80f095832c58aeb30ca65fc27e8a64b..cce4f76267a211775ec97eb2b006df536cd4cc7b 100755 +--- a/build/ltmain.sh ++++ b/build/ltmain.sh +@@ -2353,6 +2353,9 @@ EOF + continue + ;; + esac # case $deplib ++ if [ "${lib::1}" == '=' ]; then ++ lib="${SERENITY_INSTALL_ROOT}${lib:1}" ++ fi + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 +@@ -2469,6 +2472,7 @@ EOF + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. ++ libdir="${SERENITY_INSTALL_ROOT}${libdir}" + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 diff --git a/Ports/php/patches/ReadMe.md b/Ports/php/patches/ReadMe.md index fe4bf1f6e08..527b1dc59c4 100644 --- a/Ports/php/patches/ReadMe.md +++ b/Ports/php/patches/ReadMe.md @@ -15,3 +15,10 @@ For a reason unknown to me, the build system fails to find `inet_aton` and tries to redefine it with its own implementation in `flock_compat.c`. +## `0003-Build-Patch-Serenity-root-directory-into-libtool.patch` + +Build: Patch Serenity root directory into libtool + +PHP's libtool does not have sysroot support; this is the minimum change +to get PHP to build. +