summaryrefslogtreecommitdiff
path: root/lang/php/phpversion.mk
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2013-08-25 16:56:44 +0000
committertron <tron@pkgsrc.org>2013-08-25 16:56:44 +0000
commitce1e18f874ef38dfbb50ec37321df1c6d57f33e0 (patch)
tree34c17b8ae0b39a9abe77077ddc7914cfcdcde90a /lang/php/phpversion.mk
parent4650810bcdf321c464c53eb10598ec679f9aeb86 (diff)
downloadpkgsrc-ce1e18f874ef38dfbb50ec37321df1c6d57f33e0.tar.gz
Pullup ticket #4221 - requested by taca
lang/php*: apply framework changes to make pullup requests possible Revisions pulled up: - lang/php/common.mk 1.1 - lang/php/ext.mk 1.30 - lang/php/phpversion.mk 1.37-1.39 - lang/php53/DESCR 1.2 - lang/php53/Makefile 1.40-1.42 - lang/php53/Makefile.common 1.28-1.29 - lang/php53/Makefile.php 1.37 - lang/php54/DESCR 1.2 - lang/php54/MESSAGE.suhosin deleted - lang/php54/Makefile 1.9-1.10,1.12 - lang/php54/Makefile.common 1.15-1.16 - lang/php54/Makefile.php 1.6 - lang/php54/PLIST 1.4 --- Module Name: pkgsrc Committed By: taca Date: Sun Jul 21 17:29:47 UTC 2013 Modified Files: pkgsrc/lang/php: ext.mk phpversion.mk pkgsrc/lang/php53: Makefile.common Makefile.php pkgsrc/lang/php54: Makefile.common Makefile.php PLIST Added Files: pkgsrc/lang/php: common.mk Removed Files: pkgsrc/lang/php54: MESSAGE.suhosin Log Message: Clean up php's framework. * Define PHP's version at one place. * Remove obsolete description in comments. * Add "used by www/php-fpm/Makefile" in php5[34]/Makefile.php. * Remove commented out support for suhosin extension from php54. * Add PHP_CHECK_INSTALLED and PHP_EXTENSION_DIR to php/phpversion.mk. No functional should be made. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 03:59:44 UTC 2013 Modified Files: pkgsrc/lang/php53: Makefile Makefile.common Log Message: Move PHP_CHECK_INSTALLED to before including Makefile.php since it should be defined before including lang/php/phpversion.mk. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 04:20:55 UTC 2013 Modified Files: pkgsrc/lang/php54: Makefile Makefile.common Log Message: Move PHP_CHECK_INSTALLED to before including Makefile.php since it should be defined before including lang/php/phpversion.mk. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 16:19:24 UTC 2013 Modified Files: pkgsrc/lang/php53: DESCR Makefile Log Message: Explicitly note it is PHP 5.3.x pacakge in COMMENT of Makefile and DESCR file. Bump PKGREVISION. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 16:21:07 UTC 2013 Modified Files: pkgsrc/lang/php54: DESCR Makefile Log Message: Explicitly note it is PHP 5.4.x pacakge in COMMENT of Makefile and DESCR file. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 16:38:12 UTC 2013 Modified Files: pkgsrc/lang/php: phpversion.mk Log Message: * Add php55 support. * Make PKG_PHP's value as description in comment. --- Module Name: pkgsrc Committed By: joerg Date: Tue Aug 13 10:22:26 UTC 2013 Modified Files: pkgsrc/lang/php53: Makefile pkgsrc/lang/php54: Makefile pkgsrc/lang/php55: Makefile Log Message: Allow only the PHP version itself, otherwise the multi-version logic will trigger with failing distinfo entries. --- Module Name: pkgsrc Committed By: taca Date: Wed Aug 14 14:53:03 UTC 2013 Modified Files: pkgsrc/lang/php: phpversion.mk Log Message: Correct checking condition of PHP_CHECK_INSTALLED.
Diffstat (limited to 'lang/php/phpversion.mk')
-rw-r--r--lang/php/phpversion.mk38
1 files changed, 31 insertions, 7 deletions
diff --git a/lang/php/phpversion.mk b/lang/php/phpversion.mk
index 9a47f292275..580c0acb490 100644
--- a/lang/php/phpversion.mk
+++ b/lang/php/phpversion.mk
@@ -1,4 +1,4 @@
-# $NetBSD: phpversion.mk,v 1.34.2.1 2013/07/15 22:32:24 tron Exp $
+# $NetBSD: phpversion.mk,v 1.34.2.2 2013/08/25 16:56:44 tron Exp $
#
# This file selects a PHP version, based on the user's preferences and
# the installed packages. It does not add a dependency on the PHP
@@ -30,6 +30,13 @@
# Possible: 53 54
# Default: 54 53
#
+# PHP_CHECK_INSTALLED
+# Check installed version of PHP. Should be used lang/php53,
+# and lang/php54 only.
+#
+# Possible: Yes No
+# Default: Yes
+#
# === Variables defined by this file ===
#
# PKG_PHP_VERSION
@@ -61,12 +68,26 @@
#
# Example: php53, php54
#
+# PHP_EXTENSION_DIR
+# Relative path to ${PREFIX} for PHP's extensions. It is derived from
+# initial release of major version.
+#
+# Example: lib/php/20090630
+#
# Keywords: php
#
.if !defined(PHPVERSION_MK)
PHPVERSION_MK= defined
+# Define each PHP's version.
+PHP53_VERSION= 5.3.27
+PHP54_VERSION= 5.4.17
+
+# Define initial release of major version.
+PHP53_RELDATE= 20090630
+PHP54_RELDATE= 20120301
+
_VARGROUPS+= php
_USER_VARS.php= PHP_VERSION_DEFAULT
_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD
@@ -75,9 +96,6 @@ _SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \
.include "../../mk/bsd.prefs.mk"
-PHP53_VERSION= 5.3.27
-PHP54_VERSION= 5.4.16
-
PHP_VERSION_DEFAULT?= 54
PHP_VERSIONS_ACCEPTED?= 54 53
@@ -135,15 +153,19 @@ MULTI+= PHP_VERSION_REQD=${_PHP_VERSION}
# export some of internal variables
PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//}
-PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/}
+PKG_PHP:= php-${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/}
# currently we have only PHP 5.x packages.
PKG_PHP_MAJOR_VERS:= 5
+PHP_CHECK_INSTALLED?= Yes
+
# if installed PHP isn't compatible with required PHP, bail out
+.if !empty(PHP_CHECK_INSTALLED:M[nN][oO])
.if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED)
PKG_SKIP_REASON+= "Package accepts ${PKG_PHP}, but different version is installed"
.endif
+.endif
MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
PKG_PHP=${PKG_PHP}
@@ -161,10 +183,12 @@ PHP_VERSION_REQD:= ${PKG_PHP_VERSION}
PHPPKGSRCDIR= ../../lang/php53
PHP_BASE_VERS= ${PHP53_VERSION}
PHP_PKG_PREFIX= php53
+PHP_EXTENSION_DIR= lib/php/${PHP53_RELDATE}
.elif ${_PHP_VERSION} == "54"
PHPPKGSRCDIR= ../../lang/php54
PHP_BASE_VERS= ${PHP54_VERSION}
PHP_PKG_PREFIX= php54
+PHP_EXTENSION_DIR= lib/php/${PHP54_RELDATE}
.else
# force an error
PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package"
@@ -173,8 +197,8 @@ PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package"
#
# check installed version aginst required:
#
-.if defined(_PHP_VERSION_INSTALLED)
-.if ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED}
+.if !empty(PHP_CHECK_INSTALLED:M[nN][oO])
+.if defined(_PHP_VERSION_INSTALLED) && ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED}
PKG_SKIP_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed."
.endif
.endif