| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile.php,v 1.4 2020/02/09 22:01:10 rillig Exp $ | | 1 | # $NetBSD: Makefile.php,v 1.5 2020/11/20 15:34:11 otis Exp $ |
2 | # used by lang/php73/Makefile | | 2 | # used by lang/php73/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" |
10 | CONFIGURE_ARGS+= --disable-gcc-global-regs | | 10 | CONFIGURE_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 |
14 | BUILDLINK_DEPMETHOD.pcre2= full | | 14 | BUILDLINK_DEPMETHOD.pcre2= full |
| @@ -44,27 +44,27 @@ CONFIGURE_ARGS+= --disable-opcache | | | @@ -44,27 +44,27 @@ CONFIGURE_ARGS+= --disable-opcache |
44 | CONFIGURE_ARGS+= --disable-pdo | | 44 | CONFIGURE_ARGS+= --disable-pdo |
45 | CONFIGURE_ARGS+= --disable-json | | 45 | CONFIGURE_ARGS+= --disable-json |
46 | | | 46 | |
47 | CONFIGURE_ARGS+= --enable-cgi | | 47 | CONFIGURE_ARGS+= --enable-cgi |
48 | CONFIGURE_ARGS+= --enable-mysqlnd | | 48 | CONFIGURE_ARGS+= --enable-mysqlnd |
49 | CONFIGURE_ARGS+= --enable-xml | | 49 | CONFIGURE_ARGS+= --enable-xml |
50 | CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX} | | 50 | CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX} |
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 | GNU_CONFIGURE_STRICT= no | | 54 | GNU_CONFIGURE_STRICT= no |
55 | | | 55 | |
56 | PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX} | | 56 | PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX} |
57 | PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline argon2 | | 57 | PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline argon2 php-embed |
58 | PKG_SUPPORTED_OPTIONS+= disable-filter-url | | 58 | PKG_SUPPORTED_OPTIONS+= disable-filter-url |
59 | PKG_SUGGESTED_OPTIONS+= inet6 ssl readline | | 59 | PKG_SUGGESTED_OPTIONS+= inet6 ssl readline |
60 | | | 60 | |
61 | .if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD" | | 61 | .if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD" |
62 | PKG_SUPPORTED_OPTIONS+= dtrace | | 62 | PKG_SUPPORTED_OPTIONS+= dtrace |
63 | .endif | | 63 | .endif |
64 | | | 64 | |
65 | .include "../../mk/bsd.options.mk" | | 65 | .include "../../mk/bsd.options.mk" |
66 | | | 66 | |
67 | .if !empty(PKG_OPTIONS:Minet6) | | 67 | .if !empty(PKG_OPTIONS:Minet6) |
68 | CONFIGURE_ARGS+= --enable-ipv6 | | 68 | CONFIGURE_ARGS+= --enable-ipv6 |
69 | .else | | 69 | .else |
70 | CONFIGURE_ARGS+= --disable-ipv6 | | 70 | CONFIGURE_ARGS+= --disable-ipv6 |
| @@ -100,15 +100,29 @@ CONFIGURE_ARGS+= --enable-dtrace | | | @@ -100,15 +100,29 @@ CONFIGURE_ARGS+= --enable-dtrace |
100 | # See https://bugs.php.net/bug.php?id=61268 | | 100 | # See https://bugs.php.net/bug.php?id=61268 |
101 | INSTALL_MAKE_FLAGS+= -r | | 101 | INSTALL_MAKE_FLAGS+= -r |
102 | .endif | | 102 | .endif |
103 | | | 103 | |
104 | .if !empty(PKG_OPTIONS:Margon2) | | 104 | .if !empty(PKG_OPTIONS:Margon2) |
105 | CONFIGURE_ARGS+= --with-password-argon2=${BUILDLINK_PREFIX.argon2} | | 105 | CONFIGURE_ARGS+= --with-password-argon2=${BUILDLINK_PREFIX.argon2} |
106 | .include "../../security/argon2/buildlink3.mk" | | 106 | .include "../../security/argon2/buildlink3.mk" |
107 | .endif | | 107 | .endif |
108 | | | 108 | |
109 | .if !empty(PKG_OPTIONS:Mdisable-filter-url) | | 109 | .if !empty(PKG_OPTIONS:Mdisable-filter-url) |
110 | CFLAGS+= -DDISABLE_FILTER_URL | | 110 | CFLAGS+= -DDISABLE_FILTER_URL |
111 | .endif | | 111 | .endif |
112 | | | 112 | |
| | | 113 | PLIST_VARS+= embed |
| | | 114 | |
| | | 115 | .if !empty(PKG_OPTIONS:Mphp-embed) |
| | | 116 | CONFIGURE_ARGS+= --enable-embed |
| | | 117 | INSTALLATION_DIRS+= include/php/sapi/embed |
| | | 118 | PLIST.embed= yes |
| | | 119 | |
| | | 120 | .PHONY: post-install-embed |
| | | 121 | post-install: post-install-embed |
| | | 122 | post-install-embed: |
| | | 123 | ${INSTALL_DATA} ${WRKSRC}/sapi/embed/php_embed.h ${DESTDIR}${PREFIX}/include/php/sapi/embed/ |
| | | 124 | ${INSTALL_LIB} ${WRKSRC}/libs/libphp7.so ${DESTDIR}${PREFIX}/lib/ |
| | | 125 | .endif |
| | | 126 | |
113 | DL_AUTO_VARS= yes | | 127 | DL_AUTO_VARS= yes |
114 | .include "../../mk/dlopen.buildlink3.mk" | | 128 | .include "../../mk/dlopen.buildlink3.mk" |