Ports: Add PHP

This commit is contained in:
Jelle Raaijmakers 2021-06-04 01:59:23 +02:00 committed by Andreas Kling
parent e483de93ce
commit 280785f0fa
Notes: sideshowbarker 2024-07-18 16:55:11 +09:00
6 changed files with 67 additions and 0 deletions

View file

@ -100,6 +100,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`patch`](patch/) | patch (OpenBSD) | 6.6 | https://github.com/ibara/libpuffy |
| [`pcre`](pcre/) | Perl-compatible Regular Expressions (PCRE) | 8.44 | https://www.pcre.org/ |
| [`pcre2`](pcre2/) | Perl-compatible Regular Expressions (PCRE2) | 10.34 | https://www.pcre.org/ |
| [`php`](php/) | PHP | 8.0.6 | https://www.php.net/ |
| [`pkgconf`](pkgconf/) | pkgconf | 1.7.3 | https://github.com/pkgconf/pkgconf |
| [`SDLPoP`](SDLPoP/) | Prince of Persia game | | https://github.com/NagyD/SDLPoP |
| [`printf`](printf/) | printf (OpenBSD) | 6.6 | https://github.com/ibara/libpuffy |

23
Ports/php/package.sh Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=php
useconfigure="true"
version="8.0.6"
files="https://www.php.net/distributions/php-${version}.tar.xz php-${version}.tar.xz e9871d3b6c391fe9e89f86f6334852dcc10eeaaa8d5565beb8436e7f0cf30e20"
auth_type=sha256
depends=""
configopts="
--disable-dom
--disable-opcache
--disable-phar
--disable-simplexml
--disable-xml
--disable-xmlreader
--disable-xmlwriter
--prefix=${SERENITY_INSTALL_ROOT}/usr/local
--without-iconv
--without-libxml
--without-pdo-sqlite
--without-sqlite3
"
export LIBS="-ldl"

View file

@ -0,0 +1,11 @@
--- php-8.0.6/build/config.sub 2021-05-04 19:26:18.000000000 +0200
+++ php-8.0.6-patched/build/config.sub 2021-06-03 22:49:12.463974784 +0200
@@ -1366,7 +1366,7 @@
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
- | nsk* | powerunix)
+ | nsk* | powerunix | serenity*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
qnx*)

View file

@ -0,0 +1,11 @@
--- php-8.0.6/configure 2021-05-04 19:26:18.000000000 +0200
+++ php-8.0.6-patched/configure 2021-06-03 23:48:41.087223727 +0200
@@ -13587,7 +13587,7 @@
if test "x$ac_cv_func___inet_aton" = xyes; then :
found=yes
else
- found=no
+ found=yes
fi
fi

View file

@ -0,0 +1,11 @@
--- php-8.0.6/ext/standard/php_fopen_wrapper.c 2021-05-04 19:26:18.000000000 +0200
+++ php-8.0.6-patched/ext/standard/php_fopen_wrapper.c 2021-06-04 01:04:07.104126109 +0200
@@ -317,7 +317,7 @@
return NULL;
}
-#if HAVE_UNISTD_H
+#if !HAVE_UNISTD_H
dtablesize = getdtablesize();
#else
dtablesize = INT_MAX;

View file

@ -0,0 +1,10 @@
--- php-8.0.6/main/php_network.h 2021-05-04 19:26:18.000000000 +0200
+++ php-8.0.6-patched/main/php_network.h 2021-06-04 01:54:05.976580933 +0200
@@ -63,6 +63,7 @@
PHPAPI zend_string *php_socket_error_str(long err);
END_EXTERN_C()
+#include <arpa/inet.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif