From root@helo.liwing.de  Mon Jun  9 10:28:15 2003
Return-Path: <root@helo.liwing.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id CE56C37B401; Mon,  9 Jun 2003 10:28:15 -0700 (PDT)
Received: from helo.liwing.de (helo.liwing.de [213.70.188.163])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id B1E7A43F75; Mon,  9 Jun 2003 10:28:14 -0700 (PDT)
	(envelope-from root@helo.liwing.de)
Received: from helo.liwing.de (localhost.liwing.de [127.0.0.1])
	by helo.liwing.de (8.12.7/8.12.7) with ESMTP id h59HSB3F057869;
	Mon, 9 Jun 2003 17:28:11 GMT
	(envelope-from root@helo.liwing.de)
Received: (from root@localhost)
	by helo.liwing.de (8.12.7/8.12.7/Submit) id h59HSAXe057868;
	Mon, 9 Jun 2003 17:28:10 GMT
Message-Id: <200306091728.h59HSAXe057868@helo.liwing.de>
Date: Mon, 9 Jun 2003 17:28:10 GMT
From: Jens Rehsack <rehsack@liwing.de>
Reply-To: Jens Rehsack <rehsack@liwing.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Jens Rehsack <rehsack@liwing.de>,
	Alex Dupre <sysadmin@alexdupre.com>,
	Norikatsu Shigemura <nork@freebsd.org>
Subject: [PATCH] lang/php4
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         53113
>Category:       ports
>Synopsis:       [PATCH] lang/php4
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    nork
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 09 10:30:01 PDT 2003
>Closed-Date:    Thu Jun 19 22:26:17 PDT 2003
>Last-Modified:  Thu Jun 19 22:26:17 PDT 2003
>Originator:     Jens Rehsack
>Release:        FreeBSD 5.1-BETA i386
>Organization:
LiWing IT-Services
>Environment:
System: FreeBSD webdev.muppets.liwing.de 5.1-BETA FreeBSD 5.1-BETA #0: Mon May 26 14:11:55 GMT 2003 root@webdev.muppets.liwing.de:/usr/obj/usr/src/sys/WEBDEV i386

>Description:
	1) Change lang/php4 port to use PHP4_OPTION_FILE instead of
	   OPTION_FILE to avoid conflicts with other port which may use
	   (later) same technology for default options.
	2) moving '--disable-all' at top of CONFIGURE_ARGS to avoid
	   disabling eg. '--enable-versioning'
	3) Make IPv6 optional
	4) Rename PHP_OPTIONS to PHP4_OPTIONS to avoid conflicts with PHP3
	   (still existent) and PHP5 (coming soon?)

	Not fixed: Use different options for -cli, -cgi and -sapi versions,
	don't know whether it's required or not.

>How-To-Repeat:

>Fix:

--- patch-Makefile.diff begins here ---
--- lang/php4/Makefile.orig	Sun Jun  8 07:55:36 2003
+++ lang/php4/Makefile	Mon Jun  9 13:27:14 2003
@@ -63,11 +63,11 @@
 USE_BISON=	yes
 USE_LIBTOOL=	yes

-CONFIGURE_ARGS=	--enable-versioning \
+CONFIGURE_ARGS=	--disable-all \
+		--enable-versioning \
 		--enable-memory-limit \
 		--with-layout=GNU \
-		--with-zlib-dir=/usr \
-		--disable-all
+		--with-zlib-dir=/usr

 EXT_DIR=	20020429
 SAPI_FILE=	"@comment "
@@ -104,8 +104,8 @@

 ALL_OPTIONS=	BCMATH BZIP2 CALENDAR CRACK CTYPE CURL DBASE DBX DOMXML \
 		DOMXSLT EXIF FILEPRO FTP GD GDBM GETTEXT GMP HYPERWAVE ICONV \
-		IMAP INTERBASE MBSTRING MCAL MCVE MCRYPT MHASH MIME MING MYSQL \
-		NCURSES OPENLDAP OPENSSL ORACLE PCNTL PCRE PDFLIB POSIX \
+		IMAP INTERBASE IPV6 MBSTRING MCAL MCVE MCRYPT MHASH MIME MING \
+		MYSQL NCURSES OPENLDAP OPENSSL ORACLE PCNTL PCRE PDFLIB POSIX \
 		POSTGRESQL PSPELL READLINE RECODE SESSION SHMOP SNMP SOCKETS \
 		SYBASEDB SYBASECT SYSVSEM SYSVSHM TOKENIZER UNIXODBC WDDX XML \
 		XMLRPC XSLT YAZ YP ZIP ZLIB
@@ -125,7 +125,11 @@
 .include <bsd.port.pre.mk>

 .if ${OSVERSION} < 400014
-CONFIGURE_ARGS+=--disable-ipv6
+WITHOUT_IPV6=	ON
+.else
+.ifndef WITHOUT_IPV6
+WITH_IPV6?=	ON
+.endif
 .endif

 .if !defined(WITHOUT_APACHE)
@@ -157,16 +161,16 @@
 		EXT_DIR=${EXT_DIR}

 WRKDIR?=	${WRKDIRPREFIX}${.CURDIR}/work
-OPTION_FILE?=	${HOME}/php_options
+PHP4_OPTION_FILE?=	${HOME}/php4_options

-PHP_OPTIONS?=	CTYPE MYSQL PCRE POSIX SESSION TOKENIZER XML ZLIB
+PHP4_OPTIONS?=	CTYPE MYSQL PCRE POSIX SESSION TOKENIZER XML ZLIB

 .for opt in ${ALL_OPTIONS}
 .if defined(WITH_${opt})
 SEL_OPTIONS+=	${opt}
 .endif
 .endfor
-.for opt in ${PHP_OPTIONS}
+.for opt in ${PHP4_OPTIONS}
 .if !defined(WITHOUT_${opt})
 SEL_OPTIONS+=	${opt}
 .endif
@@ -174,7 +178,7 @@
 .endfor

 SCRIPTS_ENV+=	SEL_OPTIONS="${SEL_OPTIONS}" \
-		OPTION_FILE="${OPTION_FILE}" \
+		PHP4_OPTION_FILE="${PHP4_OPTION_FILE}" \
 		WRKDIR="${WRKDIR}" \
 		CAT="${CAT}" \
 		SED="${SED}"
@@ -317,6 +321,12 @@
 .if defined(WITH_INTERBASE)
 LIB_DEPENDS+=	gds.1:${PORTSDIR}/databases/firebird
 CONFIGURE_ARGS+=--with-interbase=${LOCALBASE}/firebird
+.endif
+
+.if defined(WITH_IPV6)
+CONFIGURE_ARGS+=--enable-ipv6
+.else
+CONFIGURE_ARGS+=--disable-ipv6
 .endif

 .if defined(WITH_MBSTRING)
--- patch-Makefile.diff ends here ---

--- patch-scripts-configure.diff begins here ---
--- lang/php4/scripts/configure.php.orig	Sun Jun  8 07:55:38 2003
+++ lang/php4/scripts/configure.php	Mon Jun  9 12:00:13 2003
@@ -39,6 +39,7 @@
 ICONV		"iconv support" ${WITH_ICONV:-OFF} \
 IMAP		"IMAP support" ${WITH_IMAP:-OFF} \
 INTERBASE	"Interbase 6 database support (Firebird)" ${WITH_INTERBASE:-OFF} \
+IPV6		"Internet Protocol v6" ${WITH_IPV6:-OFF} \
 MBSTRING	"multibyte string support" ${WITH_MBSTRING:-OFF} \
 MCAL		"Modular Calendar Access Library support" ${WITH_MCAL:-OFF} \
 MCVE		"MCVE support" ${WITH_MCVE:-OFF} \
--- patch-scripts-configure.diff ends here ---

--- patch-scripts-php_options.diff begins here ---
--- lang/php4/scripts/php_options	Sun Jun  8 07:55:38 2003
+++ /dev/null	Mon Jun  9 17:00:00 2003
@@ -1,59 +0,0 @@
-WITH_BCMATH=OFF
-WITH_BZIP2=OFF
-WITH_CALENDAR=OFF
-WITH_CRACK=OFF
-WITH_CTYPE=ON
-WITH_CURL=OFF
-WITH_DBASE=OFF
-WITH_DBX=OFF
-WITH_DOMXML=OFF
-WITH_DOMXSLT=OFF
-WITH_EXIF=OFF
-WITH_FILEPRO=OFF
-WITH_FTP=OFF
-WITH_GD=OFF
-WITH_GDBM=OFF
-WITH_GETTEXT=OFF
-WITH_GMP=OFF
-WITH_HYPERWAVE=OFF
-WITH_ICONV=OFF
-WITH_IMAP=OFF
-WITH_INTERBASE=OFF
-WITH_MBSTRING=OFF
-WITH_MCAL=OFF
-WITH_MCVE=OFF
-WITH_MCRYPT=OFF
-WITH_MHASH=OFF
-WITH_MIME=OFF
-WITH_MING=OFF
-WITH_MYSQL=ON
-WITH_NCURSES=OFF
-WITH_OPENLDAP=OFF
-WITH_OPENSSL=OFF
-WITH_ORACLE=OFF
-WITH_PCNTL=OFF
-WITH_PCRE=ON
-WITH_PDFLIB=OFF
-WITH_POSIX=ON
-WITH_POSTGRESQL=OFF
-WITH_PSPELL=OFF
-WITH_READLINE=OFF
-WITH_RECODE=OFF
-WITH_SESSION=ON
-WITH_SHMOP=OFF
-WITH_SNMP=OFF
-WITH_SOCKETS=OFF
-WITH_SYBASEDB=OFF
-WITH_SYBASECT=OFF
-WITH_SYSVSEM=OFF
-WITH_SYSVSHM=OFF
-WITH_TOKENIZER=ON
-WITH_UNIXODBC=OFF
-WITH_WDDX=OFF
-WITH_XML=ON
-WITH_XMLRPC=OFF
-WITH_XSLT=OFF
-WITH_YAZ=OFF
-WITH_YP=OFF
-WITH_ZIP=OFF
-WITH_ZLIB=ON
--- patch-scripts-php_options.diff ends here ---

--- patch-scripts-php4_options.diff begins here ---
--- /dev/null	Mon Jun  9 17:00:00 2003
+++ lang/php4/scripts/php4_options	Mon Jun  9 12:00:28 2003
@@ -0,0 +1,60 @@
+WITH_BCMATH=OFF
+WITH_BZIP2=OFF
+WITH_CALENDAR=OFF
+WITH_CRACK=OFF
+WITH_CTYPE=ON
+WITH_CURL=OFF
+WITH_DBASE=OFF
+WITH_DBX=OFF
+WITH_DOMXML=OFF
+WITH_DOMXSLT=OFF
+WITH_EXIF=OFF
+WITH_FILEPRO=OFF
+WITH_FTP=OFF
+WITH_GD=OFF
+WITH_GDBM=OFF
+WITH_GETTEXT=OFF
+WITH_GMP=OFF
+WITH_HYPERWAVE=OFF
+WITH_ICONV=OFF
+WITH_IMAP=OFF
+WITH_INTERBASE=OFF
+WITH_IPV6=OFF
+WITH_MBSTRING=OFF
+WITH_MCAL=OFF
+WITH_MCVE=OFF
+WITH_MCRYPT=OFF
+WITH_MHASH=OFF
+WITH_MIME=OFF
+WITH_MING=OFF
+WITH_MYSQL=ON
+WITH_NCURSES=OFF
+WITH_OPENLDAP=OFF
+WITH_OPENSSL=OFF
+WITH_ORACLE=OFF
+WITH_PCNTL=OFF
+WITH_PCRE=ON
+WITH_PDFLIB=OFF
+WITH_POSIX=ON
+WITH_POSTGRESQL=OFF
+WITH_PSPELL=OFF
+WITH_READLINE=OFF
+WITH_RECODE=OFF
+WITH_SESSION=ON
+WITH_SHMOP=OFF
+WITH_SNMP=OFF
+WITH_SOCKETS=OFF
+WITH_SYBASEDB=OFF
+WITH_SYBASECT=OFF
+WITH_SYSVSEM=OFF
+WITH_SYSVSHM=OFF
+WITH_TOKENIZER=ON
+WITH_UNIXODBC=OFF
+WITH_WDDX=OFF
+WITH_XML=ON
+WITH_XMLRPC=OFF
+WITH_XSLT=OFF
+WITH_YAZ=OFF
+WITH_YP=OFF
+WITH_ZIP=OFF
+WITH_ZLIB=ON
--- patch-scripts-php4_options.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->nork 
Responsible-Changed-By: nork 
Responsible-Changed-When: Mon Jun 9 10:39:14 PDT 2003 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53113 
State-Changed-From-To: open->analyzed 
State-Changed-By: nork 
State-Changed-When: Thu Jun 12 04:52:18 PDT 2003 
State-Changed-Why:  
Now, MAINTAINER is reviewing... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53113 
State-Changed-From-To: analyzed->closed 
State-Changed-By: nork 
State-Changed-When: Thu Jun 19 22:26:07 PDT 2003 
State-Changed-Why:  
Committed, thanks! 

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