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