Fri Nov 20 15:13:31 2020 UTC ()
php74: add default-off php-embed option to install embed SAPI

Requested by Sergey Osokin in PR 55508.


(otis)
diff -r1.8 -r1.9 pkgsrc/lang/php74/Makefile
diff -r1.2 -r1.3 pkgsrc/lang/php74/Makefile.php
diff -r1.2 -r1.3 pkgsrc/lang/php74/PLIST

cvs diff -r1.8 -r1.9 pkgsrc/lang/php74/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/php74/Makefile 2020/11/05 09:06:58 1.8
+++ pkgsrc/lang/php74/Makefile 2020/11/20 15:13:31 1.9
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1# $NetBSD: Makefile,v 1.8 2020/11/05 09:06:58 ryoon Exp $ 1# $NetBSD: Makefile,v 1.9 2020/11/20 15:13:31 otis Exp $
2 2
3# 3#
4# We can't omit PKGNAME here to handle PKG_OPTIONS. 4# We can't omit PKGNAME here to handle PKG_OPTIONS.
5# 5#
6PKGNAME= php-${PHP_VERSION:S/RC/rc/} 6PKGNAME= php-${PHP_VERSION:S/RC/rc/}
7PKGREVISION= 1 7PKGREVISION= 2
8 8
9COMMENT= PHP Hypertext Preprocessor version 7.4 9COMMENT= PHP Hypertext Preprocessor version 7.4
10LICENSE= php 10LICENSE= php
11 11
12TEST_TARGET= test 12TEST_TARGET= test
13 13
14USE_TOOLS+= gmake lex 14USE_TOOLS+= gmake lex
15LIBTOOL_OVERRIDE= # empty 15LIBTOOL_OVERRIDE= # empty
16PHP_CHECK_INSTALLED= No 16PHP_CHECK_INSTALLED= No
17 17
18PHP_VERSIONS_ACCEPTED= 74 18PHP_VERSIONS_ACCEPTED= 74
19 19
20.include "Makefile.php" 20.include "Makefile.php"

cvs diff -r1.2 -r1.3 pkgsrc/lang/php74/Makefile.php (expand / switch to unified diff)

--- pkgsrc/lang/php74/Makefile.php 2020/01/21 14:16:26 1.2
+++ pkgsrc/lang/php74/Makefile.php 2020/11/20 15:13:31 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.php,v 1.2 2020/01/21 14:16:26 taca Exp $ 1# $NetBSD: Makefile.php,v 1.3 2020/11/20 15:13:31 otis Exp $
2# used by lang/php74/Makefile 2# used by lang/php74/Makefile
3# used by www/ap-php/Makefile 3# used by www/ap-php/Makefile
4# used by www/php-fpm/Makefile 4# used by www/php-fpm/Makefile
5 5
6# segfaults when buidling with many compilers 6# segfaults when buidling with many compilers
7# https://bugs.php.net/bug.php?id=74527 7# https://bugs.php.net/bug.php?id=74527
8# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86236 8# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86236
9.if ${MACHINE_ARCH} == "i386" 9.if ${MACHINE_ARCH} == "i386"
10CONFIGURE_ARGS+= --disable-gcc-global-regs 10CONFIGURE_ARGS+= --disable-gcc-global-regs
11.endif 11.endif
12 12
13# the binary actually needs full dep on PCRE 13# the binary actually needs full dep on PCRE
14BUILDLINK_DEPMETHOD.pcre2= full 14BUILDLINK_DEPMETHOD.pcre2= full
@@ -43,27 +43,27 @@ CONFIGURE_ARGS+= --disable-json @@ -43,27 +43,27 @@ CONFIGURE_ARGS+= --disable-json
43 43
44CONFIGURE_ARGS+= --enable-cgi 44CONFIGURE_ARGS+= --enable-cgi
45CONFIGURE_ARGS+= --enable-mysqlnd 45CONFIGURE_ARGS+= --enable-mysqlnd
46CONFIGURE_ARGS+= --enable-xml 46CONFIGURE_ARGS+= --enable-xml
47#CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX} 47#CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX}
48 48
49CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}" 49CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
50 50
51.include "../../textproc/libxml2/buildlink3.mk" 51.include "../../textproc/libxml2/buildlink3.mk"
52 52
53#CONFIGURE_ARGS+= --with-pcre-regex=${BUILDLINK_PREFIX.pcre2} 53#CONFIGURE_ARGS+= --with-pcre-regex=${BUILDLINK_PREFIX.pcre2}
54 54
55PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX} 55PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX}
56PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline argon2 56PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline argon2 php-embed
57PKG_SUPPORTED_OPTIONS+= disable-filter-url 57PKG_SUPPORTED_OPTIONS+= disable-filter-url
58PKG_SUGGESTED_OPTIONS+= inet6 ssl readline 58PKG_SUGGESTED_OPTIONS+= inet6 ssl readline
59 59
60.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD" 60.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
61PKG_SUPPORTED_OPTIONS+= dtrace 61PKG_SUPPORTED_OPTIONS+= dtrace
62.endif 62.endif
63 63
64.include "../../mk/bsd.options.mk" 64.include "../../mk/bsd.options.mk"
65 65
66.if !empty(PKG_OPTIONS:Minet6) 66.if !empty(PKG_OPTIONS:Minet6)
67CONFIGURE_ARGS+= --enable-ipv6 67CONFIGURE_ARGS+= --enable-ipv6
68.else 68.else
69CONFIGURE_ARGS+= --disable-ipv6 69CONFIGURE_ARGS+= --disable-ipv6
@@ -99,15 +99,29 @@ CONFIGURE_ARGS+= --enable-dtrace @@ -99,15 +99,29 @@ CONFIGURE_ARGS+= --enable-dtrace
99# See https://bugs.php.net/bug.php?id=61268 99# See https://bugs.php.net/bug.php?id=61268
100INSTALL_MAKE_FLAGS+= -r 100INSTALL_MAKE_FLAGS+= -r
101.endif 101.endif
102 102
103.if !empty(PKG_OPTIONS:Margon2) 103.if !empty(PKG_OPTIONS:Margon2)
104CONFIGURE_ARGS+= --with-password-argon2=${BUILDLINK_PREFIX.argon2} 104CONFIGURE_ARGS+= --with-password-argon2=${BUILDLINK_PREFIX.argon2}
105.include "../../security/argon2/buildlink3.mk" 105.include "../../security/argon2/buildlink3.mk"
106.endif 106.endif
107 107
108.if !empty(PKG_OPTIONS:Mdisable-filter-url) 108.if !empty(PKG_OPTIONS:Mdisable-filter-url)
109CFLAGS+= -DDISABLE_FILTER_URL 109CFLAGS+= -DDISABLE_FILTER_URL
110.endif 110.endif
111 111
 112PLIST_VARS+= embed
 113
 114.if !empty(PKG_OPTIONS:Mphp-embed)
 115CONFIGURE_ARGS+= --enable-embed
 116INSTALLATION_DIRS+= include/php/sapi/embed
 117PLIST.embed= yes
 118
 119.PHONY: post-install-embed
 120post-install: post-install-embed
 121post-install-embed:
 122 ${INSTALL_DATA} ${WRKSRC}/sapi/embed/php_embed.h ${DESTDIR}${PREFIX}/include/php/sapi/embed/
 123 ${INSTALL_LIB} ${WRKSRC}/libs/libphp7.so ${DESTDIR}${PREFIX}/lib/
 124.endif
 125
112DL_AUTO_VARS= yes 126DL_AUTO_VARS= yes
113.include "../../mk/dlopen.buildlink3.mk" 127.include "../../mk/dlopen.buildlink3.mk"

cvs diff -r1.2 -r1.3 pkgsrc/lang/php74/PLIST (expand / switch to unified diff)

--- pkgsrc/lang/php74/PLIST 2020/01/21 14:16:26 1.2
+++ pkgsrc/lang/php74/PLIST 2020/11/20 15:13:31 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.2 2020/01/21 14:16:26 taca Exp $ 1@comment $NetBSD: PLIST,v 1.3 2020/11/20 15:13:31 otis Exp $
2bin/phar 2bin/phar
3bin/phar.phar 3bin/phar.phar
4bin/php 4bin/php
5bin/php-config 5bin/php-config
6bin/phpdbg 6bin/phpdbg
7bin/phpize 7bin/phpize
8include/php/TSRM/TSRM.h 8include/php/TSRM/TSRM.h
9include/php/TSRM/tsrm_win32.h 9include/php/TSRM/tsrm_win32.h
10include/php/Zend/zend.h 10include/php/Zend/zend.h
11include/php/Zend/zend_API.h 11include/php/Zend/zend_API.h
12include/php/Zend/zend_alloc.h 12include/php/Zend/zend_alloc.h
13include/php/Zend/zend_alloc_sizes.h 13include/php/Zend/zend_alloc_sizes.h
14include/php/Zend/zend_arena.h 14include/php/Zend/zend_arena.h
@@ -245,26 +245,28 @@ include/php/main/php_variables.h @@ -245,26 +245,28 @@ include/php/main/php_variables.h
245include/php/main/php_version.h 245include/php/main/php_version.h
246include/php/main/rfc1867.h 246include/php/main/rfc1867.h
247include/php/main/snprintf.h 247include/php/main/snprintf.h
248include/php/main/spprintf.h 248include/php/main/spprintf.h
249include/php/main/streams/php_stream_context.h 249include/php/main/streams/php_stream_context.h
250include/php/main/streams/php_stream_filter_api.h 250include/php/main/streams/php_stream_filter_api.h
251include/php/main/streams/php_stream_glob_wrapper.h 251include/php/main/streams/php_stream_glob_wrapper.h
252include/php/main/streams/php_stream_mmap.h 252include/php/main/streams/php_stream_mmap.h
253include/php/main/streams/php_stream_plain_wrapper.h 253include/php/main/streams/php_stream_plain_wrapper.h
254include/php/main/streams/php_stream_transport.h 254include/php/main/streams/php_stream_transport.h
255include/php/main/streams/php_stream_userspace.h 255include/php/main/streams/php_stream_userspace.h
256include/php/main/streams/php_streams_int.h 256include/php/main/streams/php_streams_int.h
257include/php/sapi/cli/cli.h 257include/php/sapi/cli/cli.h
 258${PLIST.embed}include/php/sapi/embed/php_embed.h
 259${PLIST.embed}lib/libphp7.so
258lib/php/build/Makefile.global 260lib/php/build/Makefile.global
259lib/php/build/ax_check_compile_flag.m4 261lib/php/build/ax_check_compile_flag.m4
260lib/php/build/ax_gcc_func_attribute.m4 262lib/php/build/ax_gcc_func_attribute.m4
261lib/php/build/config.guess 263lib/php/build/config.guess
262lib/php/build/config.sub 264lib/php/build/config.sub
263lib/php/build/libtool.m4 265lib/php/build/libtool.m4
264lib/php/build/ltmain.sh 266lib/php/build/ltmain.sh
265lib/php/build/php.m4 267lib/php/build/php.m4
266lib/php/build/php_cxx_compile_stdcxx.m4 268lib/php/build/php_cxx_compile_stdcxx.m4
267lib/php/build/phpize.m4 269lib/php/build/phpize.m4
268lib/php/build/pkg.m4 270lib/php/build/pkg.m4
269lib/php/build/run-tests.php 271lib/php/build/run-tests.php
270lib/php/build/shtool 272lib/php/build/shtool