summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2011-12-17 13:46:27 +0000
committerobache <obache@pkgsrc.org>2011-12-17 13:46:27 +0000
commitd11faae4717fc7254d9a93990cddae340790ab68 (patch)
tree0201099d58a10a76fa4a723dc2af453a6d168585 /lang
parent46bdb42bd724ba4440254133b62d000c1332875a (diff)
downloadpkgsrc-d11faae4717fc7254d9a93990cddae340790ab68.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}