1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
8 SDESC[standard]= PHP Hypertext Preprocessor version 8.1
9 HOMEPAGE= https://php.net/
13 SITES[main]= PHP/distributions
14 DISTFILE[1]= php-8.1.20.tar.xz:main
16 SPKGS[standard]= complete
21 OPTIONS_AVAILABLE= CLI CGI FPM EMBED DEBUGGER
22 OPTIONS_STANDARD= CLI CGI FPM EMBED DEBUGGER
23 OPTGROUP_RESTRICTED= SAPI
24 OPTDESCR[SAPI]= Server Application Programming Interface
25 OPTGROUP[SAPI]= CLI CGI FPM DEBUGGER
26 OPT_ON[all]= CLI CGI FPM EMBED DEBUGGER
28 BUILD_DEPENDS= autoconf:single:standard
30 USES= cpe gmake pkgconfig zlib pcre2 mbsdfix
31 C_USES[darwin]= iconv:build
32 GNOME_COMPONENTS= libxml2
36 LICENSE= CUSTOM1:primary
37 LICENSE_NAME= CUSTOM1:"PHP License v3.01"
38 LICENSE_FILE= CUSTOM1:{{WRKSRC}}/LICENSE
42 FPC_EQUIVALENT= lang/php81
45 CONFIGURE_ARGS= --with-layout=GNU
48 --with-config-file-scan-dir={{PREFIX}}/etc/php81
49 --sysconfdir={{PREFIX}}/etc/php81
50 --libdir={{PREFIX}}/lib/php81
51 --datadir={{PREFIX}}/share/php81
54 --enable-maintainer-zts
56 CONFIGURE_ENV= ac_cv_decimal_fp_supported="no"
59 DESTDIRNAME= INSTALL_ROOT
63 RC_SUBR= php81-fpm:primary
66 [CLI].DESCRIPTION= Enable Command Line Interface SAPI
67 [CLI].CONFIGURE_ARGS_OFF= --disable-cli
68 [CLI].MAKEFILE_ON= PHP_SAPI+=cli
70 [FPM].DESCRIPTION= Enable FastCGI Process Manager SAPI
71 [FPM].CONFIGURE_ARGS_ON= --enable-fpm
72 --with-fpm-user={{WWWOWN}}
73 --with-fpm-group={{WWWGRP}}
74 [FPM].MAKEFILE_ON= PHP_SAPI+=fpm
76 [DEBUGGER].DESCRIPTION= Enable interactive debugger SAPI module support
77 [DEBUGGER].CONFIGURE_ENABLE_BOTH= phpdbg
78 [DEBUGGER].MAKEFILE_ON= PHP_SAPI+=phpdbg
80 [CGI].DESCRIPTION= Enable Common Gateway Interface SAPI
81 [CGI].CONFIGURE_ARGS_OFF= --disable-cgi
82 [CGI].MAKEFILE_ON= PHP_SAPI+=cgi
84 [EMBED].DESCRIPTION= Build embedded SAPI library
85 [EMBED].CONFIGURE_ARGS_ON= --enable-embed
86 [EMBED].MAKEFILE_ON= PHP_SAPI+=embed
89 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php81
92 ${TOUCH} ${WRKSRC}/ext/php_config.h
93 ${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-*
94 ${REINPLACE_CMD} -e "/phpincludedir =/ s|/php|/php81|" \
95 ${WRKSRC}/scripts/Makefile.frag
96 ${REINPLACE_CMD} -e "/includedir=/ s|php|php81|" \
97 ${WRKSRC}/scripts/phpize.in
98 ${REINPLACE_CMD} -e "/include_dir=/ s|php|php81|" \
99 -e "/^ldflags=/ s|@PHP|-L${PREFIX}/lib/php81 @PHP|" \
100 ${WRKSRC}/scripts/php-config.in
101 ${REINPLACE_CMD} -e "s|darwin|darwin-disable|" \
102 ${WRKSRC}/sapi/cgi/config9.m4 \
103 ${WRKSRC}/sapi/cli/config.m4 \
104 ${WRKSRC}/sapi/fpm/config.m4
106 post-install-DEBUGGER-ON:
107 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/phpdbg81
110 ${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \
111 ${WRKSRC}/sapi/fpm/php-fpm.conf.in
114 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php81
115 ${RM} -r ${STAGEDIR}/var
116 ${RM} -r ${STAGEDIR}${PREFIX}/include/php81/include
117 ${INSTALL_DATA} ${WRKSRC}/php.ini-development \
118 ${WRKSRC}/php.ini-production \
119 ${WRKDIR}/php.conf ${STAGEDIR}${PREFIX}/etc/php81
122 ${ECHO_CMD} "PHP_VER=81" > ${WRKDIR}/php.conf
123 ${ECHO_CMD} "PHP_VERSION=8.1.20" >> ${WRKDIR}/php.conf
124 ${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
125 ${ECHO_CMD} "PHP_EXT_INC=hash json pcre spl" >> ${WRKDIR}/php.conf
126 ${SH} ${WRKSRC}/scripts/php-config --extension-dir | \
127 ${SED} -ne 's,^${PREFIX}/lib/php81/,PHP_EXT_DIR=,p'\
128 >> ${WRKDIR}/php.conf
130 post-install-EMBED-ON:
131 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libphp.so
132 ${MV} ${STAGEDIR}${PREFIX}/lib/libphp.so \
133 ${STAGEDIR}${PREFIX}/lib/php81/
136 (cd ${WRKSRC} && ${SETENV} MAKE=${MAKE_CMD} ./buildconf --force)
139 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php-cgi81
142 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/php-fpm81
144 [FILE:679:descriptions/desc.primary]
145 PHP is a widely-used open source general-purpose scripting language
146 that is especially suited for web development and can be embedded
147 into HTML. It is modular, and object-oriented. Much of its syntax
148 is borrowed from C, Java and Perl with a couple of unique PHP-specific
149 features thrown in. The language is designed to allow web developers
150 to write dynamically generated pages quickly.
152 This package provides PHP version 7.3.x. New feature added over
153 version 7.2.x include:
155 * Flexible Heredoc and Nowdoc Syntax
157 * Multiple MBString Improvements
158 * LDAP Controls Support
159 * Improved FPM Logging
160 * Windows File Deletion Improvements
161 * Several Deprecations
165 4c9973f599e93ed5e8ce2b45ce1d41bb8fb54ce642824fd23e56b52fd75029a6 11793228 php-8.1.20.tar.xz
168 [FILE:473:manifests/plist.primary]
169 %%CGI-ON%%bin/php-cgi%%SUFFIX%%
170 %%CLI-ON%%bin/php%%SUFFIX%%
171 %%DEBUGGER-ON%%bin/phpdbg%%SUFFIX%%
172 %%EMBED-ON%%lib/php%%SUFFIX%%/libphp.so
173 %%FPM-ON%%@sample etc/php%%SUFFIX%%/php-fpm.conf.default etc/php%%SUFFIX%%/php-fpm.conf
174 %%FPM-ON%%@sample etc/php%%SUFFIX%%/php-fpm.d/www.conf.default etc/php%%SUFFIX%%/php-fpm.d/www.conf
175 %%FPM-ON%%sbin/php-fpm%%SUFFIX%%
176 %%FPM-ON%%share/php%%SUFFIX%%/fpm/status.html
183 [FILE:5586:manifests/plist.dev]
184 %%CLI-ON%%include/php%%SUFFIX%%/sapi/cli/cli.h
185 %%EMBED-ON%%include/php%%SUFFIX%%/sapi/embed/php_embed.h
189 include/php%%SUFFIX%%/TSRM/
192 include/php%%SUFFIX%%/Zend/
200 zend_attributes_arginfo.h
203 zend_builtin_functions.h
204 zend_builtin_functions_arginfo.h
206 zend_closures_arginfo.h
217 zend_exceptions_arginfo.h
221 zend_fibers_arginfo.h
226 zend_generators_arginfo.h
228 zend_globals_macros.h
235 zend_ini_scanner_defs.h
237 zend_interfaces_arginfo.h
240 zend_language_parser.h
241 zend_language_scanner.h
242 zend_language_scanner_defs.h
247 zend_max_execution_timer.h
251 zend_object_handlers.h
261 zend_smart_str_public.h
263 zend_smart_string_public.h
280 zend_vm_trace_handlers.h
281 zend_vm_trace_lines.h
284 zend_weakrefs_arginfo.h
285 include/php%%SUFFIX%%/Zend/Optimizer/
294 include/php%%SUFFIX%%/ext/date/php_date.h
295 include/php%%SUFFIX%%/ext/date/lib/
298 include/php%%SUFFIX%%/ext/hash/
315 include/php%%SUFFIX%%/ext/json/
319 include/php%%SUFFIX%%/ext/libxml/php_libxml.h
320 include/php%%SUFFIX%%/ext/mysqlnd/
322 mysql_float_to_double.h
326 mysqlnd_block_alloc.h
333 mysqlnd_libmysql_compat.h
335 mysqlnd_portability.h
337 mysqlnd_protocol_frame_codec.h
339 mysqlnd_read_buffer.h
341 mysqlnd_result_meta.h
342 mysqlnd_reverse_api.h
346 mysqlnd_wireprotocol.h
348 include/php%%SUFFIX%%/ext/pcre/php_pcre.h
349 include/php%%SUFFIX%%/ext/pcre/pcre2lib/
357 include/php%%SUFFIX%%/ext/spl/
369 include/php%%SUFFIX%%/ext/standard/
372 basic_functions_arginfo.h
409 php_incomplete_class.h
419 php_smart_string_public.h
432 user_filters_arginfo.h
434 include/php%%SUFFIX%%/main/
450 php_open_temporary_file.h
463 include/php%%SUFFIX%%/main/streams/
465 php_stream_filter_api.h
466 php_stream_glob_wrapper.h
468 php_stream_plain_wrapper.h
469 php_stream_transport.h
470 php_stream_userspace.h
472 lib/php%%SUFFIX%%/build/
474 ax_check_compile_flag.m4
475 ax_gcc_func_attribute.m4
482 php_cxx_compile_stdcxx.m4
487 @postexec touch %D/include/php%%SUFFIX%%/ext/php_config.h
488 @postunexec [ -s %D/include/php%%SUFFIX%%/ext/php_config.h ] || rm %D/include/php%%SUFFIX%%/ext/php_config.h
491 [FILE:258:manifests/plist.man]
492 %%CGI-ON%%share/man/man1/php-cgi%%SUFFIX%%.1.gz
493 %%CLI-ON%%share/man/man1/php%%SUFFIX%%.1.gz
494 %%DEBUGGER-ON%%share/man/man1/phpdbg%%SUFFIX%%.1.gz
495 %%FPM-ON%%share/man/man8/php-fpm%%SUFFIX%%.8.gz
497 php-config%%SUFFIX%%.1.gz
498 phpize%%SUFFIX%%.1.gz
501 [FILE:293:patches/patch-Zend_zend__gdb.c]
502 --- Zend/zend_gdb.c.orig 2023-04-11 16:47:45 UTC
508 -#if defined(__FreeBSD__)
509 +#if defined(__MidnightBSD__)
510 +# include <sys/user.h>
511 +#elif defined(__FreeBSD__)
512 # include <sys/user.h>
513 # include <libutil.h>
517 [FILE:1188:patches/patch-build_Makefile.global]
518 --- build/Makefile.global.orig 2023-04-11 16:47:45 UTC
519 +++ build/Makefile.global
520 @@ -92,14 +92,14 @@ test: all
521 @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
522 INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
523 if test "$$INI_FILE"; then \
524 - $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
525 + $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini || :; \
527 echo > $(top_builddir)/tmp-php.ini; \
529 INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
530 if test "$$INI_SCANNED_PATH"; then \
531 INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
532 - $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
533 + $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini || :; \
535 TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
536 TEST_PHP_SRCDIR=$(top_srcdir) \
539 [FILE:1149:patches/patch-configure.ac]
540 --- configure.ac.orig 2023-04-11 16:47:45 UTC
542 @@ -55,6 +55,7 @@ AH_BOTTOM([
546 +#include <ext/php_config.h>
547 #endif /* PHP_CONFIG_H */
550 @@ -615,7 +616,7 @@ strerror_r \
551 AX_FUNC_WHICH_GETHOSTBYNAME_R
553 dnl Some systems (like OpenSolaris) do not have nanosleep in libc.
554 -PHP_CHECK_FUNC_LIB(nanosleep, rt)
555 +PHP_CHECK_FUNC(nanosleep, rt)
557 dnl Haiku does not have network api in libc.
558 PHP_CHECK_FUNC_LIB(setsockopt, network)
559 @@ -1373,7 +1374,7 @@ EXPANDED_SYSCONFDIR=`eval echo $sysconfd
560 EXPANDED_DATADIR=$datadir
561 EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
562 EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
563 -INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
564 +INCLUDE_PATH=.:${prefix}/share/pear
566 exec_prefix=$old_exec_prefix
568 @@ -1592,7 +1593,7 @@ PHP_SUBST(all_targets)
569 PHP_SUBST(install_targets)
570 PHP_SUBST(install_binary_targets)
572 -PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/])
573 +PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/])
574 PHP_INSTALL_HEADERS([Zend/Optimizer], [ \
579 [FILE:622:patches/patch-ext_standard_proc__open.c]
580 --- ext/standard/proc_open.c.orig 2023-04-11 16:47:45 UTC
581 +++ ext/standard/proc_open.c
586 -# elif defined(__FreeBSD__)
587 +# elif defined(__FreeBSD__) && !defined(__MidnightBSD__)
588 /* FreeBSD defines `openpty` in <libutil.h> */
589 # include <libutil.h>
590 -# elif defined(__NetBSD__) || defined(__DragonFly__)
591 +# elif defined(__NetBSD__) || defined(__DragonFly__) || defined(__MidnightBSD__)
592 /* On recent NetBSD/DragonFlyBSD releases the emalloc, estrdup ... calls had been introduced in libutil */
593 # if defined(__NetBSD__)
594 # include <sys/termios.h>
597 [FILE:428:patches/patch-sapi_apache2handler_config.m4]
598 --- sapi/apache2handler/config.m4.orig 2023-04-11 16:47:45 UTC
599 +++ sapi/apache2handler/config.m4
600 @@ -64,7 +64,7 @@ if test "$PHP_APXS2" != "no"; then
603 APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
604 - if test -z `$APXS -q SYSCONFDIR`; then
606 INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
607 $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
611 [FILE:304:patches/patch-sapi_fpm_config.m4]
612 --- sapi/fpm/config.m4.orig 2023-04-11 16:47:45 UTC
613 +++ sapi/fpm/config.m4
614 @@ -315,7 +315,7 @@ AC_DEFUN([AC_FPM_LQ],
618 - if test "$have_lq" = "tcp_info"; then
619 + if test "$have_lq" = "so_listenq"; then
620 AC_DEFINE([HAVE_LQ_TCP_INFO], 1, [do we have TCP_INFO?])
625 [FILE:954:patches/patch-sapi_fpm_www.conf.in]
626 --- sapi/fpm/www.conf.in.orig 2023-04-11 16:47:45 UTC
627 +++ sapi/fpm/www.conf.in
628 @@ -32,10 +32,14 @@ group = @php_fpm_group@
629 ; Valid syntaxes are:
630 ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
632 +; '0.0.0.0:port' - to listen on a TCP socket to all IPv4 addresses on
634 ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
636 ; 'port' - to listen on a TCP socket to all addresses
637 ; (IPv6 and IPv4-mapped) on a specific port;
638 +; Note: IPv4-mapped addresses are disabled by-default in
639 +; FreeBSD for security reasons;
640 ; '/path/to/unix/socket' - to listen on a unix socket.
641 ; Note: This value is mandatory.
642 listen = 127.0.0.1:9000
645 [FILE:1394:files/php81-fpm.in]
649 # PROVIDE: php%%SUFFIX%%-fpm
654 # Add the following line to /etc/rc.conf to enable php-fpm:
655 # php%%SUFFIX%%_fpm_enable="YES"
660 name="php%%SUFFIX%%_fpm"
661 rcvar=php%%SUFFIX%%_fpm_enable
663 start_precmd="php%%SUFFIX%%_fpm_prestart"
664 restart_precmd="php%%SUFFIX%%_fpm_checkconfig"
665 reload_precmd="php%%SUFFIX%%_fpm_checkconfig"
666 configtest_cmd="php%%SUFFIX%%_fpm_checkconfig"
668 load_rc_config "$name"
670 : ${php%%SUFFIX%%_fpm_enable="NO"}
671 : ${php%%SUFFIX%%_fpm_umask=""}
673 extra_commands="reload configtest logrotate"
675 command="%%PREFIX%%/sbin/php-fpm"
676 pidfile="/var/run/php-fpm.pid"
679 logrotate_cmd="php%%SUFFIX%%_fpm_logrotate"
681 required_files="%%PREFIX%%/etc/php-fpm.conf"
683 php%%SUFFIX%%_fpm_logrotate() {
684 if [ -z "$rc_pid" ]; then
688 echo "Rotating logs $name."
692 php%%SUFFIX%%_fpm_checkconfig()
694 echo "Performing sanity check on php-fpm configuration:"
698 php%%SUFFIX%%_fpm_prestart()
700 php%%SUFFIX%%_fpm_checkconfig
702 if [ $checkconfig -ne 0 ]; then
706 if [ ! -z "$php%%SUFFIX%%_fpm_umask" ]; then
707 echo "Setting umask to: ${php%%SUFFIX%%_fpm_umask}"
708 umask $php%%SUFFIX%%_fpm_umask