Ravenports generated: 02 Jul 2023 05:28
[ravenports.git] / bucket_90 / php81
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               php81
4 VERSION=                8.1.20
5 REVISION=               1
6 KEYWORDS=               lang www php
7 VARIANTS=               standard
8 SDESC[standard]=        PHP Hypertext Preprocessor version 8.1
9 HOMEPAGE=               https://php.net/
10 CONTACT=                nobody
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PHP/distributions
14 DISTFILE[1]=            php-8.1.20.tar.xz:main
15 DF_INDEX=               1
16 SPKGS[standard]=        complete
17                         primary
18                         dev
19                         man
20
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
27
28 BUILD_DEPENDS=          autoconf:single:standard
29
30 USES=                   cpe gmake pkgconfig zlib pcre2 mbsdfix
31 C_USES[darwin]=         iconv:build
32 GNOME_COMPONENTS=       libxml2
33
34 DISTNAME=               php-8.1.20
35
36 LICENSE=                CUSTOM1:primary
37 LICENSE_NAME=           CUSTOM1:"PHP License v3.01"
38 LICENSE_FILE=           CUSTOM1:{{WRKSRC}}/LICENSE
39 LICENSE_SCHEME=         solo
40
41 CPE_PRODUCT=            php
42 FPC_EQUIVALENT=         lang/php81
43
44 MUST_CONFIGURE=         gnu
45 CONFIGURE_ARGS=         --with-layout=GNU
46                         --with-libxml
47                         --localstatedir=/var
48                         --with-config-file-scan-dir={{PREFIX}}/etc/php81
49                         --sysconfdir={{PREFIX}}/etc/php81
50                         --libdir={{PREFIX}}/lib/php81
51                         --datadir={{PREFIX}}/share/php81
52                         --disable-all
53                         --enable-mysqlnd
54                         --enable-maintainer-zts
55                         --program-suffix=81
56 CONFIGURE_ENV=          ac_cv_decimal_fp_supported="no"
57                         lt_cv_path_SED="sed"
58
59 DESTDIRNAME=            INSTALL_ROOT
60
61 PLIST_SUB=              SUFFIX=81
62                         SOMAJOR=8
63 RC_SUBR=                php81-fpm:primary
64 SUB_LIST=               SUFFIX=81
65
66 [CLI].DESCRIPTION=                      Enable Command Line Interface SAPI
67 [CLI].CONFIGURE_ARGS_OFF=               --disable-cli
68 [CLI].MAKEFILE_ON=                      PHP_SAPI+=cli
69
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
75
76 [DEBUGGER].DESCRIPTION=                 Enable interactive debugger SAPI module support
77 [DEBUGGER].CONFIGURE_ENABLE_BOTH=       phpdbg
78 [DEBUGGER].MAKEFILE_ON=                 PHP_SAPI+=phpdbg
79
80 [CGI].DESCRIPTION=                      Enable Common Gateway Interface SAPI
81 [CGI].CONFIGURE_ARGS_OFF=               --disable-cgi
82 [CGI].MAKEFILE_ON=                      PHP_SAPI+=cgi
83
84 [EMBED].DESCRIPTION=                    Build embedded SAPI library
85 [EMBED].CONFIGURE_ARGS_ON=              --enable-embed
86 [EMBED].MAKEFILE_ON=                    PHP_SAPI+=embed
87
88 post-install-CLI-ON:
89         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php81
90
91 post-patch:
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
105
106 post-install-DEBUGGER-ON:
107         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/phpdbg81
108
109 post-patch-FPM-ON:
110         ${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \
111                 ${WRKSRC}/sapi/fpm/php-fpm.conf.in
112
113 post-install:
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
120
121 post-build:
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
129
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/
134
135 pre-configure:
136         (cd ${WRKSRC} && ${SETENV} MAKE=${MAKE_CMD} ./buildconf --force)
137
138 post-install-CGI-ON:
139         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php-cgi81
140
141 post-install-FPM-ON:
142         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/php-fpm81
143
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.
151
152 This package provides PHP version 7.3.x.  New feature added over
153 version 7.2.x include:
154
155  * Flexible Heredoc and Nowdoc Syntax
156  * PCRE2 Migration
157  * Multiple MBString Improvements
158  * LDAP Controls Support
159  * Improved FPM Logging
160  * Windows File Deletion Improvements
161  * Several Deprecations
162
163
164 [FILE:96:distinfo]
165 4c9973f599e93ed5e8ce2b45ce1d41bb8fb54ce642824fd23e56b52fd75029a6     11793228 php-8.1.20.tar.xz
166
167
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
177 etc/php%%SUFFIX%%/
178  php.conf
179  php.ini-development
180  php.ini-production
181
182
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
186 bin/
187  php-config%%SUFFIX%%
188  phpize%%SUFFIX%%
189 include/php%%SUFFIX%%/TSRM/
190  TSRM.h
191  tsrm_win32.h
192 include/php%%SUFFIX%%/Zend/
193  zend.h
194  zend_API.h
195  zend_alloc.h
196  zend_alloc_sizes.h
197  zend_arena.h
198  zend_ast.h
199  zend_attributes.h
200  zend_attributes_arginfo.h
201  zend_bitset.h
202  zend_build.h
203  zend_builtin_functions.h
204  zend_builtin_functions_arginfo.h
205  zend_closures.h
206  zend_closures_arginfo.h
207  zend_compile.h
208  zend_config.h
209  zend_config.w32.h
210  zend_constants.h
211  zend_cpuinfo.h
212  zend_dtrace.h
213  zend_enum.h
214  zend_enum_arginfo.h
215  zend_errors.h
216  zend_exceptions.h
217  zend_exceptions_arginfo.h
218  zend_execute.h
219  zend_extensions.h
220  zend_fibers.h
221  zend_fibers_arginfo.h
222  zend_float.h
223  zend_gc.h
224  zend_gdb.h
225  zend_generators.h
226  zend_generators_arginfo.h
227  zend_globals.h
228  zend_globals_macros.h
229  zend_hash.h
230  zend_highlight.h
231  zend_inheritance.h
232  zend_ini.h
233  zend_ini_parser.h
234  zend_ini_scanner.h
235  zend_ini_scanner_defs.h
236  zend_interfaces.h
237  zend_interfaces_arginfo.h
238  zend_istdiostream.h
239  zend_iterators.h
240  zend_language_parser.h
241  zend_language_scanner.h
242  zend_language_scanner_defs.h
243  zend_list.h
244  zend_llist.h
245  zend_long.h
246  zend_map_ptr.h
247  zend_max_execution_timer.h
248  zend_modules.h
249  zend_multibyte.h
250  zend_multiply.h
251  zend_object_handlers.h
252  zend_objects.h
253  zend_objects_API.h
254  zend_observer.h
255  zend_operators.h
256  zend_portability.h
257  zend_ptr_stack.h
258  zend_range_check.h
259  zend_signal.h
260  zend_smart_str.h
261  zend_smart_str_public.h
262  zend_smart_string.h
263  zend_smart_string_public.h
264  zend_sort.h
265  zend_stack.h
266  zend_stream.h
267  zend_string.h
268  zend_strtod.h
269  zend_strtod_int.h
270  zend_system_id.h
271  zend_type_info.h
272  zend_types.h
273  zend_variables.h
274  zend_virtual_cwd.h
275  zend_vm.h
276  zend_vm_def.h
277  zend_vm_execute.h
278  zend_vm_handlers.h
279  zend_vm_opcodes.h
280  zend_vm_trace_handlers.h
281  zend_vm_trace_lines.h
282  zend_vm_trace_map.h
283  zend_weakrefs.h
284  zend_weakrefs_arginfo.h
285 include/php%%SUFFIX%%/Zend/Optimizer/
286  zend_call_graph.h
287  zend_cfg.h
288  zend_dfg.h
289  zend_dump.h
290  zend_func_info.h
291  zend_inference.h
292  zend_optimizer.h
293  zend_ssa.h
294 include/php%%SUFFIX%%/ext/date/php_date.h
295 include/php%%SUFFIX%%/ext/date/lib/
296  timelib.h
297  timelib_config.h
298 include/php%%SUFFIX%%/ext/hash/
299  php_hash.h
300  php_hash_adler32.h
301  php_hash_crc32.h
302  php_hash_fnv.h
303  php_hash_gost.h
304  php_hash_haval.h
305  php_hash_joaat.h
306  php_hash_md.h
307  php_hash_murmur.h
308  php_hash_ripemd.h
309  php_hash_sha.h
310  php_hash_sha3.h
311  php_hash_snefru.h
312  php_hash_tiger.h
313  php_hash_whirlpool.h
314  php_hash_xxhash.h
315 include/php%%SUFFIX%%/ext/json/
316  php_json.h
317  php_json_parser.h
318  php_json_scanner.h
319 include/php%%SUFFIX%%/ext/libxml/php_libxml.h
320 include/php%%SUFFIX%%/ext/mysqlnd/
321  config-win.h
322  mysql_float_to_double.h
323  mysqlnd.h
324  mysqlnd_alloc.h
325  mysqlnd_auth.h
326  mysqlnd_block_alloc.h
327  mysqlnd_charset.h
328  mysqlnd_commands.h
329  mysqlnd_connection.h
330  mysqlnd_debug.h
331  mysqlnd_enum_n_def.h
332  mysqlnd_ext_plugin.h
333  mysqlnd_libmysql_compat.h
334  mysqlnd_plugin.h
335  mysqlnd_portability.h
336  mysqlnd_priv.h
337  mysqlnd_protocol_frame_codec.h
338  mysqlnd_ps.h
339  mysqlnd_read_buffer.h
340  mysqlnd_result.h
341  mysqlnd_result_meta.h
342  mysqlnd_reverse_api.h
343  mysqlnd_statistics.h
344  mysqlnd_structs.h
345  mysqlnd_vio.h
346  mysqlnd_wireprotocol.h
347  php_mysqlnd.h
348 include/php%%SUFFIX%%/ext/pcre/php_pcre.h
349 include/php%%SUFFIX%%/ext/pcre/pcre2lib/
350  config.h
351  pcre2.h
352  pcre2_internal.h
353  pcre2_intmodedep.h
354  pcre2_jit_neon_inc.h
355  pcre2_jit_simd_inc.h
356  pcre2_ucp.h
357 include/php%%SUFFIX%%/ext/spl/
358  php_spl.h
359  spl_array.h
360  spl_directory.h
361  spl_dllist.h
362  spl_engine.h
363  spl_exceptions.h
364  spl_fixedarray.h
365  spl_functions.h
366  spl_heap.h
367  spl_iterators.h
368  spl_observer.h
369 include/php%%SUFFIX%%/ext/standard/
370  base64.h
371  basic_functions.h
372  basic_functions_arginfo.h
373  crc32.h
374  crc32_x86.h
375  credits.h
376  credits_ext.h
377  credits_sapi.h
378  crypt_blowfish.h
379  crypt_freesec.h
380  css.h
381  datetime.h
382  dir_arginfo.h
383  dl.h
384  dl_arginfo.h
385  exec.h
386  file.h
387  flock_compat.h
388  fsock.h
389  head.h
390  hrtime.h
391  html.h
392  html_tables.h
393  info.h
394  md5.h
395  pack.h
396  pageinfo.h
397  php_array.h
398  php_assert.h
399  php_browscap.h
400  php_crypt.h
401  php_crypt_r.h
402  php_dir.h
403  php_dns.h
404  php_ext_syslog.h
405  php_filestat.h
406  php_fopen_wrappers.h
407  php_http.h
408  php_image.h
409  php_incomplete_class.h
410  php_lcg.h
411  php_mail.h
412  php_math.h
413  php_mt_rand.h
414  php_net.h
415  php_password.h
416  php_rand.h
417  php_random.h
418  php_smart_string.h
419  php_smart_string_public.h
420  php_standard.h
421  php_string.h
422  php_uuencode.h
423  php_var.h
424  php_versioning.h
425  proc_open.h
426  quot_print.h
427  scanf.h
428  sha1.h
429  streamsfuncs.h
430  url.h
431  url_scanner_ex.h
432  user_filters_arginfo.h
433  winver.h
434 include/php%%SUFFIX%%/main/
435  SAPI.h
436  build-defs.h
437  fastcgi.h
438  fopen_wrappers.h
439  http_status_codes.h
440  php.h
441  php_compat.h
442  php_config.h
443  php_content_types.h
444  php_getopt.h
445  php_globals.h
446  php_ini.h
447  php_main.h
448  php_memory_streams.h
449  php_network.h
450  php_open_temporary_file.h
451  php_output.h
452  php_reentrancy.h
453  php_scandir.h
454  php_stdint.h
455  php_streams.h
456  php_syslog.h
457  php_ticks.h
458  php_variables.h
459  php_version.h
460  rfc1867.h
461  snprintf.h
462  spprintf.h
463 include/php%%SUFFIX%%/main/streams/
464  php_stream_context.h
465  php_stream_filter_api.h
466  php_stream_glob_wrapper.h
467  php_stream_mmap.h
468  php_stream_plain_wrapper.h
469  php_stream_transport.h
470  php_stream_userspace.h
471  php_streams_int.h
472 lib/php%%SUFFIX%%/build/
473  Makefile.global
474  ax_check_compile_flag.m4
475  ax_gcc_func_attribute.m4
476  config.guess
477  config.sub
478  gen_stub.php
479  libtool.m4
480  ltmain.sh
481  php.m4
482  php_cxx_compile_stdcxx.m4
483  phpize.m4
484  pkg.m4
485  run-tests.php
486  shtool
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
489
490
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
496 share/man/man1/
497  php-config%%SUFFIX%%.1.gz
498  phpize%%SUFFIX%%.1.gz
499
500
501 [FILE:293:patches/patch-Zend_zend__gdb.c]
502 --- Zend/zend_gdb.c.orig        2023-04-11 16:47:45 UTC
503 +++ Zend/zend_gdb.c
504 @@ -25,7 +25,9 @@
505  #include <fcntl.h>
506  #include <unistd.h>
507  
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>
514  #endif
515
516
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 || :; \
526                 else \
527                         echo > $(top_builddir)/tmp-php.ini; \
528                 fi; \
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 || :; \
534                 fi; \
535                 TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
536                 TEST_PHP_SRCDIR=$(top_srcdir) \
537
538
539 [FILE:1149:patches/patch-configure.ac]
540 --- configure.ac.orig   2023-04-11 16:47:45 UTC
541 +++ configure.ac
542 @@ -55,6 +55,7 @@ AH_BOTTOM([
543  
544  #include <string.h>
545  
546 +#include <ext/php_config.h>
547  #endif /* PHP_CONFIG_H */
548  ])
549  
550 @@ -615,7 +616,7 @@ strerror_r \
551  AX_FUNC_WHICH_GETHOSTBYNAME_R
552  
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)
556  
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
565  
566  exec_prefix=$old_exec_prefix
567  libdir=$old_libdir
568 @@ -1592,7 +1593,7 @@ PHP_SUBST(all_targets)
569  PHP_SUBST(install_targets)
570  PHP_SUBST(install_binary_targets)
571  
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], [ \
575      zend_call_graph.h \
576      zend_cfg.h \
577
578
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
582 @@ -45,10 +45,10 @@
583  #if HAVE_OPENPTY
584  # if HAVE_PTY_H
585  #  include <pty.h>
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>
595
596
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
601    fi
602  
603    APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
604 -  if test -z `$APXS -q SYSCONFDIR`; then
605 +  if true; then
606      INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
607                   $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
608                         -i -n php"
609
610
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],
615      AC_MSG_RESULT([no])
616    ])
617  
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?])
621    fi
622  
623
624
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
631  ;                            a specific port;
632 +;   '0.0.0.0:port'         - to listen on a TCP socket to all IPv4 addresses on
633 +;                            a specific port;
634  ;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
635  ;                            a specific port;
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
643
644
645 [FILE:1394:files/php81-fpm.in]
646 #!/bin/sh
647 #
648
649 # PROVIDE: php%%SUFFIX%%-fpm
650 # REQUIRE: LOGIN
651 # KEYWORD: shutdown
652
653 #
654 # Add the following line to /etc/rc.conf to enable php-fpm:
655 # php%%SUFFIX%%_fpm_enable="YES"
656 #
657
658 . /etc/rc.subr
659
660 name="php%%SUFFIX%%_fpm"
661 rcvar=php%%SUFFIX%%_fpm_enable
662
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"
667
668 load_rc_config "$name"
669
670 : ${php%%SUFFIX%%_fpm_enable="NO"}
671 : ${php%%SUFFIX%%_fpm_umask=""}
672
673 extra_commands="reload configtest logrotate"
674
675 command="%%PREFIX%%/sbin/php-fpm"
676 pidfile="/var/run/php-fpm.pid"
677 sig_stop="QUIT"
678 sig_reload="USR2"
679 logrotate_cmd="php%%SUFFIX%%_fpm_logrotate"
680
681 required_files="%%PREFIX%%/etc/php-fpm.conf"
682
683 php%%SUFFIX%%_fpm_logrotate() {
684         if [ -z "$rc_pid" ]; then
685                 _run_rc_notrunning
686                 return 1
687         fi
688         echo "Rotating logs $name."
689         kill -USR1 $rc_pid
690 }
691
692 php%%SUFFIX%%_fpm_checkconfig()
693 {
694         echo "Performing sanity check on php-fpm configuration:"
695         eval ${command} -t
696 }
697
698 php%%SUFFIX%%_fpm_prestart()
699 {
700         php%%SUFFIX%%_fpm_checkconfig
701         checkconfig=$?
702         if [ $checkconfig -ne 0  ]; then
703                 return $checkconfig
704         fi
705
706         if [ ! -z "$php%%SUFFIX%%_fpm_umask"  ]; then
707                 echo "Setting umask to: ${php%%SUFFIX%%_fpm_umask}"
708                 umask $php%%SUFFIX%%_fpm_umask
709         fi
710 }
711
712 run_rc_command "$1"
713