Ravenports generated: 12 Feb 2024 04:56
[ravenports.git] / bucket_61 / php82
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               php82
4 VERSION=                8.2.15
5 KEYWORDS=               lang www php
6 VARIANTS=               standard
7 SDESC[standard]=        PHP Hypertext Preprocessor version 8.2
8 HOMEPAGE=               https://php.net/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            PHP/distributions
13 DISTFILE[1]=            php-8.2.15.tar.xz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        complete
16                         primary
17                         dev
18                         man
19
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
26
27 BUILD_DEPENDS=          autoconf:single:standard
28
29 USES=                   cpe gmake pkgconfig zlib pcre2 mbsdfix
30 C_USES[darwin]=         iconv:build
31 GNOME_COMPONENTS=       libxml2
32
33 DISTNAME=               php-8.2.15
34
35 LICENSE=                CUSTOM1:primary
36 LICENSE_NAME=           CUSTOM1:"PHP License v3.01"
37 LICENSE_FILE=           CUSTOM1:{{WRKSRC}}/LICENSE
38 LICENSE_SCHEME=         solo
39
40 CPE_PRODUCT=            php
41 FPC_EQUIVALENT=         lang/php82
42
43 MUST_CONFIGURE=         gnu
44 CONFIGURE_ARGS=         --with-layout=GNU
45                         --with-libxml
46                         --localstatedir=/var
47                         --with-config-file-scan-dir={{PREFIX}}/etc/php82
48                         --sysconfdir={{PREFIX}}/etc/php82
49                         --libdir={{PREFIX}}/lib/php82
50                         --datadir={{PREFIX}}/share/php82
51                         --disable-all
52                         --enable-mysqlnd
53                         --enable-maintainer-zts
54                         --program-suffix=82
55 CONFIGURE_ENV=          ac_cv_decimal_fp_supported="no"
56                         lt_cv_path_SED="sed"
57
58 DESTDIRNAME=            INSTALL_ROOT
59
60 PLIST_SUB=              SUFFIX=82
61                         SOMAJOR=8
62 RC_SUBR=                php82-fpm:primary
63 SUB_LIST=               SUFFIX=82
64
65 [CLI].DESCRIPTION=                      Enable Command Line Interface SAPI
66 [CLI].CONFIGURE_ARGS_OFF=               --disable-cli
67 [CLI].MAKEFILE_ON=                      PHP_SAPI+=cli
68
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
74
75 [DEBUGGER].DESCRIPTION=                 Enable interactive debugger SAPI module support
76 [DEBUGGER].CONFIGURE_ENABLE_BOTH=       phpdbg
77 [DEBUGGER].MAKEFILE_ON=                 PHP_SAPI+=phpdbg
78
79 [CGI].DESCRIPTION=                      Enable Common Gateway Interface SAPI
80 [CGI].CONFIGURE_ARGS_OFF=               --disable-cgi
81 [CGI].MAKEFILE_ON=                      PHP_SAPI+=cgi
82
83 [EMBED].DESCRIPTION=                    Build embedded SAPI library
84 [EMBED].CONFIGURE_ARGS_ON=              --enable-embed
85 [EMBED].MAKEFILE_ON=                    PHP_SAPI+=embed
86
87 post-install-CLI-ON:
88         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php82
89
90 post-patch:
91         ${TOUCH} ${WRKSRC}/ext/php_config.h
92         ${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-*
93         ${REINPLACE_CMD} -e "/phpincludedir =/ s|/php|/php82|" \
94                 ${WRKSRC}/scripts/Makefile.frag
95         ${REINPLACE_CMD} -e "/includedir=/ s|php|php82|" \
96                 ${WRKSRC}/scripts/phpize.in
97         ${REINPLACE_CMD} -e "/include_dir=/ s|php|php82|" \
98                 -e "/^ldflags=/ s|@PHP|-L${PREFIX}/lib/php82 @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
104
105 post-install-DEBUGGER-ON:
106         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/phpdbg82
107
108 post-patch-FPM-ON:
109         ${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \
110                 ${WRKSRC}/sapi/fpm/php-fpm.conf.in
111
112 post-install:
113         @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php82
114         ${RM} -r ${STAGEDIR}/var
115         ${RM} -r ${STAGEDIR}${PREFIX}/include/php82/include
116         ${INSTALL_DATA} ${WRKSRC}/php.ini-development \
117                 ${WRKSRC}/php.ini-production \
118                 ${WRKDIR}/php.conf ${STAGEDIR}${PREFIX}/etc/php82
119
120 post-build:
121         ${ECHO_CMD} "PHP_VER=82" > ${WRKDIR}/php.conf
122         ${ECHO_CMD} "PHP_VERSION=8.2.15" >> ${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/php82/,PHP_EXT_DIR=,p'\
127                 >> ${WRKDIR}/php.conf
128
129 post-install-EMBED-ON:
130         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libphp.so
131         ${MV} ${STAGEDIR}${PREFIX}/lib/libphp.so \
132                 ${STAGEDIR}${PREFIX}/lib/php82/
133
134 pre-configure:
135         (cd ${WRKSRC} && ${SETENV} MAKE=${MAKE_CMD} ./buildconf --force)
136
137 post-install-CGI-ON:
138         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php-cgi82
139
140 post-install-FPM-ON:
141         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/php-fpm82
142
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.
150
151 This package provides PHP version 7.3.x.  New feature added over
152 version 7.2.x include:
153
154  * Flexible Heredoc and Nowdoc Syntax
155  * PCRE2 Migration
156  * Multiple MBString Improvements
157  * LDAP Controls Support
158  * Improved FPM Logging
159  * Windows File Deletion Improvements
160  * Several Deprecations
161
162
163 [FILE:96:distinfo]
164 eca5deac02d77d806838275f8a3024b38b35ac0a5d9853dcc71c6cbe3f1f8765     12075384 php-8.2.15.tar.xz
165
166
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
176 etc/php%%SUFFIX%%/
177  php.conf
178  php.ini-development
179  php.ini-production
180
181
182 [FILE:5725:manifests/plist.dev]
183 %%CLI-ON%%include/php%%SUFFIX%%/sapi/cli/cli.h
184 %%EMBED-ON%%include/php%%SUFFIX%%/sapi/embed/php_embed.h
185 bin/
186  php-config%%SUFFIX%%
187  phpize%%SUFFIX%%
188 include/php%%SUFFIX%%/TSRM/
189  TSRM.h
190  tsrm_win32.h
191 include/php%%SUFFIX%%/Zend/
192  zend.h
193  zend_API.h
194  zend_alloc.h
195  zend_alloc_sizes.h
196  zend_arena.h
197  zend_ast.h
198  zend_atomic.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_constants_arginfo.h
212  zend_cpuinfo.h
213  zend_dtrace.h
214  zend_enum.h
215  zend_enum_arginfo.h
216  zend_errors.h
217  zend_exceptions.h
218  zend_exceptions_arginfo.h
219  zend_execute.h
220  zend_extensions.h
221  zend_fibers.h
222  zend_fibers_arginfo.h
223  zend_float.h
224  zend_gc.h
225  zend_gdb.h
226  zend_generators.h
227  zend_generators_arginfo.h
228  zend_globals.h
229  zend_globals_macros.h
230  zend_hash.h
231  zend_highlight.h
232  zend_inheritance.h
233  zend_ini.h
234  zend_ini_parser.h
235  zend_ini_scanner.h
236  zend_ini_scanner_defs.h
237  zend_interfaces.h
238  zend_interfaces_arginfo.h
239  zend_istdiostream.h
240  zend_iterators.h
241  zend_language_parser.h
242  zend_language_scanner.h
243  zend_language_scanner_defs.h
244  zend_list.h
245  zend_llist.h
246  zend_long.h
247  zend_map_ptr.h
248  zend_max_execution_timer.h
249  zend_mmap.h
250  zend_modules.h
251  zend_multibyte.h
252  zend_multiply.h
253  zend_object_handlers.h
254  zend_objects.h
255  zend_objects_API.h
256  zend_observer.h
257  zend_operators.h
258  zend_portability.h
259  zend_ptr_stack.h
260  zend_range_check.h
261  zend_signal.h
262  zend_smart_str.h
263  zend_smart_str_public.h
264  zend_smart_string.h
265  zend_smart_string_public.h
266  zend_sort.h
267  zend_stack.h
268  zend_stream.h
269  zend_string.h
270  zend_strtod.h
271  zend_strtod_int.h
272  zend_system_id.h
273  zend_type_info.h
274  zend_types.h
275  zend_variables.h
276  zend_virtual_cwd.h
277  zend_vm.h
278  zend_vm_def.h
279  zend_vm_execute.h
280  zend_vm_handlers.h
281  zend_vm_opcodes.h
282  zend_vm_trace_handlers.h
283  zend_vm_trace_lines.h
284  zend_vm_trace_map.h
285  zend_weakrefs.h
286  zend_weakrefs_arginfo.h
287 include/php%%SUFFIX%%/Zend/Optimizer/
288  zend_call_graph.h
289  zend_cfg.h
290  zend_dfg.h
291  zend_dump.h
292  zend_func_info.h
293  zend_inference.h
294  zend_optimizer.h
295  zend_ssa.h
296 include/php%%SUFFIX%%/ext/date/php_date.h
297 include/php%%SUFFIX%%/ext/date/lib/
298  timelib.h
299  timelib_config.h
300 include/php%%SUFFIX%%/ext/hash/
301  php_hash.h
302  php_hash_adler32.h
303  php_hash_crc32.h
304  php_hash_fnv.h
305  php_hash_gost.h
306  php_hash_haval.h
307  php_hash_joaat.h
308  php_hash_md.h
309  php_hash_murmur.h
310  php_hash_ripemd.h
311  php_hash_sha.h
312  php_hash_sha3.h
313  php_hash_snefru.h
314  php_hash_tiger.h
315  php_hash_whirlpool.h
316  php_hash_xxhash.h
317 include/php%%SUFFIX%%/ext/json/
318  php_json.h
319  php_json_parser.h
320  php_json_scanner.h
321 include/php%%SUFFIX%%/ext/libxml/php_libxml.h
322 include/php%%SUFFIX%%/ext/mysqlnd/
323  config-win.h
324  mysql_float_to_double.h
325  mysqlnd.h
326  mysqlnd_alloc.h
327  mysqlnd_auth.h
328  mysqlnd_block_alloc.h
329  mysqlnd_charset.h
330  mysqlnd_commands.h
331  mysqlnd_connection.h
332  mysqlnd_debug.h
333  mysqlnd_enum_n_def.h
334  mysqlnd_ext_plugin.h
335  mysqlnd_libmysql_compat.h
336  mysqlnd_plugin.h
337  mysqlnd_portability.h
338  mysqlnd_priv.h
339  mysqlnd_protocol_frame_codec.h
340  mysqlnd_ps.h
341  mysqlnd_read_buffer.h
342  mysqlnd_result.h
343  mysqlnd_result_meta.h
344  mysqlnd_reverse_api.h
345  mysqlnd_statistics.h
346  mysqlnd_structs.h
347  mysqlnd_vio.h
348  mysqlnd_wireprotocol.h
349  php_mysqlnd.h
350 include/php%%SUFFIX%%/ext/pcre/php_pcre.h
351 include/php%%SUFFIX%%/ext/pcre/pcre2lib/
352  config.h
353  pcre2.h
354  pcre2_internal.h
355  pcre2_intmodedep.h
356  pcre2_jit_neon_inc.h
357  pcre2_jit_simd_inc.h
358  pcre2_ucp.h
359 include/php%%SUFFIX%%/ext/random/php_random.h
360 include/php%%SUFFIX%%/ext/spl/
361  php_spl.h
362  spl_array.h
363  spl_directory.h
364  spl_dllist.h
365  spl_engine.h
366  spl_exceptions.h
367  spl_fixedarray.h
368  spl_functions.h
369  spl_heap.h
370  spl_iterators.h
371  spl_observer.h
372 include/php%%SUFFIX%%/ext/standard/
373  base64.h
374  basic_functions.h
375  basic_functions_arginfo.h
376  crc32.h
377  crc32_x86.h
378  credits.h
379  credits_ext.h
380  credits_sapi.h
381  crypt_blowfish.h
382  crypt_freesec.h
383  css.h
384  datetime.h
385  dir_arginfo.h
386  dl.h
387  dl_arginfo.h
388  exec.h
389  file.h
390  file_arginfo.h
391  flock_compat.h
392  fsock.h
393  head.h
394  hrtime.h
395  html.h
396  html_tables.h
397  info.h
398  md5.h
399  pack.h
400  pageinfo.h
401  php_array.h
402  php_assert.h
403  php_browscap.h
404  php_crypt.h
405  php_crypt_r.h
406  php_dir.h
407  php_dns.h
408  php_ext_syslog.h
409  php_filestat.h
410  php_fopen_wrappers.h
411  php_http.h
412  php_image.h
413  php_incomplete_class.h
414  php_lcg.h
415  php_mail.h
416  php_math.h
417  php_mt_rand.h
418  php_net.h
419  php_password.h
420  php_rand.h
421  php_random.h
422  php_smart_string.h
423  php_smart_string_public.h
424  php_standard.h
425  php_string.h
426  php_uuencode.h
427  php_var.h
428  php_versioning.h
429  proc_open.h
430  quot_print.h
431  scanf.h
432  sha1.h
433  streamsfuncs.h
434  url.h
435  url_scanner_ex.h
436  user_filters_arginfo.h
437  winver.h
438 include/php%%SUFFIX%%/main/
439  SAPI.h
440  build-defs.h
441  fastcgi.h
442  fopen_wrappers.h
443  http_status_codes.h
444  php.h
445  php_compat.h
446  php_config.h
447  php_content_types.h
448  php_getopt.h
449  php_globals.h
450  php_ini.h
451  php_ini_builder.h
452  php_main.h
453  php_memory_streams.h
454  php_network.h
455  php_odbc_utils.h
456  php_open_temporary_file.h
457  php_output.h
458  php_reentrancy.h
459  php_scandir.h
460  php_streams.h
461  php_syslog.h
462  php_ticks.h
463  php_variables.h
464  php_version.h
465  rfc1867.h
466  snprintf.h
467  spprintf.h
468 include/php%%SUFFIX%%/main/streams/
469  php_stream_context.h
470  php_stream_filter_api.h
471  php_stream_glob_wrapper.h
472  php_stream_mmap.h
473  php_stream_plain_wrapper.h
474  php_stream_transport.h
475  php_stream_userspace.h
476  php_streams_int.h
477 lib/php%%SUFFIX%%/build/
478  Makefile.global
479  ax_check_compile_flag.m4
480  ax_gcc_func_attribute.m4
481  config.guess
482  config.sub
483  gen_stub.php
484  libtool.m4
485  ltmain.sh
486  php.m4
487  php_cxx_compile_stdcxx.m4
488  phpize.m4
489  pkg.m4
490  run-tests.php
491  shtool
492 @postexec touch %D/include/php%%SUFFIX%%/ext/php_config.h
493 @postunexec [ -s %D/include/php%%SUFFIX%%/ext/php_config.h ] || rm %D/include/php%%SUFFIX%%/ext/php_config.h
494
495
496 [FILE:258:manifests/plist.man]
497 %%CGI-ON%%share/man/man1/php-cgi%%SUFFIX%%.1.gz
498 %%CLI-ON%%share/man/man1/php%%SUFFIX%%.1.gz
499 %%DEBUGGER-ON%%share/man/man1/phpdbg%%SUFFIX%%.1.gz
500 %%FPM-ON%%share/man/man8/php-fpm%%SUFFIX%%.8.gz
501 share/man/man1/
502  php-config%%SUFFIX%%.1.gz
503  phpize%%SUFFIX%%.1.gz
504
505
506 [FILE:357:patches/patch-Zend_zend__gdb.c]
507 --- Zend/zend_gdb.c.orig        2023-12-20 06:28:06 UTC
508 +++ Zend/zend_gdb.c
509 @@ -25,7 +25,9 @@
510  #include <fcntl.h>
511  #include <unistd.h>
512  
513 -#if defined(__FreeBSD__) && __FreeBSD_version >= 1100000
514 +#if defined(__MidnightBSD__)
515 +# include <sys/user.h>
516 +#elif defined(__FreeBSD__) && __FreeBSD_version >= 1100000
517  # include <sys/user.h>
518  # include <libutil.h>
519  #endif
520
521
522 [FILE:1188:patches/patch-build_Makefile.global]
523 --- build/Makefile.global.orig  2023-12-20 06:28:06 UTC
524 +++ build/Makefile.global
525 @@ -92,14 +92,14 @@ test: all
526         @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
527                 INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
528                 if test "$$INI_FILE"; then \
529 -                       $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
530 +                       $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini || :; \
531                 else \
532                         echo > $(top_builddir)/tmp-php.ini; \
533                 fi; \
534                 INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
535                 if test "$$INI_SCANNED_PATH"; then \
536                         INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
537 -                       $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
538 +                       $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini || :; \
539                 fi; \
540                 TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
541                 TEST_PHP_SRCDIR=$(top_srcdir) \
542
543
544 [FILE:1155:patches/patch-configure.ac]
545 --- configure.ac.orig   2023-12-20 06:28:06 UTC
546 +++ configure.ac
547 @@ -55,6 +55,7 @@ AH_BOTTOM([
548  
549  #include <string.h>
550  
551 +#include <ext/php_config.h>
552  #endif /* PHP_CONFIG_H */
553  ])
554  
555 @@ -637,7 +638,7 @@ AC_FUNC_STRERROR_R
556  AX_FUNC_WHICH_GETHOSTBYNAME_R
557  
558  dnl Some systems (like OpenSolaris) do not have nanosleep in libc.
559 -PHP_CHECK_FUNC_LIB(nanosleep, rt)
560 +PHP_CHECK_FUNC(nanosleep, rt)
561  
562  dnl Haiku does not have network api in libc.
563  PHP_CHECK_FUNC_LIB(setsockopt, network)
564 @@ -1424,7 +1425,7 @@ EXPANDED_SYSCONFDIR=`eval echo $sysconfd
565  EXPANDED_DATADIR=$datadir
566  EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
567  EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
568 -INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
569 +INCLUDE_PATH=.:${prefix}/share/pear
570  
571  exec_prefix=$old_exec_prefix
572  libdir=$old_libdir
573 @@ -1666,7 +1667,7 @@ PHP_SUBST(all_targets)
574  PHP_SUBST(install_targets)
575  PHP_SUBST(install_binary_targets)
576  
577 -PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/])
578 +PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/])
579  PHP_INSTALL_HEADERS([Zend/Optimizer], [ \
580      zend_call_graph.h \
581      zend_cfg.h \
582
583
584 [FILE:628:patches/patch-ext_standard_proc__open.c]
585 --- ext/standard/proc_open.c.orig       2023-12-20 06:28:06 UTC
586 +++ ext/standard/proc_open.c
587 @@ -45,10 +45,10 @@
588  #ifdef HAVE_OPENPTY
589  # ifdef HAVE_PTY_H
590  #  include <pty.h>
591 -# elif defined(__FreeBSD__)
592 +# elif defined(__FreeBSD__) && !defined(__MidnightBSD__)
593  /* FreeBSD defines `openpty` in <libutil.h> */
594  #  include <libutil.h>
595 -# elif defined(__NetBSD__) || defined(__DragonFly__)
596 +# elif defined(__NetBSD__) || defined(__DragonFly__) || defined(__MidnightBSD__)
597  /* On recent NetBSD/DragonFlyBSD releases the emalloc, estrdup ... calls had been introduced in libutil */
598  #  if defined(__NetBSD__)
599  #    include <sys/termios.h>
600
601
602 [FILE:428:patches/patch-sapi_apache2handler_config.m4]
603 --- sapi/apache2handler/config.m4.orig  2023-12-20 06:28:06 UTC
604 +++ sapi/apache2handler/config.m4
605 @@ -64,7 +64,7 @@ if test "$PHP_APXS2" != "no"; then
606    fi
607  
608    APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
609 -  if test -z `$APXS -q SYSCONFDIR`; then
610 +  if true; then
611      INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
612                   $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
613                         -i -n php"
614
615
616 [FILE:304:patches/patch-sapi_fpm_config.m4]
617 --- sapi/fpm/config.m4.orig     2023-12-20 06:28:06 UTC
618 +++ sapi/fpm/config.m4
619 @@ -339,7 +339,7 @@ AC_DEFUN([AC_FPM_LQ],
620      AC_MSG_RESULT([no])
621    ])
622  
623 -  if test "$have_lq" = "tcp_info"; then
624 +  if test "$have_lq" = "so_listenq"; then
625      AC_DEFINE([HAVE_LQ_TCP_INFO], 1, [do we have TCP_INFO?])
626    fi
627  
628
629
630 [FILE:470:patches/patch-sapi_fpm_fpm_fpm__unix.c]
631 --- sapi/fpm/fpm/fpm_unix.c.orig        2023-12-20 06:28:06 UTC
632 +++ sapi/fpm/fpm/fpm_unix.c
633 @@ -478,7 +478,7 @@ int fpm_unix_init_child(struct fpm_worke
634         }
635  #endif
636  
637 -#ifdef HAVE_PROCCTL
638 +#if defined(HAVE_PROCCTL) && defined(PROC_TRACE_CTL_ENABLE)
639         int dumpable = PROC_TRACE_CTL_ENABLE;
640         if (wp->config->process_dumpable && -1 == procctl(P_PID, getpid(), PROC_TRACE_CTL, &dumpable)) {
641                 zlog(ZLOG_SYSERROR, "[pool %s] failed to procctl(PROC_TRACE_CTL)", wp->config->name);
642
643
644 [FILE:954:patches/patch-sapi_fpm_www.conf.in]
645 --- sapi/fpm/www.conf.in.orig   2023-12-20 06:28:06 UTC
646 +++ sapi/fpm/www.conf.in
647 @@ -32,10 +32,14 @@ group = @php_fpm_group@
648  ; Valid syntaxes are:
649  ;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
650  ;                            a specific port;
651 +;   '0.0.0.0:port'         - to listen on a TCP socket to all IPv4 addresses on
652 +;                            a specific port;
653  ;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
654  ;                            a specific port;
655  ;   'port'                 - to listen on a TCP socket to all addresses
656  ;                            (IPv6 and IPv4-mapped) on a specific port;
657 +;                            Note: IPv4-mapped addresses are disabled by-default in
658 +;                                  FreeBSD for security reasons;
659  ;   '/path/to/unix/socket' - to listen on a unix socket.
660  ; Note: This value is mandatory.
661  listen = 127.0.0.1:9000
662
663
664 [FILE:1394:files/php82-fpm.in]
665 #!/bin/sh
666 #
667
668 # PROVIDE: php%%SUFFIX%%-fpm
669 # REQUIRE: LOGIN
670 # KEYWORD: shutdown
671
672 #
673 # Add the following line to /etc/rc.conf to enable php-fpm:
674 # php%%SUFFIX%%_fpm_enable="YES"
675 #
676
677 . /etc/rc.subr
678
679 name="php%%SUFFIX%%_fpm"
680 rcvar=php%%SUFFIX%%_fpm_enable
681
682 start_precmd="php%%SUFFIX%%_fpm_prestart"
683 restart_precmd="php%%SUFFIX%%_fpm_checkconfig"
684 reload_precmd="php%%SUFFIX%%_fpm_checkconfig"
685 configtest_cmd="php%%SUFFIX%%_fpm_checkconfig"
686
687 load_rc_config "$name"
688
689 : ${php%%SUFFIX%%_fpm_enable="NO"}
690 : ${php%%SUFFIX%%_fpm_umask=""}
691
692 extra_commands="reload configtest logrotate"
693
694 command="%%PREFIX%%/sbin/php-fpm"
695 pidfile="/var/run/php-fpm.pid"
696 sig_stop="QUIT"
697 sig_reload="USR2"
698 logrotate_cmd="php%%SUFFIX%%_fpm_logrotate"
699
700 required_files="%%PREFIX%%/etc/php-fpm.conf"
701
702 php%%SUFFIX%%_fpm_logrotate() {
703         if [ -z "$rc_pid" ]; then
704                 _run_rc_notrunning
705                 return 1
706         fi
707         echo "Rotating logs $name."
708         kill -USR1 $rc_pid
709 }
710
711 php%%SUFFIX%%_fpm_checkconfig()
712 {
713         echo "Performing sanity check on php-fpm configuration:"
714         eval ${command} -t
715 }
716
717 php%%SUFFIX%%_fpm_prestart()
718 {
719         php%%SUFFIX%%_fpm_checkconfig
720         checkconfig=$?
721         if [ $checkconfig -ne 0  ]; then
722                 return $checkconfig
723         fi
724
725         if [ ! -z "$php%%SUFFIX%%_fpm_umask"  ]; then
726                 echo "Setting umask to: ${php%%SUFFIX%%_fpm_umask}"
727                 umask $php%%SUFFIX%%_fpm_umask
728         fi
729 }
730
731 run_rc_command "$1"
732