pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang
Module Name: pkgsrc
Committed By: taca
Date: Thu Jan 8 13:38:01 UTC 2026
Modified Files:
pkgsrc/lang/php: phpversion.mk
Added Files:
pkgsrc/lang/php/files: README.pkgsrc
pkgsrc/lang/php85: ALTERNATIVES DESCR Makefile Makefile.common
Makefile.php PLIST buildlink3.mk distinfo options.mk
pkgsrc/lang/php85/patches: patch-build_Makefile.global
patch-build_php.m4 patch-configure.ac patch-ext_pcntl_pcntl.c
patch-ext_phar_Makefile.frag
patch-ext_standard_php__fopen__wrapper.c
patch-main_streams_streams.c patch-php.ini-development
patch-php.ini-production patch-sapi_apache2handler_config.m4
patch-sapi_cgi_Makefile.frag patch-sapi_cgi_config9.m4
patch-sapi_cli_Makefile.frag patch-sapi_fpm_fpm_fpm__conf.c
patch-sapi_fpm_php-fpm.conf.in patch-sapi_fpm_www.conf.in
patch-scripts_Makefile.frag patch-scripts_php-config.in
patch-scripts_phpize.in
Log Message:
lang/php: add package version 8.5.1
PHP is a widely-used open source general-purpose scripting language
that is especially suited for web development and can be embedded
into HTML. It is modular, and object-oriented. Much of its syntax
is borrowed from C, Java and Perl with a couple of unique PHP-specific
features thrown in. The language is designed to allow web developers
to write dynamically generated pages quickly.
PHP 8.5 comes with numerous improvements and new features such as
* Built-in URI Extension to parse, normalize and handle URL.
* Pipe Operator |> enables chaining callables and passing values.
* Clone objects and update properties with the new clone() syntax.
* A new attribute #[\NoDiscard] for a function.
* Static closures and first-class-callables in constatnt expressisons.
* cURL shared handles support.
* array_first() and array_last() functions are added to array.
* And much much more...
To generate a diff of this commit:
cvs rdiff -u -r1.485 -r1.486 pkgsrc/lang/php/phpversion.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/php/files/README.pkgsrc
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/php85/ALTERNATIVES pkgsrc/lang/php85/DESCR \
pkgsrc/lang/php85/Makefile pkgsrc/lang/php85/Makefile.common \
pkgsrc/lang/php85/Makefile.php pkgsrc/lang/php85/PLIST \
pkgsrc/lang/php85/buildlink3.mk pkgsrc/lang/php85/distinfo \
pkgsrc/lang/php85/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/php85/patches/patch-build_Makefile.global \
pkgsrc/lang/php85/patches/patch-build_php.m4 \
pkgsrc/lang/php85/patches/patch-configure.ac \
pkgsrc/lang/php85/patches/patch-ext_pcntl_pcntl.c \
pkgsrc/lang/php85/patches/patch-ext_phar_Makefile.frag \
pkgsrc/lang/php85/patches/patch-ext_standard_php__fopen__wrapper.c \
pkgsrc/lang/php85/patches/patch-main_streams_streams.c \
pkgsrc/lang/php85/patches/patch-php.ini-development \
pkgsrc/lang/php85/patches/patch-php.ini-production \
pkgsrc/lang/php85/patches/patch-sapi_apache2handler_config.m4 \
pkgsrc/lang/php85/patches/patch-sapi_cgi_Makefile.frag \
pkgsrc/lang/php85/patches/patch-sapi_cgi_config9.m4 \
pkgsrc/lang/php85/patches/patch-sapi_cli_Makefile.frag \
pkgsrc/lang/php85/patches/patch-sapi_fpm_fpm_fpm__conf.c \
pkgsrc/lang/php85/patches/patch-sapi_fpm_php-fpm.conf.in \
pkgsrc/lang/php85/patches/patch-sapi_fpm_www.conf.in \
pkgsrc/lang/php85/patches/patch-scripts_Makefile.frag \
pkgsrc/lang/php85/patches/patch-scripts_php-config.in \
pkgsrc/lang/php85/patches/patch-scripts_phpize.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/php/phpversion.mk
diff -u pkgsrc/lang/php/phpversion.mk:1.485 pkgsrc/lang/php/phpversion.mk:1.486
--- pkgsrc/lang/php/phpversion.mk:1.485 Fri Dec 19 14:32:34 2025
+++ pkgsrc/lang/php/phpversion.mk Thu Jan 8 13:37:59 2026
@@ -1,4 +1,4 @@
-# $NetBSD: phpversion.mk,v 1.485 2025/12/19 14:32:34 taca Exp $
+# $NetBSD: phpversion.mk,v 1.486 2026/01/08 13:37:59 taca Exp $
#
# This file selects a PHP version, based on the user's preferences and
# the installed packages. It does not add a dependency on the PHP
@@ -10,7 +10,7 @@
# The PHP version to choose when more than one is acceptable to
# the package.
#
-# Possible: 56 74 81 82 83 84
+# Possible: 56 74 81 82 83 84 85
# Default: 83
#
# === Infrastructure variables ===
@@ -27,13 +27,13 @@
# PHP_VERSIONS_ACCEPTED
# The PHP versions that are accepted by the package.
#
-# Possible: 56 74 81 82 83 84
-# Default: 83 82 84 81 74 56
+# Possible: 56 74 81 82 83 84 85
+# Default: 83 82 84 85 81 74 56
#
# PHP_VERSIONS_INCOMPATIBLE
# The PHP versions that are not supported by the package.
#
-# Possible: 56 74 81 82 83 84
+# Possible: 56 74 81 82 83 84 85
# Default: (empty)
#
# PHP_MINIMUM_TEENY
@@ -44,7 +44,7 @@
# PHP_VER
# The selected PHP version.
#
-# Possible: 56 74 81 82 83 84
+# Possible: 56 74 81 82 83 84 85
# Default: ${PHP_VERSION_DEFAULT}
#
# PHP_VERSION
@@ -72,7 +72,7 @@
# PHP_PKG_PREFIX
# The prefix that is prepended to the package name.
#
-# Example: php56 php74 php81 php82 php83 php84
+# Example: php56 php74 php81 php82 php83 php84 php85
#
# PHP_INCDIR
# PHP include directory path relative to ${PREFIX}.
@@ -114,6 +114,7 @@ PHP81_VERSION= 8.1.34
PHP82_VERSION= 8.2.30
PHP83_VERSION= 8.3.29
PHP84_VERSION= 8.4.16
+PHP85_VERSION= 8.5.1
_VARGROUPS+= php
_USER_VARS.php= PHP_VERSION_DEFAULT
@@ -123,7 +124,7 @@ _SYS_VARS.php= PHP_VERSION_PHP PHPPKGSRC
.include "../../mk/bsd.prefs.mk"
PHP_VERSION_DEFAULT?= 83
-PHP_VERSIONS_ACCEPTED?= 83 82 84 81 74 56
+PHP_VERSIONS_ACCEPTED?= 83 82 84 85 81 74 56
.for pv in ${PHP_VERSIONS_ACCEPTED}
. if empty(PHP_VERSIONS_INCOMPATIBLE:M${pv})
_PHP_VERSIONS_ACCEPTED+= ${pv}
@@ -177,6 +178,8 @@ PHP_VERSION= ${PHP82_VERSION}
PHP_VERSION= ${PHP83_VERSION}
.elif ${_PHP_VERSION} == 84
PHP_VERSION= ${PHP84_VERSION}
+.elif ${_PHP_VERSION} == 85
+PHP_VERSION= ${PHP85_VERSION}
.else
# force an error
PKG_FAIL_REASON+= "${_PHP_VERSION} is not a valid package"
Added files:
Index: pkgsrc/lang/php/files/README.pkgsrc
diff -u /dev/null pkgsrc/lang/php/files/README.pkgsrc:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php/files/README.pkgsrc Thu Jan 8 13:37:59 2026
@@ -0,0 +1,11 @@
+===========================================================================
+$NetBSD: README.pkgsrc,v 1.1 2026/01/08 13:37:59 taca Exp $
+
+To process PHP scripts, you will need a PHP-enabled HTTP server. You may
+either configure the HTTP server to use the PHP CGI binary located in
+
+ @CGIDIR@/php@PHP_VER@
+
+or you may install a PHP module www/ap-php or www/php-fpm.
+
+===========================================================================
Index: pkgsrc/lang/php85/ALTERNATIVES
diff -u /dev/null pkgsrc/lang/php85/ALTERNATIVES:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/ALTERNATIVES Thu Jan 8 13:37:59 2026
@@ -0,0 +1,6 @@
+bin/phar @PREFIX@/bin/phar@PHP_VER@
+bin/phar.phar @PREFIX@/bin/phar@PHP_VER@.phar
+bin/php-config @PREFIX@/bin/php-config@PHP_VER@
+bin/php @PREFIX@/bin/php@PHP_VER@
+bin/phpdbg @PREFIX@/bin/phpdbg@PHP_VER@
+bin/phpize @PREFIX@/bin/phpize@PHP_VER@
Index: pkgsrc/lang/php85/DESCR
diff -u /dev/null pkgsrc/lang/php85/DESCR:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/DESCR Thu Jan 8 13:38:00 2026
@@ -0,0 +1,17 @@
+PHP is a widely-used open source general-purpose scripting language
+that is especially suited for web development and can be embedded
+into HTML. It is modular, and object-oriented. Much of its syntax
+is borrowed from C, Java and Perl with a couple of unique PHP-specific
+features thrown in. The language is designed to allow web developers
+to write dynamically generated pages quickly.
+
+PHP 8.5 comes with numerous improvements and new features such as
+
+* Built-in URI Extension to parse, normalize and handle URL.
+* Pipe Operator |> enables chaining callables and passing values.
+* Clone objects and update properties with the new clone() syntax.
+* A new attribute #[\NoDiscard] for a function.
+* Static closures and first-class-callables in constatnt expressisons.
+* cURL shared handles support.
+* array_first() and array_last() functions are added to array.
+* And much much more...
Index: pkgsrc/lang/php85/Makefile
diff -u /dev/null pkgsrc/lang/php85/Makefile:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/Makefile Thu Jan 8 13:38:00 2026
@@ -0,0 +1,70 @@
+# $NetBSD: Makefile,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+#
+# We can't omit PKGNAME here to handle PKG_OPTIONS.
+#
+PKGNAME= ${PHP_PKG_PREFIX}-${PHP_VERSION}
+CATEGORIES= lang
+
+COMMENT= PHP Hypertext Preprocessor version 8.5
+LICENSE= php
+
+TEST_TARGET= test
+
+USE_TOOLS+= autoconf gmake lex
+LIBTOOL_OVERRIDE= # empty
+
+PHP_VERSIONS_ACCEPTED= 85
+
+.include "Makefile.php"
+
+CGIDIR= ${PREFIX}/libexec/cgi-bin
+
+CONFIGURE_ENV+= lt_cv_path_SED=${SED:Q}
+MAKE_ENV+= INSTALL_ROOT=${DESTDIR}
+
+CONF_FILES= ${PHP_EGDIR}/php.ini-production ${PKG_SYSCONFDIR}/php.ini
+PLIST_SUBST+= PHPEXTDIR="${PHP_EXTENSION_DIR}"
+
+# taken from devel/pkgconf/Makefile
+PKGCONFIG_PATHS= ${PREFIX}/lib/pkgconfig
+PKGCONFIG_PATHS+= ${PREFIX}/share/pkgconfig
+PKGCONFIG_PATHS+= /usr/lib/pkgconfig
+
+# At this point, PREFIX is not set yet.
+.if ${LOCALBASE} != ${X11BASE}
+PKGCONFIG_PATHS+= ${X11BASE}/lib/pkgconfig
+.endif
+
+PHP_PKGCONFIG_PATH= ${PKGCONFIG_PATHS:ts:}
+
+REPLACE_PHP= ext/phar/phar/phar.php run-tests.php
+
+INSTALLATION_DIRS+= ${CGIDIR} ${PHP_EXTENSION_DIR} ${PHP_EGDIR} \
+ ${PHP_SHAREDIR}
+
+# Make sure modules can link correctly
+.if ${OPSYS} == "Darwin"
+INSTALL_UNSTRIPPED= yes
+.endif
+
+# Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2)
+# and lacks the zone memory allocator
+.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
+CFLAGS+= -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC
+.endif
+
+post-patch:
+ ${CP} ${.CURDIR}/${PHP_PKGSRC_README} ${WRKDIR}/${PHP_PKGSRC_README:T}
+
+pre-configure:
+ cd ${WRKSRC} && ${PKGSRC_SETENV} ${CONFIGURE_ENV} autoconf -f
+
+post-install:
+ cd ${WRKSRC}; ${INSTALL_DATA} php.ini-development php.ini-production \
+ ${DESTDIR}${PREFIX}/${PHP_EGDIR}
+ ${INSTALL_DATA} ${WRKDIR}/${PHP_PKGSRC_README:T} \
+ ${DESTDIR}${PREFIX}/${PHP_SHAREDIR}
+
+.include "../../lang/php/phpversion.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/lang/php85/Makefile.common
diff -u /dev/null pkgsrc/lang/php85/Makefile.common:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/Makefile.common Thu Jan 8 13:38:00 2026
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile.common,v 1.1 2026/01/08 13:38:00 taca Exp $
+# used by lang/php85/Makefile.php
+# used by lang/php/ext.mk
+
+PHP_VERSION_REQD= 85
+
+.include "../../lang/php/common.mk"
+
+CATEGORIES+= www
+MAINTAINER?= pkgsrc-users%NetBSD.org@localhost
+
+USE_TOOLS+= pkg-config
+
+CHECK_PORTABILITY_SKIP+= scripts/dev/makedist
+
+.if ${OPSYS} == "NetBSD"
+CONFIGURE_ARGS+= ax_cv_have_func_attribute_ifunc=no
+.endif
+
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mclang)
+# configure test gets confused by wrappers dropping -R /usr/lib
+CONFIGURE_ARGS+= php_cv_cc_dashr=no
+.endif
+
+# not every extension actually depend on PCRE, and those which do
+# don't use internal pcre structures, so default to build-time
+# dependency only
+BUILDLINK_DEPMETHOD.pcre2?= build
+.include "../../devel/pcre2/buildlink3.mk"
Index: pkgsrc/lang/php85/Makefile.php
diff -u /dev/null pkgsrc/lang/php85/Makefile.php:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/Makefile.php Thu Jan 8 13:38:00 2026
@@ -0,0 +1,102 @@
+# $NetBSD: Makefile.php,v 1.1 2026/01/08 13:38:00 taca Exp $
+# used by lang/php85/Makefile
+# used by www/ap-php/Makefile
+# used by www/php-fpm/Makefile
+
+# segfaults when buidling with many compilers
+# https://bugs.php.net/bug.php?id=74527
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86236
+.if ${MACHINE_ARCH} == "i386"
+CONFIGURE_ARGS+= --disable-gcc-global-regs
+.endif
+
+# the binary actually needs full dep on PCRE
+BUILDLINK_DEPMETHOD.pcre2= full
+
+USE_LIBTOOL= YES
+USE_LANGUAGES= c c++
+GNU_CONFIGURE= YES
+BUILD_DEFS+= VARBASE
+PLIST_VARS+= dtrace
+
+.include "../../lang/php85/Makefile.common"
+
+DISTINFO_FILE= ${.CURDIR}/../../lang/php85/distinfo
+PATCHDIR= ${.CURDIR}/../../lang/php85/patches
+
+PHP_PKGSRC_README= ../../lang/php/files/README.pkgsrc
+
+PLIST_SUBST+= PHP_VER="${PHP_VER}"
+
+PRINT_PLIST_AWK+= /${PHP_EXTENSION_DIR:S/\//\\\//g}/ \
+ { sub(/${PHP_EXTENSION_DIR:S/\//\\\//g}/, \
+ "$${PHP_EXTENSION_DIR}") }
+PRINT_PLIST_AWK+= /${PHP_VER}/ { sub(/${PHP_VER}/, "$${PHP_VER}") }
+
+CONFIGURE_ARGS+= --program-suffix=${PHP_VER}
+CONFIGURE_ARGS+= --with-config-file-path=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --with-config-file-scan-dir=${PKG_SYSCONFDIR}/php.d
+
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --libdir=${PREFIX}/${PHP_LIBDIR}
+CONFIGURE_ARGS+= --datadir=${PREFIX}/${PHP_SHAREDIR}
+CONFIGURE_ARGS+= --localstatedir=${VARBASE}
+
+CONFIGURE_ARGS+= --without-mysqli
+CONFIGURE_ARGS+= --without-iconv
+CONFIGURE_ARGS+= --without-pear
+CONFIGURE_ARGS+= --without-sqlite3
+CONFIGURE_ARGS+= --with-external-pcre
+CONFIGURE_ARGS+= --disable-intl
+CONFIGURE_ARGS+= --disable-posix
+CONFIGURE_ARGS+= --disable-pdo
+
+CONFIGURE_ARGS+= --enable-cgi
+CONFIGURE_ARGS+= --enable-mysqlnd
+CONFIGURE_ARGS+= --enable-xml
+#CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX}
+
+CONFIGURE_ENV+= PHP_VER=${PHP_VER}
+CONFIGURE_ENV+= PHP_VAR_SUBST=PHP_VER
+CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
+
+#
+# Workaround for NetBSD: php 8.4 require zlib>=1.2.11.
+# NetBSD 8 and later have zlib 1.2.13 in base system but
+# /usr/lib/pkg-config/zlib.pc is still 1.2.10.
+# So, modify configure script to allow 1.2.10 on NetBSD.
+#
+SUBST_CLASSES+= zlib
+SUBST_MESSAGE.zlib= Adjust zlib version
+SUBST_STAGE.zlib= pre-configure
+SUBST_FILES.zlib+= build/php.m4
+SUBST_VARS.zlib+= FAKE_ZLIB_VERSION
+
+.if ${OPSYS} == "NetBSD"
+FAKE_ZLIB_VERSION= 1.2.10
+.else
+FAKE_ZLIB_VERSION= 1.2.11
+.endif
+
+SUBST_CLASSES+= path
+SUBST_MESSAGE.path= Fixing common paths.
+SUBST_STAGE.path= pre-configure
+SUBST_FILES.path+= build/php.m4
+SUBST_FILES.path+= php.ini-development php.ini-production
+SUBST_FILES.path+= sapi/cgi/Makefile.frag
+SUBST_FILES.path+= sapi/fpm/php-fpm.conf.in sapi/fpm/www.conf.in
+SUBST_FILES.path+= sapi/fpm/fpm/fpm_conf.c
+SUBST_FILES.path+= scripts/php-config.in scripts/phpize.in
+SUBST_FILES.path+= ${WRKDIR}/${PHP_PKGSRC_README:T}
+SUBST_VARS.path= PREFIX CGIDIR PHP_VER PHP_API_VERS
+SUBST_VARS.path+= PHP_EGDIR PHP_INCDIR PHP_LIBDIR
+SUBST_VARS.path+= TOOLS_PATH.pkg-config PHP_PKGCONFIG_PATH
+
+.include "../../textproc/libxml2/buildlink3.mk"
+
+#CONFIGURE_ARGS+= --with-pcre-regex=${BUILDLINK_PREFIX.pcre2}
+
+.include "options.mk"
+
+DL_AUTO_VARS= yes
+.include "../../mk/dlopen.buildlink3.mk"
Index: pkgsrc/lang/php85/PLIST
diff -u /dev/null pkgsrc/lang/php85/PLIST:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/PLIST Thu Jan 8 13:38:00 2026
@@ -0,0 +1,333 @@
+@comment $NetBSD: PLIST,v 1.1 2026/01/08 13:38:00 taca Exp $
+bin/phar${PHP_VER}
+bin/phar${PHP_VER}.phar
+bin/php-config${PHP_VER}
+bin/php${PHP_VER}
+bin/phpdbg${PHP_VER}
+bin/phpize${PHP_VER}
+${PHP_INCDIR}/TSRM/TSRM.h
+${PHP_INCDIR}/TSRM/tsrm_win32.h
+${PHP_INCDIR}/Zend/Optimizer/zend_call_graph.h
+${PHP_INCDIR}/Zend/Optimizer/zend_cfg.h
+${PHP_INCDIR}/Zend/Optimizer/zend_dfg.h
+${PHP_INCDIR}/Zend/Optimizer/zend_dump.h
+${PHP_INCDIR}/Zend/Optimizer/zend_func_info.h
+${PHP_INCDIR}/Zend/Optimizer/zend_inference.h
+${PHP_INCDIR}/Zend/Optimizer/zend_optimizer.h
+${PHP_INCDIR}/Zend/Optimizer/zend_ssa.h
+${PHP_INCDIR}/Zend/Optimizer/zend_worklist.h
+${PHP_INCDIR}/Zend/zend.h
+${PHP_INCDIR}/Zend/zend_API.h
+${PHP_INCDIR}/Zend/zend_alloc.h
+${PHP_INCDIR}/Zend/zend_alloc_sizes.h
+${PHP_INCDIR}/Zend/zend_arena.h
+${PHP_INCDIR}/Zend/zend_ast.h
+${PHP_INCDIR}/Zend/zend_atomic.h
+${PHP_INCDIR}/Zend/zend_attributes.h
+${PHP_INCDIR}/Zend/zend_attributes_arginfo.h
+${PHP_INCDIR}/Zend/zend_bitset.h
+${PHP_INCDIR}/Zend/zend_build.h
+${PHP_INCDIR}/Zend/zend_builtin_functions.h
+${PHP_INCDIR}/Zend/zend_builtin_functions_arginfo.h
+${PHP_INCDIR}/Zend/zend_call_stack.h
+${PHP_INCDIR}/Zend/zend_closures.h
+${PHP_INCDIR}/Zend/zend_closures_arginfo.h
+${PHP_INCDIR}/Zend/zend_compile.h
+${PHP_INCDIR}/Zend/zend_config.h
+${PHP_INCDIR}/Zend/zend_config.w32.h
+${PHP_INCDIR}/Zend/zend_constants.h
+${PHP_INCDIR}/Zend/zend_constants_arginfo.h
+${PHP_INCDIR}/Zend/zend_cpuinfo.h
+${PHP_INCDIR}/Zend/zend_dtrace.h
+${PLIST.dtrace}${PHP_INCDIR}/Zend/zend_dtrace_gen.h
+${PHP_INCDIR}/Zend/zend_enum.h
+${PHP_INCDIR}/Zend/zend_enum_arginfo.h
+${PHP_INCDIR}/Zend/zend_errors.h
+${PHP_INCDIR}/Zend/zend_exceptions.h
+${PHP_INCDIR}/Zend/zend_exceptions_arginfo.h
+${PHP_INCDIR}/Zend/zend_execute.h
+${PHP_INCDIR}/Zend/zend_extensions.h
+${PHP_INCDIR}/Zend/zend_fibers.h
+${PHP_INCDIR}/Zend/zend_fibers_arginfo.h
+${PHP_INCDIR}/Zend/zend_float.h
+${PHP_INCDIR}/Zend/zend_frameless_function.h
+${PHP_INCDIR}/Zend/zend_gc.h
+${PHP_INCDIR}/Zend/zend_gdb.h
+${PHP_INCDIR}/Zend/zend_generators.h
+${PHP_INCDIR}/Zend/zend_generators_arginfo.h
+${PHP_INCDIR}/Zend/zend_globals.h
+${PHP_INCDIR}/Zend/zend_globals_macros.h
+${PHP_INCDIR}/Zend/zend_hash.h
+${PHP_INCDIR}/Zend/zend_highlight.h
+${PHP_INCDIR}/Zend/zend_hrtime.h
+${PHP_INCDIR}/Zend/zend_inheritance.h
+${PHP_INCDIR}/Zend/zend_ini.h
+${PHP_INCDIR}/Zend/zend_ini_parser.h
+${PHP_INCDIR}/Zend/zend_ini_scanner.h
+${PHP_INCDIR}/Zend/zend_ini_scanner_defs.h
+${PHP_INCDIR}/Zend/zend_interfaces.h
+${PHP_INCDIR}/Zend/zend_interfaces_arginfo.h
+${PHP_INCDIR}/Zend/zend_iterators.h
+${PHP_INCDIR}/Zend/zend_language_parser.h
+${PHP_INCDIR}/Zend/zend_language_scanner.h
+${PHP_INCDIR}/Zend/zend_language_scanner_defs.h
+${PHP_INCDIR}/Zend/zend_lazy_objects.h
+${PHP_INCDIR}/Zend/zend_list.h
+${PHP_INCDIR}/Zend/zend_llist.h
+${PHP_INCDIR}/Zend/zend_long.h
+${PHP_INCDIR}/Zend/zend_map_ptr.h
+${PHP_INCDIR}/Zend/zend_max_execution_timer.h
+${PHP_INCDIR}/Zend/zend_mmap.h
+${PHP_INCDIR}/Zend/zend_modules.h
+${PHP_INCDIR}/Zend/zend_multibyte.h
+${PHP_INCDIR}/Zend/zend_multiply.h
+${PHP_INCDIR}/Zend/zend_object_handlers.h
+${PHP_INCDIR}/Zend/zend_objects.h
+${PHP_INCDIR}/Zend/zend_objects_API.h
+${PHP_INCDIR}/Zend/zend_observer.h
+${PHP_INCDIR}/Zend/zend_operators.h
+${PHP_INCDIR}/Zend/zend_portability.h
+${PHP_INCDIR}/Zend/zend_property_hooks.h
+${PHP_INCDIR}/Zend/zend_ptr_stack.h
+${PHP_INCDIR}/Zend/zend_range_check.h
+${PHP_INCDIR}/Zend/zend_signal.h
+${PHP_INCDIR}/Zend/zend_simd.h
+${PHP_INCDIR}/Zend/zend_smart_str.h
+${PHP_INCDIR}/Zend/zend_smart_str_public.h
+${PHP_INCDIR}/Zend/zend_smart_string.h
+${PHP_INCDIR}/Zend/zend_smart_string_public.h
+${PHP_INCDIR}/Zend/zend_sort.h
+${PHP_INCDIR}/Zend/zend_stack.h
+${PHP_INCDIR}/Zend/zend_stream.h
+${PHP_INCDIR}/Zend/zend_string.h
+${PHP_INCDIR}/Zend/zend_strtod.h
+${PHP_INCDIR}/Zend/zend_strtod_int.h
+${PHP_INCDIR}/Zend/zend_system_id.h
+${PHP_INCDIR}/Zend/zend_type_info.h
+${PHP_INCDIR}/Zend/zend_types.h
+${PHP_INCDIR}/Zend/zend_variables.h
+${PHP_INCDIR}/Zend/zend_verify_type_inference.h
+${PHP_INCDIR}/Zend/zend_virtual_cwd.h
+${PHP_INCDIR}/Zend/zend_vm.h
+${PHP_INCDIR}/Zend/zend_vm_def.h
+${PHP_INCDIR}/Zend/zend_vm_execute.h
+${PHP_INCDIR}/Zend/zend_vm_handlers.h
+${PHP_INCDIR}/Zend/zend_vm_opcodes.h
+${PHP_INCDIR}/Zend/zend_vm_trace_handlers.h
+${PHP_INCDIR}/Zend/zend_vm_trace_lines.h
+${PHP_INCDIR}/Zend/zend_vm_trace_map.h
+${PHP_INCDIR}/Zend/zend_weakrefs.h
+${PHP_INCDIR}/Zend/zend_weakrefs_arginfo.h
+${PHP_INCDIR}/ext/date/lib/timelib.h
+${PHP_INCDIR}/ext/date/lib/timelib_config.h
+${PHP_INCDIR}/ext/date/php_date.h
+${PHP_INCDIR}/ext/dom/dom_ce.h
+${PHP_INCDIR}/ext/dom/namespace_compat.h
+${PHP_INCDIR}/ext/dom/xml_common.h
+${PHP_INCDIR}/ext/dom/xpath_callbacks.h
+${PHP_INCDIR}/ext/filter/php_filter.h
+${PHP_INCDIR}/ext/hash/php_hash.h
+${PHP_INCDIR}/ext/hash/php_hash_adler32.h
+${PHP_INCDIR}/ext/hash/php_hash_crc32.h
+${PHP_INCDIR}/ext/hash/php_hash_fnv.h
+${PHP_INCDIR}/ext/hash/php_hash_gost.h
+${PHP_INCDIR}/ext/hash/php_hash_haval.h
+${PHP_INCDIR}/ext/hash/php_hash_joaat.h
+${PHP_INCDIR}/ext/hash/php_hash_md.h
+${PHP_INCDIR}/ext/hash/php_hash_murmur.h
+${PHP_INCDIR}/ext/hash/php_hash_ripemd.h
+${PHP_INCDIR}/ext/hash/php_hash_sha.h
+${PHP_INCDIR}/ext/hash/php_hash_sha3.h
+${PHP_INCDIR}/ext/hash/php_hash_snefru.h
+${PHP_INCDIR}/ext/hash/php_hash_tiger.h
+${PHP_INCDIR}/ext/hash/php_hash_whirlpool.h
+${PHP_INCDIR}/ext/hash/php_hash_xxhash.h
+${PHP_INCDIR}/ext/hash/xxhash/xxhash.h
+${PHP_INCDIR}/ext/json/php_json.h
+${PHP_INCDIR}/ext/json/php_json_parser.h
+${PHP_INCDIR}/ext/json/php_json_scanner.h
+${PHP_INCDIR}/ext/lexbor/php_lexbor.h
+${PHP_INCDIR}/ext/libxml/php_libxml.h
+${PHP_INCDIR}/ext/mysqlnd/config-win.h
+${PHP_INCDIR}/ext/mysqlnd/mysql_float_to_double.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_alloc.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_auth.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_block_alloc.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_charset.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_commands.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_connection.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_debug.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_enum_n_def.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_ext_plugin.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_libmysql_compat.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_plugin.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_portability.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_priv.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_protocol_frame_codec.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_ps.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_read_buffer.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_result.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_result_meta.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_reverse_api.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_statistics.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_structs.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_vio.h
+${PHP_INCDIR}/ext/mysqlnd/mysqlnd_wireprotocol.h
+${PHP_INCDIR}/ext/mysqlnd/php_mysqlnd.h
+${PHP_INCDIR}/ext/opcache/zend_accelerator_api.h
+${PHP_INCDIR}/ext/pcre/php_pcre.h
+${PHP_INCDIR}/ext/random/php_random.h
+${PHP_INCDIR}/ext/random/php_random_csprng.h
+${PHP_INCDIR}/ext/random/php_random_uint128.h
+${PHP_INCDIR}/ext/session/mod_files.h
+${PHP_INCDIR}/ext/session/mod_user.h
+${PHP_INCDIR}/ext/session/php_session.h
+${PHP_INCDIR}/ext/simplexml/php_simplexml.h
+${PHP_INCDIR}/ext/simplexml/php_simplexml_exports.h
+${PHP_INCDIR}/ext/spl/php_spl.h
+${PHP_INCDIR}/ext/spl/spl_array.h
+${PHP_INCDIR}/ext/spl/spl_directory.h
+${PHP_INCDIR}/ext/spl/spl_dllist.h
+${PHP_INCDIR}/ext/spl/spl_exceptions.h
+${PHP_INCDIR}/ext/spl/spl_fixedarray.h
+${PHP_INCDIR}/ext/spl/spl_functions.h
+${PHP_INCDIR}/ext/spl/spl_heap.h
+${PHP_INCDIR}/ext/spl/spl_iterators.h
+${PHP_INCDIR}/ext/spl/spl_observer.h
+${PHP_INCDIR}/ext/standard/base64.h
+${PHP_INCDIR}/ext/standard/basic_functions.h
+${PHP_INCDIR}/ext/standard/basic_functions_arginfo.h
+${PHP_INCDIR}/ext/standard/crc32.h
+${PHP_INCDIR}/ext/standard/crc32_x86.h
+${PHP_INCDIR}/ext/standard/credits.h
+${PHP_INCDIR}/ext/standard/credits_ext.h
+${PHP_INCDIR}/ext/standard/credits_sapi.h
+${PHP_INCDIR}/ext/standard/crypt_blowfish.h
+${PHP_INCDIR}/ext/standard/crypt_freesec.h
+${PHP_INCDIR}/ext/standard/css.h
+${PHP_INCDIR}/ext/standard/dir_arginfo.h
+${PHP_INCDIR}/ext/standard/dl.h
+${PHP_INCDIR}/ext/standard/dl_arginfo.h
+${PHP_INCDIR}/ext/standard/exec.h
+${PHP_INCDIR}/ext/standard/file.h
+${PHP_INCDIR}/ext/standard/file_arginfo.h
+${PHP_INCDIR}/ext/standard/flock_compat.h
+${PHP_INCDIR}/ext/standard/fsock.h
+${PHP_INCDIR}/ext/standard/head.h
+${PHP_INCDIR}/ext/standard/html.h
+${PHP_INCDIR}/ext/standard/html_tables.h
+${PHP_INCDIR}/ext/standard/info.h
+${PHP_INCDIR}/ext/standard/md5.h
+${PHP_INCDIR}/ext/standard/pageinfo.h
+${PHP_INCDIR}/ext/standard/password_arginfo.h
+${PHP_INCDIR}/ext/standard/php_array.h
+${PHP_INCDIR}/ext/standard/php_assert.h
+${PHP_INCDIR}/ext/standard/php_browscap.h
+${PHP_INCDIR}/ext/standard/php_crypt.h
+${PHP_INCDIR}/ext/standard/php_crypt_r.h
+${PHP_INCDIR}/ext/standard/php_dir.h
+${PHP_INCDIR}/ext/standard/php_dir_int.h
+${PHP_INCDIR}/ext/standard/php_dns.h
+${PHP_INCDIR}/ext/standard/php_ext_syslog.h
+${PHP_INCDIR}/ext/standard/php_filestat.h
+${PHP_INCDIR}/ext/standard/php_fopen_wrappers.h
+${PHP_INCDIR}/ext/standard/php_http.h
+${PHP_INCDIR}/ext/standard/php_image.h
+${PHP_INCDIR}/ext/standard/php_incomplete_class.h
+${PHP_INCDIR}/ext/standard/php_mail.h
+${PHP_INCDIR}/ext/standard/php_math.h
+${PHP_INCDIR}/ext/standard/php_math_round_mode.h
+${PHP_INCDIR}/ext/standard/php_net.h
+${PHP_INCDIR}/ext/standard/php_password.h
+${PHP_INCDIR}/ext/standard/php_standard.h
+${PHP_INCDIR}/ext/standard/php_string.h
+${PHP_INCDIR}/ext/standard/php_uuencode.h
+${PHP_INCDIR}/ext/standard/php_var.h
+${PHP_INCDIR}/ext/standard/php_versioning.h
+${PHP_INCDIR}/ext/standard/proc_open.h
+${PHP_INCDIR}/ext/standard/quot_print.h
+${PHP_INCDIR}/ext/standard/scanf.h
+${PHP_INCDIR}/ext/standard/sha1.h
+${PHP_INCDIR}/ext/standard/streamsfuncs.h
+${PHP_INCDIR}/ext/standard/url.h
+${PHP_INCDIR}/ext/standard/url_scanner_ex.h
+${PHP_INCDIR}/ext/standard/user_filters_arginfo.h
+${PHP_INCDIR}/ext/standard/winver.h
+${PHP_INCDIR}/ext/uri/php_uri.h
+${PHP_INCDIR}/ext/uri/php_uri_common.h
+${PHP_INCDIR}/ext/uri/uri_parser_php_parse_url.h
+${PHP_INCDIR}/ext/uri/uri_parser_rfc3986.h
+${PHP_INCDIR}/ext/uri/uri_parser_whatwg.h
+${PHP_INCDIR}/ext/xml/expat_compat.h
+${PHP_INCDIR}/ext/xml/php_xml.h
+${PHP_INCDIR}/main/SAPI.h
+${PHP_INCDIR}/main/build-defs.h
+${PHP_INCDIR}/main/charclass.h
+${PHP_INCDIR}/main/fastcgi.h
+${PHP_INCDIR}/main/fopen_wrappers.h
+${PHP_INCDIR}/main/http_status_codes.h
+${PHP_INCDIR}/main/main_arginfo.h
+${PHP_INCDIR}/main/php.h
+${PHP_INCDIR}/main/php_compat.h
+${PHP_INCDIR}/main/php_config.h
+${PHP_INCDIR}/main/php_content_types.h
+${PHP_INCDIR}/main/php_getopt.h
+${PHP_INCDIR}/main/php_glob.h
+${PHP_INCDIR}/main/php_globals.h
+${PHP_INCDIR}/main/php_ini.h
+${PHP_INCDIR}/main/php_ini_builder.h
+${PHP_INCDIR}/main/php_main.h
+${PHP_INCDIR}/main/php_memory_streams.h
+${PHP_INCDIR}/main/php_network.h
+${PHP_INCDIR}/main/php_odbc_utils.h
+${PHP_INCDIR}/main/php_open_temporary_file.h
+${PHP_INCDIR}/main/php_output.h
+${PHP_INCDIR}/main/php_reentrancy.h
+${PHP_INCDIR}/main/php_scandir.h
+${PHP_INCDIR}/main/php_streams.h
+${PHP_INCDIR}/main/php_syslog.h
+${PHP_INCDIR}/main/php_ticks.h
+${PHP_INCDIR}/main/php_variables.h
+${PHP_INCDIR}/main/php_version.h
+${PHP_INCDIR}/main/rfc1867.h
+${PHP_INCDIR}/main/snprintf.h
+${PHP_INCDIR}/main/spprintf.h
+${PHP_INCDIR}/main/streams/php_stream_context.h
+${PHP_INCDIR}/main/streams/php_stream_filter_api.h
+${PHP_INCDIR}/main/streams/php_stream_glob_wrapper.h
+${PHP_INCDIR}/main/streams/php_stream_mmap.h
+${PHP_INCDIR}/main/streams/php_stream_plain_wrapper.h
+${PHP_INCDIR}/main/streams/php_stream_transport.h
+${PHP_INCDIR}/main/streams/php_stream_userspace.h
+${PHP_INCDIR}/main/streams/php_streams_int.h
+${PHP_INCDIR}/main/streams/userspace_arginfo.h
+${PHP_INCDIR}/sapi/cli/cli.h
+${PLIST.embed}${PHP_INCDIR}/sapi/embed/php_embed.h
+${PLIST.embed}lib/libphp${PHP_VER}.so
+${PHP_LIBDIR}/build/Makefile.global
+${PHP_LIBDIR}/build/ax_check_compile_flag.m4
+${PHP_LIBDIR}/build/ax_gcc_func_attribute.m4
+${PHP_LIBDIR}/build/config.guess
+${PHP_LIBDIR}/build/config.sub
+${PHP_LIBDIR}/build/gen_stub.php
+${PHP_LIBDIR}/build/libtool.m4
+${PHP_LIBDIR}/build/ltmain.sh
+${PHP_LIBDIR}/build/php.m4
+${PHP_LIBDIR}/build/php_cxx_compile_stdcxx.m4
+${PHP_LIBDIR}/build/phpize.m4
+${PHP_LIBDIR}/build/pkg.m4
+${PHP_LIBDIR}/build/run-tests.php
+${PHP_LIBDIR}/build/shtool
+libexec/cgi-bin/php${PHP_VER}
+man/man1/phar${PHP_VER}.1
+man/man1/phar${PHP_VER}.phar.1
+man/man1/php-cgi${PHP_VER}.1
+man/man1/php-config${PHP_VER}.1
+man/man1/php${PHP_VER}.1
+man/man1/phpdbg${PHP_VER}.1
+man/man1/phpize${PHP_VER}.1
+${PHP_EGDIR}/php.ini-development
+${PHP_EGDIR}/php.ini-production
+${PHP_SHAREDIR}/README.pkgsrc
+@pkgdir ${PHPEXTDIR}
Index: pkgsrc/lang/php85/buildlink3.mk
diff -u /dev/null pkgsrc/lang/php85/buildlink3.mk:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/buildlink3.mk Thu Jan 8 13:38:00 2026
@@ -0,0 +1,18 @@
+# $NetBSD: buildlink3.mk,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+BUILDLINK_TREE+= php85
+
+.if !defined(PHP85_BUILDLINK3_MK)
+PHP85_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.php85+= php85>=8.5.0<8.6
+BUILDLINK_ABI_DEPENDS.php85+= php85>=8.5.1
+BUILDLINK_PKGSRCDIR.php85?= ../../lang/php85
+BUILDLINK_INCDIRS.php85+= ${PHP_INCDIR}
+
+pkgbase := php85
+.include "../../mk/pkg-build-options.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.endif # PHP85_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -php85
Index: pkgsrc/lang/php85/distinfo
diff -u /dev/null pkgsrc/lang/php85/distinfo:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/distinfo Thu Jan 8 13:38:00 2026
@@ -0,0 +1,24 @@
+$NetBSD: distinfo,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+BLAKE2s (php-8.5.1.tar.xz) = f24843847d5879caa52d7f2ce032d18c62176595aac36d574d68f801180f1bb1
+SHA512 (php-8.5.1.tar.xz) = baac228db5ba26d97abd6c1471ea8448aa1bd7754f4637ca9399b8200df6b7be23e71dd20edbe55828a87a354f0d1a8516aaa434b6fd45ddcb05a478c04a94e2
+Size (php-8.5.1.tar.xz) = 14326700 bytes
+SHA1 (patch-build_Makefile.global) = 570d813a05626f633e2ce380ab6668fdc7e8f030
+SHA1 (patch-build_php.m4) = bb72e38ab391ad587962940ba85e8d4de8633dca
+SHA1 (patch-configure.ac) = 20c95915d5e4aa622d04ee923c626789c44fef11
+SHA1 (patch-ext_pcntl_pcntl.c) = 0b741d6b501ae1f4932a98de79a860eef2ee1a14
+SHA1 (patch-ext_phar_Makefile.frag) = 53ea5c58b0bc27d236118d5750a74b1cba43e5dd
+SHA1 (patch-ext_standard_php__fopen__wrapper.c) = 0a2c19c18f089448a8d842e99738b292ab9e5640
+SHA1 (patch-main_streams_streams.c) = d699ce7d3a300ffb39494b3f1fa5e0958f714483
+SHA1 (patch-php.ini-development) = 2974af3c5f923491d4d23f85a3dcf24d91ce7c86
+SHA1 (patch-php.ini-production) = 023ba88c06470e32b18d5502bc500dd7c2510702
+SHA1 (patch-sapi_apache2handler_config.m4) = 6b1834b9c212887fbcc1b6679858d5dd8eb4e19b
+SHA1 (patch-sapi_cgi_Makefile.frag) = f4cd64d334884c49787d8854115c8cd69cc79bb8
+SHA1 (patch-sapi_cgi_config9.m4) = 473d5bd351138538bb6f2c394982df35b6543714
+SHA1 (patch-sapi_cli_Makefile.frag) = 1cd29d09042863acbf5330e406410fdcf75d06b3
+SHA1 (patch-sapi_fpm_fpm_fpm__conf.c) = 26f25b64d71e4d4d89c19b04433b10abc6673504
+SHA1 (patch-sapi_fpm_php-fpm.conf.in) = 86e0de84d2e273bf63e475716c1eda1ea5d7937f
+SHA1 (patch-sapi_fpm_www.conf.in) = 2299f6de1d4c0ead4fe41eca4af5ea3e8e7b3a35
+SHA1 (patch-scripts_Makefile.frag) = e3eb2fd682e0b5048995007c040aebaa9d135fe9
+SHA1 (patch-scripts_php-config.in) = b43fb08f2bcb99fb96fd967efd85ee871382b0c6
+SHA1 (patch-scripts_phpize.in) = 29245d9fc487a0800de4a9a7670b0a65a765bb58
Index: pkgsrc/lang/php85/options.mk
diff -u /dev/null pkgsrc/lang/php85/options.mk:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/options.mk Thu Jan 8 13:38:00 2026
@@ -0,0 +1,75 @@
+# $NetBSD: options.mk,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.php85
+PKG_SUPPORTED_OPTIONS+= inet6 ssl zts readline argon2 php-embed
+PKG_SUPPORTED_OPTIONS+= disable-filter-url
+PKG_SUGGESTED_OPTIONS+= inet6 ssl readline
+PKG_OPTIONS_LEGACY_OPTS+= maintainer-zts:zts
+
+PLIST_VARS+= dtrace embed
+
+.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
+PKG_SUPPORTED_OPTIONS+= dtrace
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --enable-ipv6
+.else
+CONFIGURE_ARGS+= --disable-ipv6
+.endif
+
+.if !empty(PKG_OPTIONS:Mssl)
+. include "../../security/openssl/buildlink3.mk"
+. if ${OPSYS} == "SunOS"
+CONFIGURE_ARGS+= --with-openssl=yes
+LIBS.SunOS+= -lcrypto
+. else
+CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
+. endif
+.else
+CONFIGURE_ARGS+= --without-openssl
+.endif
+
+.if !empty(PKG_OPTIONS:Mzts)
+CONFIGURE_ARGS+= --enable-zts
+.endif
+
+.if !empty(PKG_OPTIONS:Mreadline)
+.include "../../devel/readline/buildlink3.mk"
+CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline}
+.else
+CONFIGURE_ARGS+= --without-readline
+.endif
+
+.if !empty(PKG_OPTIONS:Mdtrace)
+PLIST.dtrace= yes
+CONFIGURE_ARGS+= --enable-dtrace
+
+# See https://bugs.php.net/bug.php?id=61268
+INSTALL_MAKE_FLAGS+= -r
+.endif
+
+.if !empty(PKG_OPTIONS:Margon2)
+CONFIGURE_ARGS+= --with-password-argon2=${BUILDLINK_PREFIX.argon2}
+.include "../../security/argon2/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mdisable-filter-url)
+CFLAGS+= -DDISABLE_FILTER_URL
+.endif
+
+PLIST_VARS+= embed
+
+.if ${.CURDIR:C/.*\///} != "ap-php" && ${.CURDIR:C/.*\///} != "php-fpm" && ${PKG_OPTIONS:Mphp-embed}
+CONFIGURE_ARGS+= --enable-embed
+INSTALLATION_DIRS+= ${PHP_INCDIR}/sapi/embed
+PLIST.embed= yes
+
+.PHONY: post-install-embed
+post-install: post-install-embed
+post-install-embed:
+ ${INSTALL_DATA} ${WRKSRC}/sapi/embed/php_embed.h ${DESTDIR}${PREFIX}/${PHP_INCDIR}/sapi/embed/
+ ${INSTALL_LIB} ${WRKSRC}/libs/libphp${PHP_VER}.so ${DESTDIR}${PREFIX}/lib
+.endif
Index: pkgsrc/lang/php85/patches/patch-build_Makefile.global
diff -u /dev/null pkgsrc/lang/php85/patches/patch-build_Makefile.global:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-build_Makefile.global Thu Jan 8 13:38:00 2026
@@ -0,0 +1,58 @@
+$NetBSD: patch-build_Makefile.global,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+* Add ${PHP_VER} suffix.
+
+--- build/Makefile.global.orig 2025-12-16 15:59:07.000000000 +0000
++++ build/Makefile.global
+@@ -14,26 +14,26 @@ build-modules: $(PHP_MODULES) $(PHP_ZEND
+
+ build-binaries: $(PHP_BINARIES)
+
+-libphp.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++libphp$(PHP_VER).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
+ $(LIBTOOL) --tag=CC --mode=link $(CC) $(LIBPHP_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
+ -@$(LIBTOOL) --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
+
+-libphp.dylib: libphp.la
++libphp$(PHP_VER).dylib: libphp$(PHP_VER).la
+ $(LIBTOOL) --tag=CC --mode=link $(CC) -dynamiclib $(LIBPHP_CFLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -rpath $(phptempdir) -install_name @rpath/$@ $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
$(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
+ -@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
+
+-libs/libphp.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
+- $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
&& cp $@ libs/libphp.so
++libs/libphp$(PHP_VER).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++ $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
&& cp $@ libs/libphp$(PHP_VER).so
+
+ install: $(all_targets) $(install_targets)
+
+ install-sapi: $(OVERALL_TARGET)
+ @echo "Installing PHP SAPI module: $(PHP_SAPI)"
+ -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
+- -@if test ! -r $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME); then \
++ -@if test ! -r $(phptempdir)/libphp$(PHP_VER).$(SHLIB_DL_SUFFIX_NAME); then \
+ for i in 0.0.0 0.0 0; do \
+- if test -r $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
+- $(LN_S) $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME); \
++ if test -r $(phptempdir)/libphp$(PHP_VER).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
++ $(LN_S) $(phptempdir)/libphp$(PHP_VER).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME); \
+ break; \
+ fi; \
+ done; \
+@@ -121,7 +121,7 @@ clean:
+ find . -name \*.la -o -name \*.a | xargs rm -f
+ find . -name \*.so | xargs rm -f
+ find . -name .libs -a -type d|xargs rm -rf
+- rm -f libphp.la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(SAPI_PHPDBG_PATH) $(SAPI_PHPDBG_SHARED_PATH) $(OVERALL_TARGET) modules/* libs/*
++ rm -f libphp$(PHP_VER).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(SAPI_PHPDBG_PATH) $(SAPI_PHPDBG_SHARED_PATH) $(OVERALL_TARGET) modules/* libs/*
+ rm -f ext/opcache/jit/ir/gen_ir_fold_hash
+ rm -f ext/opcache/jit/ir/minilua
+ rm -f ext/opcache/jit/ir/ir_fold_hash.h
+@@ -147,7 +147,7 @@ prof-clean:
+ find . -name \*.lo -o -name \*.o | xargs rm -f
+ find . -name \*.la -o -name \*.a | xargs rm -f
+ find . -name \*.so | xargs rm -f
+- rm -f libphp.la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(SAPI_PHPDBG_PATH) $(SAPI_PHPDBG_SHARED_PATH) $(OVERALL_TARGET) modules/* libs/*
++ rm -f libphp$(PHP_VER).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(SAPI_PHPDBG_PATH) $(SAPI_PHPDBG_SHARED_PATH) $(OVERALL_TARGET) modules/* libs/*
+
+ prof-use:
+ CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all
Index: pkgsrc/lang/php85/patches/patch-build_php.m4
diff -u /dev/null pkgsrc/lang/php85/patches/patch-build_php.m4:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-build_php.m4 Thu Jan 8 13:38:00 2026
@@ -0,0 +1,55 @@
+$NetBSD: patch-build_php.m4,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+* Do not include "PKG_CONFIG*" in CONFIGURE_OPTIONS.
+* Add ${PHP_VER} suffix.
+* Fake required zlib version for NetBSD.
+
+--- build/php.m4.orig 2025-01-15 01:03:17.000000000 +0000
++++ build/php.m4
+@@ -767,7 +767,7 @@ dnl PHP_BUILD_SHARED
+ dnl
+ AC_DEFUN([PHP_BUILD_SHARED],[
+ PHP_BUILD_PROGRAM
+- OVERALL_TARGET=libphp.la
++ OVERALL_TARGET=libphp$PHP_VER.la
+ php_sapi_module=shared
+
+ php_c_pre=$shared_c_pre
+@@ -784,7 +784,7 @@ dnl PHP_BUILD_STATIC
+ dnl
+ AC_DEFUN([PHP_BUILD_STATIC],[
+ PHP_BUILD_PROGRAM
+- OVERALL_TARGET=libphp.la
++ OVERALL_TARGET=libphp$PHP_VER.la
+ php_sapi_module=static
+ ])
+
+@@ -793,7 +793,7 @@ dnl PHP_BUILD_BUNDLE
+ dnl
+ AC_DEFUN([PHP_BUILD_BUNDLE],[
+ PHP_BUILD_PROGRAM
+- OVERALL_TARGET=libs/libphp.bundle
++ OVERALL_TARGET=libs/libphp$PHP_VER.bundle
+ php_sapi_module=static
+ ])
+
+@@ -1928,7 +1928,7 @@ dnl default error by PKG_CHECK_MODULES i
+ dnl is given.
+ dnl
+ AC_DEFUN([PHP_SETUP_ZLIB], [dnl
+-PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.11], [dnl
++PKG_CHECK_MODULES([ZLIB], [zlib >= @FAKE_ZLIB_VERSION@], [dnl
+ PHP_EVAL_INCLINE([$ZLIB_CFLAGS])
+ PHP_EVAL_LIBLINE([$ZLIB_LIBS], [$1])
+ $2], [$3])dnl
+@@ -2099,6 +2099,10 @@ EOF
+ else
+ break
+ fi
++ case "$CURRENT_ARG" in
++ \'PKG_CONFIG\=*) CURRENT_ARG="'PKG_CONFIG=@TOOLS_PATH.pkg-config@'";;
++ \'PKG_CONFIG_LIBDIR\=*) CURRENT_ARG="'PKG_CONFIG_LIBDIR=@PHP_PKGCONFIG_PATH@'";;
++ esac
+ AS_ECHO(["$CURRENT_ARG \\"]) >>$1
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CURRENT_ARG"
+ done
Index: pkgsrc/lang/php85/patches/patch-configure.ac
diff -u /dev/null pkgsrc/lang/php85/patches/patch-configure.ac:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-configure.ac Thu Jan 8 13:38:00 2026
@@ -0,0 +1,48 @@
+$NetBSD: patch-configure.ac,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+* libphp.so => libphp${PHP_VER}.so.
+* add ${PHP_VER} to lib/php.
+
+--- configure.ac.orig 2025-12-16 15:59:07.000000000 +0000
++++ configure.ac
+@@ -270,7 +270,7 @@ dnl SAPI configuration.
+ dnl ----------------------------------------------------------------------------
+
+ dnl Paths to the targets are relative to the build directory.
+-SAPI_LIBNAME=libphp
++SAPI_LIBNAME=libphp$(PHP_VER)
+ SAPI_LIBNAME_SHARED=$SAPI_LIBNAME.[]$SHLIB_DL_SUFFIX_NAME
+ SAPI_LIBNAME_STATIC=$SAPI_LIBNAME.a
+ SAPI_SHARED=libs/$SAPI_LIBNAME_SHARED
+@@ -1172,7 +1172,7 @@ AS_VAR_IF([PHP_PEAR], [no],, [
+ AS_VAR_IF([PHP_PEAR], [yes],
+ [AS_CASE([$PHP_LAYOUT],
+ [GNU], [PEAR_INSTALLDIR=$datadir/pear],
+- [PEAR_INSTALLDIR=$libdir/php])],
++ [PEAR_INSTALLDIR=$libdir/php/${PHP_API_VERS}])],
+ [PEAR_INSTALLDIR=$PHP_PEAR])
+
+ PHP_SUBST([PEAR_INSTALLDIR])
+@@ -1333,11 +1333,11 @@ orig_libdir=$libdir
+ dnl First for unexpanded (default), second for expanded (from options)
+ AS_CASE([$libdir],
+ ['${exec_prefix}/lib'], [libdir=$libdir/php],
+- [${exec_prefix}/${PHP_LIBDIR}], [libdir=$libdir/php])
++ [${exec_prefix}/${PHP_LIBDIR}], [libdir=$libdir/php${PHP_API_VERS}])
+
+ AS_CASE([$(eval echo $datadir)],
+ ['${prefix}/share'], [datadir=$datadir/php],
+- [${prefix}/share], [datadir=$datadir/php])
++ [${prefix}/share], [datadir=$datadir/php${PHP_API_VERS}])
+
+ phptempdir=$(pwd)/libs
+
+@@ -1371,7 +1371,7 @@ AS_VAR_IF([EXTENSION_DIR],, [
+
+ AS_CASE([$PHP_LAYOUT],
+ [GNU], [datarootdir=$prefix/share],
+- [datarootdir=$prefix/php])
++ [datarootdir=$prefix/${PHP_SHAREDIR}])
+
+ dnl Expand all directory names for use in macros/constants.
+ EXPANDED_PEAR_INSTALLDIR=$(eval echo $PEAR_INSTALLDIR)
Index: pkgsrc/lang/php85/patches/patch-ext_pcntl_pcntl.c
diff -u /dev/null pkgsrc/lang/php85/patches/patch-ext_pcntl_pcntl.c:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-ext_pcntl_pcntl.c Thu Jan 8 13:38:00 2026
@@ -0,0 +1,17 @@
+$NetBSD: patch-ext_pcntl_pcntl.c,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+Use proper type for wait6(2).
+
+--- ext/pcntl/pcntl.c.orig 2025-12-16 15:59:07.000000000 +0000
++++ ext/pcntl/pcntl.c
+@@ -437,8 +437,8 @@ PHP_FUNCTION(pcntl_waitid)
+ }
+ struct rusage rusage;
+ # if defined(HAVE_WAIT6) /* FreeBSD */
+- struct __wrusage wrusage;
+- memset(&wrusage, 0, sizeof(struct __wrusage));
++ struct wrusage wrusage;
++ memset(&wrusage, 0, sizeof(struct wrusage));
+ pid_t pid = wait6((idtype_t) idtype, (id_t) id, &status, (int) options, &wrusage, &siginfo);
+ status = pid > 0 ? 0 : pid;
+ memcpy(&rusage, &wrusage.wru_self, sizeof(struct rusage));
Index: pkgsrc/lang/php85/patches/patch-ext_phar_Makefile.frag
diff -u /dev/null pkgsrc/lang/php85/patches/patch-ext_phar_Makefile.frag:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-ext_phar_Makefile.frag Thu Jan 8 13:38:00 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-ext_phar_Makefile.frag,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+Set shbang for phar correctly.
+
+--- ext/phar/Makefile.frag.orig 2015-06-23 17:33:33.000000000 +0000
++++ ext/phar/Makefile.frag
+@@ -18,7 +18,7 @@ PHP_PHARCMD_EXECUTABLE = ` \
+ else \
+ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
+ fi;`
+-PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
++PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
+
+ $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
+ -@test -d $(builddir)/phar || mkdir $(builddir)/phar
Index: pkgsrc/lang/php85/patches/patch-ext_standard_php__fopen__wrapper.c
diff -u /dev/null pkgsrc/lang/php85/patches/patch-ext_standard_php__fopen__wrapper.c:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-ext_standard_php__fopen__wrapper.c Thu Jan 8 13:38:00 2026
@@ -0,0 +1,30 @@
+$NetBSD: patch-ext_standard_php__fopen__wrapper.c,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+Add build-time disable option for dangerous php://filter URL
+
+php://filter URL is a feature documented here:
+http://php.net/manual/en/wrappers.php.php
+
+Unfortunately, it allows remote control of include() behavior
+beyond what many developpers expected, enabling easy dump of
+PHP source files. The administrator may want to disable the
+feature for security sake, and this patch makes that possible.
+
+--- ext/standard/php_fopen_wrapper.c.orig 2019-11-19 10:24:58.000000000 +0000
++++ ext/standard/php_fopen_wrapper.c
+@@ -338,6 +338,7 @@ php_stream * php_stream_url_wrap_php(php
+ "[%d]: %s", fildes_ori, errno, strerror(errno));
+ return NULL;
+ }
++#ifndef DISABLE_FILTER_URL
+ } else if (!strncasecmp(path, "filter/", 7)) {
+ /* Save time/memory when chain isn't specified */
+ if (strchr(mode, 'r') || strchr(mode, '+')) {
+@@ -380,6 +381,7 @@ php_stream * php_stream_url_wrap_php(php
+ }
+
+ return stream;
++#endif /* !DISABLE_FILTER_URL */
+ } else {
+ /* invalid php://thingy */
+ php_error_docref(NULL, E_WARNING, "Invalid php:// URL specified");
Index: pkgsrc/lang/php85/patches/patch-main_streams_streams.c
diff -u /dev/null pkgsrc/lang/php85/patches/patch-main_streams_streams.c:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-main_streams_streams.c Thu Jan 8 13:38:00 2026
@@ -0,0 +1,19 @@
+$NetBSD: patch-main_streams_streams.c,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+* Allow copying files with size zero.
+
+--- main/streams/streams.c.orig 2022-05-11 01:14:18.000000000 +0000
++++ main/streams/streams.c
+@@ -1584,10 +1584,8 @@ PHPAPI int _php_stream_copy_to_stream_ex
+
+ *len = haveread += didwrite;
+
+- /* we've got at least 1 byte to read
+- * less than 1 is an error
+- * AND read bytes match written */
+- if (mapped == 0 || mapped != didwrite) {
++ /* read bytes match written */
++ if (mapped != didwrite) {
+ return FAILURE;
+ }
+ if (mapped < chunk_size) {
Index: pkgsrc/lang/php85/patches/patch-php.ini-development
diff -u /dev/null pkgsrc/lang/php85/patches/patch-php.ini-development:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-php.ini-development Thu Jan 8 13:38:00 2026
@@ -0,0 +1,34 @@
+$NetBSD: patch-php.ini-development,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+Set proper default configuration values.
+
+--- php.ini-development.orig 2025-06-03 16:29:26.000000000 +0000
++++ php.ini-development
+@@ -736,7 +736,7 @@ default_charset = "UTF-8"
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:@PREFIX@/@PHP_LIBDIR@"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -757,7 +757,8 @@ doc_root =
+ ; https://php.net/user-dir
+ user_dir =
+
+-; Directory in which the loadable extensions (modules) reside.
++; Directory in which the loadable extensions (modules) reside. If not
++; defined, then use the extension directory specified at compile-time.
+ ; https://php.net/extension-dir
+ ;extension_dir = "./"
+ ; On windows:
+@@ -842,7 +843,7 @@ file_uploads = On
+ ; Temporary directory for HTTP uploaded files (will use system default if not
+ ; specified).
+ ; https://php.net/upload-tmp-dir
+-;upload_tmp_dir =
++upload_tmp_dir = /tmp
+
+ ; Maximum allowed size for uploaded files.
+ ; https://php.net/upload-max-filesize
Index: pkgsrc/lang/php85/patches/patch-php.ini-production
diff -u /dev/null pkgsrc/lang/php85/patches/patch-php.ini-production:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-php.ini-production Thu Jan 8 13:38:00 2026
@@ -0,0 +1,34 @@
+$NetBSD: patch-php.ini-production,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+Set proper default configuration values.
+
+--- php.ini-production.orig 2025-06-03 16:29:26.000000000 +0000
++++ php.ini-production
+@@ -738,7 +738,7 @@ default_charset = "UTF-8"
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:@PREFIX@/@PHP_LIBDIR@"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -759,7 +759,8 @@ doc_root =
+ ; https://php.net/user-dir
+ user_dir =
+
+-; Directory in which the loadable extensions (modules) reside.
++; Directory in which the loadable extensions (modules) reside. If not
++; defined, then use the extension directory specified at compile-time.
+ ; https://php.net/extension-dir
+ ;extension_dir = "./"
+ ; On windows:
+@@ -844,7 +845,7 @@ file_uploads = On
+ ; Temporary directory for HTTP uploaded files (will use system default if not
+ ; specified).
+ ; https://php.net/upload-tmp-dir
+-;upload_tmp_dir =
++upload_tmp_dir = /tmp
+
+ ; Maximum allowed size for uploaded files.
+ ; https://php.net/upload-max-filesize
Index: pkgsrc/lang/php85/patches/patch-sapi_apache2handler_config.m4
diff -u /dev/null pkgsrc/lang/php85/patches/patch-sapi_apache2handler_config.m4:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-sapi_apache2handler_config.m4 Thu Jan 8 13:38:00 2026
@@ -0,0 +1,47 @@
+$NetBSD: patch-sapi_apache2handler_config.m4,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+* Don't autodetect maintainer-zts.
+* Add $PHP_VER suffix.
+
+--- sapi/apache2handler/config.m4.orig 2025-05-06 12:31:58.000000000 +0000
++++ sapi/apache2handler/config.m4
+@@ -72,14 +72,14 @@ if test "$PHP_APXS2" != "no"; then
+ if test -z $($APXS -q SYSCONFDIR); then
+ INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
+ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
+- -i -n php"
++ -i -n php$PHP_VER"
+ else
+ APXS_SYSCONFDIR='$(INSTALL_ROOT)'$($APXS -q SYSCONFDIR)
+ INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
+ \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
+ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
+ -S SYSCONFDIR='$APXS_SYSCONFDIR' \
+- -i -a -n php"
++ -i -a -n php$PHP_VER"
+ fi
+
+ LIBPHP_CFLAGS="-shared"
+@@ -119,22 +119,4 @@ if test "$PHP_APXS2" != "no"; then
+ $APU_CFLAGS
+ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1
+ ])
+-
+- AS_IF([$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes' >/dev/null 2>&1], [
+- APACHE_THREADED_MPM=yes
+- enable_zts=yes
+- ], [APACHE_THREADED_MPM=no])
+-
+-AC_CONFIG_COMMANDS([apache2handler], [AS_VAR_IF([enable_zts], [yes],,
+- [AS_VAR_IF([APACHE_THREADED_MPM], [no],
+- [AC_MSG_WARN([
+-+--------------------------------------------------------------------+
+-| *** WARNING *** |
+-| |
+-| You have built PHP for Apache's current non-threaded MPM. |
+-| If you change Apache to use a threaded MPM you must reconfigure |
+-| PHP with --enable-zts |
+-+--------------------------------------------------------------------+
+- ])])])],
+- [APACHE_THREADED_MPM="$APACHE_THREADED_MPM"; enable_zts="$enable_zts"])
+ fi
Index: pkgsrc/lang/php85/patches/patch-sapi_cgi_Makefile.frag
diff -u /dev/null pkgsrc/lang/php85/patches/patch-sapi_cgi_Makefile.frag:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-sapi_cgi_Makefile.frag Thu Jan 8 13:38:00 2026
@@ -0,0 +1,18 @@
+$NetBSD: patch-sapi_cgi_Makefile.frag,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+Install to CGI directory.
+
+--- sapi/cgi/Makefile.frag.orig 2015-06-23 17:33:33.000000000 +0000
++++ sapi/cgi/Makefile.frag
+@@ -4,9 +4,9 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(P
+ $(BUILD_CGI)
+
+ install-cgi: $(SAPI_CGI_PATH)
+- @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
++ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)@CGIDIR@/"
+ @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
+- @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php-cgi$(program_suffix)$(EXEEXT)
++ @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)@CGIDIR@/$(program_prefix)php$(program_suffix)$(EXEEXT)
+ @echo "Installing PHP CGI man page: $(INSTALL_ROOT)$(mandir)/man1/"
+ @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
+ @$(INSTALL_DATA) sapi/cgi/php-cgi.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)php-cgi$(program_suffix).1
Index: pkgsrc/lang/php85/patches/patch-sapi_cgi_config9.m4
diff -u /dev/null pkgsrc/lang/php85/patches/patch-sapi_cgi_config9.m4:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-sapi_cgi_config9.m4 Thu Jan 8 13:38:00 2026
@@ -0,0 +1,17 @@
+$NetBSD: patch-sapi_cgi_config9.m4,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+* Add $PHP_VER suffix.
+
+--- sapi/cgi/config9.m4.orig 2025-01-15 01:03:17.000000000 +0000
++++ sapi/cgi/config9.m4
+@@ -22,8 +22,8 @@ if test "$PHP_CGI" != "no"; then
+
+ dnl Set filename.
+ AS_CASE([$host_alias],
+- [*cygwin*], [SAPI_CGI_PATH=sapi/cgi/php-cgi.exe],
+- [SAPI_CGI_PATH=sapi/cgi/php-cgi])
++ [*cygwin*], [SAPI_CGI_PATH=sapi/cgi/php${PHP_VER}-cgi.exe],
++ [SAPI_CGI_PATH=sapi/cgi/php${PHP_VER}-cgi])
+
+ dnl Select SAPI.
+ PHP_SELECT_SAPI([cgi],
Index: pkgsrc/lang/php85/patches/patch-sapi_cli_Makefile.frag
diff -u /dev/null pkgsrc/lang/php85/patches/patch-sapi_cli_Makefile.frag:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-sapi_cli_Makefile.frag Thu Jan 8 13:38:00 2026
@@ -0,0 +1,19 @@
+$NetBSD: patch-sapi_cli_Makefile.frag,v 1.1 2026/01/08 13:38:00 taca Exp $
+
+Needed on NetBSD with PaX MPROTEXT, otherwise core dump with:
+#1 0x00000000004d0d87 in _pcre_jit_exec ()
+#2 0x00000000004a53f1 in php_pcre_exec ()
+https://bugs.php.net/bug.php?id=72281
+
+--- sapi/cli/Makefile.frag.orig 2016-04-28 18:12:27.000000000 +0000
++++ sapi/cli/Makefile.frag
+@@ -2,6 +2,9 @@ cli: $(SAPI_CLI_PATH)
+
+ $(SAPI_CLI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_CLI_OBJS)
+ $(BUILD_CLI)
++ @if test -x /usr/sbin/paxctl; then \
++ /usr/sbin/paxctl +m $(SAPI_CLI_PATH); \
++ fi
+
+ install-cli: $(SAPI_CLI_PATH)
+ @echo "Installing PHP CLI binary: $(INSTALL_ROOT)$(bindir)/"
Index: pkgsrc/lang/php85/patches/patch-sapi_fpm_fpm_fpm__conf.c
diff -u /dev/null pkgsrc/lang/php85/patches/patch-sapi_fpm_fpm_fpm__conf.c:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-sapi_fpm_fpm_fpm__conf.c Thu Jan 8 13:38:01 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-sapi_fpm_fpm_fpm__conf.c,v 1.1 2026/01/08 13:38:01 taca Exp $
+
+* Add $PHP_VER suffix.
+
+--- sapi/fpm/fpm/fpm_conf.c.orig 2024-12-17 18:18:02.000000000 +0000
++++ sapi/fpm/fpm/fpm_conf.c
+@@ -1309,7 +1309,7 @@ static int fpm_conf_post_process(int for
+ }
+
+ if (!fpm_global_config.error_log) {
+- fpm_global_config.error_log = strdup("log/php-fpm.log");
++ fpm_global_config.error_log = strdup("log/php-fpm@PHP_VER@.log");
+ }
+
+ #ifdef HAVE_SYSTEMD
Index: pkgsrc/lang/php85/patches/patch-sapi_fpm_php-fpm.conf.in
diff -u /dev/null pkgsrc/lang/php85/patches/patch-sapi_fpm_php-fpm.conf.in:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-sapi_fpm_php-fpm.conf.in Thu Jan 8 13:38:01 2026
@@ -0,0 +1,24 @@
+$NetBSD: patch-sapi_fpm_php-fpm.conf.in,v 1.1 2026/01/08 13:38:01 taca Exp $
+
+* Set proper default configuration values.
+* Add $PHP_VER suffix.
+
+--- sapi/fpm/php-fpm.conf.in.orig 2024-12-17 18:18:02.000000000 +0000
++++ sapi/fpm/php-fpm.conf.in
+@@ -14,14 +14,14 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++pid = run/php-fpm@PHP_VER@.pid
+
+ ; Error log file
+ ; If it's set to "syslog", log is sent to syslogd instead of being written
+ ; into a local file.
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.log
++;error_log = log/php-fpm@PHP_VER@.log
+
+ ; syslog_facility is used to specify what type of program is logging the
+ ; message. This lets syslogd specify that messages from different facilities
Index: pkgsrc/lang/php85/patches/patch-sapi_fpm_www.conf.in
diff -u /dev/null pkgsrc/lang/php85/patches/patch-sapi_fpm_www.conf.in:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-sapi_fpm_www.conf.in Thu Jan 8 13:38:01 2026
@@ -0,0 +1,46 @@
+$NetBSD: patch-sapi_fpm_www.conf.in,v 1.1 2026/01/08 13:38:01 taca Exp $
+
+* Use UNIX domain socket default and create with default group.
+* Set proper default configuration values with PHP version.
+
+--- sapi/fpm/www.conf.in.orig 2025-01-14 18:25:29.000000000 +0000
++++ sapi/fpm/www.conf.in
+@@ -38,7 +38,8 @@ group = @php_fpm_group@
+ ; (IPv6 and IPv4-mapped) on a specific port;
+ ; '/path/to/unix/socket' - to listen on a unix socket.
+ ; Note: This value is mandatory.
+-listen = 127.0.0.1:9000
++;listen = 127.0.0.1:9000
++listen = @php_fpm_localstatedir@/run/php-fpm@PHP_VER@
+
+ ; Set listen(2) backlog.
+ ; Default Value: 511 (-1 on Linux, FreeBSD and OpenBSD)
+@@ -51,8 +52,8 @@ listen = 127.0.0.1:9000
+ ; Default Values: Owner is set to the master process running user. If the group
+ ; is not set, the owner's group is used. Mode is set to 0660.
+ ;listen.owner = @php_fpm_user@
+-;listen.group = @php_fpm_group@
+-;listen.mode = 0660
++listen.group = @php_fpm_group@
++listen.mode = 0660
+
+ ; When POSIX Access Control Lists are supported you can set them using
+ ; these options, value is a comma separated list of user/group names.
+@@ -292,7 +293,7 @@ pm.max_spare_servers = 3
+
+ ; The access log file
+ ; Default: not set
+-;access.log = log/$pool.access.log
++;access.log = @php_fpm_localstatedir@/log/php-fpm@PHP_VER@.$pool.access.log
+
+ ; The access log format.
+ ; The following syntax is allowed
+@@ -372,7 +373,7 @@ pm.max_spare_servers = 3
+ ; The log file for slow requests
+ ; Default Value: not set
+ ; Note: slowlog is mandatory if request_slowlog_timeout is set
+-;slowlog = log/$pool.log.slow
++;slowlog = @php_fpm_localstatedir@/log/php-fpm@PHP_VER@.$pool.log.slow
+
+ ; The timeout for serving a single request after which a PHP backtrace will be
+ ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
Index: pkgsrc/lang/php85/patches/patch-scripts_Makefile.frag
diff -u /dev/null pkgsrc/lang/php85/patches/patch-scripts_Makefile.frag:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-scripts_Makefile.frag Thu Jan 8 13:38:01 2026
@@ -0,0 +1,17 @@
+$NetBSD: patch-scripts_Makefile.frag,v 1.1 2026/01/08 13:38:01 taca Exp $
+
+* Add $PHP_VER suffix.
+
+--- scripts/Makefile.frag.orig 2025-01-14 18:25:29.000000000 +0000
++++ scripts/Makefile.frag
+@@ -2,8 +2,8 @@
+ # Build environment install
+ #
+
+-phpincludedir = $(includedir)/php
+-phpbuilddir = $(libdir)/build
++phpincludedir = $(includedir)/php/$(PHP_API_VERS)
++phpbuilddir = $(prefix)/$(PHP_LIBDIR)/build
+
+ BUILD_FILES = \
+ scripts/phpize.m4 \
Index: pkgsrc/lang/php85/patches/patch-scripts_php-config.in
diff -u /dev/null pkgsrc/lang/php85/patches/patch-scripts_php-config.in:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-scripts_php-config.in Thu Jan 8 13:38:01 2026
@@ -0,0 +1,14 @@
+$NetBSD: patch-scripts_php-config.in,v 1.1 2026/01/08 13:38:01 taca Exp $
+
+* Add $PHP_VER suffix.
+
+--- scripts/php-config.in.orig 2025-01-15 01:03:17.000000000 +0000
++++ scripts/php-config.in
+@@ -7,6 +7,7 @@ exec_prefix="@exec_prefix@"
+ version="@PHP_VERSION@"
+ vernum="@PHP_VERSION_ID@"
+ include_dir="@includedir@/php"
++include_dir="@includedir@/php/@PHP_API_VERS@"
+ lib_dir="@orig_libdir@"
+ includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
+ ldflags="@PHP_LDFLAGS@"
Index: pkgsrc/lang/php85/patches/patch-scripts_phpize.in
diff -u /dev/null pkgsrc/lang/php85/patches/patch-scripts_phpize.in:1.1
--- /dev/null Thu Jan 8 13:38:01 2026
+++ pkgsrc/lang/php85/patches/patch-scripts_phpize.in Thu Jan 8 13:38:01 2026
@@ -0,0 +1,17 @@
+$NetBSD: patch-scripts_phpize.in,v 1.1 2026/01/08 13:38:01 taca Exp $
+
+* Add $PHP_VER suffix.
+
+--- scripts/phpize.in.orig 2025-01-14 18:25:29.000000000 +0000
++++ scripts/phpize.in
+@@ -4,8 +4,8 @@
+ prefix='@prefix@'
+ datarootdir='@datarootdir@'
+ exec_prefix="`eval echo @exec_prefix@`"
+-phpdir="`eval echo @libdir@`/build"
+-includedir="`eval echo @includedir@`/php"
++phpdir="@prefix@/@PHP_LIBDIR@/build"
++includedir="@prefix@/@PHP_INCDIR@"
+ builddir="`pwd`"
+ SED="@SED@"
+
Home |
Main Index |
Thread Index |
Old Index