From 7036688ce1cf6f49a74cdc42729e69639d1f88b4 Mon Sep 17 00:00:00 2001 From: sborrill Date: Fri, 13 Mar 2009 10:57:20 +0000 Subject: The php_pdo* packages have not kept step with PHP changes. The PDO components are now built into PHP rather than maintained separately in PECL. The old PECL versions are unmaintained and haven't been altered for 3 years. This is confusing as the package versions report themselves to be 5.2.9.1.0.2, etc. but they are in fact based on the 5.1.x code-base. Therefore, we need to switch to building the PDO modules like any other PHP module. A side-effect of this is that the PECL version number will get stripped off the end meaning that the new version numbers are just 5.2.9 instead of 5.2.9.1.0.2 (for example). Unfortunately, 5.2.9 is considered to be older than 5.2.9.1.0.2 meaning that it will appear as though a downgrade has taken place. Therefore, while we are still using PHP 5.2.9, add .99 on the end (i.e. 5.2.9.99) so that the package appears newer. When PHP 5.2.10 is released this can be removed (the module.mk file explicitly cgecks for 5.2.9 before adding the .99 suffix so that it will not alter 5.2.10 if the hack is forgotten. However, for the record, when 5.2.10 is released, php-pdo/module.mk can be removed along with the references to it in each php-pdo*/Makefile --- databases/php-pdo/Makefile | 24 +++++++++++++----------- databases/php-pdo/buildlink3.mk | 4 ++-- databases/php-pdo/distinfo | 6 ------ databases/php-pdo/module.mk | 31 +++++-------------------------- databases/php-pdo/patches/patch-aa | 27 --------------------------- 5 files changed, 20 insertions(+), 72 deletions(-) delete mode 100644 databases/php-pdo/distinfo delete mode 100644 databases/php-pdo/patches/patch-aa (limited to 'databases/php-pdo') diff --git a/databases/php-pdo/Makefile b/databases/php-pdo/Makefile index 35b4a96f56a..fccf88285b6 100644 --- a/databases/php-pdo/Makefile +++ b/databases/php-pdo/Makefile @@ -1,28 +1,30 @@ -# $NetBSD: Makefile,v 1.7 2008/06/12 02:14:19 joerg Exp $ +# $NetBSD: Makefile,v 1.8 2009/03/13 10:57:20 sborrill Exp $ -PDO_DRIVER= # empty -PDO_VERSION= 1.0.2 +MODNAME= pdo +CATEGORIES+= databases +COMMENT= PHP extension for PHP Data Objects (base) PHP_VERSIONS_ACCEPTED= 5 PKG_DESTDIR_SUPPORT= user-destdir +USE_PHP_EXT_PATCHES= yes -.include "../../databases/php-pdo/module.mk" +.include "../../mk/bsd.prefs.mk" -COMMENT= PHP extension for PHP Data Objects (base) +.include "../../lang/php/ext.mk" +# Remove the following line when PHP >= 5.2.10 is released +.include "../../databases/php-pdo/module.mk" -CONFIGURE_ARGS+= --with-${PKGMODNAME} +CONFIGURE_ARGS+= --with-${MODNAME} -PLIST_SRC+= ${.CURDIR}/../../databases/php-pdo/PLIST.pdo +INSTALLATION_DIRS+= include/php/ext/pdo PDO_INCLUDES= php_pdo_driver.h php_pdo.h - -INSTALLATION_DIRS+= include/php/ext/pdo +PLIST_SRC+= ${.CURDIR}/../../databases/php-pdo/PLIST.pdo post-install: .for inc in ${PDO_INCLUDES} ${INSTALL_DATA} ${WRKSRC}/${inc} ${DESTDIR}${PREFIX}/include/php/ext/pdo/${inc} .endfor - -.include "../../lang/php/ext.mk" + .include "../../mk/bsd.pkg.mk" diff --git a/databases/php-pdo/buildlink3.mk b/databases/php-pdo/buildlink3.mk index a9e7ecb4ece..8d48da56f1f 100644 --- a/databases/php-pdo/buildlink3.mk +++ b/databases/php-pdo/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.9 2009/03/05 20:58:37 joerg Exp $ +# $NetBSD: buildlink3.mk,v 1.10 2009/03/13 10:57:20 sborrill Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ PHP_PDO_BUILDLINK3_MK:= ${PHP_PDO_BUILDLINK3_MK}+ @@ -13,7 +13,7 @@ BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}php-pdo .if !empty(PHP_PDO_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.php-pdo+= ${PHP_PKG_PREFIX}-pdo-5.* -BUILDLINK_ABI_DEPENDS.php-pdo?= ${PHP_PKG_PREFIX}-pdo>=5.1.1.1.0.2nb1 +BUILDLINK_ABI_DEPENDS.php-pdo?= ${PHP_PKG_PREFIX}-pdo>=5.2.9 BUILDLINK_PKGSRCDIR.php-pdo?= ../../databases/php-pdo BUILDLINK_INCDIRS.php-pdo?= include/php/ext/pdo .endif # PHP_PDO_BUILDLINK3_MK diff --git a/databases/php-pdo/distinfo b/databases/php-pdo/distinfo deleted file mode 100644 index a396b41b798..00000000000 --- a/databases/php-pdo/distinfo +++ /dev/null @@ -1,6 +0,0 @@ -$NetBSD: distinfo,v 1.3 2007/09/04 23:21:27 jdolecek Exp $ - -SHA1 (php-PDO/PDO-1.0.2.tgz) = 0cab1adfde9214f6cb9edff022c51709ddbce3ba -RMD160 (php-PDO/PDO-1.0.2.tgz) = 08d10eb3aa6622dbe209e64c35951957aade3033 -Size (php-PDO/PDO-1.0.2.tgz) = 49810 bytes -SHA1 (patch-aa) = 49cdde51d81b5a7938ff36eabc3b663ea5858689 diff --git a/databases/php-pdo/module.mk b/databases/php-pdo/module.mk index aec56a6e844..e2d663d3278 100644 --- a/databases/php-pdo/module.mk +++ b/databases/php-pdo/module.mk @@ -1,28 +1,7 @@ -# $NetBSD: module.mk,v 1.7 2006/06/02 18:27:55 joerg Exp $ +# $NetBSD: module.mk,v 1.8 2009/03/13 10:57:20 sborrill Exp $ -# Items common for all PDO drivers - -.if !empty(PDO_DRIVER) -_PDO_SEP= _ -.else -_PDO_SEP= # empty +# This file is now only needed to patch up PKGNAME until PHP 5.2.10 or later is +# released. +.if "${PHP_BASE_VERS}" == "5.2.9" +PKGNAME= ${PHP_PKG_PREFIX}-${MODNAME}-${PHP_BASE_VERS}.99 .endif - -PDO_DRIVER_TR= ${ECHO} ${PDO_DRIVER:Q} | ${TR} a-z A-Z -MODNAME= PDO${_PDO_SEP}${PDO_DRIVER_TR:sh} -PKGMODNAME= pdo${_PDO_SEP}${PDO_DRIVER} -PECL_VERSION?= ${PDO_VERSION} -PKGNAME= ${PHP_PKG_PREFIX}-${PKGMODNAME}-${PHP_BASE_VERS}.${PECL_VERSION} - -CONFLICTS= php-pdo${_PDO_SEP}${PDO_DRIVER}-[0-9]* - -CATEGORIES+= databases -MAINTAINER= jdolecek@NetBSD.org -COMMENT= PHP PDO extension for ${PDO_COMMENT} databases - -# needed due to (broken?) PDO_* configure checks -CONFIGURE_ENV+= PHP_PDO_SHARED="1" - -PHP_VERSIONS_ACCEPTED= 5 - -.include "../../lang/php/phpversion.mk" diff --git a/databases/php-pdo/patches/patch-aa b/databases/php-pdo/patches/patch-aa deleted file mode 100644 index bd4cd589306..00000000000 --- a/databases/php-pdo/patches/patch-aa +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-aa,v 1.1 2007/09/04 23:21:27 jdolecek Exp $ - ---- config.m4.orig 2006-05-02 04:47:43.000000000 +0200 -+++ config.m4 -@@ -34,22 +34,6 @@ if test "$PHP_PDO" != "no"; then - - PHP_PDO_PEAR_CHECK - -- if test "$ext_shared" = "yes" ; then -- case $host_alias in -- *darwin*) -- if test "$pdo_running_under_pear" = "1"; then -- AC_MSG_ERROR([ --Due to the way that loadable modules work on OSX/Darwin, you need to --compile the PDO package statically into the PHP core. -- --Please follow the instructions at: http://netevil.org/node.php?nid=202 --for more detail on this issue. -- ]) -- fi -- ext_shared=no -- ;; -- esac -- fi - PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared) - ifdef([PHP_ADD_EXTENSION_DEP], - [ -- cgit v1.2.3