summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorobache <obache>2011-12-17 13:46:27 +0000
committerobache <obache>2011-12-17 13:46:27 +0000
commit13fb24bcd7fef21ea3288a07e5388711eba31bf0 (patch)
tree0201099d58a10a76fa4a723dc2af453a6d168585 /lang
parente1fb05616cb7fbe9feddf096628c6dabafed7945 (diff)
downloadpkgsrc-13fb24bcd7fef21ea3288a07e5388711eba31bf0.tar.gz
Change default PKGNAME scheme for PECL packages.
Drop ${PHP_BASE_VARS} from PKGVERSION by default. It used to be required to support multiple php version. But after PHP version based ${PHP_PKG_PREFIX} was introduced, such trick is not required anymore. In addition to this, such version name schme invokes unwanted version bump when base php version is bumped, plus, such version scheme is hard to use for DEPENDS pattern. To avoid downgrading of package using such legacy version scheme, PECL_LEGACY_VERSION_SCHEME is introduced. If it is defined, current version scheme is still used for currently supported PHP version (5 and 53), but instead of ${PHP_BASE_VARS}, current fixed PHP base version in pkgsrc is used to avoid unwanted version bump from update of PHP base package. With newer PHP (54, or so on), new version scheme will be used if it is defined. This trick will not be required and should be removed after php5 and php53 will be gone away from pkgsrc.
Diffstat (limited to 'lang')
-rw-r--r--lang/php/ext.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/lang/php/ext.mk b/lang/php/ext.mk
index 9495ff949c6..b5b61aa3ca3 100644
--- a/lang/php/ext.mk
+++ b/lang/php/ext.mk
@@ -1,4 +1,4 @@
-# $NetBSD: ext.mk,v 1.22 2011/04/13 13:23:39 adam Exp $
+# $NetBSD: ext.mk,v 1.23 2011/12/17 13:46:27 obache Exp $
#
# PHP extension package framework, for both PECL and bundled PHP extensions.
#
@@ -35,7 +35,16 @@ WRKSRC?= ${WRKDIR}/${EXTRACT_ELEMENTS}
DISTINFO_FILE= ${.CURDIR}/${PHPPKGSRCDIR}/distinfo
.else
# PECL extension
-PKGNAME?= ${PHP_PKG_PREFIX}-${MODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
+.if defined(PECL_LEGACY_VERSION_SCHEME) && \
+ (${PKG_PHP_VERSION} == "5" || ${PKG_PHP_VERSION} == "53")
+. if ${PKG_PHP_VERSION} == "5"
+PKGNAME?= ${PHP_PKG_PREFIX}-${MODNAME}-5.2.17.${PECL_VERSION}
+. elif ${PKG_PHP_VERSION} == "53"
+PKGNAME?= ${PHP_PKG_PREFIX}-${MODNAME}-5.3.8.${PECL_VERSION}
+. endif
+.else
+PKGNAME?= ${PHP_PKG_PREFIX}-${MODNAME}-${PECL_VERSION}
+.endif
MASTER_SITES?= http://pecl.php.net/get/
PECL_DISTNAME?= ${MODNAME}-${PECL_VERSION}
DISTNAME= ${PECL_DISTNAME}