tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Change version scheme for PECL packages



Hi,

Currently, for PHP PECL package, PKGNAME is defined as following in 
lang/php/ext.mk:

PKGNAME?=              
${PHP_PKG_PREFIX}-${MODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}

I asked some time ago why ${PHP_BASE_VERS} is required in PKGNAME, but got no 
response.

I dug history of it, and I suspect that it was introduced after importing php5,
but php module package prefix was fixed as `php-'.
Then PKG_BASE_VERS should be dropped from PKGVERSION.

So, I would like to commit following changes before pkgsrc-2011Q4.
It include tricks to avoid downgrade PKGVERSION of currently using legacy 
PKGVERSION scheme
by define PECL_LEGACY_VERSION_SCHEME in its Makefile.
php-5.2 is already EOL and php-5.4 is RC3, so after php5 and php53 packages 
will be removed,
this trick will not be required anymore.
(If downgrade of version is allowed, I would like to change without the trick 
soon,
 because current PKGVERSION scheme is hard to use in DEPENDS and 
pkg-vulnerability patterns)

Index: ext.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/php/ext.mk,v
retrieving revision 1.22
diff -u -r1.22 ext.mk
--- ext.mk      13 Apr 2011 13:23:39 -0000      1.22
+++ ext.mk      16 Dec 2011 12:54:24 -0000
@@ -35,7 +35,16 @@
 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}

--
OBATA Akio / obache%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index