php56: add default-off php-embed option to install embed SAPI Requested by Sergey Osokin in PR 55508. While here, split off option handling into options.mk.diff -r1.7 -r1.8 pkgsrc/lang/php56/Makefile.php
(wiz)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile.php,v 1.7 2019/03/31 20:48:18 wiz Exp $ | 1 | # $NetBSD: Makefile.php,v 1.8 2020/08/01 09:52:51 wiz Exp $ | |
2 | # used by lang/php56/Makefile | 2 | # used by lang/php56/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 | .include "../../lang/php56/Makefile.common" | 6 | .include "../../lang/php56/Makefile.common" | |
7 | 7 | |||
8 | DISTINFO_FILE= ${.CURDIR}/../../lang/php56/distinfo | 8 | DISTINFO_FILE= ${.CURDIR}/../../lang/php56/distinfo | |
9 | PATCHDIR= ${.CURDIR}/../../lang/php56/patches | 9 | PATCHDIR= ${.CURDIR}/../../lang/php56/patches | |
10 | 10 | |||
11 | USE_LIBTOOL= YES | 11 | USE_LIBTOOL= YES | |
12 | USE_LANGUAGES= c c++ | 12 | USE_LANGUAGES= c c++ | |
13 | GNU_CONFIGURE= YES | 13 | GNU_CONFIGURE= YES | |
14 | BUILD_DEFS+= VARBASE | 14 | BUILD_DEFS+= VARBASE | |
@@ -32,70 +32,17 @@ CONFIGURE_ARGS+= --without-sqlite3 | @@ -32,70 +32,17 @@ CONFIGURE_ARGS+= --without-sqlite3 | |||
32 | #CONFIGURE_ARGS+= --without-intl | 32 | #CONFIGURE_ARGS+= --without-intl | |
33 | 33 | |||
34 | CONFIGURE_ARGS+= --disable-posix | 34 | CONFIGURE_ARGS+= --disable-posix | |
35 | CONFIGURE_ARGS+= --disable-opcache | 35 | CONFIGURE_ARGS+= --disable-opcache | |
36 | CONFIGURE_ARGS+= --disable-pdo | 36 | CONFIGURE_ARGS+= --disable-pdo | |
37 | CONFIGURE_ARGS+= --disable-json | 37 | CONFIGURE_ARGS+= --disable-json | |
38 | 38 | |||
39 | CONFIGURE_ARGS+= --enable-cgi | 39 | CONFIGURE_ARGS+= --enable-cgi | |
40 | CONFIGURE_ARGS+= --enable-mysqlnd | 40 | CONFIGURE_ARGS+= --enable-mysqlnd | |
41 | CONFIGURE_ARGS+= --enable-xml | 41 | CONFIGURE_ARGS+= --enable-xml | |
42 | CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX} | 42 | CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX} | |
43 | .include "../../textproc/libxml2/buildlink3.mk" | 43 | .include "../../textproc/libxml2/buildlink3.mk" | |
44 | 44 | |||
45 | PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX} | 45 | .include "options.mk" | |
46 | PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline disable-filter-url | |||
47 | PKG_SUGGESTED_OPTIONS+= inet6 ssl | |||
48 | ||||
49 | .if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD" | |||
50 | PKG_SUPPORTED_OPTIONS+= dtrace | |||
51 | .endif | |||
52 | ||||
53 | .include "../../mk/bsd.options.mk" | |||
54 | ||||
55 | .if !empty(PKG_OPTIONS:Minet6) | |||
56 | CONFIGURE_ARGS+= --enable-ipv6 | |||
57 | .else | |||
58 | CONFIGURE_ARGS+= --disable-ipv6 | |||
59 | .endif | |||
60 | ||||
61 | .if !empty(PKG_OPTIONS:Mssl) | |||
62 | . include "../../security/openssl/buildlink3.mk" | |||
63 | . if ${OPSYS} == "SunOS" | |||
64 | CONFIGURE_ARGS+= --with-openssl=yes | |||
65 | LIBS.SunOS+= -lcrypto | |||
66 | . else | |||
67 | CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl} | |||
68 | . endif | |||
69 | PATCH_SITES+= http://zettasystem.com/ | |||
70 | PATCHFILES+= PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch | |||
71 | PATCH_DIST_STRIP= -p1 | |||
72 | .else | |||
73 | CONFIGURE_ARGS+= --without-openssl | |||
74 | .endif | |||
75 | ||||
76 | .if !empty(PKG_OPTIONS:Mmaintainer-zts) | |||
77 | CONFIGURE_ARGS+= --enable-maintainer-zts | |||
78 | .endif | |||
79 | ||||
80 | .if !empty(PKG_OPTIONS:Mreadline) | |||
81 | USE_GNU_READLINE= yes | |||
82 | .include "../../devel/readline/buildlink3.mk" | |||
83 | CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline} | |||
84 | .else | |||
85 | CONFIGURE_ARGS+= --without-readline | |||
86 | .endif | |||
87 | ||||
88 | .if !empty(PKG_OPTIONS:Mdtrace) | |||
89 | PLIST.dtrace= yes | |||
90 | CONFIGURE_ARGS+= --enable-dtrace | |||
91 | ||||
92 | # See https://bugs.php.net/bug.php?id=61268 | |||
93 | INSTALL_MAKE_FLAGS+= -r | |||
94 | .endif | |||
95 | ||||
96 | .if !empty(PKG_OPTIONS:Mdisable-filter-url) | |||
97 | CFLAGS+= -DDISABLE_FILTER_URL | |||
98 | .endif | |||
99 | 46 | |||
100 | DL_AUTO_VARS= yes | 47 | DL_AUTO_VARS= yes | |
101 | .include "../../mk/dlopen.buildlink3.mk" | 48 | .include "../../mk/dlopen.buildlink3.mk" |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.3 2017/04/05 12:28:59 fhajny Exp $ | 1 | @comment $NetBSD: PLIST,v 1.4 2020/08/01 09:52:51 wiz Exp $ | |
2 | bin/phar | 2 | bin/phar | |
3 | bin/phar.phar | 3 | bin/phar.phar | |
4 | bin/php | 4 | bin/php | |
5 | bin/php-config | 5 | bin/php-config | |
6 | bin/phpize | 6 | bin/phpize | |
7 | include/php/TSRM/TSRM.h | 7 | include/php/TSRM/TSRM.h | |
8 | include/php/TSRM/readdir.h | 8 | include/php/TSRM/readdir.h | |
9 | include/php/TSRM/tsrm_config.h | 9 | include/php/TSRM/tsrm_config.h | |
10 | include/php/TSRM/tsrm_config.w32.h | 10 | include/php/TSRM/tsrm_config.w32.h | |
11 | include/php/TSRM/tsrm_config_common.h | 11 | include/php/TSRM/tsrm_config_common.h | |
12 | include/php/TSRM/tsrm_nw.h | 12 | include/php/TSRM/tsrm_nw.h | |
13 | include/php/TSRM/tsrm_strtok_r.h | 13 | include/php/TSRM/tsrm_strtok_r.h | |
14 | include/php/TSRM/tsrm_win32.h | 14 | include/php/TSRM/tsrm_win32.h | |
@@ -231,26 +231,28 @@ include/php/main/rfc1867.h | @@ -231,26 +231,28 @@ include/php/main/rfc1867.h | |||
231 | include/php/main/snprintf.h | 231 | include/php/main/snprintf.h | |
232 | include/php/main/spprintf.h | 232 | include/php/main/spprintf.h | |
233 | include/php/main/streams/php_stream_context.h | 233 | include/php/main/streams/php_stream_context.h | |
234 | include/php/main/streams/php_stream_filter_api.h | 234 | include/php/main/streams/php_stream_filter_api.h | |
235 | include/php/main/streams/php_stream_glob_wrapper.h | 235 | include/php/main/streams/php_stream_glob_wrapper.h | |
236 | include/php/main/streams/php_stream_mmap.h | 236 | include/php/main/streams/php_stream_mmap.h | |
237 | include/php/main/streams/php_stream_plain_wrapper.h | 237 | include/php/main/streams/php_stream_plain_wrapper.h | |
238 | include/php/main/streams/php_stream_transport.h | 238 | include/php/main/streams/php_stream_transport.h | |
239 | include/php/main/streams/php_stream_userspace.h | 239 | include/php/main/streams/php_stream_userspace.h | |
240 | include/php/main/streams/php_streams_int.h | 240 | include/php/main/streams/php_streams_int.h | |
241 | include/php/main/win32_internal_function_disabled.h | 241 | include/php/main/win32_internal_function_disabled.h | |
242 | include/php/main/win95nt.h | 242 | include/php/main/win95nt.h | |
243 | include/php/sapi/cli/cli.h | 243 | include/php/sapi/cli/cli.h | |
244 | ${PLIST.embed}include/php/sapi/embed/php_embed.h | |||
245 | ${PLIST.embed}lib/libphp5.so | |||
244 | lib/php/build/Makefile.global | 246 | lib/php/build/Makefile.global | |
245 | lib/php/build/acinclude.m4 | 247 | lib/php/build/acinclude.m4 | |
246 | lib/php/build/config.guess | 248 | lib/php/build/config.guess | |
247 | lib/php/build/config.sub | 249 | lib/php/build/config.sub | |
248 | lib/php/build/libtool.m4 | 250 | lib/php/build/libtool.m4 | |
249 | lib/php/build/ltmain.sh | 251 | lib/php/build/ltmain.sh | |
250 | lib/php/build/mkdep.awk | 252 | lib/php/build/mkdep.awk | |
251 | lib/php/build/phpize.m4 | 253 | lib/php/build/phpize.m4 | |
252 | lib/php/build/run-tests.php | 254 | lib/php/build/run-tests.php | |
253 | lib/php/build/scan_makefile_in.awk | 255 | lib/php/build/scan_makefile_in.awk | |
254 | lib/php/build/shtool | 256 | lib/php/build/shtool | |
255 | libexec/cgi-bin/php | 257 | libexec/cgi-bin/php | |
256 | man/man1/phar.1 | 258 | man/man1/phar.1 |
# $NetBSD: options.mk,v 1.1 2020/08/01 09:52:51 wiz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX}
PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline disable-filter-url php-embed
PKG_SUGGESTED_OPTIONS+= inet6 ssl
.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
PKG_SUPPORTED_OPTIONS+= dtrace
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Minet6)
CONFIGURE_ARGS+= --enable-ipv6
.else
CONFIGURE_ARGS+= --disable-ipv6
.endif
.if !empty(PKG_OPTIONS:Mssl)
. include "../../security/openssl/buildlink3.mk"
. if ${OPSYS} == "SunOS"
CONFIGURE_ARGS+= --with-openssl=yes
LIBS.SunOS+= -lcrypto
. else
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
. endif
PATCH_SITES+= http://zettasystem.com/
PATCHFILES+= PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch
PATCH_DIST_STRIP= -p1
.else
CONFIGURE_ARGS+= --without-openssl
.endif
.if !empty(PKG_OPTIONS:Mmaintainer-zts)
CONFIGURE_ARGS+= --enable-maintainer-zts
.endif
.if !empty(PKG_OPTIONS:Mreadline)
USE_GNU_READLINE= yes
.include "../../devel/readline/buildlink3.mk"
CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline}
.else
CONFIGURE_ARGS+= --without-readline
.endif
.if !empty(PKG_OPTIONS:Mdtrace)
PLIST.dtrace= yes
CONFIGURE_ARGS+= --enable-dtrace
# See https://bugs.php.net/bug.php?id=61268
INSTALL_MAKE_FLAGS+= -r
.endif
.if !empty(PKG_OPTIONS:Mdisable-filter-url)
CFLAGS+= -DDISABLE_FILTER_URL
.endif
PLIST_VARS+= embed
.if !empty(PKG_OPTIONS:Mphp-embed)
CONFIGURE_ARGS+= --enable-embed
INSTALLATION_DIRS+= include/php/sapi/embed
PLIST.embed= yes
.PHONY: post-install-embed
post-install: post-install-embed
post-install-embed:
${INSTALL_DATA} ${WRKSRC}/sapi/embed/php_embed.h ${DESTDIR}${PREFIX}/include/php/sapi/embed/
${INSTALL_LIB} ${WRKSRC}/libs/libphp5.so ${DESTDIR}${PREFIX}/lib/
.endif