aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2013-12-30 17:12:33 +0800
committersunpoet <sunpoet@FreeBSD.org>2013-12-30 17:12:33 +0800
commitccc4da505c359d1f6c0bfa4b9d627a2695804c27 (patch)
tree10b02f1cfeb1fc524fecc81ee74ce4b7298439f6
parent6470b059f75ac0993ab16329166396dec44b91aa (diff)
downloadfreebsd-ports-gnome-ccc4da505c359d1f6c0bfa4b9d627a2695804c27.tar.gz
freebsd-ports-gnome-ccc4da505c359d1f6c0bfa4b9d627a2695804c27.tar.zst
freebsd-ports-gnome-ccc4da505c359d1f6c0bfa4b9d627a2695804c27.zip
- Fix PHP Thread-Safe problem
- While I'm here: - Remove leading indefinite article from COMMENT - Avoid INDEX breakage: - Check existence of ${LOCALBASE}/bin/php - PHP_ZTS defaults to disabled - Support STAGEDIR PR: ports/179565 Submitted by: John Chen <johnpupu@gmail.com> (maintainer)
-rw-r--r--devel/pecl-pthreads/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/devel/pecl-pthreads/Makefile b/devel/pecl-pthreads/Makefile
index 70b3466f5930..198a73fef1f2 100644
--- a/devel/pecl-pthreads/Makefile
+++ b/devel/pecl-pthreads/Makefile
@@ -10,7 +10,7 @@ EXTRACT_SUFX= .tgz
DIST_SUBDIR= PECL
MAINTAINER= johnpupu@gmail.com
-COMMENT= A compatible Threading API for PHP5.3+
+COMMENT= Compatible Threading API for PHP5.3+
LICENSE= PHP301
@@ -21,5 +21,16 @@ USE_PHPEXT= yes
PHP_MODNAME= pthreads
IGNORE_WITH_PHP= 52
-NO_STAGE= yes
+.include <bsd.port.options.mk>
+
+.if !defined(PHP_ZTS) && exists(${LOCALBASE}/bin/php)
+PHP_ZTS!= ${LOCALBASE}/bin/php -r 'phpinfo();' | ${GREP} 'Thread Safety' | ${AWK} -F '=> ' '{print $$2}'
+.else
+PHP_ZTS= disabled
+.endif
+
+.if ${PHP_ZTS} == "disabled"
+IGNORE= pthreads requires ZTS, please re-compile PHP with ZTS enabled
+.endif
+
.include <bsd.port.mk>