| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: ext.mk,v 1.34 2015/02/02 12:26:21 obache Exp $ | | 1 | # $NetBSD: ext.mk,v 1.35 2015/02/15 09:00:33 taca Exp $ |
2 | # | | 2 | # |
3 | # PHP extension package framework, for both PECL and bundled PHP extensions. | | 3 | # PHP extension package framework, for both PECL and bundled PHP extensions. |
4 | # | | 4 | # |
5 | # Just include this file, define MODNAME, define PKGREVISION if necessary, | | 5 | # Just include this file, define MODNAME, define PKGREVISION if necessary, |
6 | # add dependencies, and add the appropriate --with-configure-arg, then include | | 6 | # add dependencies, and add the appropriate --with-configure-arg, then include |
7 | # bsd.pkg.mk. | | 7 | # bsd.pkg.mk. |
8 | | | 8 | |
9 | .if !defined(PHPEXT_MK) | | 9 | .if !defined(PHPEXT_MK) |
10 | PHPEXT_MK= defined | | 10 | PHPEXT_MK= defined |
11 | | | 11 | |
12 | _VARGROUPS+= phpext | | 12 | _VARGROUPS+= phpext |
13 | _USER_VARS.phpext= # none | | 13 | _USER_VARS.phpext= # none |
14 | _PKG_VARS.phpext= MODNAME PECL_VERSION PKGMODNAME MODULESDIR \ | | 14 | _PKG_VARS.phpext= MODNAME PECL_VERSION PKGMODNAME MODULESDIR \ |
| @@ -60,26 +60,31 @@ CONFIGURE_ARGS+= --with-php-config=${PHP | | | @@ -60,26 +60,31 @@ CONFIGURE_ARGS+= --with-php-config=${PHP |
60 | USE_CONFIG_WRAPPER= YES | | 60 | USE_CONFIG_WRAPPER= YES |
61 | USE_LIBTOOL= YES | | 61 | USE_LIBTOOL= YES |
62 | LIBTOOL_OVERRIDE= YES | | 62 | LIBTOOL_OVERRIDE= YES |
63 | USE_TOOLS+= automake | | 63 | USE_TOOLS+= automake |
64 | | | 64 | |
65 | # Ensure we export symbols in the linked shared object. | | 65 | # Ensure we export symbols in the linked shared object. |
66 | LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} | | 66 | LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} |
67 | MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS="${EXPORT_SYMBOLS_LDFLAGS}" | | 67 | MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS="${EXPORT_SYMBOLS_LDFLAGS}" |
68 | | | 68 | |
69 | PLIST_SRC+= ${.CURDIR}/../../lang/php/PLIST.module | | 69 | PLIST_SRC+= ${.CURDIR}/../../lang/php/PLIST.module |
70 | MESSAGE_SRC= ${.CURDIR}/../../lang/php/MESSAGE.module | | 70 | MESSAGE_SRC= ${.CURDIR}/../../lang/php/MESSAGE.module |
71 | MESSAGE_SUBST+= MODNAME=${PKGMODNAME} | | 71 | MESSAGE_SUBST+= MODNAME=${PKGMODNAME} |
72 | MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} | | 72 | MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} |
| | | 73 | .if !empty(PHP_ZEND_EXTENSION:U:M[Yy][Ye][Ss]) |
| | | 74 | MESSAGE_SUBST+= EXTENSION_DIRECTIVE=zend_extension |
| | | 75 | .else |
| | | 76 | MESSAGE_SUBST+= EXTENSION_DIRECTIVE=extension |
| | | 77 | .endif |
73 | | | 78 | |
74 | # Also include extension-specific message | | 79 | # Also include extension-specific message |
75 | .if exists(${.CURDIR}/MESSAGE) | | 80 | .if exists(${.CURDIR}/MESSAGE) |
76 | MESSAGE_SRC+= ${.CURDIR}/MESSAGE | | 81 | MESSAGE_SRC+= ${.CURDIR}/MESSAGE |
77 | .endif | | 82 | .endif |
78 | | | 83 | |
79 | .if ${OBJECT_FMT} == "SOM" | | 84 | .if ${OBJECT_FMT} == "SOM" |
80 | SHLIB_SUFFIX= sl | | 85 | SHLIB_SUFFIX= sl |
81 | .else | | 86 | .else |
82 | SHLIB_SUFFIX= so | | 87 | SHLIB_SUFFIX= so |
83 | .endif | | 88 | .endif |
84 | | | 89 | |
85 | pre-configure: phpize-module | | 90 | pre-configure: phpize-module |