mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:07:34 +00:00
Ports: Update PHP to 8.1.4
This commit is contained in:
parent
cf1baddb67
commit
c637795888
9 changed files with 80 additions and 42 deletions
29
Ports/php/patches/0001-Build-Disable-pharcmd.patch
Normal file
29
Ports/php/patches/0001-Build-Disable-pharcmd.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
From b77421b9902a06c17e01c6c1dabffbc066a978e8 Mon Sep 17 00:00:00 2001
|
||||
From: Jelle Raaijmakers <jelle@gmta.nl>
|
||||
Date: Tue, 29 Mar 2022 22:41:26 +0200
|
||||
Subject: [PATCH 1/2] Build: Disable `pharcmd`
|
||||
|
||||
We do not support running the PHP binary locally after its build, so do
|
||||
not try to run phar locally.
|
||||
---
|
||||
configure.ac | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b54abe32..d9a8d0b9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1567,8 +1567,8 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
|
||||
CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"
|
||||
|
||||
if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then
|
||||
- pharcmd=pharcmd
|
||||
- pharcmd_install=install-pharcmd
|
||||
+ pharcmd=
|
||||
+ pharcmd_install=
|
||||
else
|
||||
pharcmd=
|
||||
pharcmd_install=
|
||||
--
|
||||
2.32.0
|
||||
|
29
Ports/php/patches/0002-Build-Force-inet_aton-detection.patch
Normal file
29
Ports/php/patches/0002-Build-Force-inet_aton-detection.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
From 99607c7382d82b955015586c716ab4dc5f747235 Mon Sep 17 00:00:00 2001
|
||||
From: Jelle Raaijmakers <jelle@gmta.nl>
|
||||
Date: Tue, 29 Mar 2022 22:42:18 +0200
|
||||
Subject: [PATCH 2/2] Build: Force `inet_aton` detection
|
||||
|
||||
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`.
|
||||
---
|
||||
configure.ac | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d9a8d0b9..687c2d87 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -365,8 +365,7 @@ if test "$ac_cv_func_dlopen" = "yes"; then
|
||||
fi
|
||||
AC_CHECK_LIB(m, sin)
|
||||
|
||||
-dnl Check for inet_aton in -lc, -lbind and -lresolv.
|
||||
-PHP_CHECK_FUNC(inet_aton, resolv, bind)
|
||||
+AC_DEFINE(HAVE_INET_ATON, 1, [ ])
|
||||
|
||||
dnl Then headers.
|
||||
dnl ----------------------------------------------------------------------------
|
||||
--
|
||||
2.32.0
|
||||
|
17
Ports/php/patches/ReadMe.md
Normal file
17
Ports/php/patches/ReadMe.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Patches for php on SerenityOS
|
||||
|
||||
## `0001-Build-Disable-pharcmd.patch`
|
||||
|
||||
Build: Disable `pharcmd`
|
||||
|
||||
We do not support running the PHP binary locally after its build, so do
|
||||
not try to run phar locally.
|
||||
|
||||
## `0002-Build-Force-inet_aton-detection.patch`
|
||||
|
||||
Build: Force `inet_aton` detection
|
||||
|
||||
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`.
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- php-8.1.1/configure 2021-12-15 03:00:45.000000000 +0100
|
||||
+++ php-8.1.1-patched/configure 2022-01-07 23:44:20.361165350 +0100
|
||||
@@ -14229,7 +14229,7 @@
|
||||
then :
|
||||
found=yes
|
||||
else $as_nop
|
||||
- found=no
|
||||
+ found=yes
|
||||
fi
|
||||
|
||||
fi
|
|
@ -1,13 +0,0 @@
|
|||
--- php-8.1.1/configure 2022-01-07 23:44:48.117187609 +0100
|
||||
+++ php-8.1.1-patched/configure 2022-01-07 23:47:02.228957328 +0100
|
||||
@@ -96803,8 +96803,8 @@
|
||||
CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"
|
||||
|
||||
if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then
|
||||
- pharcmd=pharcmd
|
||||
- pharcmd_install=install-pharcmd
|
||||
+ pharcmd=
|
||||
+ pharcmd_install=
|
||||
else
|
||||
pharcmd=
|
||||
pharcmd_install=
|
|
@ -1,14 +0,0 @@
|
|||
--- php-8.1.1/ext/standard/php_fopen_wrapper.c 2021-12-15 03:00:45.000000000 +0100
|
||||
+++ php-8.1.1-patched/ext/standard/php_fopen_wrapper.c 2022-01-07 23:45:58.357132436 +0100
|
||||
@@ -317,11 +317,7 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-#if HAVE_UNISTD_H
|
||||
- dtablesize = getdtablesize();
|
||||
-#else
|
||||
dtablesize = INT_MAX;
|
||||
-#endif
|
||||
|
||||
if (fildes_ori < 0 || fildes_ori >= dtablesize) {
|
||||
php_stream_wrapper_log_error(wrapper, options,
|
Loading…
Add table
Add a link
Reference in a new issue