From nobody@FreeBSD.org  Sun Dec 10 11:29:58 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C2C2E16A412
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Dec 2006 11:29:58 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id EADA843CC3
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Dec 2006 11:28:43 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id kBABTrxU034019
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Dec 2006 11:29:53 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id kBABTrjY034018;
	Sun, 10 Dec 2006 11:29:53 GMT
	(envelope-from nobody)
Message-Id: <200612101129.kBABTrjY034018@www.freebsd.org>
Date: Sun, 10 Dec 2006 11:29:53 GMT
From: Alex Dupre<ale@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Make USE_PHP work after inclusion of bsd.port.pre.mk
X-Send-Pr-Version: www-3.0

>Number:         106557
>Category:       ports
>Synopsis:       [PATCH] Make USE_PHP work after inclusion of bsd.port.pre.mk
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 10 11:30:10 GMT 2006
>Closed-Date:    Tue Mar 06 07:32:11 GMT 2007
>Last-Modified:  Tue Mar 06 07:32:11 GMT 2007
>Originator:     Alex Dupre
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
FreeBSD athlon.alexdupre.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Fri Dec 8 11:27:33 CET 2006 alex@athlon.alexdupre.com:/usr/obj/usr/src/sys/ATHLON i386
>Description:
Currently USE_PHP must be defined before inclusion of bsd.port.pre.mk.
Since sometimes it's useful to add php or php extensions after it
(for example according to OPTIONS selection) many ports do ugly tricks
to overcome this limitation. The patch tries to fix the issue in a clean
and definitive way.
Since I touched bsd.port.mk, bsd.php.mk and a few ports, I think the
patch should be run on tinderbox before committing it.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: ports/Mk/bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.544
diff -u -r1.544 bsd.port.mk
--- ports/Mk/bsd.port.mk	30 Sep 2006 19:25:45 -0000	1.544
+++ ports/Mk/bsd.port.mk	10 Dec 2006 10:42:57 -0000
@@ -2007,6 +2007,10 @@
 .include "${PORTSDIR}/Mk/bsd.sdl.mk"
 .endif
 
+.if defined(USE_PHP)
+.include "${PORTSDIR}/Mk/bsd.php.mk"
+.endif
+
 .if defined(USE_PYTHON)
 .include "${PORTSDIR}/Mk/bsd.python.mk"
 .endif
Index: ports/Mk/bsd.php.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.php.mk,v
retrieving revision 1.35
diff -u -r1.35 bsd.php.mk
--- ports/Mk/bsd.php.mk	22 Nov 2006 06:59:37 -0000	1.35
+++ ports/Mk/bsd.php.mk	10 Dec 2006 10:42:57 -0000
@@ -31,8 +31,12 @@
 # Don't specify any WANT_PHP_* knob if your port will work with every PHP SAPI.
 #
 
+.if !defined(_PHPMKINCLUDED)
+
 PHP_Include_MAINTAINER=	ale@FreeBSD.org
 
+_PHPMKINCLUDED=	yes
+
 .if exists(${LOCALBASE}/etc/php.conf)
 .include "${LOCALBASE}/etc/php.conf"
 PHP_EXT_DIR!=	${LOCALBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${LOCALBASE}/lib/php/\(.*\),\1,p'
@@ -224,8 +228,10 @@
 	@${ECHO_CMD} "****************************************************************************"
 .endif
 
+.endif
+
 # Extensions
-.if ${USE_PHP:L} != "yes"
+.if defined(_POSTMKINCLUDED) && ${USE_PHP:L} != "yes"
 # non-version specific components
 _USE_PHP_ALL=	bcmath bz2 calendar ctype curl dba dbase \
 		exif fileinfo fribidi ftp gd gettext gmp \
Index: ports/mail/postfixadmin/Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/postfixadmin/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- ports/mail/postfixadmin/Makefile	8 Jul 2006 21:17:28 -0000	1.23
+++ ports/mail/postfixadmin/Makefile	10 Dec 2006 10:42:57 -0000
@@ -50,8 +50,6 @@
 RUN_DEPENDS+=	postfix>=2[0-9]*:${PORTSDIR}/mail/postfix
 .endif
 
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 post-patch:
 		${FIND} ${WRKSRC} -name '*.orig' -delete
 
Index: ports/mail/roundcube/Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/roundcube/Makefile,v
retrieving revision 1.26
diff -u -r1.26 Makefile
--- ports/mail/roundcube/Makefile	9 Dec 2006 09:06:17 -0000	1.26
+++ ports/mail/roundcube/Makefile	10 Dec 2006 10:42:57 -0000
@@ -49,18 +49,10 @@
 MAIL=		mail
 .endif
 PLIST_SUB+=	MAIL=${MAIL}
-LOCALBASE?=	/usr/local
-
-.if exists(${LOCALBASE}/etc/php.conf)
-.include "${LOCALBASE}/etc/php.conf"
-.endif
 
 OPTIONS=	MYSQL "Use MySQL backend" on \
-		PGSQL "Use PostgreSQL backend" off
-
-.if defined(PHP_VER) && ${PHP_VER} == 5
-OPTIONS+=	SQLITE "Use SQLite backend" off
-.endif
+		PGSQL "Use PostgreSQL backend" off \
+		SQLITE "Use SQLite backend (php5 only)" off
 
 .include <bsd.port.pre.mk>
 
@@ -80,11 +72,6 @@
 USE_PHP+=	sqlite
 .endif
 
-# Avoid INDEX breakage when WITHOUT_MYSQL is defined.
-USE_PHP?=	yes
-
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 .if defined(WITH_REPLACE_MAIL_URL)
 post-patch:
 	@${REINPLACE_CMD} "s/'mail'/'${MAIL}'/g" ${WRKSRC}/index.php \
Index: ports/misc/tinderbox/Makefile
===================================================================
RCS file: /home/pcvs/ports/misc/tinderbox/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- ports/misc/tinderbox/Makefile	1 Dec 2006 13:57:47 -0000	1.24
+++ ports/misc/tinderbox/Makefile	10 Dec 2006 10:42:57 -0000
@@ -86,10 +86,6 @@
 RUN_DEPENDS+=	lighttpd:${PORTSDIR}/www/lighttpd
 .endif
 
-.if defined(WITH_WEB) || !defined(WITHOUT_WEB_EXP)
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-.endif
-
 pre-everything::
 .if (!defined(WITHOUT_APACHE) || defined(WITH_LIGHTTPD)) && !(defined(WITH_WEB) || !defined(WITHOUT_WEB_EXP))
 	@${ECHO_CMD} "It doesn't make sense to depend on Apache or LightHTTPD if not using either web interface."
Index: ports/print/cups-base/Makefile
===================================================================
RCS file: /home/pcvs/ports/print/cups-base/Makefile,v
retrieving revision 1.58
diff -u -r1.58 Makefile
--- ports/print/cups-base/Makefile	6 Dec 2006 12:26:22 -0000	1.58
+++ ports/print/cups-base/Makefile	10 Dec 2006 10:42:57 -0000
@@ -70,8 +70,8 @@
 .if defined(WITH_PHP)
 CONFIGURE_ARGS+=	--with-php
 USE_PHP=		yes
+USE_PHP_BUILD=		yes
 PLIST_SUB+=		PHP=""
-.include "${PORTSDIR}/Mk/bsd.php.mk"
 .else
 CONFIGURE_ARGS+=	--without-php
 PLIST_SUB+=		PHP="@comment "
Index: ports/security/base/Makefile
===================================================================
RCS file: /home/pcvs/ports/security/base/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- ports/security/base/Makefile	21 Nov 2006 23:38:57 -0000	1.14
+++ ports/security/base/Makefile	10 Dec 2006 10:42:57 -0000
@@ -42,9 +42,6 @@
 RUN_DEPENDS+=	${LOCALBASE}/share/fpdf/fpdf.php:${PORTSDIR}/print/fpdf
 .endif
 
-# we need this because we USE_PHP after bsd.port.pre.mk is included
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-build:
 	@${REINPLACE_CMD} -e 's,DBlib_path = "",DBlib_path = "${ADODB_DIR}",' \
 		${WRKSRC}/base_conf.php.dist
Index: ports/sysutils/pear-Log/Makefile
===================================================================
RCS file: /home/pcvs/ports/sysutils/pear-Log/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- ports/sysutils/pear-Log/Makefile	31 Oct 2006 08:21:36 -0000	1.33
+++ ports/sysutils/pear-Log/Makefile	10 Dec 2006 10:42:57 -0000
@@ -35,15 +35,8 @@
 
 LATEST_LINK=	pear-Log
 OPTIONS=	PEAR_DB "PEAR::DB support" off \
-		PEAR_MDB2 "PEAR::MDB2 support" off
-
-.if exists(${LOCALBASE}/etc/php.conf)
-.include "${LOCALBASE}/etc/php.conf"
-.endif
-
-.if defined(PHP_VER) && ${PHP_VER} == 5
-OPTIONS+=	PHP_SQLITE "PHP sqlite support" off
-.endif
+		PEAR_MDB2 "PEAR::MDB2 support" off \
+		PHP_SQLITE "PHP sqlite support (php5 only)" off
 
 .include <bsd.port.pre.mk>
 
@@ -56,7 +49,7 @@
 .endif
 
 .if defined(WITH_PHP_SQLITE)
-BUILD_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/databases/php5-sqlite
+USE_PHP+=	sqlite
 .endif
 
 .include "${PORTSDIR}/devel/pear/bsd.pear.mk"
Index: ports/www/bacula-web/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/bacula-web/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- ports/www/bacula-web/Makefile	8 Aug 2006 14:44:24 -0000	1.1
+++ ports/www/bacula-web/Makefile	10 Dec 2006 10:42:57 -0000
@@ -18,6 +18,7 @@
 RUN_DEPENDS=	${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
 
 NO_BUILD=	yes
+USE_PHP=	yes
 WANT_PHP_WEB=	yes
 
 OPTIONS=	POSTGRESQL "Use PostgreSQL database instead of MySQL" on
@@ -30,16 +31,14 @@
 USE_PGSQL=		yes
 CONFIGURE_ARGS+=	--with-postgresql=yes
 SUB_LIST+=		REQ_PGSQL=postgresql
-USE_PHP=		pgsql
+USE_PHP+=		pgsql
 .else
 CONFIGURE_ARGS+=	--with-mysql=yes
 USE_MYSQL=		yes
 SUB_LIST+=		REQ_MYSQL=mysql
-USE_PHP=		mysql
+USE_PHP+=		mysql
 .endif
 
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-install:
 	@${ECHO} "Installing in ${PREFIX}/www/bacula-web"
 	${MKDIR} ${PREFIX}/www/bacula-web
Index: ports/www/drupal/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/drupal/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- ports/www/drupal/Makefile	19 Oct 2006 14:00:37 -0000	1.30
+++ ports/www/drupal/Makefile	10 Dec 2006 10:42:57 -0000
@@ -35,9 +35,7 @@
 .include <bsd.port.pre.mk>
 
 .if defined(WITH_MYSQL)
-# XXX: should be "USE_PHP+=mysql", but the depends are added too early
-# by bsd.php.mk
-RUN_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/mysql.so:${PORTSDIR}/${mysql_DEPENDS}
+USE_PHP+=	mysql
 .endif
 .if defined(WITH_PGSQL)
 RUN_DEPENDS+=	${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
Index: ports/www/horde/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/horde/Makefile,v
retrieving revision 1.44
diff -u -r1.44 Makefile
--- ports/www/horde/Makefile	17 Aug 2006 23:49:05 -0000	1.44
+++ ports/www/horde/Makefile	10 Dec 2006 10:42:57 -0000
@@ -244,8 +244,6 @@
 . endif
 .endif
 
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 .if ${APACHE_VERSION} >= 20
 APACHE_CNFDIR=	${LOCALBASE}/etc/apache${APACHE_VERSION:S/20/2/}
 HORDE_INC=	${APACHE_CNFDIR}/Includes
Index: ports/www/mediawiki/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/mediawiki/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- ports/www/mediawiki/Makefile	6 Dec 2006 14:20:12 -0000	1.33
+++ ports/www/mediawiki/Makefile	10 Dec 2006 10:42:57 -0000
@@ -32,9 +32,6 @@
 USE_PHP+=	ldap
 .endif
 
-# Fix USE_PHP after bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-install:
 	@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
 	${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}
Index: ports/www/mediawiki13/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/mediawiki13/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- ports/www/mediawiki13/Makefile	1 Jul 2006 17:16:57 -0000	1.19
+++ ports/www/mediawiki13/Makefile	10 Dec 2006 10:42:57 -0000
@@ -41,9 +41,6 @@
 USE_PHP+=	ldap
 .endif
 
-# Fix USE_PHP after bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-install:
 	-${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
 	@${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}
Index: ports/www/mediawiki15/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/mediawiki15/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- ports/www/mediawiki15/Makefile	3 Dec 2006 22:28:05 -0000	1.30
+++ ports/www/mediawiki15/Makefile	10 Dec 2006 10:42:57 -0000
@@ -41,9 +41,6 @@
 USE_PHP+=	ldap
 .endif
 
-# Fix USE_PHP after bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-install:
 	-${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
 	@${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}
Index: ports/www/mediawiki16/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/mediawiki16/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- ports/www/mediawiki16/Makefile	15 Aug 2006 23:34:43 -0000	1.33
+++ ports/www/mediawiki16/Makefile	10 Dec 2006 10:42:57 -0000
@@ -40,9 +40,6 @@
 USE_PHP+=	ldap
 .endif
 
-# Fix USE_PHP after bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-install:
 	@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
 	${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}
Index: ports/www/mediawiki17/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/mediawiki17/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- ports/www/mediawiki17/Makefile	6 Dec 2006 14:11:14 -0000	1.33
+++ ports/www/mediawiki17/Makefile	10 Dec 2006 10:42:57 -0000
@@ -32,9 +32,6 @@
 USE_PHP+=	ldap
 .endif
 
-# Fix USE_PHP after bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-install:
 	@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
 	${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}
Index: ports/www/ojs2/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/ojs2/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- ports/www/ojs2/Makefile	15 Aug 2006 16:55:24 -0000	1.3
+++ ports/www/ojs2/Makefile	10 Dec 2006 10:42:57 -0000
@@ -39,8 +39,6 @@
 USE_PHP+=	pgsql
 .endif
 
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-install:
 	@${INSTALL_DATA} -d ${PREFIX}/${OJSDIR}
 	@${CP} -Rn ${WRKSRC}/* ${PREFIX}/${OJSDIR}
Index: ports/www/phpwiki13/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/phpwiki13/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- ports/www/phpwiki13/Makefile	8 Nov 2006 09:28:31 -0000	1.21
+++ ports/www/phpwiki13/Makefile	10 Dec 2006 10:42:57 -0000
@@ -32,23 +32,10 @@
 
 OPTIONS=	MYSQL "Use MySQL backend" on \
 		PGSQL "Use PostgreSQL backend" off \
-		DB4   "Use Berkeley DB4 backend" off
+		DB4   "Use Berkeley DB4 backend" off \
+		SQLITE "Use SQLite backend (php5 only)" off
 
-.if exists(${LOCALBASE}/etc/php.conf)
-.include "${LOCALBASE}/etc/php.conf"
-.endif
-
-.if defined(PHP_VER) && ${PHP_VER} == 5
-OPTIONS+=	SQLITE "Use SQLite backend" off
-.endif
-
-PORT_DBDIR?=	/var/db/ports
-LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
-OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options
-
-.if exists(${OPTIONSFILE})
-.include "${OPTIONSFILE}"
-.endif
+.include <bsd.port.pre.mk>
 
 .if defined(WITH_DB4)
 USE_PHP+=	dba
@@ -84,4 +71,4 @@
 post-install:
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: ports/www/serendipity/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/serendipity/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- ports/www/serendipity/Makefile	5 Dec 2006 22:01:49 -0000	1.12
+++ ports/www/serendipity/Makefile	10 Dec 2006 10:42:57 -0000
@@ -24,28 +24,12 @@
 SUB_LIST+=	SERENDIPITY=${SERENDIPITY}
 SUB_FILES=	pkg-message
 
-LOCALBASE?=	/usr/local
-
 OPTIONS=	MYSQL "Use MySQL backend" on \
-		PGSQL "Use PostgreSQL backend" off
-
-.if exists(${LOCALBASE}/etc/php.conf)
-.include "${LOCALBASE}/etc/php.conf"
-.endif
-
-.if defined(PHP_VER) && ${PHP_VER} == 5
-OPTIONS+=	SQLITE "Use SQLite backend" off
-.endif
-
-OPTIONS+=	MAGICK "Use ImageMagick Library" on
+		PGSQL "Use PostgreSQL backend" off \
+		SQLITE "Use SQLite backend (php5 only)" off \
+		MAGICK "Use ImageMagick Library" on
 
-PORT_DBDIR?=	/var/db/ports
-LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
-OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options
-
-.if exists(${OPTIONSFILE})
-.include "${OPTIONSFILE}"
-.endif
+.include <bsd.port.pre.mk>
 
 .if !defined(WITHOUT_MYSQL)
 USE_PHP+=	mysql
@@ -72,4 +56,4 @@
 post-install:
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: ports/www/serendipity-devel/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/serendipity-devel/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- ports/www/serendipity-devel/Makefile	5 Dec 2006 22:02:40 -0000	1.20
+++ ports/www/serendipity-devel/Makefile	10 Dec 2006 10:42:57 -0000
@@ -26,30 +26,13 @@
 SUB_FILES=	pkg-message
 
 CONFLICTS=	serendipity-1.*
-LATEST_LINK=	serendipity-devel
-
-LOCALBASE?=	/usr/local
 
 OPTIONS=	MYSQL "Use MySQL backend" on \
-		PGSQL "Use PostgreSQL backend" off
-
-.if exists(${LOCALBASE}/etc/php.conf)
-.include "${LOCALBASE}/etc/php.conf"
-.endif
-
-.if defined(PHP_VER) && ${PHP_VER} == 5
-OPTIONS+=	SQLITE "Use SQLite backend" off
-.endif
-
-OPTIONS+=	MAGICK "Use ImageMagick Library" on
+		PGSQL "Use PostgreSQL backend" off \
+		SQLITE "Use SQLite backend (php5 only)" off \
+		MAGICK "Use ImageMagick Library" on
 
-PORT_DBDIR?=	/var/db/ports
-LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
-OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options
-
-.if exists(${OPTIONSFILE})
-.include "${OPTIONSFILE}"
-.endif
+.include <bsd.port.pre.mk>
 
 .if !defined(WITHOUT_MYSQL)
 USE_PHP+=	mysql
@@ -76,4 +59,4 @@
 post-install:
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: ports/www/typo3/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/typo3/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- ports/www/typo3/Makefile	18 Sep 2006 13:13:17 -0000	1.11
+++ ports/www/typo3/Makefile	10 Dec 2006 10:42:57 -0000
@@ -41,9 +41,6 @@
 USE_PHP+=	zlib
 .endif
 
-# Include bsd.php.mk because use USE_PHP after bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 .if defined(WITH_IMAGICK)
 LIB_DEPENDS+=	Magick.10:${PORTSDIR}/graphics/ImageMagick
 .endif
Index: ports/www/webcalendar/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/webcalendar/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- ports/www/webcalendar/Makefile	7 Nov 2006 17:37:01 -0000	1.9
+++ ports/www/webcalendar/Makefile	10 Dec 2006 10:42:57 -0000
@@ -87,9 +87,6 @@
 USE_PHP+=	ldap
 .endif
 
-# Fix USE_PHP after bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 pre-install:
 	cd ${WRKSRC} && ${FIND} -s * -type f | \
 		${SED} -e 's|^|${WCDIR}/|' > ${PLIST} \
Index: ports/www/zend-framework/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/zend-framework/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- ports/www/zend-framework/Makefile	7 Nov 2006 16:58:09 -0000	1.1
+++ ports/www/zend-framework/Makefile	10 Dec 2006 10:42:58 -0000
@@ -17,6 +17,7 @@
 NO_BUILD=	yes
 USE_PHP=	pcre
 WANT_PHP_WEB=	yes
+IGNORE_WITH_PHP=4
 
 SUB_FILES=	pkg-message
 SUB_LIST=	DATADIR=${DATADIR} LOCALBASE=${LOCALBASE}
@@ -32,9 +33,6 @@
 
 .include <bsd.port.pre.mk>
 
-DEFAULT_PHP_VER=5
-IGNORE_WITH_PHP=4
-
 DB_DEFINED=	no
 
 .if defined(WITH_MYSQL)
@@ -68,13 +66,10 @@
 .endif
 
 .if ${DB_DEFINED} == "yes"
-RUN_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/pdo.so:${PORTSDIR}/databases/pecl-PDO \
-		${DB_DEPENDS}
+USE_PHP+=	pdo
+RUN_DEPENDS+=	${DB_DEPENDS}
 .endif
 
-# Fix USE_PHP after bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-
 do-install:
 	@${MKDIR} ${DATADIR}
 	${CP} -R ${WRKSRC}/* ${DATADIR}

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: ale 
Responsible-Changed-When: Sun Dec 10 11:31:46 UTC 2006 
Responsible-Changed-Why:  
Assign to portmgr for testing / approving the patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106557 
State-Changed-From-To: open->analyzed 
State-Changed-By: linimon 
State-Changed-When: Sun Feb 25 06:55:41 UTC 2007 
State-Changed-Why:  
Accepted for a test build on the cluster. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106557 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/106557: commit references a PR
Date: Tue,  6 Mar 2007 06:21:53 +0000 (UTC)

 linimon     2007-03-06 06:21:46 UTC
 
   FreeBSD ports repository
 
   Modified files:
     Mk                   bsd.java.mk bsd.port.mk bsd.php.mk 
     .                    CHANGES UPDATING 
   Log:
   * Refine some comments about Linux emulation [1]
   
   * Fix 'make search' with non-default ${PORTSDIR} [2]
   
   * Fix typo in USE_LDCONFIG32 message [3]
   
   * Allow USE_PHP after inclusion of bsd.port.pre.mk [4]
   
   * Document NO_LDCONFIG_MTREE [5]
   
   * Update/enhance description of INSTALLS_SHLIB and USE_LDCONFIG [6]
   
   * Remove obsolete code in bsd.port.mk dealing with 4.X and other,
     even older, releases [7]
   
   * Remove references to obsolete ports from bsd.java.mk [8]
   
   PR:     105883 [1], 105917 [2], 106195 [3], 106557 [4], 108738 [5],
           108739 [6], 108782 [7], 103357 [8]
   
   Submitted by:   bsam [1], shaun [2], edwin [3], ale [4], gerald [5] [6],
                   linimon [7], kris [7], gabor [4]
   
   Revision  Changes    Path
   1.66      +12 -1     ports/CHANGES
   1.76      +4 -11     ports/Mk/bsd.java.mk
   1.40      +8 -2      ports/Mk/bsd.php.mk
   1.555     +8 -116    ports/Mk/bsd.port.mk
   1.475     +8 -1      ports/UPDATING
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/106557: commit references a PR
Date: Tue,  6 Mar 2007 06:28:06 +0000 (UTC)

 linimon     2007-03-06 06:28:02 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/roundcube       Makefile 
   Log:
   Use the new facility of bsd.port.mk to be able to simplify the interaction
   of USE_PHP and OPTIONS.
   
   PR:             ports/106557
   Submitted by:   ale
   Hat:            portmgr
   
   Revision  Changes    Path
   1.33      +3 -15     ports/mail/roundcube/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/106557: commit references a PR
Date: Tue,  6 Mar 2007 06:51:57 +0000 (UTC)

 linimon     2007-03-06 06:51:51 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/postfixadmin    Makefile 
     ports-mgmt/tinderbox Makefile 
     print/cups-base      Makefile 
     security/base        Makefile 
     sysutils/pear-Log    Makefile 
     www/bacula-web       Makefile 
     www/drupal           Makefile 
     www/mediawiki        Makefile 
     www/mediawiki16      Makefile 
     www/mediawiki17      Makefile 
     www/ojs2             Makefile 
     www/phpwiki13        Makefile 
     www/serendipity      Makefile 
     www/serendipity-devel Makefile 
     www/typo3            Makefile 
     www/webcalendar      Makefile 
     www/zend-framework   Makefile 
   Log:
   Use the new facility of bsd.port.mk to be able to simplify the interaction
   of USE_PHP and OPTIONS.
   
   PR:             ports/106557
   Submitted by:   ale
   Hat:            portmgr
   
   Revision  Changes    Path
   1.25      +0 -2      ports/mail/postfixadmin/Makefile
   1.31      +0 -4      ports/ports-mgmt/tinderbox/Makefile
   1.64      +1 -1      ports/print/cups-base/Makefile
   1.16      +0 -3      ports/security/base/Makefile
   1.36      +3 -10     ports/sysutils/pear-Log/Makefile
   1.2       +3 -4      ports/www/bacula-web/Makefile
   1.34      +1 -3      ports/www/drupal/Makefile
   1.36      +0 -3      ports/www/mediawiki/Makefile
   1.36      +0 -3      ports/www/mediawiki16/Makefile
   1.36      +0 -3      ports/www/mediawiki17/Makefile
   1.4       +0 -2      ports/www/ojs2/Makefile
   1.22      +4 -17     ports/www/phpwiki13/Makefile
   1.24      +5 -22     ports/www/serendipity-devel/Makefile
   1.16      +5 -21     ports/www/serendipity/Makefile
   1.13      +0 -3      ports/www/typo3/Makefile
   1.10      +0 -3      ports/www/webcalendar/Makefile
   1.5       +3 -8      ports/www/zend-framework/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/106557: commit references a PR
Date: Tue,  6 Mar 2007 06:54:22 +0000 (UTC)

 linimon     2007-03-06 06:54:19 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/horde-base       Makefile 
   Log:
   Use the new facility of bsd.port.mk to be able to simplify the interaction
   of USE_PHP and OPTIONS.
   
   PR:             ports/106557
   Submitted by:   ale
   Hat:            portmgr
   
   Revision  Changes    Path
   1.49      +0 -2      ports/www/horde-base/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Mar 6 07:32:03 UTC 2007 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106557 
>Unformatted:
