| @@ -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" |
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 |
| @@ -43,27 +43,27 @@ CONFIGURE_ARGS+= --disable-json | | | @@ -43,27 +43,27 @@ CONFIGURE_ARGS+= --disable-json |
43 | | | 43 | |
44 | CONFIGURE_ARGS+= --enable-cgi | | 44 | CONFIGURE_ARGS+= --enable-cgi |
45 | CONFIGURE_ARGS+= --enable-mysqlnd | | 45 | CONFIGURE_ARGS+= --enable-mysqlnd |
46 | CONFIGURE_ARGS+= --enable-xml | | 46 | CONFIGURE_ARGS+= --enable-xml |
47 | #CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX} | | 47 | #CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX} |
48 | | | 48 | |
49 | CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}" | | 49 | CONFIGURE_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 | |
55 | PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX} | | 55 | PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX} |
56 | PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline argon2 | | 56 | PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline argon2 php-embed |
57 | PKG_SUPPORTED_OPTIONS+= disable-filter-url | | 57 | PKG_SUPPORTED_OPTIONS+= disable-filter-url |
58 | PKG_SUGGESTED_OPTIONS+= inet6 ssl readline | | 58 | PKG_SUGGESTED_OPTIONS+= inet6 ssl readline |
59 | | | 59 | |
60 | .if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD" | | 60 | .if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD" |
61 | PKG_SUPPORTED_OPTIONS+= dtrace | | 61 | PKG_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) |
67 | CONFIGURE_ARGS+= --enable-ipv6 | | 67 | CONFIGURE_ARGS+= --enable-ipv6 |
68 | .else | | 68 | .else |
69 | CONFIGURE_ARGS+= --disable-ipv6 | | 69 | CONFIGURE_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 |
100 | INSTALL_MAKE_FLAGS+= -r | | 100 | INSTALL_MAKE_FLAGS+= -r |
101 | .endif | | 101 | .endif |
102 | | | 102 | |
103 | .if !empty(PKG_OPTIONS:Margon2) | | 103 | .if !empty(PKG_OPTIONS:Margon2) |
104 | CONFIGURE_ARGS+= --with-password-argon2=${BUILDLINK_PREFIX.argon2} | | 104 | CONFIGURE_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) |
109 | CFLAGS+= -DDISABLE_FILTER_URL | | 109 | CFLAGS+= -DDISABLE_FILTER_URL |
110 | .endif | | 110 | .endif |
111 | | | 111 | |
| | | 112 | PLIST_VARS+= embed |
| | | 113 | |
| | | 114 | .if !empty(PKG_OPTIONS:Mphp-embed) |
| | | 115 | CONFIGURE_ARGS+= --enable-embed |
| | | 116 | INSTALLATION_DIRS+= include/php/sapi/embed |
| | | 117 | PLIST.embed= yes |
| | | 118 | |
| | | 119 | .PHONY: post-install-embed |
| | | 120 | post-install: post-install-embed |
| | | 121 | post-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 | |
112 | DL_AUTO_VARS= yes | | 126 | DL_AUTO_VARS= yes |
113 | .include "../../mk/dlopen.buildlink3.mk" | | 127 | .include "../../mk/dlopen.buildlink3.mk" |