summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile2
-rw-r--r--sysutils/php83-fileinfo/Makefile7
-rw-r--r--sysutils/php83-fileinfo/files/patch-config.m421
-rw-r--r--sysutils/php83-posix/Makefile7
-rw-r--r--sysutils/php83-posix/files/patch-posix.c38
5 files changed, 75 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index ba438cf73f33..78a691343ceb 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1009,6 +1009,8 @@
SUBDIR += php81-posix
SUBDIR += php82-fileinfo
SUBDIR += php82-posix
+ SUBDIR += php83-fileinfo
+ SUBDIR += php83-posix
SUBDIR += phybs
SUBDIR += pick
SUBDIR += pidof
diff --git a/sysutils/php83-fileinfo/Makefile b/sysutils/php83-fileinfo/Makefile
new file mode 100644
index 000000000000..0cb5594a050b
--- /dev/null
+++ b/sysutils/php83-fileinfo/Makefile
@@ -0,0 +1,7 @@
+CATEGORIES= sysutils
+
+MASTERDIR= ${.CURDIR}/../../lang/php83
+
+PKGNAMESUFFIX= -fileinfo
+
+.include "${MASTERDIR}/Makefile"
diff --git a/sysutils/php83-fileinfo/files/patch-config.m4 b/sysutils/php83-fileinfo/files/patch-config.m4
new file mode 100644
index 000000000000..042170100462
--- /dev/null
+++ b/sysutils/php83-fileinfo/files/patch-config.m4
@@ -0,0 +1,21 @@
+--- config.m4.orig 2023-06-06 15:54:29 UTC
++++ config.m4
+@@ -4,6 +4,9 @@ PHP_ARG_ENABLE([fileinfo],
+ [Disable fileinfo support])],
+ [yes])
+
++PHP_ARG_WITH(pcre-dir, pcre install prefix,
++[ --with-pcre-dir FILEINFO: pcre install prefix], no, no)
++
+ if test "$PHP_FILEINFO" != "no"; then
+
+ libmagic_sources=" \
+@@ -48,6 +51,8 @@ int main(void)
+ AC_MSG_NOTICE(using libmagic strcasestr implementation)
+ libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
+ ],[AC_MSG_RESULT([skipped, cross-compiling])])
++
++ PHP_ADD_INCLUDE($PHP_PCRE_DIR/include)
+
+ PHP_NEW_EXTENSION(fileinfo, fileinfo.c php_libmagic.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
+ PHP_ADD_BUILD_DIR($ext_builddir/libmagic)
diff --git a/sysutils/php83-posix/Makefile b/sysutils/php83-posix/Makefile
new file mode 100644
index 000000000000..59d39c1be278
--- /dev/null
+++ b/sysutils/php83-posix/Makefile
@@ -0,0 +1,7 @@
+CATEGORIES= sysutils
+
+MASTERDIR= ${.CURDIR}/../../lang/php83
+
+PKGNAMESUFFIX= -posix
+
+.include "${MASTERDIR}/Makefile"
diff --git a/sysutils/php83-posix/files/patch-posix.c b/sysutils/php83-posix/files/patch-posix.c
new file mode 100644
index 000000000000..bf034ba887b4
--- /dev/null
+++ b/sysutils/php83-posix/files/patch-posix.c
@@ -0,0 +1,38 @@
+--- posix.c.orig 2023-06-06 15:54:29 UTC
++++ posix.c
+@@ -779,7 +779,7 @@ PHP_FUNCTION(posix_getgrnam)
+ #if defined(ZTS) && defined(HAVE_GETGRNAM_R) && defined(_SC_GETGR_R_SIZE_MAX)
+ buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
+ if (buflen < 1) {
+- RETURN_FALSE;
++ buflen = 1024;
+ }
+ buf = emalloc(buflen);
+ try_again:
+@@ -835,7 +835,7 @@ PHP_FUNCTION(posix_getgrgid)
+
+ grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
+ if (grbuflen < 1) {
+- RETURN_FALSE;
++ grbuflen = 1024;
+ }
+
+ grbuf = emalloc(grbuflen);
+@@ -909,7 +909,7 @@ PHP_FUNCTION(posix_getpwnam)
+ #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R)
+ buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (buflen < 1) {
+- RETURN_FALSE;
++ buflen = 1024;
+ }
+ buf = emalloc(buflen);
+ pw = &pwbuf;
+@@ -964,7 +964,7 @@ PHP_FUNCTION(posix_getpwuid)
+ #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R)
+ pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (pwbuflen < 1) {
+- RETURN_FALSE;
++ pwbuflen = 1024;
+ }
+ pwbuf = emalloc(pwbuflen);
+