Ravenports generated: 02 Dec 2019 21:21
[ravenports.git] / bucket_8A / php74
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               php74
4 VERSION=                7.4.0
5 KEYWORDS=               lang www php
6 VARIANTS=               standard
7 SDESC[standard]=        PHP Hypertext Preprocessor version 7.4
8 HOMEPAGE=               https://php.net/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            https://downloads.php.net/~derick/
13 DISTFILE[1]=            php-7.4.0.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 BR_DEPS[darwin]=        libiconv:static:standard
27
28 USES=                   cpe gmake pkgconfig
29 GNOME_COMPONENTS=       libxml2
30
31 DISTNAME=               php-7.4.0
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/php74
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/php74
46                         --sysconfdir={{PREFIX}}/etc/php74
47                         --libdir={{PREFIX}}/lib/php74
48                         --datadir={{PREFIX}}/share/php74
49                         --disable-all
50                         --enable-mysqlnd
51                         --enable-maintainer-zts
52                         --program-suffix=74
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=74
59                         SOMAJOR=7
60 RC_SUBR=                php74-fpm:single
61 SUB_LIST=               SUFFIX=74
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/php74
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|/php74|" \
92                 ${WRKSRC}/scripts/Makefile.frag
93         ${REINPLACE_CMD} -e "/includedir=/ s|php|php74|" \
94                 ${WRKSRC}/scripts/phpize.in
95         ${REINPLACE_CMD} -e "/include_dir=/ s|php|php74|" \
96                 -e "/^ldflags=/ s|@PHP|-L${PREFIX}/lib/php74 @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/phpdbg74
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/php74
112         ${RM} -r ${STAGEDIR}/var
113         ${RM} -r ${STAGEDIR}${PREFIX}/include/php74/include
114         ${INSTALL_DATA} ${WRKSRC}/php.ini-development \
115                 ${WRKSRC}/php.ini-production \
116                 ${WRKDIR}/php.conf ${STAGEDIR}${PREFIX}/etc/php74
117
118 post-build:
119         ${ECHO_CMD} "PHP_VER=74" > ${WRKDIR}/php.conf
120         ${ECHO_CMD} "PHP_VERSION=7.4.0" >> ${WRKDIR}/php.conf
121         ${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
122         ${ECHO_CMD} "PHP_EXT_INC=hash pcre spl" >> ${WRKDIR}/php.conf
123         ${SH} ${WRKSRC}/scripts/php-config --extension-dir | \
124                 ${SED} -ne 's,^${PREFIX}/lib/php74/,PHP_EXT_DIR=,p'\
125                 >> ${WRKDIR}/php.conf
126
127 post-install-EMBED-ON:
128         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libphp7.so
129         ${MV} ${STAGEDIR}${PREFIX}/lib/libphp7.so \
130                 ${STAGEDIR}${PREFIX}/lib/php74/
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-cgi74
137
138 post-install-FPM-ON:
139         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/php-fpm74
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:95:distinfo]
162 9bb751b20e5d6cc1ea9b1ebf23ef2d5f07f99b2d9cc417bf1d70c04f8b20ec42     10232208 php-7.4.0.tar.xz
163
164
165 [FILE:5649: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%%SOMAJOR%%.%%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_bitset.h
198  zend_build.h
199  zend_builtin_functions.h
200  zend_closures.h
201  zend_compile.h
202  zend_config.h
203  zend_config.w32.h
204  zend_constants.h
205  zend_cpuinfo.h
206  zend_dtrace.h
207  zend_errors.h
208  zend_exceptions.h
209  zend_execute.h
210  zend_extensions.h
211  zend_float.h
212  zend_gc.h
213  zend_generators.h
214  zend_globals.h
215  zend_globals_macros.h
216  zend_hash.h
217  zend_highlight.h
218  zend_inheritance.h
219  zend_ini.h
220  zend_ini_parser.h
221  zend_ini_scanner.h
222  zend_ini_scanner_defs.h
223  zend_interfaces.h
224  zend_istdiostream.h
225  zend_iterators.h
226  zend_language_parser.h
227  zend_language_scanner.h
228  zend_language_scanner_defs.h
229  zend_list.h
230  zend_llist.h
231  zend_long.h
232  zend_map_ptr.h
233  zend_modules.h
234  zend_multibyte.h
235  zend_multiply.h
236  zend_object_handlers.h
237  zend_objects.h
238  zend_objects_API.h
239  zend_operators.h
240  zend_portability.h
241  zend_ptr_stack.h
242  zend_range_check.h
243  zend_signal.h
244  zend_smart_str.h
245  zend_smart_str_public.h
246  zend_smart_string.h
247  zend_smart_string_public.h
248  zend_sort.h
249  zend_stack.h
250  zend_stream.h
251  zend_string.h
252  zend_strtod.h
253  zend_strtod_int.h
254  zend_ts_hash.h
255  zend_type_info.h
256  zend_types.h
257  zend_variables.h
258  zend_virtual_cwd.h
259  zend_vm.h
260  zend_vm_def.h
261  zend_vm_execute.h
262  zend_vm_handlers.h
263  zend_vm_opcodes.h
264  zend_vm_trace_handlers.h
265  zend_vm_trace_map.h
266  zend_weakrefs.h
267 include/php%%SUFFIX%%/ext/date/php_date.h
268 include/php%%SUFFIX%%/ext/date/lib/
269  timelib.h
270  timelib_config.h
271 include/php%%SUFFIX%%/ext/hash/
272  php_hash.h
273  php_hash_adler32.h
274  php_hash_crc32.h
275  php_hash_fnv.h
276  php_hash_gost.h
277  php_hash_haval.h
278  php_hash_joaat.h
279  php_hash_md.h
280  php_hash_ripemd.h
281  php_hash_sha.h
282  php_hash_sha3.h
283  php_hash_snefru.h
284  php_hash_tiger.h
285  php_hash_whirlpool.h
286 include/php%%SUFFIX%%/ext/libxml/php_libxml.h
287 include/php%%SUFFIX%%/ext/mysqlnd/
288  config-win.h
289  mysql_float_to_double.h
290  mysqlnd.h
291  mysqlnd_alloc.h
292  mysqlnd_auth.h
293  mysqlnd_block_alloc.h
294  mysqlnd_charset.h
295  mysqlnd_commands.h
296  mysqlnd_connection.h
297  mysqlnd_debug.h
298  mysqlnd_enum_n_def.h
299  mysqlnd_ext_plugin.h
300  mysqlnd_libmysql_compat.h
301  mysqlnd_plugin.h
302  mysqlnd_portability.h
303  mysqlnd_priv.h
304  mysqlnd_protocol_frame_codec.h
305  mysqlnd_ps.h
306  mysqlnd_read_buffer.h
307  mysqlnd_result.h
308  mysqlnd_result_meta.h
309  mysqlnd_reverse_api.h
310  mysqlnd_statistics.h
311  mysqlnd_structs.h
312  mysqlnd_vio.h
313  mysqlnd_wireprotocol.h
314  php_mysqlnd.h
315 include/php%%SUFFIX%%/ext/pcre/php_pcre.h
316 include/php%%SUFFIX%%/ext/pcre/pcre2lib/
317  config.h
318  pcre2.h
319  pcre2_internal.h
320  pcre2_intmodedep.h
321  pcre2_ucp.h
322 include/php%%SUFFIX%%/ext/spl/
323  php_spl.h
324  spl_array.h
325  spl_directory.h
326  spl_dllist.h
327  spl_engine.h
328  spl_exceptions.h
329  spl_fixedarray.h
330  spl_functions.h
331  spl_heap.h
332  spl_iterators.h
333  spl_observer.h
334 include/php%%SUFFIX%%/ext/standard/
335  base64.h
336  basic_functions.h
337  crc32.h
338  credits.h
339  credits_ext.h
340  credits_sapi.h
341  crypt_blowfish.h
342  crypt_freesec.h
343  css.h
344  cyr_convert.h
345  datetime.h
346  dl.h
347  exec.h
348  file.h
349  flock_compat.h
350  fsock.h
351  head.h
352  hrtime.h
353  html.h
354  html_tables.h
355  info.h
356  md5.h
357  microtime.h
358  pack.h
359  pageinfo.h
360  php_array.h
361  php_assert.h
362  php_browscap.h
363  php_crypt.h
364  php_crypt_r.h
365  php_dir.h
366  php_dns.h
367  php_ext_syslog.h
368  php_filestat.h
369  php_fopen_wrappers.h
370  php_ftok.h
371  php_http.h
372  php_image.h
373  php_incomplete_class.h
374  php_iptc.h
375  php_lcg.h
376  php_link.h
377  php_mail.h
378  php_math.h
379  php_metaphone.h
380  php_mt_rand.h
381  php_net.h
382  php_password.h
383  php_rand.h
384  php_random.h
385  php_smart_string.h
386  php_smart_string_public.h
387  php_standard.h
388  php_string.h
389  php_type.h
390  php_uuencode.h
391  php_var.h
392  php_versioning.h
393  proc_open.h
394  quot_print.h
395  scanf.h
396  sha1.h
397  streamsfuncs.h
398  uniqid.h
399  url.h
400  url_scanner_ex.h
401  winver.h
402 include/php%%SUFFIX%%/main/
403  SAPI.h
404  build-defs.h
405  fastcgi.h
406  fopen_wrappers.h
407  http_status_codes.h
408  php.h
409  php_compat.h
410  php_config.h
411  php_content_types.h
412  php_getopt.h
413  php_globals.h
414  php_ini.h
415  php_main.h
416  php_memory_streams.h
417  php_network.h
418  php_open_temporary_file.h
419  php_output.h
420  php_reentrancy.h
421  php_scandir.h
422  php_stdint.h
423  php_streams.h
424  php_syslog.h
425  php_ticks.h
426  php_variables.h
427  php_version.h
428  rfc1867.h
429  snprintf.h
430  spprintf.h
431 include/php%%SUFFIX%%/main/streams/
432  php_stream_context.h
433  php_stream_filter_api.h
434  php_stream_glob_wrapper.h
435  php_stream_mmap.h
436  php_stream_plain_wrapper.h
437  php_stream_transport.h
438  php_stream_userspace.h
439  php_streams_int.h
440 lib/php%%SUFFIX%%/build/
441  Makefile.global
442  ax_check_compile_flag.m4
443  ax_gcc_func_attribute.m4
444  config.guess
445  config.sub
446  libtool.m4
447  ltmain.sh
448  php.m4
449  php_cxx_compile_stdcxx.m4
450  phpize.m4
451  pkg.m4
452  run-tests.php
453  shtool
454 share/man/man1/
455  php-config%%SUFFIX%%.1.gz
456  phpize%%SUFFIX%%.1.gz
457 @postexec touch %D/include/php%%SUFFIX%%/ext/php_config.h
458 @postunexec [ -s %D/include/php%%SUFFIX%%/ext/php_config.h ] || rm %D/include/php%%SUFFIX%%/ext/php_config.h
459
460
461 [FILE:1188:patches/patch-build_Makefile.global]
462 --- build/Makefile.global.orig  2019-11-10 23:33:27 UTC
463 +++ build/Makefile.global
464 @@ -89,14 +89,14 @@ test: all
465         @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
466                 INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
467                 if test "$$INI_FILE"; then \
468 -                       $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
469 +                       $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini || :; \
470                 else \
471                         echo > $(top_builddir)/tmp-php.ini; \
472                 fi; \
473                 INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
474                 if test "$$INI_SCANNED_PATH"; then \
475                         INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
476 -                       $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
477 +                       $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini || :; \
478                 fi; \
479                 TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
480                 TEST_PHP_SRCDIR=$(top_srcdir) \
481
482
483 [FILE:1183:patches/patch-configure.ac]
484 --- configure.ac.orig   2019-11-10 23:33:26 UTC
485 +++ configure.ac
486 @@ -105,6 +105,7 @@ extern "C++" {
487  #endif
488  #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
489  
490 +#include <ext/php_config.h>
491  #endif /* PHP_CONFIG_H */
492  ])
493  
494 @@ -654,7 +655,7 @@ memmem \
495  AX_FUNC_WHICH_GETHOSTBYNAME_R
496  
497  dnl Some systems (like OpenSolaris) do not have nanosleep in libc.
498 -PHP_CHECK_FUNC_LIB(nanosleep, rt)
499 +PHP_CHECK_FUNC(nanosleep, rt)
500  
501  dnl Check for getaddrinfo, should be a better way, but... Also check for working
502  dnl getaddrinfo.
503 @@ -1260,7 +1261,7 @@ EXPANDED_SYSCONFDIR=`eval echo $sysconfd
504  EXPANDED_DATADIR=$datadir
505  EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
506  EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
507 -INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
508 +INCLUDE_PATH=.:${prefix}/share/pear
509  
510  exec_prefix=$old_exec_prefix
511  libdir=$old_libdir
512 @@ -1445,7 +1446,7 @@ PHP_SUBST(all_targets)
513  PHP_SUBST(install_targets)
514  PHP_SUBST(install_binary_targets)
515  
516 -PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/])
517 +PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/])
518  
519  PHP_ADD_SOURCES(TSRM, TSRM.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
520  
521
522
523 [FILE:429:patches/patch-sapi_apache2handler_config.m4]
524 --- sapi/apache2handler/config.m4.orig  2019-11-10 23:33:27 UTC
525 +++ sapi/apache2handler/config.m4
526 @@ -64,7 +64,7 @@ if test "$PHP_APXS2" != "no"; then
527    fi
528  
529    APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
530 -  if test -z `$APXS -q SYSCONFDIR`; then
531 +  if true; then
532      INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
533                   $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
534                         -i -n php7"
535
536
537 [FILE:304:patches/patch-sapi_fpm_config.m4]
538 --- sapi/fpm/config.m4.orig     2019-11-10 23:33:27 UTC
539 +++ sapi/fpm/config.m4
540 @@ -315,7 +315,7 @@ AC_DEFUN([AC_FPM_LQ],
541      AC_MSG_RESULT([no])
542    ])
543  
544 -  if test "$have_lq" = "tcp_info"; then
545 +  if test "$have_lq" = "so_listenq"; then
546      AC_DEFINE([HAVE_LQ_TCP_INFO], 1, [do we have TCP_INFO?])
547    fi
548  
549
550
551 [FILE:954:patches/patch-sapi_fpm_www.conf.in]
552 --- sapi/fpm/www.conf.in.orig   2019-11-10 23:33:27 UTC
553 +++ sapi/fpm/www.conf.in
554 @@ -27,10 +27,14 @@ group = @php_fpm_group@
555  ; Valid syntaxes are:
556  ;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
557  ;                            a specific port;
558 +;   '0.0.0.0:port'         - to listen on a TCP socket to all IPv4 addresses on
559 +;                            a specific port;
560  ;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
561  ;                            a specific port;
562  ;   'port'                 - to listen on a TCP socket to all addresses
563  ;                            (IPv6 and IPv4-mapped) on a specific port;
564 +;                            Note: IPv4-mapped addresses are disabled by-default in
565 +;                                  FreeBSD for security reasons;
566  ;   '/path/to/unix/socket' - to listen on a unix socket.
567  ; Note: This value is mandatory.
568  listen = 127.0.0.1:9000
569
570
571 [FILE:1394:files/php74-fpm.in]
572 #!/bin/sh
573 #
574
575 # PROVIDE: php%%SUFFIX%%-fpm
576 # REQUIRE: LOGIN
577 # KEYWORD: shutdown
578
579 #
580 # Add the following line to /etc/rc.conf to enable php-fpm:
581 # php%%SUFFIX%%_fpm_enable="YES"
582 #
583
584 . /etc/rc.subr
585
586 name="php%%SUFFIX%%_fpm"
587 rcvar=php%%SUFFIX%%_fpm_enable
588
589 start_precmd="php%%SUFFIX%%_fpm_prestart"
590 restart_precmd="php%%SUFFIX%%_fpm_checkconfig"
591 reload_precmd="php%%SUFFIX%%_fpm_checkconfig"
592 configtest_cmd="php%%SUFFIX%%_fpm_checkconfig"
593
594 load_rc_config "$name"
595
596 : ${php%%SUFFIX%%_fpm_enable="NO"}
597 : ${php%%SUFFIX%%_fpm_umask=""}
598
599 extra_commands="reload configtest logrotate"
600
601 command="%%PREFIX%%/sbin/php-fpm"
602 pidfile="/var/run/php-fpm.pid"
603 sig_stop="QUIT"
604 sig_reload="USR2"
605 logrotate_cmd="php%%SUFFIX%%_fpm_logrotate"
606
607 required_files="%%PREFIX%%/etc/php-fpm.conf"
608
609 php%%SUFFIX%%_fpm_logrotate() {
610         if [ -z "$rc_pid" ]; then
611                 _run_rc_notrunning
612                 return 1
613         fi
614         echo "Rotating logs $name."
615         kill -USR1 $rc_pid
616 }
617
618 php%%SUFFIX%%_fpm_checkconfig()
619 {
620         echo "Performing sanity check on php-fpm configuration:"
621         eval ${command} -t
622 }
623
624 php%%SUFFIX%%_fpm_prestart()
625 {
626         php%%SUFFIX%%_fpm_checkconfig
627         checkconfig=$?
628         if [ $checkconfig -ne 0  ]; then
629                 return $checkconfig
630         fi
631
632         if [ ! -z "$php%%SUFFIX%%_fpm_umask"  ]; then
633                 echo "Setting umask to: ${php%%SUFFIX%%_fpm_umask}"
634                 umask $php%%SUFFIX%%_fpm_umask
635         fi
636 }
637
638 run_rc_command "$1"
639