Subject: Apache/PHP/Pear package naming
To: None <tech-pkg@netbsd.org>
From: None <joerg@britannica.bec.de>
List: tech-pkg
Date: 05/29/2006 23:54:48
--M9NhX3UHpAaciwkO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi all,
as follow-up to the Apache naming, here a full patch to deal with all
Apache, PHP and PEAR packages. They get consistent prefix (ap{13,2},
php{4,5}, php{4,5}-pear) and the dependencies are fixed. I've also
changed the use of PHP_VERSION_REQD to PHP_VERSIONS_ACCEPTED, since I
want to kill the use of the former in packages to simplify specifying
which version is wanted.

The patch is still missing CONFLICT entries for the old names and
removal of PKGREVISIONs and revisions bumps, but I prefer to have a
consensus first before doing that work.

One important change should be noted: the ap-php dependency is now
explicit for both the PHP version and the Apache version. I think that
is semntically more correct and shouldn't alter behaviour for normal
bulk builds. Many of those dependencies should be reviewed though, since
some of them are definitely bogus (e.g. PHP with fastcgi would work as
well).

Joerg

--M9NhX3UHpAaciwkO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="apache_php_pear.diff"

? pkgchk.conf
? pkgchk_update-britannica.bec.de.conf
Index: databases/php-pdo/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/php-pdo/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- databases/php-pdo/Makefile	3 May 2006 06:37:36 -0000	1.5
+++ databases/php-pdo/Makefile	29 May 2006 21:36:23 -0000
@@ -3,6 +3,8 @@
 PDO_DRIVER=		# empty
 PDO_VERSION=		1.0.2
 
+PHP_VERSIONS_ACCEPTED=	5
+
 .include "../../databases/php-pdo/module.mk"
 
 COMMENT=		PHP extension for PHP Data Objects (base)
@@ -10,8 +12,6 @@
 
 CONFIGURE_ARGS+=	--with-${PKGMODNAME}
 
-PHP_VERSION_REQD=	5
-
 PLIST_SRC+=		${.CURDIR}/../../databases/php-pdo/PLIST.pdo
 
 PDO_INCLUDES=		php_pdo_driver.h php_pdo.h
Index: databases/php-pdo/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/databases/php-pdo/buildlink3.mk,v
retrieving revision 1.5
diff -u -r1.5 buildlink3.mk
--- databases/php-pdo/buildlink3.mk	1 May 2006 13:52:55 -0000	1.5
+++ databases/php-pdo/buildlink3.mk	29 May 2006 21:36:23 -0000
@@ -11,8 +11,8 @@
 BUILDLINK_PACKAGES+=		php-pdo
 
 .if !empty(PHP_PDO_BUILDLINK3_MK:M+)
-BUILDLINK_API_DEPENDS.php-pdo+=	php-pdo-5.*
-BUILDLINK_ABI_DEPENDS.php-pdo?=	php-pdo>=5.1.1.1.0.2nb1
+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_PKGSRCDIR.php-pdo?=	../../databases/php-pdo
 BUILDLINK_INCDIRS.php-pdo?=	include/php/ext/pdo
 .endif  # PHP_PDO_BUILDLINK3_MK
Index: databases/php-pdo/module.mk
===================================================================
RCS file: /cvsroot/pkgsrc/databases/php-pdo/module.mk,v
retrieving revision 1.6
diff -u -r1.6 module.mk
--- databases/php-pdo/module.mk	7 Feb 2006 17:59:56 -0000	1.6
+++ databases/php-pdo/module.mk	29 May 2006 21:36:23 -0000
@@ -12,7 +12,7 @@
 MODNAME=		PDO${_PDO_SEP}${PDO_DRIVER_TR:sh}
 PKGMODNAME=		pdo${_PDO_SEP}${PDO_DRIVER}
 PECL_VERSION?=		${PDO_VERSION}
-PKGNAME=		php-${PKGMODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
+PKGNAME=		${PHP_PKG_PREFIX}-${PKGMODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
 
 CATEGORIES+=		databases
 MAINTAINER=		jdolecek@NetBSD.org
@@ -20,3 +20,7 @@
 
 # needed due to (broken?) PDO_* configure checks
 CONFIGURE_ENV+=		PHP_PDO_SHARED="1"
+
+PHP_VERSIONS_ACCEPTED=	5
+
+.include "../../lang/php/phpversion.mk"
Index: databases/php-sqlite/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/php-sqlite/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- databases/php-sqlite/Makefile	4 Mar 2006 21:29:10 -0000	1.6
+++ databases/php-sqlite/Makefile	29 May 2006 21:36:23 -0000
@@ -2,7 +2,7 @@
 
 MODNAME=		SQLite
 PKGMODNAME=		sqlite
-PKGNAME=		php-${PKGMODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
+PKGNAME=		${PHP_PKG_PREFIX}-${PKGMODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
 PKGREVISION=		4
 PECL_VERSION=		1.0.3
 CATEGORIES+=		databases
Index: databases/php5-mysqli/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/php5-mysqli/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- databases/php5-mysqli/Makefile	5 Feb 2006 23:08:34 -0000	1.5
+++ databases/php5-mysqli/Makefile	29 May 2006 21:36:23 -0000
@@ -7,11 +7,11 @@
 
 MAINTAINER=		jdolecek@NetBSD.org
 
+PHP_VERSIONS_ACCEPTED=	5
 
 EVAL_PREFIX+=		MYSQLDIR=mysql-client
 CONFIGURE_ARGS+=	--with-${MODNAME}=${PREFIX}/bin/mysql_config
 
-PHP_VERSION_REQD=	5
 .include "../../lang/php/ext.mk"
 .include "../../mk/mysql.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: databases/phpldapadmin/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/phpldapadmin/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- databases/phpldapadmin/Makefile	28 May 2006 18:18:44 -0000	1.22
+++ databases/phpldapadmin/Makefile	29 May 2006 21:36:23 -0000
@@ -12,12 +12,12 @@
 .include "../../mk/bsd.prefs.mk"
 .include "../../lang/php/phpversion.mk"
 
-DEPENDS+=	php-ldap>=4.1.2:../../databases/php-ldap
-DEPENDS+=	php-gettext>=4.1.2:../../devel/php-gettext
+DEPENDS+=	${PHP_PKG_PREFIX}-ldap>=4.1.2:../../databases/php-ldap
+DEPENDS+=	${PHP_PKG_PREFIX}-gettext>=4.1.2:../../devel/php-gettext
 .if ${PKG_PHP_VERSION} == "4"
-DEPENDS+=	php-domxml>=4.1.2:../../textproc/php4-domxml
+DEPENDS+=	${PHP_PKG_PREFIX}-domxml>=4.1.2:../../textproc/php4-domxml
 .elif ${PKG_PHP_VERSION} == "5"
-DEPENDS+=	php-dom-[0-9]*:../../textproc/php5-dom
+DEPENDS+=	${PHP_PKG_PREFIX}-dom-[0-9]*:../../textproc/php5-dom
 .endif
 
 VERSION=	0.9.8.3
Index: databases/phpmyadmin/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/phpmyadmin/Makefile,v
retrieving revision 1.49
diff -u -r1.49 Makefile
--- databases/phpmyadmin/Makefile	13 May 2006 09:56:36 -0000	1.49
+++ databases/phpmyadmin/Makefile	29 May 2006 21:36:23 -0000
@@ -10,8 +10,8 @@
 HOMEPAGE=	http://www.phpmyadmin.net/
 COMMENT=	Set of PHP-scripts to adminstrate MySQL over the WWW
 
-DEPENDS+=	php-mbstring>=4.3.3:../../misc/php-mbstring
-DEPENDS+=	php-mysql{,i}>=4.3.3:../../databases/php-mysql
+DEPENDS+=	${PHP_PKG_PREFIX}-mbstring>=4.3.3:../../misc/php-mbstring
+DEPENDS+=	${PHP_PKG_PREFIX}-mysql{,i}>=4.3.3:../../databases/php-mysql
 
 PLIST_SUBST+=	CP=${CP:Q} DIST_VERSION=${DIST_VERSION:Q} \
 		PMCONFFILE=${PMCONFFILE:Q} TEST=${TEST:Q}
@@ -83,4 +83,5 @@
 
 	${RM} -f ${PREFIX}/share/phpmyadmin/libraries/footer.inc.php.orig
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: databases/phppgadmin/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/phppgadmin/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- databases/phppgadmin/Makefile	5 Feb 2006 23:08:34 -0000	1.19
+++ databases/phppgadmin/Makefile	29 May 2006 21:36:23 -0000
@@ -11,7 +11,7 @@
 HOMEPAGE=	http://phppgadmin.sourceforge.net/
 COMMENT=	Set of PHP-scripts to administer PostgreSQL over the WWW
 
-DEPENDS+=	php-pgsql>=4.2.0:../../databases/php-pgsql
+DEPENDS+=	${PHP_PKG_PREFIX}-pgsql>=4.2.0:../../databases/php-pgsql
 
 MESSAGE_SUBST+=	EGDIR=${EGDIR}
 
@@ -80,4 +80,5 @@
 		${INSTALL_DATA} ${WRKSRC}/$$f ${DOCDIR}; \
 	done
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: devel/mantis/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/mantis/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- devel/mantis/Makefile	28 May 2006 15:17:47 -0000	1.21
+++ devel/mantis/Makefile	29 May 2006 21:36:42 -0000
@@ -8,8 +8,8 @@
 HOMEPAGE=	http://www.mantisdb.org/
 COMMENT=	PHP/MySQL/web based bugtracking system
 
-DEPENDS+=	ap-php>=4.0.6:../../www/ap-php
-DEPENDS+=	php-mysql>=4.0.6:../../databases/php-mysql
+DEPENDS+=	${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.0.6:../../www/ap-php
+DEPENDS+=	${PHP_PKG_PREFIX}-mysql>=4.0.6:../../databases/php-mysql
 
 NO_BUILD=	YES
 
@@ -21,7 +21,7 @@
 .include "../../mk/bsd.options.mk"
 
 .if !empty(PKG_OPTIONS:Mcharts)
-DEPENDS+=	php-jpgraph-[0-9]*:../../graphics/php-jpgraph
+DEPENDS+=	${PHP_PKG_PREFIX}-jpgraph-[0-9]*:../../graphics/php-jpgraph
 .endif
 
 APACHE_USER?=	www
Index: graphics/pear-Image_Canvas/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/pear-Image_Canvas/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- graphics/pear-Image_Canvas/Makefile	5 Feb 2006 23:09:37 -0000	1.2
+++ graphics/pear-Image_Canvas/Makefile	29 May 2006 21:37:13 -0000
@@ -8,7 +8,7 @@
 HOMEPAGE= 	http://pear.php.net/package/Image_Color/
 COMMENT=	Common interface to image drawing, making image source code
 
-DEPENDS+=	pear-Image_Color>=1.0.0:../../graphics/pear-Image_Color
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Image_Color>=1.0.0:../../graphics/pear-Image_Color
 
 .include "../../lang/php/pear.mk"
 .include "../../mk/bsd.pkg.mk"
Index: graphics/pear-Image_Color/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/pear-Image_Color/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- graphics/pear-Image_Color/Makefile	5 Feb 2006 23:09:37 -0000	1.2
+++ graphics/pear-Image_Color/Makefile	29 May 2006 21:37:13 -0000
@@ -8,7 +8,7 @@
 HOMEPAGE= 	http://pear.php.net/package/Image_Color/
 COMMENT=	Manage and handles color data and conversions
 
-DEPENDS+=	php-gd-[0-9]*:../../graphics/php-gd
+DEPENDS+=	${PHP_PKG_PREFIX}-gd-[0-9]*:../../graphics/php-gd
 
 .include "../../lang/php/pear.mk"
 .include "../../mk/bsd.pkg.mk"
Index: graphics/pear-Image_Graph/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/pear-Image_Graph/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- graphics/pear-Image_Graph/Makefile	5 Feb 2006 23:09:37 -0000	1.2
+++ graphics/pear-Image_Graph/Makefile	29 May 2006 21:37:13 -0000
@@ -8,9 +8,9 @@
 HOMEPAGE= 	http://pear.php.net/package/Image_Graph/
 COMMENT=	Package for displaying (numerical) data as a graph/chart/plot
 
-DEPENDS+=	pear-Image_Canvas>=0.2.1:../../graphics/pear-Image_Canvas
-DEPENDS+=	pear-Numbers_Roman-[0-9]*:../../math/pear-Numbers_Roman
-DEPENDS+=	pear-Numbers_Words-[0-9]*:../../math/pear-Numbers_Words
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Image_Canvas>=0.2.1:../../graphics/pear-Image_Canvas
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Numbers_Roman-[0-9]*:../../math/pear-Numbers_Roman
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Numbers_Words-[0-9]*:../../math/pear-Numbers_Words
 
 .include "../../lang/php/pear.mk"
 .include "../../mk/bsd.pkg.mk"
Index: graphics/php-jpgraph/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/php-jpgraph/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- graphics/php-jpgraph/Makefile	13 Apr 2006 01:30:43 -0000	1.10
+++ graphics/php-jpgraph/Makefile	29 May 2006 21:37:13 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.10 2006/04/13 01:30:43 rillig Exp $
 
 DISTNAME=	jpgraph-1.18
-PKGNAME=	php-${DISTNAME}
+PKGNAME=	${PHP_PKG_PREFIX}-${DISTNAME}
 PKGREVISION=	2
 CATEGORIES=	graphics www
 MASTER_SITES=	http://members.chello.se/jpgraph/jpgdownloads/
@@ -10,7 +10,7 @@
 HOMEPAGE= 	http://www.aditus.nu/jpgraph/index.php
 COMMENT=	Object Oriented class library for PHP
 
-DEPENDS+=	php-gd>=4.3.1:../../graphics/php-gd
+DEPENDS+=	${PHP_PKG_PREFIX}-gd>=4.3.1:../../graphics/php-gd
 
 NO_CONFIGURE=	YES
 NO_BUILD=	YES
@@ -52,4 +52,5 @@
 	${FIND} ${PREFIX}/share/doc/php-jpgraph/html -type d | ${XARGS} \
 		${CHMOD} ${PKGDIRMODE}
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: lang/php/ext.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/php/ext.mk,v
retrieving revision 1.13
diff -u -r1.13 ext.mk
--- lang/php/ext.mk	3 Dec 2005 18:52:54 -0000	1.13
+++ lang/php/ext.mk	29 May 2006 21:37:20 -0000
@@ -23,13 +23,13 @@
 
 .if !defined(PECL_VERSION)
 # bundled extension
-PKGNAME?=		php-${MODNAME}-${PHP_BASE_VERS}
+PKGNAME?=		${PHP_PKG_PREFIX}-${MODNAME}-${PHP_BASE_VERS}
 EXTRACT_ELEMENTS?=	${DISTNAME}/ext/${PKGMODNAME}
 WRKSRC?=		${WRKDIR}/${EXTRACT_ELEMENTS}
 DISTINFO_FILE=		${.CURDIR}/${PHPPKGSRCDIR}/distinfo
 .else
 # PECL extension
-PKGNAME?=		php-${MODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
+PKGNAME?=		${PHP_PKG_PREFIX}-${MODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
 MASTER_SITES?=		http://pecl.php.net/get/
 DISTNAME=		${MODNAME}-${PECL_VERSION}
 DIST_SUBDIR=		php-${MODNAME}
Index: lang/php/pear.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/php/pear.mk,v
retrieving revision 1.8
diff -u -r1.8 pear.mk
--- lang/php/pear.mk	28 Sep 2005 21:46:24 -0000	1.8
+++ lang/php/pear.mk	29 May 2006 21:37:20 -0000
@@ -18,7 +18,7 @@
 
 EXTRACT_SUFX=	.tgz
 
-PKGNAME=	pear-${DISTNAME}
+PKGNAME=	${PHP_PKG_PREFIX}-pear-${DISTNAME}
 CATEGORIES+=	www
 
 MASTER_SITE_PEAR_PACKAGE+= \
Index: lang/php/phpversion.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/php/phpversion.mk,v
retrieving revision 1.4
diff -u -r1.4 phpversion.mk
--- lang/php/phpversion.mk	9 May 2006 10:06:34 -0000	1.4
+++ lang/php/phpversion.mk	29 May 2006 21:37:20 -0000
@@ -71,9 +71,11 @@
 # set variables for the version we decided to use:
 #
 .if ${_PHP_VERSION} == "4"
-PHPPKGSRCDIR=	../../www/php4
+PHPPKGSRCDIR=		../../www/php4
+PHP_PKG_PREFIX=		php4
 .elif ${_PHP_VERSION} == "5"
-PHPPKGSRCDIR=	../../lang/php5
+PHPPKGSRCDIR=		../../lang/php5
+PHP_PKG_PREFIX=		php5
 .else
 # force an error
 PKG_SKIP_REASON+=	"${PKG_PHP} is not a valid package"
Index: mail/imp/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/imp/Makefile,v
retrieving revision 1.36
diff -u -r1.36 Makefile
--- mail/imp/Makefile	5 Feb 2006 23:09:55 -0000	1.36
+++ mail/imp/Makefile	29 May 2006 21:37:27 -0000
@@ -12,8 +12,8 @@
 CONFLICTS+=	imp-4.*
 
 DEPENDS+=	horde>=2.2.4:../../www/horde
-DEPENDS+=	php-imap>4.0.0:../../mail/php-imap
-DEPENDS+=	pear-Mail-[0-9]*:../../mail/pear-Mail
+DEPENDS+=	${PHP_PKG_PREFIX}-imap>4.0.0:../../mail/php-imap
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Mail-[0-9]*:../../mail/pear-Mail
 
 DOCDIR=		${PREFIX}/share/doc/imp
 EGDIR=		${PREFIX}/share/examples/imp
@@ -71,4 +71,5 @@
 	${FIND} ${IMPDIR} -type d -print | ${XARGS} ${CHMOD} ${PKGDIRMODE}
 	${FIND} ${IMPDIR} -type f -print | ${XARGS} ${CHMOD} ${SHAREMODE}
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: mail/imp4/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/imp4/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- mail/imp4/Makefile	29 Apr 2006 09:23:19 -0000	1.20
+++ mail/imp4/Makefile	29 May 2006 21:37:27 -0000
@@ -13,8 +13,8 @@
 CONFLICTS+=	imp-3.*
 
 DEPENDS+=	horde>=3.0.2:../../www/horde3
-DEPENDS+=	php-imap>4.3.3:../../mail/php-imap
-DEPENDS+=	pear-Mail-[0-9]*:../../mail/pear-Mail
+DEPENDS+=	${PHP_PKG_PREFIX}-imap>4.3.3:../../mail/php-imap
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Mail-[0-9]*:../../mail/pear-Mail
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -97,4 +97,5 @@
 	@${CHOWN} ${APACHE_USER}:${ROOT_GROUP} ${IMPDIR}/config
 	@${CHMOD} 0750 ${IMPDIR}/config
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: mail/ingo/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/ingo/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- mail/ingo/Makefile	12 May 2006 20:52:03 -0000	1.4
+++ mail/ingo/Makefile	29 May 2006 21:37:28 -0000
@@ -81,4 +81,5 @@
 	@${CHOWN} ${APACHE_USER}:${SHAREGRP} ${INGODIR}/config
 	@${CHMOD} 0750 ${INGODIR}/config
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: mail/ingo/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/ingo/options.mk,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 options.mk
--- mail/ingo/options.mk	31 Mar 2006 22:06:34 -0000	1.1.1.1
+++ mail/ingo/options.mk	29 May 2006 21:37:28 -0000
@@ -9,12 +9,12 @@
 ### Bring in support for the sieve filtering language
 ###
 .if !empty(PKG_OPTIONS:Msieve)
-DEPENDS+=	pear-Net_Sieve>=1.0.0:../../net/pear-Net_Sieve
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Net_Sieve>=1.0.0:../../net/pear-Net_Sieve
 .endif
 
 ###
 ### Bring in support for an IMAP server
 ###
 .if !empty(PKG_OPTIONS:Mimap)
-DEPENDS+=	php-imap>4.3.3:../../mail/php-imap
+DEPENDS+=	${PHP_PKG_PREFIX}-imap>4.3.3:../../mail/php-imap
 .endif
Index: mail/ja-squirrelmail/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/ja-squirrelmail/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- mail/ja-squirrelmail/Makefile	5 May 2006 05:32:36 -0000	1.28
+++ mail/ja-squirrelmail/Makefile	29 May 2006 21:37:28 -0000
@@ -19,8 +19,8 @@
 CONFLICTS+=	sq-squirrelspell-[0-9]*
 CONFLICTS+=	squirrelmail-[0-9]*
 
-DEPENDS+=	php-gettext>=4.3.3:../../devel/php-gettext
-DEPENDS+=	php-mbstring>=4.3.3:../../misc/php-mbstring
+DEPENDS+=	${PHP_PKG_PREFIX}-gettext>=4.3.3:../../devel/php-gettext
+DEPENDS+=	${PHP_PKG_PREFIX}-mbstring>=4.3.3:../../misc/php-mbstring
 
 USE_LANGUAGES=	# empty
 NO_BUILD=	yes
@@ -82,4 +82,5 @@
 	${INSTALL_DATA} ${WRKSRC:Q}/data/index.php ${USER_PREFS_DIR:Q}/
 	${INSTALL_DATA} ${WRKSRC:Q}/data/.htaccess ${USER_PREFS_DIR:Q}/
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: mail/pear-Mail/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/pear-Mail/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- mail/pear-Mail/Makefile	5 Feb 2006 23:09:57 -0000	1.2
+++ mail/pear-Mail/Makefile	29 May 2006 21:37:30 -0000
@@ -4,7 +4,7 @@
 PKGREVISION=	1
 CATEGORIES=	mail
 
-DEPENDS+=       pear-Net_SMTP-[0-9]*:../../net/pear-Net_SMTP
+DEPENDS+=       ${PHP_PKG_PREFIX}-pear-Net_SMTP-[0-9]*:../../net/pear-Net_SMTP
 
 MAINTAINER=	adrianp@NetBSD.org
 HOMEPAGE= 	http://pear.php.net/package/Mail
Index: mail/squirrelmail/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/squirrelmail/Makefile,v
retrieving revision 1.71
diff -u -r1.71 Makefile
--- mail/squirrelmail/Makefile	11 Apr 2006 05:24:20 -0000	1.71
+++ mail/squirrelmail/Makefile	29 May 2006 21:37:31 -0000
@@ -15,7 +15,7 @@
 CONFLICTS+=	ja-squirrelspell-[0-9]*
 CONFLICTS+=	ja-squirrelmail-[0-9]*
 
-DEPENDS+=	php-gettext>=4.3.3:../../devel/php-gettext
+DEPENDS+=	${PHP_PKG_PREFIX}-gettext>=4.3.3:../../devel/php-gettext
 
 USE_LANGUAGES=	# empty
 NO_BUILD=	yes
@@ -77,4 +77,5 @@
 	${INSTALL_DATA} ${WRKSRC:Q}/data/index.php ${USER_PREFS_DIR:Q}/
 	${INSTALL_DATA} ${WRKSRC:Q}/data/.htaccess ${USER_PREFS_DIR:Q}/
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: mail/squirrelmail-decode/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/squirrelmail-decode/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- mail/squirrelmail-decode/Makefile	2 Mar 2006 07:41:44 -0000	1.3
+++ mail/squirrelmail-decode/Makefile	29 May 2006 21:37:31 -0000
@@ -12,11 +12,12 @@
 
 NO_BUILD=	yes
 
-DEPENDS+=	php-iconv>=4.3.3:../../converters/php-iconv
+DEPENDS+=	${PHP_PKG_PREFIX}-iconv>=4.3.3:../../converters/php-iconv
 
 do-install:
 	${INSTALL_DATA} ${WRKSRC:Q}/eastasia/*.php ${WRKSRC:Q}/x-mac/*.php \
 		${PREFIX:Q}/share/squirrelmail/functions/decode
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mail/squirrelmail/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: mail/turba/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/turba/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- mail/turba/Makefile	12 May 2006 21:12:28 -0000	1.16
+++ mail/turba/Makefile	29 May 2006 21:37:34 -0000
@@ -86,4 +86,5 @@
 	@${CHOWN} ${APACHE_USER}:${SHAREGRP} ${TURBADIR}/config
 	@${CHMOD} 0750 ${TURBADIR}/config
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: mail/turba/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/turba/options.mk,v
retrieving revision 1.2
diff -u -r1.2 options.mk
--- mail/turba/options.mk	31 May 2005 10:01:38 -0000	1.2
+++ mail/turba/options.mk	29 May 2006 21:37:34 -0000
@@ -10,12 +10,12 @@
 ### Use OpenLDAP for storing data
 ###
 .if !empty(PKG_OPTIONS:Mldap)
-DEPENDS+=	php-ldap>=4.3.3:../../databases/php-ldap
+DEPENDS+=	${PHP_PKG_PREFIX}-ldap>=4.3.3:../../databases/php-ldap
 .endif
 
 ###
 ### Use MySQL for storing data
 ###
 .if !empty(PKG_OPTIONS:Mmysql)
-DEPENDS+=	php-mysql>=4.3.3:../../databases/php-mysql
+DEPENDS+=	${PHP_PKG_PREFIX}-mysql>=4.3.3:../../databases/php-mysql
 .endif
Index: meta-pkgs/php4-extensions/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/meta-pkgs/php4-extensions/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- meta-pkgs/php4-extensions/Makefile	5 Feb 2006 23:10:06 -0000	1.17
+++ meta-pkgs/php4-extensions/Makefile	29 May 2006 21:37:41 -0000
@@ -12,52 +12,52 @@
 
 # base PHP 4.x package
 DEPENDS+=	php-4.4.*:../../www/php4
-DEPENDS+=	ap-php-4.4.*:../../www/ap-php
+DEPENDS+=	${APACHE_PKG_PREFIX}-php4-4.4.*:../../www/ap-php
 
 # extensions buildable with both PHP 4.x and PHP 5.x
-DEPENDS+=	php-bcmath-4.4.*:../../math/php-bcmath
-DEPENDS+=	php-bz2-4.4.*:../../archivers/php-bz2
-DEPENDS+=	php-calendar-4.4.*:../../misc/php-calendar
-DEPENDS+=	php-curl-4.4.*:../../www/php-curl
-DEPENDS+=	php-dba-4.4.*:../../databases/php-dba
-DEPENDS+=	php-dbase-4.4.*:../../databases/php-dbase
-DEPENDS+=	php-dbx-4.4.*:../../databases/php-dbx
-DEPENDS+=	php-eaccelerator-4.4.*:../../www/php-eaccelerator
-DEPENDS+=	php-exif-4.4.*:../../graphics/php-exif
-DEPENDS+=	php-filepro-4.4.*:../../databases/php-filepro
-DEPENDS+=	php-ftp-4.4.*:../../net/php-ftp
-DEPENDS+=	php-gd-4.4.*:../../graphics/php-gd
-DEPENDS+=	php-gettext-4.4.*:../../devel/php-gettext
-DEPENDS+=	php-gmp-4.4.*:../../devel/php-gmp
-DEPENDS+=	php-iconv-4.4.*:../../converters/php-iconv
-DEPENDS+=	php-imap-4.4.*:../../mail/php-imap
-DEPENDS+=	php-ldap-4.4.*:../../databases/php-ldap
-DEPENDS+=	php-mbstring-4.4.*:../../misc/php-mbstring
-DEPENDS+=	php-mcrypt-4.4.*:../../security/php-mcrypt
-DEPENDS+=	php-mhash-4.4.*:../../security/php-mhash
-DEPENDS+=	php-mssql-4.4.*:../../databases/php-mssql
-DEPENDS+=	php-mysql-4.4.*:../../databases/php-mysql
-DEPENDS+=	php-odbc-4.4.*:../../databases/php-odbc
-DEPENDS+=	php-pcntl-4.4.*:../../devel/php-pcntl
-DEPENDS+=	php-pdflib-4.4.*:../../print/php-pdflib
-DEPENDS+=	php-pgsql-4.4.*:../../databases/php-pgsql
-DEPENDS+=	php-posix-4.4.*:../../devel/php-posix
-DEPENDS+=	php-shmop-4.4.*:../../devel/php-shmop
-DEPENDS+=	php-snmp-4.4.*:../../net/php-snmp
-DEPENDS+=	php-sockets-4.4.*:../../net/php-sockets
-DEPENDS+=	php-sqlite-4.4.*:../../databases/php-sqlite
-DEPENDS+=	php-sysvsem-4.4.*:../../devel/php-sysvsem
-DEPENDS+=	php-sysvshm-4.4.*:../../devel/php-sysvshm
-DEPENDS+=	php-wddx-4.4.*:../../textproc/php-wddx
-DEPENDS+=	php-xmlrpc-4.4.*:../../net/php-xmlrpc
-DEPENDS+=	php-yp-4.4.*:../../net/php-yp
-DEPENDS+=	php-zip-4.4.*:../../archivers/php-zip
-DEPENDS+=	php-zlib-4.4.*:../../archivers/php-zlib
+DEPENDS+=	php4-bcmath-4.4.*:../../math/php-bcmath
+DEPENDS+=	php4-bz2-4.4.*:../../archivers/php-bz2
+DEPENDS+=	php4-calendar-4.4.*:../../misc/php-calendar
+DEPENDS+=	php4-curl-4.4.*:../../www/php-curl
+DEPENDS+=	php4-dba-4.4.*:../../databases/php-dba
+DEPENDS+=	php4-dbase-4.4.*:../../databases/php-dbase
+DEPENDS+=	php4-dbx-4.4.*:../../databases/php-dbx
+DEPENDS+=	php4-eaccelerator-4.4.*:../../www/php-eaccelerator
+DEPENDS+=	php4-exif-4.4.*:../../graphics/php-exif
+DEPENDS+=	php4-filepro-4.4.*:../../databases/php-filepro
+DEPENDS+=	php4-ftp-4.4.*:../../net/php-ftp
+DEPENDS+=	php4-gd-4.4.*:../../graphics/php-gd
+DEPENDS+=	php4-gettext-4.4.*:../../devel/php-gettext
+DEPENDS+=	php4-gmp-4.4.*:../../devel/php-gmp
+DEPENDS+=	php4-iconv-4.4.*:../../converters/php-iconv
+DEPENDS+=	php4-imap-4.4.*:../../mail/php-imap
+DEPENDS+=	php4-ldap-4.4.*:../../databases/php-ldap
+DEPENDS+=	php4-mbstring-4.4.*:../../misc/php-mbstring
+DEPENDS+=	php4-mcrypt-4.4.*:../../security/php-mcrypt
+DEPENDS+=	php4-mhash-4.4.*:../../security/php-mhash
+DEPENDS+=	php4-mssql-4.4.*:../../databases/php-mssql
+DEPENDS+=	php4-mysql-4.4.*:../../databases/php-mysql
+DEPENDS+=	php4-odbc-4.4.*:../../databases/php-odbc
+DEPENDS+=	php4-pcntl-4.4.*:../../devel/php-pcntl
+DEPENDS+=	php4-pdflib-4.4.*:../../print/php-pdflib
+DEPENDS+=	php4-pgsql-4.4.*:../../databases/php-pgsql
+DEPENDS+=	php4-posix-4.4.*:../../devel/php-posix
+DEPENDS+=	php4-shmop-4.4.*:../../devel/php-shmop
+DEPENDS+=	php4-snmp-4.4.*:../../net/php-snmp
+DEPENDS+=	php4-sockets-4.4.*:../../net/php-sockets
+DEPENDS+=	php4-sqlite-4.4.*:../../databases/php-sqlite
+DEPENDS+=	php4-sysvsem-4.4.*:../../devel/php-sysvsem
+DEPENDS+=	php4-sysvshm-4.4.*:../../devel/php-sysvshm
+DEPENDS+=	php4-wddx-4.4.*:../../textproc/php-wddx
+DEPENDS+=	php4-xmlrpc-4.4.*:../../net/php-xmlrpc
+DEPENDS+=	php4-yp-4.4.*:../../net/php-yp
+DEPENDS+=	php4-zip-4.4.*:../../archivers/php-zip
+DEPENDS+=	php4-zlib-4.4.*:../../archivers/php-zlib
 
 # PHP 4.x-only extensions
-DEPENDS+=	php-apc-4.4.*:../../www/php4-apc
-DEPENDS+=	php-domxml-4.4.*:../../textproc/php4-domxml
-DEPENDS+=	php-xslt-4.4.*:../../textproc/php4-xslt
+DEPENDS+=	php4-apc-4.4.*:../../www/php4-apc
+DEPENDS+=	php4-domxml-4.4.*:../../textproc/php4-domxml
+DEPENDS+=	php4-xslt-4.4.*:../../textproc/php4-xslt
 
 EXTRACT_ONLY=	# empty
 NO_CHECKSUM=	yes
@@ -67,4 +67,6 @@
 
 do-install:	# empty
 
+.include "../../mk/apachever.mk"
+
 .include "../../mk/bsd.pkg.mk"
Index: meta-pkgs/php5-extensions/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/meta-pkgs/php5-extensions/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- meta-pkgs/php5-extensions/Makefile	5 Feb 2006 23:10:06 -0000	1.17
+++ meta-pkgs/php5-extensions/Makefile	29 May 2006 21:37:41 -0000
@@ -13,59 +13,59 @@
 
 # base PHP 5.x package
 DEPENDS+=	php-5.1.*:../../lang/php5
-DEPENDS+=	ap-php-5.1.*:../../www/ap-php
+DEPENDS+=	${APACHE_PKG_PREFIX}-php5-5.1.*:../../www/ap-php
 
 # extensions buildable with both PHP 4.x and PHP 5.x
-DEPENDS+=	php-bcmath-5.1.*:../../math/php-bcmath
-DEPENDS+=	php-bz2-5.1.*:../../archivers/php-bz2
-DEPENDS+=	php-calendar-5.1.*:../../misc/php-calendar
-DEPENDS+=	php-curl-5.1.*:../../www/php-curl
-DEPENDS+=	php-dba-5.1.*:../../databases/php-dba
-DEPENDS+=	php-dbase-5.1.*:../../databases/php-dbase
-DEPENDS+=	php-dbx-5.1.*:../../databases/php-dbx
+DEPENDS+=	php5-bcmath-5.1.*:../../math/php-bcmath
+DEPENDS+=	php5-bz2-5.1.*:../../archivers/php-bz2
+DEPENDS+=	php5-calendar-5.1.*:../../misc/php-calendar
+DEPENDS+=	php5-curl-5.1.*:../../www/php-curl
+DEPENDS+=	php5-dba-5.1.*:../../databases/php-dba
+DEPENDS+=	php5-dbase-5.1.*:../../databases/php-dbase
+DEPENDS+=	php5-dbx-5.1.*:../../databases/php-dbx
 # eaccelerator doesn't compile/work with 5.1
 # DEPENDS+=	php-eaccelerator-5.1.*:../../www/php-eaccelerator
-DEPENDS+=	php-exif-5.1.*:../../graphics/php-exif
-DEPENDS+=	php-filepro-5.1.*:../../databases/php-filepro
-DEPENDS+=	php-ftp-5.1.*:../../net/php-ftp
-DEPENDS+=	php-gd-5.1.*:../../graphics/php-gd
-DEPENDS+=	php-gettext-5.1.*:../../devel/php-gettext
-DEPENDS+=	php-gmp-5.1.*:../../devel/php-gmp
-DEPENDS+=	php-iconv-5.1.*:../../converters/php-iconv
-DEPENDS+=	php-imap-5.1.*:../../mail/php-imap
-DEPENDS+=	php-ldap-5.1.*:../../databases/php-ldap
-DEPENDS+=	php-mbstring-5.1.*:../../misc/php-mbstring
-DEPENDS+=	php-mcrypt-5.1.*:../../security/php-mcrypt
-DEPENDS+=	php-mhash-5.1.*:../../security/php-mhash
-DEPENDS+=	php-mssql-5.1.*:../../databases/php-mssql
-DEPENDS+=	php-mysql-5.1.*:../../databases/php-mysql
-DEPENDS+=	php-odbc-5.1.*:../../databases/php-odbc
-DEPENDS+=	php-pcntl-5.1.*:../../devel/php-pcntl
-DEPENDS+=	php-pdflib-5.1.*:../../print/php-pdflib
-DEPENDS+=	php-pgsql-5.1.*:../../databases/php-pgsql
-DEPENDS+=	php-posix-5.1.*:../../devel/php-posix
-DEPENDS+=	php-shmop-5.1.*:../../devel/php-shmop
-DEPENDS+=	php-snmp-5.1.*:../../net/php-snmp
-DEPENDS+=	php-sockets-5.1.*:../../net/php-sockets
-DEPENDS+=	php-sqlite-5.1.*:../../databases/php-sqlite
-DEPENDS+=	php-sysvsem-5.1.*:../../devel/php-sysvsem
-DEPENDS+=	php-sysvshm-5.1.*:../../devel/php-sysvshm
-DEPENDS+=	php-wddx-5.1.*:../../textproc/php-wddx
-DEPENDS+=	php-xmlrpc-5.1.*:../../net/php-xmlrpc
-DEPENDS+=	php-zip-5.1.*:../../archivers/php-zip
-DEPENDS+=	php-zlib-5.1.*:../../archivers/php-zlib
+DEPENDS+=	php5-exif-5.1.*:../../graphics/php-exif
+DEPENDS+=	php5-filepro-5.1.*:../../databases/php-filepro
+DEPENDS+=	php5-ftp-5.1.*:../../net/php-ftp
+DEPENDS+=	php5-gd-5.1.*:../../graphics/php-gd
+DEPENDS+=	php5-gettext-5.1.*:../../devel/php-gettext
+DEPENDS+=	php5-gmp-5.1.*:../../devel/php-gmp
+DEPENDS+=	php5-iconv-5.1.*:../../converters/php-iconv
+DEPENDS+=	php5-imap-5.1.*:../../mail/php-imap
+DEPENDS+=	php5-ldap-5.1.*:../../databases/php-ldap
+DEPENDS+=	php5-mbstring-5.1.*:../../misc/php-mbstring
+DEPENDS+=	php5-mcrypt-5.1.*:../../security/php-mcrypt
+DEPENDS+=	php5-mhash-5.1.*:../../security/php-mhash
+DEPENDS+=	php5-mssql-5.1.*:../../databases/php-mssql
+DEPENDS+=	php5-mysql-5.1.*:../../databases/php-mysql
+DEPENDS+=	php5-odbc-5.1.*:../../databases/php-odbc
+DEPENDS+=	php5-pcntl-5.1.*:../../devel/php-pcntl
+DEPENDS+=	php5-pdflib-5.1.*:../../print/php-pdflib
+DEPENDS+=	php5-pgsql-5.1.*:../../databases/php-pgsql
+DEPENDS+=	php5-posix-5.1.*:../../devel/php-posix
+DEPENDS+=	php5-shmop-5.1.*:../../devel/php-shmop
+DEPENDS+=	php5-snmp-5.1.*:../../net/php-snmp
+DEPENDS+=	php5-sockets-5.1.*:../../net/php-sockets
+DEPENDS+=	php5-sqlite-5.1.*:../../databases/php-sqlite
+DEPENDS+=	php5-sysvsem-5.1.*:../../devel/php-sysvsem
+DEPENDS+=	php5-sysvshm-5.1.*:../../devel/php-sysvshm
+DEPENDS+=	php5-wddx-5.1.*:../../textproc/php-wddx
+DEPENDS+=	php5-xmlrpc-5.1.*:../../net/php-xmlrpc
+DEPENDS+=	php5-zip-5.1.*:../../archivers/php-zip
+DEPENDS+=	php5-zlib-5.1.*:../../archivers/php-zlib
 
 # PHP 5.x-only extensions
-DEPENDS+=	php-dom-5.1.*:../../textproc/php5-dom
-DEPENDS+=	php-mysqli-5.1.*:../../databases/php5-mysqli
-DEPENDS+=	php-soap-5.1.*:../../net/php5-soap
-DEPENDS+=	php-xsl-5.1.*:../../textproc/php5-xsl
-DEPENDS+=	php-pdo-5.1.*:../../databases/php-pdo
-DEPENDS+=	php-pdo_dblib-5.1.*:../../databases/php-pdo_dblib
-DEPENDS+=	php-pdo_mysql-5.1.*:../../databases/php-pdo_mysql
-DEPENDS+=	php-pdo_odbc-5.1.*:../../databases/php-pdo_odbc
-DEPENDS+=	php-pdo_pgsql-5.1.*:../../databases/php-pdo_pgsql
-DEPENDS+=	php-pdo_sqlite-5.1.*:../../databases/php-pdo_sqlite
+DEPENDS+=	php5-dom-5.1.*:../../textproc/php5-dom
+DEPENDS+=	php5-mysqli-5.1.*:../../databases/php5-mysqli
+DEPENDS+=	php5-soap-5.1.*:../../net/php5-soap
+DEPENDS+=	php5-xsl-5.1.*:../../textproc/php5-xsl
+DEPENDS+=	php5-pdo-5.1.*:../../databases/php-pdo
+DEPENDS+=	php5-pdo_dblib-5.1.*:../../databases/php-pdo_dblib
+DEPENDS+=	php5-pdo_mysql-5.1.*:../../databases/php-pdo_mysql
+DEPENDS+=	php5-pdo_odbc-5.1.*:../../databases/php-pdo_odbc
+DEPENDS+=	php5-pdo_pgsql-5.1.*:../../databases/php-pdo_pgsql
+DEPENDS+=	php5-pdo_sqlite-5.1.*:../../databases/php-pdo_sqlite
 
 EXTRACT_ONLY=	# empty
 NO_CHECKSUM=	yes
@@ -75,4 +75,6 @@
 
 do-install:	# empty
 
+
+.include "../../mk/apachever.mk"
 .include "../../mk/bsd.pkg.mk"
Index: mk/apache.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/apache.mk,v
retrieving revision 1.11
diff -u -r1.11 apache.mk
--- mk/apache.mk	9 May 2006 10:05:04 -0000	1.11
+++ mk/apache.mk	29 May 2006 21:37:44 -0000
@@ -32,93 +32,7 @@
 .if !defined(APACHE_MK)
 APACHE_MK=	# defined
 
-.include "../../mk/bsd.prefs.mk"
-
-PKG_APACHE_DEFAULT?=	# empty
-
-_PKG_APACHES?=	apache13 apache2
-
-.if defined(PKG_APACHE_ACCEPTED)
-.  for _ap_ in ${PKG_APACHE_ACCEPTED}
-.    if !empty(_PKG_APACHES:M${_ap_})
-_PKG_APACHE_ACCEPTED+=	${PKG_APACHE_ACCEPTED:M${_ap_}}
-.    endif
-.  endfor
-.endif
-
-_PKG_APACHE_ACCEPTED?=	${_PKG_APACHES}
-
-# Set the default apache for this platform.
-#
-.if !empty(PKG_APACHE_DEFAULT)
-_PKG_APACHE_DEFAULT=	${PKG_APACHE_DEFAULT}
-.endif
-.if !defined(_PKG_APACHE_DEFAULT)
-_PKG_APACHE_DEFAULT?=	apache2
-.endif
-
-_APACHE_PKGBASE.apache13=	apache-1\*
-_APACHE_PKGBASE.apache2=	apache-2\*
-
-# Mark the acceptable apaches and check which apache packages are installed.
-.for _ap_ in ${_PKG_APACHE_ACCEPTED}
-_PKG_APACHE_OK.${_ap_}=	yes
-_PKG_APACHE_INSTALLED.${_ap_}!= \
-	if ${PKG_INFO} -qe ${_APACHE_PKGBASE.${_ap_}}; then		\
-		${ECHO} yes;						\
-	else								\
-		${ECHO} no;						\
-	fi
-.endfor
-
-# Use one of the installed apaches,...
-#
-.if !defined(_PKG_APACHE)
-.  for _ap_ in ${_PKG_APACHE_ACCEPTED}
-.    if !empty(_PKG_APACHE_INSTALLED.${_ap_}:M[yY][eE][sS])
-_PKG_APACHE?=			${_ap_}
-.    else
-_PKG_APACHE_FIRSTACCEPTED?=	${_ap_}
-.    endif
-.  endfor
-.endif
-#
-# ...otherwise, prefer the default one if it's accepted,...
-#
-.if !defined(_PKG_APACHE)
-.  if defined(_PKG_APACHE_OK.${_PKG_APACHE_DEFAULT}) && \
-      !empty(_PKG_APACHE_OK.${_PKG_APACHE_DEFAULT}:M[yY][eE][sS])
-_PKG_APACHE=	${_PKG_APACHE_DEFAULT}
-.  endif
-.endif
-#
-# ...otherwise, just use the first accepted apache.
-#
-.if !defined(_PKG_APACHE)
-.  if defined(_PKG_APACHE_FIRSTACCEPTED)
-_PKG_APACHE=	${_PKG_APACHE_FIRSTACCEPTED}
-.  endif
-.endif
-#
-# If there are no acceptable apaches, then generate an error.
-#
-.if !defined(_PKG_APACHE)
-# force an error
-PKG_FAIL_REASON=	"no acceptable apache found"
-_PKG_APACHE=		"none"
-.endif
-
-BUILDLINK_API_DEPENDS.apache13?=	apache-1.3*
-BUILDLINK_API_DEPENDS.apache2?=	apache-2*
-
-.if ${_PKG_APACHE} == "apache13"
-_APACHE_PKGSRCDIR=	../../www/apache
-.elif ${_PKG_APACHE} == "apache2"
-_APACHE_PKGSRCDIR=	../../www/apache2
-_APACHE_BL_SRCDIR=	${_APACHE_PKGSRCDIR}
-.endif
-
-_APACHE_BL_SRCDIR?=	../../www/apache
+.include "../../mk/apachever.mk"
 
 # Add a runtime dependency on the apache server.
 # This may or may not create an actual dependency depending on
@@ -137,10 +51,4 @@
 .  endif
 .endif
 
-# PKG_APACHE is a publicly readable variable containing the name of the server
-#	we will be using.
-#
-PKG_APACHE:=		${_PKG_APACHE}
-BUILD_DEFS+=		PKG_APACHE
-
 .endif	# APACHE_MK
Index: mk/apachever.mk
===================================================================
RCS file: mk/apachever.mk
diff -N mk/apachever.mk
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mk/apachever.mk	29 May 2006 21:37:44 -0000
@@ -0,0 +1,129 @@
+# $NetBSD: apache.mk,v 1.11 2006/05/09 10:05:04 tron Exp $
+#
+# This Makefile fragment handles Apache dependencies and make variables,
+# and is meant to be included by packages that require Apache either at
+# build-time or at run-time.  apache.mk will:
+#
+#	* set PKG_APACHE to the name of the apache web server used
+#
+#	* add a full dependency on the apache server
+#
+#	* optionally add a full dependency on apr
+#
+# The available user variables are:
+#
+# PKG_APACHE_DEFAULT is a user-settable variable whose value is the default
+#	apache server to use.  Possible values are apache13 and apache2.
+#   If there is already a version of apache installed this will have no
+#   effect.
+#
+# The available makefile variables are:
+#
+# PKG_APACHE_ACCEPTED is a package-settable list of servers that may be used as
+#	possible dependencies for the package.  Possible values are the same as
+#   for PKG_APACHE_DEFAULT.
+#
+# USE_APR is used to note that the package requires the Apache Portable
+#   runtime to build and execute.  This is only takes effect if apache2
+#   is chosen (by this file) as the web server to use.  This adds a full
+#   dependency on apr.
+#
+
+.if !defined(APACHEVER_MK)
+APACHEVER_MK=	# defined
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_APACHE_DEFAULT?=	# empty
+
+_PKG_APACHES?=	apache13 apache2
+
+.if defined(PKG_APACHE_ACCEPTED)
+.  for _ap_ in ${PKG_APACHE_ACCEPTED}
+.    if !empty(_PKG_APACHES:M${_ap_})
+_PKG_APACHE_ACCEPTED+=	${PKG_APACHE_ACCEPTED:M${_ap_}}
+.    endif
+.  endfor
+.endif
+
+_PKG_APACHE_ACCEPTED?=	${_PKG_APACHES}
+
+# Set the default apache for this platform.
+#
+.if !empty(PKG_APACHE_DEFAULT)
+_PKG_APACHE_DEFAULT=	${PKG_APACHE_DEFAULT}
+.endif
+.if !defined(_PKG_APACHE_DEFAULT)
+_PKG_APACHE_DEFAULT?=	apache2
+.endif
+
+_APACHE_PKGBASE.apache13=	apache-1\*
+_APACHE_PKGBASE.apache2=	apache-2\*
+
+# Mark the acceptable apaches and check which apache packages are installed.
+.for _ap_ in ${_PKG_APACHE_ACCEPTED}
+_PKG_APACHE_OK.${_ap_}=	yes
+_PKG_APACHE_INSTALLED.${_ap_}!= \
+	if ${PKG_INFO} -qe ${_APACHE_PKGBASE.${_ap_}}; then		\
+		${ECHO} yes;						\
+	else								\
+		${ECHO} no;						\
+	fi
+.endfor
+
+# Use one of the installed apaches,...
+#
+.if !defined(_PKG_APACHE)
+.  for _ap_ in ${_PKG_APACHE_ACCEPTED}
+.    if !empty(_PKG_APACHE_INSTALLED.${_ap_}:M[yY][eE][sS])
+_PKG_APACHE?=			${_ap_}
+.    else
+_PKG_APACHE_FIRSTACCEPTED?=	${_ap_}
+.    endif
+.  endfor
+.endif
+#
+# ...otherwise, prefer the default one if it's accepted,...
+#
+.if !defined(_PKG_APACHE)
+.  if defined(_PKG_APACHE_OK.${_PKG_APACHE_DEFAULT}) && \
+      !empty(_PKG_APACHE_OK.${_PKG_APACHE_DEFAULT}:M[yY][eE][sS])
+_PKG_APACHE=	${_PKG_APACHE_DEFAULT}
+.  endif
+.endif
+#
+# ...otherwise, just use the first accepted apache.
+#
+.if !defined(_PKG_APACHE)
+.  if defined(_PKG_APACHE_FIRSTACCEPTED)
+_PKG_APACHE=	${_PKG_APACHE_FIRSTACCEPTED}
+.  endif
+.endif
+#
+# If there are no acceptable apaches, then generate an error.
+#
+.if !defined(_PKG_APACHE)
+# force an error
+PKG_FAIL_REASON=	"no acceptable apache found"
+_PKG_APACHE=		"none"
+.endif
+
+.if ${_PKG_APACHE} == "apache13"
+_APACHE_PKGSRCDIR=	../../www/apache
+_APACHE_PKG_PREFIX=	ap13
+.elif ${_PKG_APACHE} == "apache2"
+_APACHE_PKGSRCDIR=	../../www/apache2
+_APACHE_BL_SRCDIR=	${_APACHE_PKGSRCDIR}
+_APACHE_PKG_PREFIX=	ap2
+.endif
+
+_APACHE_BL_SRCDIR?=	../../www/apache
+
+# PKG_APACHE is a publicly readable variable containing the name of the server
+#	we will be using.
+#
+PKG_APACHE:=		${_PKG_APACHE}
+APACHE_PKG_PREFIX:=	${_APACHE_PKG_PREFIX}
+BUILD_DEFS+=		PKG_APACHE
+
+.endif	# APACHEVER_MK
Index: net/pear-Net_SMTP/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/pear-Net_SMTP/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- net/pear-Net_SMTP/Makefile	5 Feb 2006 23:10:29 -0000	1.4
+++ net/pear-Net_SMTP/Makefile	29 May 2006 21:37:53 -0000
@@ -7,7 +7,7 @@
 MAINTAINER=	jdolecek@NetBSD.org
 COMMENT=	PHP classes to provide SMTP Interface
 
-DEPENDS+=	pear-Net_Socket>=1.0.2:../../net/pear-Net_Socket
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Net_Socket>=1.0.2:../../net/pear-Net_Socket
 
 .include "../../lang/php/pear.mk"
 .include "../../mk/bsd.pkg.mk"
Index: net/pear-Net_Sieve/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/pear-Net_Sieve/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- net/pear-Net_Sieve/Makefile	31 Mar 2006 21:54:16 -0000	1.1.1.1
+++ net/pear-Net_Sieve/Makefile	29 May 2006 21:37:53 -0000
@@ -7,7 +7,7 @@
 HOMEPAGE=	http://pear.php.net/package/Net_Sieve/
 COMMENT=	PHP classes that handles talking to timsieved
 
-DEPENDS+=	pear-Net_Socket>=1.0.0:../../net/pear-Net_Socket
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Net_Socket>=1.0.0:../../net/pear-Net_Socket
 
 .include "../../lang/php/pear.mk"
 .include "../../mk/bsd.pkg.mk"
Index: net/pear-SOAP/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/pear-SOAP/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- net/pear-SOAP/Makefile	5 Feb 2006 23:10:29 -0000	1.5
+++ net/pear-SOAP/Makefile	29 May 2006 21:37:53 -0000
@@ -7,10 +7,10 @@
 MAINTAINER=	jdolecek@NetBSD.org
 COMMENT=	SOAP Client/Server for PHP
 
-DEPENDS+=	pear-Mail_Mime>=1.2:../../mail/pear-Mail_Mime
-DEPENDS+=	pear-HTTP_Request>=1.2:../../www/pear-HTTP_Request
-DEPENDS+=	pear-Net_URL>=1.0:../../net/pear-Net_URL
-DEPENDS+=	pear-Net_DIME>=0.3:../../net/pear-Net_DIME
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Mail_Mime>=1.2:../../mail/pear-Mail_Mime
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-HTTP_Request>=1.2:../../www/pear-HTTP_Request
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Net_URL>=1.0:../../net/pear-Net_URL
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Net_DIME>=0.3:../../net/pear-Net_DIME
 
 PEAR_DIRRM_BASEDIR=     yes
 
Index: net/php-yp/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/php-yp/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- net/php-yp/Makefile	5 Feb 2006 23:10:29 -0000	1.7
+++ net/php-yp/Makefile	29 May 2006 21:37:53 -0000
@@ -8,7 +8,7 @@
 # yp extension has been unbundled in PHP 5.1.1, it's only available
 # in CVS and isn't available through have PECL; thus, mark this
 # PHP4-only for now
-PHP_VERSION_REQD=	4
+PHP_VERSIONS_ACCEPTED=	4
 
 CONFIGURE_ARGS+=	--enable-${MODNAME}=shared,${BUILDLINK_DIR}
 
Index: net/php5-soap/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/php5-soap/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- net/php5-soap/Makefile	5 Feb 2006 23:10:29 -0000	1.2
+++ net/php5-soap/Makefile	29 May 2006 21:37:53 -0000
@@ -7,11 +7,11 @@
 
 MAINTAINER=		jdolecek@NetBSD.org
 
+PHP_VERSIONS_ACCEPTED=	5
 
 CONFIGURE_ARGS+=        --enable-${MODNAME}
 CONFIGURE_ARGS+=	--with-libxml-dir=${BUILDLINK_PREFIX.libxml2}
 
-PHP_VERSION_REQD=	5
 .include "../../lang/php/ext.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: security/base/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/base/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- security/base/Makefile	12 May 2006 22:31:38 -0000	1.8
+++ security/base/Makefile	29 May 2006 21:38:19 -0000
@@ -10,15 +10,15 @@
 COMMENT=	Analysis engine to process a database of security events
 
 DEPENDS+=	adodb>=1.2:../../databases/adodb
-DEPENDS+=	ap-php>=4.0.4:../../www/ap-php
-DEPENDS+=	php-gd>=4.0.4:../../graphics/php-gd
-DEPENDS+=	php-sockets>=4.0.4:../../net/php-sockets
-DEPENDS+=	php-mysql>=4.0.4:../../databases/php-mysql
-DEPENDS+=	pear-Log-[0-9]*:../../sysutils/pear-Log
-DEPENDS+=	pear-Numbers_Words-[0-9]*:../../math/pear-Numbers_Words
-DEPENDS+=	pear-Numbers_Roman-[0-9]*:../../math/pear-Numbers_Roman
-DEPENDS+=	pear-Image_Color-[0-9]*:../../graphics/pear-Image_Color
-DEPENDS+=	pear-Image_Graph-[0-9]*:../../graphics/pear-Image_Graph
+DEPENDS+=	${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.0.4:../../www/ap-php
+DEPENDS+=	${PHP_PKG_PREFIX}-gd>=4.0.4:../../graphics/php-gd
+DEPENDS+=	${PHP_PKG_PREFIX}-sockets>=4.0.4:../../net/php-sockets
+DEPENDS+=	${PHP_PKG_PREFIX}-mysql>=4.0.4:../../databases/php-mysql
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Log-[0-9]*:../../sysutils/pear-Log
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Numbers_Words-[0-9]*:../../math/pear-Numbers_Words
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Numbers_Roman-[0-9]*:../../math/pear-Numbers_Roman
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Image_Color-[0-9]*:../../graphics/pear-Image_Color
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Image_Graph-[0-9]*:../../graphics/pear-Image_Graph
 
 NO_BUILD=	YES
 
@@ -72,4 +72,6 @@
 
 	@${CHOWN} ${WWW_USER} ${BASE_DIR}
 
+.include "../../mk/apachever.mk"
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: textproc/php4-domxml/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/php4-domxml/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- textproc/php4-domxml/Makefile	5 Feb 2006 23:11:06 -0000	1.23
+++ textproc/php4-domxml/Makefile	29 May 2006 21:38:54 -0000
@@ -5,6 +5,7 @@
 CATEGORIES+=		textproc
 COMMENT=		PHP4 extension for DOM support
 
+PHP_VERSIONS_ACCEPTED=	4
 
 CONFIGURE_ARGS+=	--enable-${MODNAME}=shared,${BUILDLINK_PREFIX.libxml2}
 CONFIGURE_ARGS+=	--with-dom=shared,${BUILDLINK_PREFIX.libxml2}
@@ -12,7 +13,6 @@
 CONFIGURE_ARGS+=	--with-dom-xslt=${BUILDLINK_PREFIX.libxslt}
 CONFIGURE_ARGS+=	--with-dom-exslt=${BUILDLINK_PREFIX.libxslt}
 
-PHP_VERSION_REQD=	4
 .include "../../lang/php/ext.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
Index: textproc/php4-xslt/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/php4-xslt/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- textproc/php4-xslt/Makefile	5 Feb 2006 23:11:06 -0000	1.20
+++ textproc/php4-xslt/Makefile	29 May 2006 21:38:54 -0000
@@ -5,6 +5,7 @@
 CATEGORIES+=		textproc
 COMMENT=		PHP4 extension for XSLT functions (Sablotron backend)
 
+PHP_VERSIONS_ACCEPTED=	4
 
 CONFIGURE_ARGS+=	--enable-${MODNAME}
 CONFIGURE_ARGS+=	--with-${MODNAME}-sablot=${BUILDLINK_PREFIX.sablotron}
@@ -34,7 +35,6 @@
 	${INSTALL_DATA_DIR} ${DOCDIR}
 	cd ${WRKSRC}; ${INSTALL_DATA} README.XSLT-BACKENDS ${DOCDIR}
 
-PHP_VERSION_REQD=	4
 .include "../../lang/php/ext.mk"
 .include "../../textproc/sablotron/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: textproc/php5-dom/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/php5-dom/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- textproc/php5-dom/Makefile	5 Feb 2006 23:11:06 -0000	1.4
+++ textproc/php5-dom/Makefile	29 May 2006 21:38:54 -0000
@@ -9,7 +9,7 @@
 CONFIGURE_ARGS+=	--enable-${MODNAME}
 CONFIGURE_ARGS+=	--with-libxml-dir=${BUILDLINK_PREFIX.libxml2}
 
-PHP_VERSION_REQD=	5
+PHP_VERSIONS_ACCEPTED=	5
 .include "../../lang/php/ext.mk"
 #.include "../../devel/zlib/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
Index: textproc/php5-xsl/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/php5-xsl/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- textproc/php5-xsl/Makefile	5 Feb 2006 23:11:06 -0000	1.4
+++ textproc/php5-xsl/Makefile	29 May 2006 21:38:54 -0000
@@ -12,7 +12,7 @@
 EXTRACT_ELEMENTS=	${DISTNAME}/ext/${MODNAME} ${DISTNAME}/ext/dom
 WRKSRC=			${WRKDIR}/${DISTNAME}/ext/${MODNAME}
 
-PHP_VERSION_REQD=	5
+PHP_VERSIONS_ACCEPTED=	5
 .include "../../lang/php/ext.mk"
 .include "../../textproc/libxslt/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: time/kronolith/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/time/kronolith/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- time/kronolith/Makefile	29 Apr 2006 09:23:19 -0000	1.4
+++ time/kronolith/Makefile	29 May 2006 21:39:01 -0000
@@ -11,8 +11,8 @@
 COMMENT=	Horde calendar application
 
 DEPENDS+=	horde>=3.0.0:../../www/horde3
-DEPENDS+=	php-mysql>=4.3.3:../../databases/php-mysql
-DEPENDS+=	pear-Date-[0-9]*:../../time/pear-Date
+DEPENDS+=	${PHP_PKG_PREFIX}-mysql>=4.3.3:../../databases/php-mysql
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Date-[0-9]*:../../time/pear-Date
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -81,4 +81,5 @@
 	@${CHOWN} ${APACHE_USER}:${SHAREGRP} ${KRONOLITHDIR}/config
 	@${CHMOD} 0750 ${KRONOLITHDIR}/config
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/ap-Embperl/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-Embperl/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- www/ap-Embperl/Makefile	4 Mar 2006 21:30:56 -0000	1.16
+++ www/ap-Embperl/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=       HTML-Embperl-1.2.0
-PKGNAME=        ap-Embperl-1.2.0
+PKGNAME=        ap13-Embperl-1.2.0
 PKGREVISION=	3
 CATEGORIES=	www perl5
 MASTER_SITES=	${MASTER_SITE_PERL_CPAN:=HTML/} \
Index: www/ap-access-referer/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-access-referer/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- www/ap-access-referer/Makefile	4 Mar 2006 21:30:56 -0000	1.8
+++ www/ap-access-referer/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=	mod_access_referer-1.0.2
-PKGNAME=	ap-access-referer-1.0.2
+PKGNAME=	ap13-access-referer-1.0.2
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=accessreferer/}
Index: www/ap-auth-cookie/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-cookie/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- www/ap-auth-cookie/Makefile	4 Mar 2006 21:30:56 -0000	1.38
+++ www/ap-auth-cookie/Makefile	29 May 2006 21:39:10 -0000
@@ -5,7 +5,7 @@
 # one.
 
 DISTNAME=	mod_auth_cookie.c
-PKGNAME=	ap-auth-cookie-1.9
+PKGNAME=	ap13-auth-cookie-1.9
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.kciLink.com/pub/
Index: www/ap-auth-kerb/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-kerb/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- www/ap-auth-kerb/Makefile	15 May 2006 12:05:43 -0000	1.1.1.1
+++ www/ap-auth-kerb/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.1.1.1 2006/05/15 12:05:43 markd Exp $
 
 DISTNAME=	mod_auth_kerb-5.0rc7
-PKGNAME=	ap-auth-kerb-5.0rc7
+PKGNAME=	${APACHE_PKG_PREFIX}-auth-kerb-5.0rc7
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=modauthkerb/}
 
Index: www/ap-auth-ldap/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-ldap/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- www/ap-auth-ldap/Makefile	4 Mar 2006 21:30:56 -0000	1.28
+++ www/ap-auth-ldap/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.28 2006/03/04 21:30:56 jlam Exp $
 
 DISTNAME=	auth_ldap-1.6.1
-PKGNAME=	ap-auth-ldap-1.6.1
+PKGNAME=	ap13-auth-ldap-1.6.1
 PKGREVISION=	2
 SVR4_PKGNAME=	apldap
 CATEGORIES=	www databases
Index: www/ap-auth-mysql/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-mysql/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- www/ap-auth-mysql/Makefile	16 May 2006 02:35:37 -0000	1.16
+++ www/ap-auth-mysql/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=		libapache-mod-auth-mysql_4.3.1
-PKGNAME=		${DISTNAME:S/libapache-mod/ap/:S/_/-/}
+PKGNAME=		${APACHE_PKG_PREFIX}-auth-mysql-4.3.1
 PKGREVISION=		5
 WRKSRC=			${WRKDIR}/${DISTNAME:S/_/-/}
 CATEGORIES=		www databases security
Index: www/ap-auth-pam/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-pam/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- www/ap-auth-pam/Makefile	4 Mar 2006 21:30:56 -0000	1.13
+++ www/ap-auth-pam/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.13 2006/03/04 21:30:56 jlam Exp $
 
 DISTNAME=	mod_auth_pam-1.0a
-PKGNAME=	ap-auth-pam-1.0a
+PKGNAME=	ap13-auth-pam-1.0a
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	http://pam.sourceforge.net/mod_auth_pam/dist/
Index: www/ap-auth-pgsql/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-pgsql/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- www/ap-auth-pgsql/Makefile	5 Feb 2006 23:11:16 -0000	1.8
+++ www/ap-auth-pgsql/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.8 2006/02/05 23:11:16 joerg Exp $
 
 DISTNAME=	mod_auth_pgsql-0.9.12
-PKGNAME=	ap-auth-pgsql-0.9.12
+PKGNAME=	ap13-auth-pgsql-0.9.12
 PKGREVISION=	3
 CATEGORIES=	www databases
 MASTER_SITES=	http://www.giuseppetanzilli.it/mod_auth_pgsql/dist/
@@ -10,7 +10,8 @@
 HOMEPAGE=	http://www.giuseppetanzilli.it/mod_auth_pgsql/
 COMMENT=	Apache module for user authentication/logging against a PostgreSQL DB
 
-CONFLICTS=	ap-auth-postgresql-[0-9]*
+CONFLICTS+=	ap-auth-postgresql-[0-9]*
+CONFLICTS+=	ap13-auth-postgresql-[0-9]*
 
 APACHE_MODULE_NAME=	mod_auth_pgsql.so
 
Index: www/ap-auth-postgresql/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-postgresql/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- www/ap-auth-postgresql/Makefile	20 Mar 2006 19:59:21 -0000	1.27
+++ www/ap-auth-postgresql/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.27 2006/03/20 19:59:21 joerg Exp $
 
 DISTNAME=	AuthPG-1.4
-PKGNAME=	ap-auth-postgresql-1.4
+PKGNAME=	ap13-auth-postgresql-1.4
 PKGREVISION=	3
 CATEGORIES=	www databases
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=authpg/}
@@ -10,8 +10,8 @@
 HOMEPAGE=	http://authpg.sourceforge.net/
 COMMENT=	Module to allow apache authentication against a Postgresql database
 
-CONFLICTS=	ap-auth-pgsql-[0-9]*
-
+CONFLICTS+=	ap-auth-pgsql-[0-9]*
+CONFLICTS+=	ap13-auth-pgsql-[0-9]*
 
 APACHE_MODULE_NAME=	mod_auth_pg.so
 
Index: www/ap-auth-radius/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-radius/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- www/ap-auth-radius/Makefile	5 Feb 2006 23:11:17 -0000	1.4
+++ www/ap-auth-radius/Makefile	29 May 2006 21:39:10 -0000
@@ -2,6 +2,7 @@
 #
 
 DISTNAME=	mod_auth_radius-1.5.7
+PKGNAME=	ap13-auth-radius-1.5.7
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.freeradius.org/pub/radius/
Index: www/ap-auth-script/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-auth-script/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- www/ap-auth-script/Makefile	4 Mar 2006 21:30:56 -0000	1.8
+++ www/ap-auth-script/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=	mod_auth_script-alpha1.3
-PKGNAME=	ap-auth-script-1.3
+PKGNAME=	ap13-auth-script-1.3
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=mod-auth-script/}
Index: www/ap-bandwidth/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-bandwidth/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- www/ap-bandwidth/Makefile	4 Mar 2006 21:30:56 -0000	1.12
+++ www/ap-bandwidth/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=	mod_bandwidth.c
-PKGNAME=	ap-bandwidth-2.0.6
+PKGNAME=	ap13-bandwidth-2.0.6
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.cohprog.com/pub/apache/module/
Index: www/ap-dav/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-dav/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- www/ap-dav/Makefile	6 Apr 2006 06:22:52 -0000	1.19
+++ www/ap-dav/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.19 2006/04/06 06:22:52 reed Exp $
 
 DISTNAME=		mod_dav-1.0.3-1.3.6
-PKGNAME=		ap-dav-1.0.3
+PKGNAME=		ap13-dav-1.0.3
 PKGREVISION=		4
 CATEGORIES=		www
 MASTER_SITES=		http://www.webdav.org/mod_dav/
@@ -10,9 +10,6 @@
 HOMEPAGE=		http://www.webdav.org/mod_dav/
 COMMENT=		Apache WebDAV module
 
-# Ugly mess that says apache>=1.3.9 and apache<2.0.
-BUILDLINK_API_DEPENDS.apache+=	{apache-1.3.9*,apache-1.3.[1-9][0-9]*,apache6-1.3.9*,apache6-1.3.[1-9][0-9]*}
-
 APACHE_MODULE=		YES
 GNU_CONFIGURE=		YES
 CONFIGURE_ARGS+=	--with-expat=${BUILDLINK_PREFIX.expat}
Index: www/ap-dtcl/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-dtcl/Makefile,v
retrieving revision 1.26
diff -u -r1.26 Makefile
--- www/ap-dtcl/Makefile	5 Feb 2006 23:11:17 -0000	1.26
+++ www/ap-dtcl/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.26 2006/02/05 23:11:17 joerg Exp $
 
 DISTNAME=	mod_dtcl-0.11.6
-PKGNAME=	ap-dtcl-0.11.2
+PKGNAME=	ap13-dtcl-0.11.2
 PKGREVISION=	3
 CATEGORIES=	www
 MASTER_SITES=	http://tcl.apache.org/mod_dtcl/download/
Index: www/ap-fastcgi/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-fastcgi/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- www/ap-fastcgi/Makefile	5 Feb 2006 23:11:17 -0000	1.29
+++ www/ap-fastcgi/Makefile	29 May 2006 21:39:10 -0000
@@ -3,7 +3,7 @@
 
 .include "Makefile.common"
 
-PKGNAME=	${DISTNAME:S/mod_/ap-/}
+PKGNAME=	${DISTNAME:S/mod_/ap13-/}
 PKGREVISION=	2
 
 APACHE_MODULE=	yes
Index: www/ap-gzip/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-gzip/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- www/ap-gzip/Makefile	4 Mar 2006 21:30:56 -0000	1.14
+++ www/ap-gzip/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=	mod_gzip-1.3.26.1a
-PKGNAME=	${DISTNAME:C|mod_|ap-|}
+PKGNAME=	${DISTNAME:C|mod_|ap13-|}
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=mod-gzip/}
Index: www/ap-iasp/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-iasp/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- www/ap-iasp/Makefile	5 Feb 2006 23:11:17 -0000	1.10
+++ www/ap-iasp/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 
 .include "../../www/iasp/Makefile.common"
 
-PKGNAME=	ap-iasp-${IASP_VERSION}
+PKGNAME=	ap13-iasp-${IASP_VERSION}
 PKGREVISION=	2
 COMMENT=	Apache connector for accessing a iASP proxy server
 
Index: www/ap-jk/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-jk/Makefile,v
retrieving revision 1.35
diff -u -r1.35 Makefile
--- www/ap-jk/Makefile	22 Apr 2006 09:22:16 -0000	1.35
+++ www/ap-jk/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.35 2006/04/22 09:22:16 rillig Exp $
 
 DISTNAME=	jakarta-tomcat-connectors-${JK_VERSION}-src
-PKGNAME=	ap-jk-${JK_VERSION}
+PKGNAME=	ap13-jk-${JK_VERSION}
 JK_VERSION=	1.2.15
 PKGREVISION=	1
 CATEGORIES=	www java
Index: www/ap-layout/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-layout/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- www/ap-layout/Makefile	5 Feb 2006 23:11:17 -0000	1.13
+++ www/ap-layout/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=	mod_layout-3.2
-PKGNAME=	${DISTNAME:C|mod_|ap-|}
+PKGNAME=	${DISTNAME:C|mod_|ap13-|}
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.tangent.org/pub/apache/ \
Index: www/ap-mp3/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-mp3/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- www/ap-mp3/Makefile	5 Feb 2006 23:11:17 -0000	1.11
+++ www/ap-mp3/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=	mod_mp3-0.35
-PKGNAME=	${DISTNAME:C|mod_|ap-|}
+PKGNAME=	${DISTNAME:C|mod_|ap13-|}
 PKGREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.tangent.org/pub/apache/ \
Index: www/ap-perl/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-perl/Makefile,v
retrieving revision 1.42
diff -u -r1.42 Makefile
--- www/ap-perl/Makefile	6 Apr 2006 06:22:53 -0000	1.42
+++ www/ap-perl/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=		mod_perl-1.29
-PKGNAME=		ap-perl-1.29
+PKGNAME=		ap13-perl-1.29
 PKGREVISION=		5
 CATEGORIES=		www perl5
 MASTER_SITES=		${MASTER_SITE_PERL_CPAN:=Apache/} \
Index: www/ap-perl/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-perl/buildlink3.mk,v
retrieving revision 1.8
diff -u -r1.8 buildlink3.mk
--- www/ap-perl/buildlink3.mk	12 Apr 2006 10:27:38 -0000	1.8
+++ www/ap-perl/buildlink3.mk	29 May 2006 21:39:10 -0000
@@ -4,15 +4,15 @@
 AP_PERL_BUILDLINK3_MK:=	${AP_PERL_BUILDLINK3_MK}+
 
 .if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+=	ap-perl
+BUILDLINK_DEPENDS+=	ap13-perl
 .endif
 
 BUILDLINK_PACKAGES:=	${BUILDLINK_PACKAGES:Nap-perl}
-BUILDLINK_PACKAGES+=	ap-perl
+BUILDLINK_PACKAGES+=	ap13-perl
 
 .if !empty(AP_PERL_BUILDLINK3_MK:M+)
-BUILDLINK_API_DEPENDS.ap-perl+=	ap-perl>=1.29nb3
-BUILDLINK_ABI_DEPENDS.ap-perl?=	ap-perl>=1.29nb5
+BUILDLINK_API_DEPENDS.ap-perl+=	ap13-perl>=1.29nb3
+BUILDLINK_ABI_DEPENDS.ap-perl?=	ap13-perl>=1.29nb5
 BUILDLINK_PKGSRCDIR.ap-perl?=	../../www/ap-perl
 
 BUILDLINK_FILES.ap-perl+=	lib/httpd/mod_perl.*
Index: www/ap-php/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-php/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- www/ap-php/Makefile	14 Apr 2006 13:47:30 -0000	1.9
+++ www/ap-php/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.9 2006/04/14 13:47:30 cube Exp $
 #
 
-PKGNAME=		ap-php-${PHP_BASE_VERS}
+PKGNAME=		${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}-${PHP_BASE_VERS}
 PKGREVISION=		6
 COMMENT=		Apache (${PKG_APACHE}) module for ${PKG_PHP}
 
Index: www/ap-python/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-python/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- www/ap-python/Makefile	4 Mar 2006 21:30:56 -0000	1.17
+++ www/ap-python/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=		mod_python-2.7.10
-PKGNAME=		ap-python-2.7.10
+PKGNAME=		ap13-python-2.7.10
 PKGREVISION=		2
 CATEGORIES=		www
 MASTER_SITES=		${MASTER_SITE_APACHE:=httpd/modpython/}
Index: www/ap-rivet/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-rivet/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- www/ap-rivet/Makefile	5 Feb 2006 23:11:17 -0000	1.5
+++ www/ap-rivet/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.5 2006/02/05 23:11:17 joerg Exp $
 
 DISTNAME=	rivet_0.4.0-1
-PKGNAME=	ap-rivet-0.4.0.1
+PKGNAME=	ap13-rivet-0.4.0.1
 PKGREVISION=	3
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_APACHE:=tcl/rivet/}
Index: www/ap-rpaf/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-rpaf/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- www/ap-rpaf/Makefile	22 Mar 2006 22:50:33 -0000	1.3
+++ www/ap-rpaf/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=		mod_rpaf-0.5
-PKGNAME=		${DISTNAME:S/mod_/ap-/}
+PKGNAME=		${APACHE_PKG_PREFIX}-rpaf-0.5
 CATEGORIES=		www
 MASTER_SITES=		http://stderr.net/apache/rpaf/download/
 
Index: www/ap-ruby/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-ruby/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- www/ap-ruby/Makefile	5 Feb 2006 23:11:17 -0000	1.28
+++ www/ap-ruby/Makefile	29 May 2006 21:39:10 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=	mod_ruby-${VERSION}
-PKGNAME=	ap-${RUBY_PKGPREFIX}-${VERSION}
+PKGNAME=	ap13-${RUBY_PKGPREFIX}-${VERSION}
 PKGREVISION=	5
 CATEGORIES=	www ruby
 MASTER_SITES=	http://www.modruby.net/archive/
Index: www/ap-ssl/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-ssl/Makefile,v
retrieving revision 1.100
diff -u -r1.100 Makefile
--- www/ap-ssl/Makefile	6 Apr 2006 06:22:53 -0000	1.100
+++ www/ap-ssl/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.100 2006/04/06 06:22:53 reed Exp $
 
 DISTNAME=		mod_ssl-2.8.25-1.3.34
-PKGNAME=		ap-ssl-2.8.25
+PKGNAME=		ap13-ssl-2.8.25
 PKGREVISION=		2
 CATEGORIES=		www security
 MASTER_SITES=		http://www.modssl.org/source/ \
Index: www/ap-throttle/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-throttle/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- www/ap-throttle/Makefile	5 Feb 2006 23:11:18 -0000	1.12
+++ www/ap-throttle/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.12 2006/02/05 23:11:18 joerg Exp $
 
 DISTNAME=	mod_throttle312
-PKGNAME=	ap-throttle-3.1.2
+PKGNAME=	ap13-throttle-3.1.2
 PKGREVISION=	3
 CATEGORIES=	www
 MASTER_SITES=	http://www.snert.com/Software/mod_throttle/
Index: www/ap-xslt/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-xslt/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- www/ap-xslt/Makefile	5 Feb 2006 23:11:18 -0000	1.30
+++ www/ap-xslt/Makefile	29 May 2006 21:39:10 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.30 2006/02/05 23:11:18 joerg Exp $
 
 DISTNAME=	modxslt-1.1
-PKGNAME=	ap-xslt-1.1
+PKGNAME=	ap13-xslt-1.1
 PKGREVISION=	11
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=modxslt/}
Index: www/apc-gui/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/apc-gui/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- www/apc-gui/Makefile	4 Mar 2006 21:30:57 -0000	1.18
+++ www/apc-gui/Makefile	29 May 2006 21:39:10 -0000
@@ -10,10 +10,12 @@
 HOMEPAGE=	http://apc.neuropeans.com/
 COMMENT=	Web interface for managing APC (php-apc)
 
-PHP_VERSION_REQD=	4
+PHP_VERSIONS_ACCEPTED=	4
 
-DEPENDS+=	php-apc>=1.1.0.1:../../www/php4-apc
-DEPENDS+=	php-gd-4.[0-9]*:../../graphics/php-gd
+.include "../../lang/php/phpversion.mk"
+
+DEPENDS+=	${PHP_PKG_PREFIX}-apc>=1.1.0.1:../../www/php4-apc
+DEPENDS+=	${PHP_PKG_PREFIX}-gd-4.[0-9]*:../../graphics/php-gd
 
 NO_BUILD=	YES
 
Index: www/blur6ex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/blur6ex/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- www/blur6ex/Makefile	4 Mar 2006 21:30:57 -0000	1.9
+++ www/blur6ex/Makefile	29 May 2006 21:39:10 -0000
@@ -10,8 +10,8 @@
 HOMEPAGE=	http://www.blursoft.com/
 COMMENT=	Weblog and content framework
 
-DEPENDS+=	ap{,2}-php>=4.0.0:../../www/ap-php
-DEPENDS+=	php-mysql-[0-9]*:../../databases/php-mysql
+DEPENDS+=	${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.0.0:../../www/ap-php
+DEPENDS+=	${PHP_PKG_PREFIX}-mysql-[0-9]*:../../databases/php-mysql
 DEPENDS+=	mysql-server>=4.1:../../databases/mysql5-server
 
 NO_CONFIGURE=	yes
@@ -51,4 +51,6 @@
 		'-s|./engine/core/db.php$$||' .			\
 		${PREFIX}/${HTTPD_ROOT}/blog
 
+.include "../../mk/apachever.mk"
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/drupal/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/drupal/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- www/drupal/Makefile	28 May 2006 14:46:47 -0000	1.11
+++ www/drupal/Makefile	29 May 2006 21:39:10 -0000
@@ -8,10 +8,8 @@
 HOMEPAGE=	http://drupal.org/
 COMMENT=	Open source content management system
 
-.include "../../lang/php/phpversion.mk"
-
-DEPENDS+=	ap-php>=4.3.3:../../www/ap-php
-DEPENDS+=	php-gd>=4.3.3:../../graphics/php-gd
+DEPENDS+=	${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.3.3:../../www/ap-php
+DEPENDS+=	${PHP_PKG_PREFIX}-gd>=4.3.3:../../graphics/php-gd
 
 NO_BUILD=	YES
 DRUPAL=		${PREFIX}/share/drupal
@@ -30,6 +28,9 @@
 SUBST_SED.conf=		-e "s|@DRUPAL@|${DRUPAL}|g"
 SUBST_MESSAGE.conf=     Fixing configuration files.
 
+.include "../../mk/apachever.mk"
+.include "../../lang/php/phpversion.mk"
+
 .include "options.mk"
 
 post-extract:
Index: www/drupal/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/www/drupal/options.mk,v
retrieving revision 1.2
diff -u -r1.2 options.mk
--- www/drupal/options.mk	28 May 2006 14:46:47 -0000	1.2
+++ www/drupal/options.mk	29 May 2006 21:39:10 -0000
@@ -15,13 +15,13 @@
 ###
 .if !empty(PKG_OPTIONS:Mpgsql)
 .	include "../../mk/pgsql.buildlink3.mk"
-DEPENDS+=	php-pgsql-[0-9]*:../../databases/php-pgsql
+DEPENDS+=	${PHP_PKG_PREFIX}-pgsql-[0-9]*:../../databases/php-pgsql
 .elif !empty(PKG_OPTIONS:Mmysql)
 ###
 ### Use MySQL for storing Drupal data
 ###
 .	include "../../mk/mysql.buildlink3.mk"
-DEPENDS+=	php-mysql>=4.3.3:../../databases/php-mysql
+DEPENDS+=	${PHP_PKG_PREFIX}-mysql>=4.3.3:../../databases/php-mysql
 .endif
 
 ###
Index: www/ganglia-webfrontend/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ganglia-webfrontend/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- www/ganglia-webfrontend/Makefile	5 Feb 2006 23:11:23 -0000	1.5
+++ www/ganglia-webfrontend/Makefile	29 May 2006 21:39:10 -0000
@@ -12,7 +12,7 @@
 HOMEPAGE=	http://ganglia.sourceforge.net/
 COMMENT=	PHP based frontend for the Ganglia Cluster Monitor
 
-DEPENDS+=	ap-php>=4.1:../../www/ap-php
+DEPENDS+=	${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.1:../../www/ap-php
 DEPENDS+=	ganglia-monitor-core>=3.0.1:../../parallel/ganglia-monitor-core
 
 NO_BUILD=	YES
@@ -31,4 +31,6 @@
 	${INSTALL_DATA_DIR} ${DOCROOT}
 	cd ${WRKSRC} && ${PAX} -rw . ${DOCROOT}/
 
+.include "../../mk/apachever.mk"
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/horde/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/horde/Makefile,v
retrieving revision 1.43
diff -u -r1.43 Makefile
--- www/horde/Makefile	28 May 2006 15:48:32 -0000	1.43
+++ www/horde/Makefile	29 May 2006 21:39:10 -0000
@@ -9,9 +9,11 @@
 HOMEPAGE=	http://www.horde.org/
 COMMENT=	PHP application framework
 
-DEPENDS+=	php-gettext>=4.3.3:../../devel/php-gettext
-DEPENDS+=	pear-Log-[0-9]*:../../sysutils/pear-Log
-DEPENDS+=	pear-DB-[0-9]*:../../databases/pear-DB
+.include "../../lang/php/phpversion.mk"
+
+DEPENDS+=	${PHP_PKG_PREFIX}-gettext>=4.3.3:../../devel/php-gettext
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Log-[0-9]*:../../sysutils/pear-Log
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-DB-[0-9]*:../../databases/pear-DB
 
 CONFLICTS+=	horde-3.*
 
Index: www/horde3/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/horde3/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- www/horde3/Makefile	29 Apr 2006 09:23:19 -0000	1.24
+++ www/horde3/Makefile	29 May 2006 21:39:11 -0000
@@ -13,20 +13,20 @@
 
 .include "../../lang/php/phpversion.mk"
 
-DEPENDS+=	php-gettext>=4.3.3:../../devel/php-gettext
-DEPENDS+=	php-mcrypt>=4.3.3:../../security/php-mcrypt
-DEPENDS+=	php-iconv>=4.3.3:../../converters/php-iconv
-DEPENDS+=	php-gd>=4.3.3:../../graphics/php-gd
-DEPENDS+=	pear-Log-[0-9]*:../../sysutils/pear-Log
-DEPENDS+=	pear-Mail_Mime-[0-9]*:../../mail/pear-Mail_Mime
-DEPENDS+=	pear-DB-[0-9]*:../../databases/pear-DB
-DEPENDS+=	ap-php>=4.3.3:../../www/ap-php
+DEPENDS+=	${PHP_PKG_PREFIX}-gettext>=4.3.3:../../devel/php-gettext
+DEPENDS+=	${PHP_PKG_PREFIX}-mcrypt>=4.3.3:../../security/php-mcrypt
+DEPENDS+=	${PHP_PKG_PREFIX}-iconv>=4.3.3:../../converters/php-iconv
+DEPENDS+=	${PHP_PKG_PREFIX}-gd>=4.3.3:../../graphics/php-gd
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Log-[0-9]*:../../sysutils/pear-Log
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Mail_Mime-[0-9]*:../../mail/pear-Mail_Mime
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-DB-[0-9]*:../../databases/pear-DB
+DEPENDS+=	${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.3.3:../../www/ap-php
 .if ${PKG_PHP_VERSION} == "4"
-DEPENDS+=	php-domxml>=4.3.3:../../textproc/php4-domxml
+DEPENDS+=	${PHP_PKG_PREFIX}-domxml>=4.3.3:../../textproc/php4-domxml
 .elif ${PKG_PHP_VERSION} == "5"
-DEPENDS+=	php-dom-[0-9]*:../../textproc/php5-dom
+DEPENDS+=	${PHP_PKG_PREFIX}-dom-[0-9]*:../../textproc/php5-dom
 .endif
-DEPENDS+=	php-zlib>=4.3.3:../../archivers/php-zlib
+DEPENDS+=	${PHP_PKG_PREFIX}-zlib>=4.3.3:../../archivers/php-zlib
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -127,4 +127,5 @@
 	@${CHOWN} ${APACHE_USER}:${SHAREGRP} ${HORDEDIR}/config
 	@${CHMOD} 0750 ${HORDEDIR}/config
 
+.include "../../mk/apachever.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/horde3/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/www/horde3/options.mk,v
retrieving revision 1.4
diff -u -r1.4 options.mk
--- www/horde3/options.mk	29 Aug 2005 13:36:06 -0000	1.4
+++ www/horde3/options.mk	29 May 2006 21:39:11 -0000
@@ -11,7 +11,7 @@
 ###
 .if !empty(PKG_OPTIONS:Mldap)
 .	include "../../databases/openldap/buildlink3.mk"
-DEPENDS+=	php-ldap>=4.3.3:../../databases/php-ldap
+DEPENDS+=	${PHP_PKG_PREFIX}-ldap>=4.3.3:../../databases/php-ldap
 .endif
 
 ###
@@ -19,7 +19,7 @@
 ###
 .if !empty(PKG_OPTIONS:Mpgsql)
 .	include "../../mk/pgsql.buildlink3.mk"
-DEPENDS+=	php-pgsql>=4.3.3:../../databases/php-pgsql
+DEPENDS+=	${PHP_PKG_PREFIX}-pgsql>=4.3.3:../../databases/php-pgsql
 .endif
 
 ###
@@ -27,5 +27,5 @@
 ###
 .if !empty(PKG_OPTIONS:Mmysql)
 .	include "../../mk/mysql.buildlink3.mk"
-DEPENDS+=	php-mysql>=4.3.3:../../databases/php-mysql
+DEPENDS+=	${PHP_PKG_PREFIX}-mysql>=4.3.3:../../databases/php-mysql
 .endif
Index: www/p5-Apache-AuthCookie/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/p5-Apache-AuthCookie/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- www/p5-Apache-AuthCookie/Makefile	4 Mar 2006 21:30:59 -0000	1.13
+++ www/p5-Apache-AuthCookie/Makefile	29 May 2006 21:39:11 -0000
@@ -11,7 +11,7 @@
 HOMEPAGE=	http://search.cpan.org/dist/Apache-AuthCookie/
 COMMENT=	Perl5 module for Authentication and Authorization via cookies
 
-DEPENDS+=	ap-perl>=1.29:../../www/ap-perl
+DEPENDS+=	ap13-perl>=1.29:../../www/ap-perl
 DEPENDS+=	p5-Apache-Test-[0-9]*:../../www/p5-Apache-Test
 
 PERL5_PACKLIST=		auto/Apache/AuthCookie/.packlist
Index: www/pear-HTML_Select/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/pear-HTML_Select/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- www/pear-HTML_Select/Makefile	5 Feb 2006 23:11:27 -0000	1.8
+++ www/pear-HTML_Select/Makefile	29 May 2006 21:39:12 -0000
@@ -7,7 +7,7 @@
 MAINTAINER=	jdolecek@NetBSD.org
 COMMENT=	PHP class for generating HTML form select elements
 
-DEPENDS+=	pear-HTML_Common>=1.1:../../www/pear-HTML_Common
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-HTML_Common>=1.1:../../www/pear-HTML_Common
 
 .include "../../lang/php/pear.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/pear-HTTP_Request/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/pear-HTTP_Request/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- www/pear-HTTP_Request/Makefile	5 Feb 2006 23:11:27 -0000	1.5
+++ www/pear-HTTP_Request/Makefile	29 May 2006 21:39:12 -0000
@@ -7,8 +7,8 @@
 MAINTAINER=	jdolecek@NetBSD.org
 COMMENT=	PHP classes to provides an easy way to perform HTTP requests
 
-DEPENDS+=	pear-Net_URL>=1.0.12:../../net/pear-Net_URL
-DEPENDS+=	pear-Net_Socket>=1.0.2:../../net/pear-Net_Socket
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Net_URL>=1.0.12:../../net/pear-Net_URL
+DEPENDS+=	${PHP_PKG_PREFIX}-pear-Net_Socket>=1.0.2:../../net/pear-Net_Socket
 
 .include "../../lang/php/pear.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/php-FastTemplate/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/php-FastTemplate/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- www/php-FastTemplate/Makefile	4 Mar 2006 21:31:03 -0000	1.9
+++ www/php-FastTemplate/Makefile	29 May 2006 21:39:12 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.9 2006/03/04 21:31:03 jlam Exp $
 
 DISTNAME=	FastTemplate-1_1_0
-PKGNAME=	php-FastTemplate-1.1.0
+PKGNAME=	${PHP_PKG_PREFIX}-FastTemplate-1.1.0
 PKGREVISION=	1
 CATEGORIES=	www php4
 MASTER_SITES=	http://www.thewebmasters.net/php/
@@ -14,6 +14,7 @@
 COMMENT=	PHP extension for managing templates and variable interpolation
 
 DEPENDS+=	php>=3.0.18:../../www/php4
+PHP_VERSIONS_ACCEPTED=	4
 
 WRKSRC=		${WRKDIR}/FastTemplate
 DIST_SUBDIR=	${PKGBASE}
@@ -40,4 +41,5 @@
 	done
 	${INSTALL_DATA} ${WRKSRC}/templates/*.tpl ${EGDIR}/templates
 
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/php4-apc/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/php4-apc/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- www/php4-apc/Makefile	4 Mar 2006 21:31:03 -0000	1.23
+++ www/php4-apc/Makefile	29 May 2006 21:39:12 -0000
@@ -20,7 +20,7 @@
 	${INSTALL_DATA_DIR} ${DOCDIR}
 	${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCDIR}
 
-PHP_VERSION_REQD=	4		# PHP 4.x only
+PHP_VERSIONS_ACCEPTED=	4
 
 .include "../../lang/php/ext.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/websvn/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/websvn/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- www/websvn/Makefile	4 Mar 2006 21:31:04 -0000	1.13
+++ www/websvn/Makefile	29 May 2006 21:39:12 -0000
@@ -11,8 +11,8 @@
 HOMEPAGE=	http://websvn.tigris.org/
 COMMENT=	Subversion repository web frontend
 
-DEPENDS+=	ap{,2}-php>=4.0.0:../../www/ap-php
-DEPENDS+=	php-zlib-[0-9]*:../../archivers/php-zlib
+DEPENDS+=	${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.0.0:../../www/ap-php
+DEPENDS+=	${PHP_PKG_PREFIX}-zlib-[0-9]*:../../archivers/php-zlib
 
 WRKSRC=		${WRKDIR}/WebSVN
 NO_BUILD=	yes
@@ -40,4 +40,6 @@
 post-install:
 	${RM} ${PREFIX}/${HTTPD_ROOT}/websvn/include/distconfig.inc
 
+.include "../../mk/apachever.mk"
+.include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"

--M9NhX3UHpAaciwkO--