diff options
author | obache <obache@pkgsrc.org> | 2011-12-17 13:46:27 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-12-17 13:46:27 +0000 |
commit | 9ce09e1be1edcebbde3094976733ba75ad25424b (patch) | |
tree | 0201099d58a10a76fa4a723dc2af453a6d168585 /lang/php | |
parent | 27c643b7045792492113ae29806e36ac723f5995 (diff) | |
download | pkgsrc-9ce09e1be1edcebbde3094976733ba75ad25424b.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/php')
-rw-r--r-- | lang/php/ext.mk | 13 |
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} |