1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= PHP Hypertext Preprocessor version 8.1
8 HOMEPAGE= https://php.net/
12 SITES[main]= PHP/distributions
13 DISTFILE[1]= php-8.1.26.tar.xz:main
15 SPKGS[standard]= complete
20 OPTIONS_AVAILABLE= CLI CGI FPM EMBED DEBUGGER
21 OPTIONS_STANDARD= CLI CGI FPM EMBED DEBUGGER
22 OPTGROUP_RESTRICTED= SAPI
23 OPTDESCR[SAPI]= Server Application Programming Interface
24 OPTGROUP[SAPI]= CLI CGI FPM DEBUGGER
25 OPT_ON[all]= CLI CGI FPM EMBED DEBUGGER
27 BUILD_DEPENDS= autoconf:single:standard
29 USES= cpe gmake pkgconfig zlib pcre2 mbsdfix
30 C_USES[darwin]= iconv:build
31 GNOME_COMPONENTS= libxml2
35 LICENSE= CUSTOM1:primary
36 LICENSE_NAME= CUSTOM1:"PHP License v3.01"
37 LICENSE_FILE= CUSTOM1:{{WRKSRC}}/LICENSE
41 FPC_EQUIVALENT= lang/php81
44 CONFIGURE_ARGS= --with-layout=GNU
47 --with-config-file-scan-dir={{PREFIX}}/etc/php81
48 --sysconfdir={{PREFIX}}/etc/php81
49 --libdir={{PREFIX}}/lib/php81
50 --datadir={{PREFIX}}/share/php81
53 --enable-maintainer-zts
55 CONFIGURE_ENV= ac_cv_decimal_fp_supported="no"
58 DESTDIRNAME= INSTALL_ROOT
62 RC_SUBR= php81-fpm:primary
65 [CLI].DESCRIPTION= Enable Command Line Interface SAPI
66 [CLI].CONFIGURE_ARGS_OFF= --disable-cli
67 [CLI].MAKEFILE_ON= PHP_SAPI+=cli
69 [FPM].DESCRIPTION= Enable FastCGI Process Manager SAPI
70 [FPM].CONFIGURE_ARGS_ON= --enable-fpm
71 --with-fpm-user={{WWWOWN}}
72 --with-fpm-group={{WWWGRP}}
73 [FPM].MAKEFILE_ON= PHP_SAPI+=fpm
75 [DEBUGGER].DESCRIPTION= Enable interactive debugger SAPI module support
76 [DEBUGGER].CONFIGURE_ENABLE_BOTH= phpdbg
77 [DEBUGGER].MAKEFILE_ON= PHP_SAPI+=phpdbg
79 [CGI].DESCRIPTION= Enable Common Gateway Interface SAPI
80 [CGI].CONFIGURE_ARGS_OFF= --disable-cgi
81 [CGI].MAKEFILE_ON= PHP_SAPI+=cgi
83 [EMBED].DESCRIPTION= Build embedded SAPI library
84 [EMBED].CONFIGURE_ARGS_ON= --enable-embed
85 [EMBED].MAKEFILE_ON= PHP_SAPI+=embed
88 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php81
91 ${TOUCH} ${WRKSRC}/ext/php_config.h
92 ${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-*
93 ${REINPLACE_CMD} -e "/phpincludedir =/ s|/php|/php81|" \
94 ${WRKSRC}/scripts/Makefile.frag
95 ${REINPLACE_CMD} -e "/includedir=/ s|php|php81|" \
96 ${WRKSRC}/scripts/phpize.in
97 ${REINPLACE_CMD} -e "/include_dir=/ s|php|php81|" \
98 -e "/^ldflags=/ s|@PHP|-L${PREFIX}/lib/php81 @PHP|" \
99 ${WRKSRC}/scripts/php-config.in
100 ${REINPLACE_CMD} -e "s|darwin|darwin-disable|" \
101 ${WRKSRC}/sapi/cgi/config9.m4 \
102 ${WRKSRC}/sapi/cli/config.m4 \
103 ${WRKSRC}/sapi/fpm/config.m4
105 post-install-DEBUGGER-ON:
106 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/phpdbg81
109 ${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \
110 ${WRKSRC}/sapi/fpm/php-fpm.conf.in
113 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php81
114 ${RM} -r ${STAGEDIR}/var
115 ${RM} -r ${STAGEDIR}${PREFIX}/include/php81/include
116 ${INSTALL_DATA} ${WRKSRC}/php.ini-development \
117 ${WRKSRC}/php.ini-production \
118 ${WRKDIR}/php.conf ${STAGEDIR}${PREFIX}/etc/php81
121 ${ECHO_CMD} "PHP_VER=81" > ${WRKDIR}/php.conf
122 ${ECHO_CMD} "PHP_VERSION=8.1.26" >> ${WRKDIR}/php.conf
123 ${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
124 ${ECHO_CMD} "PHP_EXT_INC=hash json pcre spl" >> ${WRKDIR}/php.conf
125 ${SH} ${WRKSRC}/scripts/php-config --extension-dir | \
126 ${SED} -ne 's,^${PREFIX}/lib/php81/,PHP_EXT_DIR=,p'\
127 >> ${WRKDIR}/php.conf
129 post-install-EMBED-ON:
130 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libphp.so
131 ${MV} ${STAGEDIR}${PREFIX}/lib/libphp.so \
132 ${STAGEDIR}${PREFIX}/lib/php81/
135 (cd ${WRKSRC} && ${SETENV} MAKE=${MAKE_CMD} ./buildconf --force)
138 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php-cgi81
141 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/php-fpm81
143 [FILE:679:descriptions/desc.primary]
144 PHP is a widely-used open source general-purpose scripting language
145 that is especially suited for web development and can be embedded
146 into HTML. It is modular, and object-oriented. Much of its syntax
147 is borrowed from C, Java and Perl with a couple of unique PHP-specific
148 features thrown in. The language is designed to allow web developers
149 to write dynamically generated pages quickly.
151 This package provides PHP version 7.3.x. New feature added over
152 version 7.2.x include:
154 * Flexible Heredoc and Nowdoc Syntax
156 * Multiple MBString Improvements
157 * LDAP Controls Support
158 * Improved FPM Logging
159 * Windows File Deletion Improvements
160 * Several Deprecations
164 17f87133596449327451ad4b8d9911bfaea59ff5109f3a6f2bb679f967a8ea0f 11809448 php-8.1.26.tar.xz
167 [FILE:473:manifests/plist.primary]
168 %%CGI-ON%%bin/php-cgi%%SUFFIX%%
169 %%CLI-ON%%bin/php%%SUFFIX%%
170 %%DEBUGGER-ON%%bin/phpdbg%%SUFFIX%%
171 %%EMBED-ON%%lib/php%%SUFFIX%%/libphp.so
172 %%FPM-ON%%@sample etc/php%%SUFFIX%%/php-fpm.conf.default etc/php%%SUFFIX%%/php-fpm.conf
173 %%FPM-ON%%@sample etc/php%%SUFFIX%%/php-fpm.d/www.conf.default etc/php%%SUFFIX%%/php-fpm.d/www.conf
174 %%FPM-ON%%sbin/php-fpm%%SUFFIX%%
175 %%FPM-ON%%share/php%%SUFFIX%%/fpm/status.html
182 [FILE:5586:manifests/plist.dev]
183 %%CLI-ON%%include/php%%SUFFIX%%/sapi/cli/cli.h
184 %%EMBED-ON%%include/php%%SUFFIX%%/sapi/embed/php_embed.h
188 include/php%%SUFFIX%%/TSRM/
191 include/php%%SUFFIX%%/Zend/
199 zend_attributes_arginfo.h
202 zend_builtin_functions.h
203 zend_builtin_functions_arginfo.h
205 zend_closures_arginfo.h
216 zend_exceptions_arginfo.h
220 zend_fibers_arginfo.h
225 zend_generators_arginfo.h
227 zend_globals_macros.h
234 zend_ini_scanner_defs.h
236 zend_interfaces_arginfo.h
239 zend_language_parser.h
240 zend_language_scanner.h
241 zend_language_scanner_defs.h
246 zend_max_execution_timer.h
250 zend_object_handlers.h
260 zend_smart_str_public.h
262 zend_smart_string_public.h
279 zend_vm_trace_handlers.h
280 zend_vm_trace_lines.h
283 zend_weakrefs_arginfo.h
284 include/php%%SUFFIX%%/Zend/Optimizer/
293 include/php%%SUFFIX%%/ext/date/php_date.h
294 include/php%%SUFFIX%%/ext/date/lib/
297 include/php%%SUFFIX%%/ext/hash/
314 include/php%%SUFFIX%%/ext/json/
318 include/php%%SUFFIX%%/ext/libxml/php_libxml.h
319 include/php%%SUFFIX%%/ext/mysqlnd/
321 mysql_float_to_double.h
325 mysqlnd_block_alloc.h
332 mysqlnd_libmysql_compat.h
334 mysqlnd_portability.h
336 mysqlnd_protocol_frame_codec.h
338 mysqlnd_read_buffer.h
340 mysqlnd_result_meta.h
341 mysqlnd_reverse_api.h
345 mysqlnd_wireprotocol.h
347 include/php%%SUFFIX%%/ext/pcre/php_pcre.h
348 include/php%%SUFFIX%%/ext/pcre/pcre2lib/
356 include/php%%SUFFIX%%/ext/spl/
368 include/php%%SUFFIX%%/ext/standard/
371 basic_functions_arginfo.h
408 php_incomplete_class.h
418 php_smart_string_public.h
431 user_filters_arginfo.h
433 include/php%%SUFFIX%%/main/
449 php_open_temporary_file.h
462 include/php%%SUFFIX%%/main/streams/
464 php_stream_filter_api.h
465 php_stream_glob_wrapper.h
467 php_stream_plain_wrapper.h
468 php_stream_transport.h
469 php_stream_userspace.h
471 lib/php%%SUFFIX%%/build/
473 ax_check_compile_flag.m4
474 ax_gcc_func_attribute.m4
481 php_cxx_compile_stdcxx.m4
486 @postexec touch %D/include/php%%SUFFIX%%/ext/php_config.h
487 @postunexec [ -s %D/include/php%%SUFFIX%%/ext/php_config.h ] || rm %D/include/php%%SUFFIX%%/ext/php_config.h
490 [FILE:258:manifests/plist.man]
491 %%CGI-ON%%share/man/man1/php-cgi%%SUFFIX%%.1.gz
492 %%CLI-ON%%share/man/man1/php%%SUFFIX%%.1.gz
493 %%DEBUGGER-ON%%share/man/man1/phpdbg%%SUFFIX%%.1.gz
494 %%FPM-ON%%share/man/man8/php-fpm%%SUFFIX%%.8.gz
496 php-config%%SUFFIX%%.1.gz
497 phpize%%SUFFIX%%.1.gz
500 [FILE:357:patches/patch-Zend_zend__gdb.c]
501 --- Zend/zend_gdb.c.orig 2023-11-21 21:53:48 UTC
507 -#if defined(__FreeBSD__) && __FreeBSD_version >= 1100000
508 +#if defined(__MidnightBSD__)
509 +# include <sys/user.h>
510 +#elif defined(__FreeBSD__) && __FreeBSD_version >= 1100000
511 # include <sys/user.h>
512 # include <libutil.h>
516 [FILE:1188:patches/patch-build_Makefile.global]
517 --- build/Makefile.global.orig 2023-11-21 21:53:48 UTC
518 +++ build/Makefile.global
519 @@ -92,14 +92,14 @@ test: all
520 @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
521 INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
522 if test "$$INI_FILE"; then \
523 - $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
524 + $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini || :; \
526 echo > $(top_builddir)/tmp-php.ini; \
528 INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
529 if test "$$INI_SCANNED_PATH"; then \
530 INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
531 - $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
532 + $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini || :; \
534 TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
535 TEST_PHP_SRCDIR=$(top_srcdir) \
538 [FILE:1155:patches/patch-configure.ac]
539 --- configure.ac.orig 2023-11-21 21:53:48 UTC
541 @@ -55,6 +55,7 @@ AH_BOTTOM([
545 +#include <ext/php_config.h>
546 #endif /* PHP_CONFIG_H */
549 @@ -625,7 +626,7 @@ AC_FUNC_STRERROR_R
550 AX_FUNC_WHICH_GETHOSTBYNAME_R
552 dnl Some systems (like OpenSolaris) do not have nanosleep in libc.
553 -PHP_CHECK_FUNC_LIB(nanosleep, rt)
554 +PHP_CHECK_FUNC(nanosleep, rt)
556 dnl Haiku does not have network api in libc.
557 PHP_CHECK_FUNC_LIB(setsockopt, network)
558 @@ -1383,7 +1384,7 @@ EXPANDED_SYSCONFDIR=`eval echo $sysconfd
559 EXPANDED_DATADIR=$datadir
560 EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
561 EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
562 -INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
563 +INCLUDE_PATH=.:${prefix}/share/pear
565 exec_prefix=$old_exec_prefix
567 @@ -1602,7 +1603,7 @@ PHP_SUBST(all_targets)
568 PHP_SUBST(install_targets)
569 PHP_SUBST(install_binary_targets)
571 -PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/])
572 +PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/])
573 PHP_INSTALL_HEADERS([Zend/Optimizer], [ \
578 [FILE:270:patches/patch-ext_libxml_php__libxml.h]
579 --- ext/libxml/php_libxml.h.orig 2023-11-21 21:53:48 UTC
580 +++ ext/libxml/php_libxml.h
581 @@ -35,6 +35,7 @@ extern zend_module_entry libxml_module_e
583 #include "zend_smart_str.h"
584 #include <libxml/tree.h>
585 +#include <libxml/parser.h>
587 #define LIBXML_SAVE_NOEMPTYTAG 1<<2
591 [FILE:622:patches/patch-ext_standard_proc__open.c]
592 --- ext/standard/proc_open.c.orig 2023-11-21 21:53:48 UTC
593 +++ ext/standard/proc_open.c
598 -# elif defined(__FreeBSD__)
599 +# elif defined(__FreeBSD__) && !defined(__MidnightBSD__)
600 /* FreeBSD defines `openpty` in <libutil.h> */
601 # include <libutil.h>
602 -# elif defined(__NetBSD__) || defined(__DragonFly__)
603 +# elif defined(__NetBSD__) || defined(__DragonFly__) || defined(__MidnightBSD__)
604 /* On recent NetBSD/DragonFlyBSD releases the emalloc, estrdup ... calls had been introduced in libutil */
605 # if defined(__NetBSD__)
606 # include <sys/termios.h>
609 [FILE:428:patches/patch-sapi_apache2handler_config.m4]
610 --- sapi/apache2handler/config.m4.orig 2023-11-21 21:53:48 UTC
611 +++ sapi/apache2handler/config.m4
612 @@ -64,7 +64,7 @@ if test "$PHP_APXS2" != "no"; then
615 APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
616 - if test -z `$APXS -q SYSCONFDIR`; then
618 INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
619 $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
623 [FILE:304:patches/patch-sapi_fpm_config.m4]
624 --- sapi/fpm/config.m4.orig 2023-11-21 21:53:48 UTC
625 +++ sapi/fpm/config.m4
626 @@ -315,7 +315,7 @@ AC_DEFUN([AC_FPM_LQ],
630 - if test "$have_lq" = "tcp_info"; then
631 + if test "$have_lq" = "so_listenq"; then
632 AC_DEFINE([HAVE_LQ_TCP_INFO], 1, [do we have TCP_INFO?])
637 [FILE:954:patches/patch-sapi_fpm_www.conf.in]
638 --- sapi/fpm/www.conf.in.orig 2023-11-21 21:53:48 UTC
639 +++ sapi/fpm/www.conf.in
640 @@ -32,10 +32,14 @@ group = @php_fpm_group@
641 ; Valid syntaxes are:
642 ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
644 +; '0.0.0.0:port' - to listen on a TCP socket to all IPv4 addresses on
646 ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
648 ; 'port' - to listen on a TCP socket to all addresses
649 ; (IPv6 and IPv4-mapped) on a specific port;
650 +; Note: IPv4-mapped addresses are disabled by-default in
651 +; FreeBSD for security reasons;
652 ; '/path/to/unix/socket' - to listen on a unix socket.
653 ; Note: This value is mandatory.
654 listen = 127.0.0.1:9000
657 [FILE:1394:files/php81-fpm.in]
661 # PROVIDE: php%%SUFFIX%%-fpm
666 # Add the following line to /etc/rc.conf to enable php-fpm:
667 # php%%SUFFIX%%_fpm_enable="YES"
672 name="php%%SUFFIX%%_fpm"
673 rcvar=php%%SUFFIX%%_fpm_enable
675 start_precmd="php%%SUFFIX%%_fpm_prestart"
676 restart_precmd="php%%SUFFIX%%_fpm_checkconfig"
677 reload_precmd="php%%SUFFIX%%_fpm_checkconfig"
678 configtest_cmd="php%%SUFFIX%%_fpm_checkconfig"
680 load_rc_config "$name"
682 : ${php%%SUFFIX%%_fpm_enable="NO"}
683 : ${php%%SUFFIX%%_fpm_umask=""}
685 extra_commands="reload configtest logrotate"
687 command="%%PREFIX%%/sbin/php-fpm"
688 pidfile="/var/run/php-fpm.pid"
691 logrotate_cmd="php%%SUFFIX%%_fpm_logrotate"
693 required_files="%%PREFIX%%/etc/php-fpm.conf"
695 php%%SUFFIX%%_fpm_logrotate() {
696 if [ -z "$rc_pid" ]; then
700 echo "Rotating logs $name."
704 php%%SUFFIX%%_fpm_checkconfig()
706 echo "Performing sanity check on php-fpm configuration:"
710 php%%SUFFIX%%_fpm_prestart()
712 php%%SUFFIX%%_fpm_checkconfig
714 if [ $checkconfig -ne 0 ]; then
718 if [ ! -z "$php%%SUFFIX%%_fpm_umask" ]; then
719 echo "Setting umask to: ${php%%SUFFIX%%_fpm_umask}"
720 umask $php%%SUFFIX%%_fpm_umask