aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-06-28 21:57:43 +0800
committermat <mat@FreeBSD.org>2016-06-28 21:57:43 +0800
commit9674e8edf86ef8430734bd19e417e512e8fec1d7 (patch)
tree7e771ff32d7e0f799bdc9bf7b1648b771015847d /Mk
parent8b1eb77500438e8f6b3b9d859110daf42bdb3093 (diff)
downloadfreebsd-ports-graphics-9674e8edf86ef8430734bd19e417e512e8fec1d7.tar.gz
freebsd-ports-graphics-9674e8edf86ef8430734bd19e417e512e8fec1d7.tar.zst
freebsd-ports-graphics-9674e8edf86ef8430734bd19e417e512e8fec1d7.zip
Add support for USE_PHP=ext:build to add a build dependency on the extension.
PR: 210529 Submitted by: mat Exp-run by: antoine Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D6936
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/php.mk14
1 files changed, 7 insertions, 7 deletions
diff --git a/Mk/Uses/php.mk b/Mk/Uses/php.mk
index 81fdfb80beb..d7ff150191e 100644
--- a/Mk/Uses/php.mk
+++ b/Mk/Uses/php.mk
@@ -385,18 +385,18 @@ zip_DEPENDS= archivers/php${PHP_VER}-zip
zlib_DEPENDS= archivers/php${PHP_VER}-zlib
. for extension in ${USE_PHP}
-. if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
-. if ${PHP_EXT_INC:M${extension}} == ""
-. if ${php_ARGS:Mbuild}
-BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS}
+ext= ${extension}
+. if ${_USE_PHP_VER${PHP_VER}:M${ext:S/:build//}} != ""
+. if ${PHP_EXT_INC:M${extension:S/:build//}} == ""
+. if !empty(php_ARGS:Mbuild) || !empty(ext:M*\:build)
+BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension:S/:build//}.so:${${extension:S/:build//}_DEPENDS}
. endif
-RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS}
+RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension:S/:build//}.so:${${extension:S/:build//}_DEPENDS}
. endif
. else
-ext= ${extension}
. if ${ext:tl} != "yes"
check-makevars::
- @${ECHO_CMD} "Unknown extension ${extension} for PHP ${PHP_VER}."
+ @${ECHO_CMD} "Unknown extension ${extension:S/:build//} for PHP ${PHP_VER}."
@${FALSE}
. endif
. endif