diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2022-03-29 22:48:04 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-03-29 22:49:27 +0100 |
commit | c637795888d7c245f291a9684c47fa9133ddfc44 (patch) | |
tree | be87547d46006e6d742a979e98e4359bdade68bd | |
parent | cf1baddb670accbb44526a32daf8648bc3fec023 (diff) | |
download | serenity-c637795888d7c245f291a9684c47fa9133ddfc44.zip |
Ports: Update PHP to 8.1.4
-rwxr-xr-x | Meta/lint-ports.py | 1 | ||||
-rw-r--r-- | Ports/AvailablePorts.md | 2 | ||||
-rwxr-xr-x | Ports/php/package.sh | 6 | ||||
-rw-r--r-- | Ports/php/patches/0001-Build-Disable-pharcmd.patch | 29 | ||||
-rw-r--r-- | Ports/php/patches/0002-Build-Force-inet_aton-detection.patch | 29 | ||||
-rw-r--r-- | Ports/php/patches/ReadMe.md | 17 | ||||
-rw-r--r-- | Ports/php/patches/configure-inet_aton.patch | 11 | ||||
-rw-r--r-- | Ports/php/patches/configure-pharcmd.patch | 13 | ||||
-rw-r--r-- | Ports/php/patches/fopen-getdtablesize.patch | 14 |
9 files changed, 80 insertions, 42 deletions
diff --git a/Meta/lint-ports.py b/Meta/lint-ports.py index 69fd5edbb4..23e37effdf 100755 --- a/Meta/lint-ports.py +++ b/Meta/lint-ports.py @@ -105,7 +105,6 @@ PORTS_MISSING_DESCRIPTIONS = { 'patch', 'pcre2', 'pfetch', - 'php', 'pkgconf', 'pt2-clone', 'qt6-qtbase', diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 04da7588be..263a783349 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -162,7 +162,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`pcre`](pcre/) | Perl-compatible Regular Expressions (PCRE) | 8.45 | https://www.pcre.org/ | | [`pcre2`](pcre2/) | Perl-compatible Regular Expressions (PCRE2) | 10.39 | https://www.pcre.org/ | | [`pfetch`](pfetch/) | pfetch | a906ff8 | https://github.com/dylanaraps/pfetch/ | -| [`php`](php/) | PHP | 8.1.1 | https://www.php.net/ | +| [`php`](php/) | PHP | 8.1.4 | https://www.php.net/ | | [`pkgconf`](pkgconf/) | pkgconf | 1.8.0 | https://github.com/pkgconf/pkgconf | | [`powdertoy`](powdertoy/) | The Powder Toy | 96.2.350 | https://powdertoy.co.uk/ | | [`SDLPoP`](SDLPoP/) | Prince of Persia game | | https://github.com/NagyD/SDLPoP | diff --git a/Ports/php/package.sh b/Ports/php/package.sh index f217f2c56f..b60a466240 100755 --- a/Ports/php/package.sh +++ b/Ports/php/package.sh @@ -1,8 +1,8 @@ #!/usr/bin/env -S bash ../.port_include.sh port=php useconfigure="true" -version="8.1.1" -files="https://www.php.net/distributions/php-${version}.tar.xz php-${version}.tar.xz 33c09d76d0a8bbb5dd930d9dd32e6bfd44e9efcf867563759eb5492c3aff8856" +version="8.1.4" +files="https://www.php.net/distributions/php-${version}.tar.xz php-${version}.tar.xz 05a8c0ac30008154fb38a305560543fc172ba79fb957084a99b8d3b10d5bdb4b" auth_type=sha256 depends=("libiconv" "libxml2" "openssl" "readline" "sqlite" "zlib") configopts=( @@ -33,6 +33,8 @@ pre_configure() { export SQLITE_LIBS="-lsqlite3 -lpthread" export ZLIB_CFLAGS="y" export ZLIB_LIBS="-lz" + + run ./buildconf --force } post_configure() { diff --git a/Ports/php/patches/0001-Build-Disable-pharcmd.patch b/Ports/php/patches/0001-Build-Disable-pharcmd.patch new file mode 100644 index 0000000000..7f86b61b16 --- /dev/null +++ b/Ports/php/patches/0001-Build-Disable-pharcmd.patch @@ -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 + diff --git a/Ports/php/patches/0002-Build-Force-inet_aton-detection.patch b/Ports/php/patches/0002-Build-Force-inet_aton-detection.patch new file mode 100644 index 0000000000..01da6e3fd6 --- /dev/null +++ b/Ports/php/patches/0002-Build-Force-inet_aton-detection.patch @@ -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 + diff --git a/Ports/php/patches/ReadMe.md b/Ports/php/patches/ReadMe.md new file mode 100644 index 0000000000..fe4bf1f6e0 --- /dev/null +++ b/Ports/php/patches/ReadMe.md @@ -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`. + diff --git a/Ports/php/patches/configure-inet_aton.patch b/Ports/php/patches/configure-inet_aton.patch deleted file mode 100644 index dddf8b607e..0000000000 --- a/Ports/php/patches/configure-inet_aton.patch +++ /dev/null @@ -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 diff --git a/Ports/php/patches/configure-pharcmd.patch b/Ports/php/patches/configure-pharcmd.patch deleted file mode 100644 index 9e5b4b100c..0000000000 --- a/Ports/php/patches/configure-pharcmd.patch +++ /dev/null @@ -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= diff --git a/Ports/php/patches/fopen-getdtablesize.patch b/Ports/php/patches/fopen-getdtablesize.patch deleted file mode 100644 index 55abbe9581..0000000000 --- a/Ports/php/patches/fopen-getdtablesize.patch +++ /dev/null @@ -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, |