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