From owner-freebsd-ports-bugs@FreeBSD.ORG  Fri Sep  9 15:20:15 2005
Return-Path: <owner-freebsd-ports-bugs@FreeBSD.ORG>
X-Original-To: freebsd-ports-bugs@hub.freebsd.org
Delivered-To: freebsd-ports-bugs@hub.freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A0B0D16A41F
	for <freebsd-ports-bugs@hub.freebsd.org>;
	Fri,  9 Sep 2005 15:20:15 +0000 (GMT)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E321F43D45
	for <freebsd-ports-bugs@hub.freebsd.org>;
	Fri,  9 Sep 2005 15:20:14 +0000 (GMT)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j89FKEHH001537
	for <freebsd-ports-bugs@freefall.freebsd.org>;
	Fri, 9 Sep 2005 15:20:14 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j89FKE6Z001536;
	Fri, 9 Sep 2005 15:20:14 GMT (envelope-from gnats)
Resent-Date: Fri, 9 Sep 2005 15:20:14 GMT
Resent-Message-Id: <200509091520.j89FKE6Z001536@freefall.freebsd.org>
Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer)
Resent-To: freebsd-ports-bugs@FreeBSD.org
Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org,
	Simon Dick <simond@irrelevant.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 117DA16A41F
	for <FreeBSD-gnats-submit@freebsd.org>;
	Fri,  9 Sep 2005 15:18:59 +0000 (GMT)
	(envelope-from simond@home.irrelevant.org)
Received: from home.irrelevant.org (dsl82-163-99-113.as15444.net
	[82.163.99.113])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 67B2643D45
	for <FreeBSD-gnats-submit@freebsd.org>;
	Fri,  9 Sep 2005 15:18:58 +0000 (GMT)
	(envelope-from simond@home.irrelevant.org)
Received: from simond by home.irrelevant.org with local (Exim 4.52 (FreeBSD))
	id 1EDkeW-000MZd-86
	for FreeBSD-gnats-submit@freebsd.org; Fri, 09 Sep 2005 16:18:56 +0100
Message-Id: <E1EDkeW-000MZd-86@home.irrelevant.org>
Date: Fri, 09 Sep 2005 16:18:56 +0100
From: Simon Dick <simond@irrelevant.org>
Sender: Simon Dick <simond@home.irrelevant.org>
To: FreeBSD-gnats-submit@FreeBSD.org
X-Send-Pr-Version: 3.113
Cc: 
Subject: ports/85909: Maintainer port update: mail/squirrelmail
X-BeenThere: freebsd-ports-bugs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Simon Dick <simond@irrelevant.org>
List-Id: Ports bug reports <freebsd-ports-bugs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs>, 
	<mailto:freebsd-ports-bugs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports-bugs>
List-Post: <mailto:freebsd-ports-bugs@freebsd.org>
List-Help: <mailto:freebsd-ports-bugs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs>, 
	<mailto:freebsd-ports-bugs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Sep 2005 15:20:15 -0000


>Number:         85909
>Category:       ports
>Synopsis:       Maintainer port update: mail/squirrelmail
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 09 15:20:14 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Simon Dick
>Release:        FreeBSD 4.11-RELEASE-p11 i386
>Organization:
>Environment:
System: FreeBSD nelly.internal.irrelevant.org 4.11-RELEASE-p11 FreeBSD 4.11-RELEASE-p11 #0: Wed Jul 6 12:51:41 BST 2005 root@nelly.internal.irrelevant.org:/usr/obj/usr/src/sys/ELEPHANT i386


	
>Description:

Update squirrelmail port to work under PHP5+ until the next
release comes out with the fix already in.

>How-To-Repeat:
	
>Fix:

diff -ruN squirrelmail.orig/Makefile squirrelmail/Makefile
--- squirrelmail.orig/Makefile	Fri Sep  9 16:16:51 2005
+++ squirrelmail/Makefile	Fri Sep  9 16:11:09 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	squirrelmail
 PORTVERSION?=	1.4.5
+PORTREVISION?=	1
 CATEGORIES?=	mail www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	squirrelmail
@@ -63,7 +64,12 @@
 
 post-patch: slaveport-post-patch
 .ifndef PATCH_DEBUG
-	@${RM} -f ${WRKSRC}/config/config_default.php.orig
+	@${RM} -f ${WRKSRC}/config/config_default.php.orig \
+		  ${WRKSRC}/src/configtest.php.orig \
+		  ${WRKSRC}/src/search.php.orig \
+		  ${WRKSRC}/class/mime/Rfc822Header.class.php.orig \
+		  ${WRKSRC}/functions/imap_messages.php.orig \
+		  ${WRKSRC}/plugins/listcommands/setup.php.orig
 .endif
 	@${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \
 		${MASTERDIR}/pkg-install > ${PKGINSTALL}
diff -ruN squirrelmail.orig/files/patch-squirrelmail-stable.diff squirrelmail/files/patch-squirrelmail-stable.diff
--- squirrelmail.orig/files/patch-squirrelmail-stable.diff	Thu Jan  1 01:00:00 1970
+++ squirrelmail/files/patch-squirrelmail-stable.diff	Fri Sep  9 16:04:57 2005
@@ -0,0 +1,92 @@
+diff -urN class/mime/Rfc822Header.class.php class/mime/Rfc822Header.class.php
+--- class/mime/Rfc822Header.class.php	2005-02-07 12:26:49.000000000 +0200
++++ class/mime/Rfc822Header.class.php	2005-07-14 09:13:44.000000000 +0300
+@@ -505,8 +505,9 @@
+      * functions/imap_messages. I'm not sure if it's ok here to call
+      * that function?
+      */
+-    function parsePriority($value) {
+-        $value = strtolower(array_shift(split('/\w/',trim($value))));
++    function parsePriority($sValue) {
++	$aValue = split('/\w/',trim($sValue));
++        $value = strtolower(array_shift($aValue));
+         if ( is_numeric($value) ) {
+             return $value;
+         }
+diff -urN functions/imap_messages.php functions/imap_messages.php
+--- functions/imap_messages.php	2005-04-17 18:50:14.000000000 +0300
++++ functions/imap_messages.php	2005-07-14 09:23:02.991592896 +0300
+@@ -476,8 +476,9 @@
+  * NOTE: this is actually a duplicate from the function in
+  * class/mime/Rfc822Header.php.
+  */
+-function parsePriority($value) {
+-    $value = strtolower(array_shift(split('/\w/',trim($value))));
++function parsePriority($sValue) {
++    $aValue=split('/\w/',trim($sValue));
++    $value = strtolower(array_shift($aValue));
+     if ( is_numeric($value) ) {
+         return $value;
+     }
+diff -urN plugins/listcommands/setup.php plugins/listcommands/setup.php
+--- plugins/listcommands/setup.php	2005-03-02 20:22:17.000000000 +0200
++++ plugins/listcommands/setup.php	2005-07-14 09:16:29.762372824 +0300
+@@ -51,8 +51,9 @@
+         }
+ 
+         /* proto = {mailto,href} */
+-	$proto = array_shift(array_keys($actions));
+-	$act   = array_shift($actions);
++	$aActionKeys = array_keys($actions);
++	$proto = array_shift($aActionKeys);
++	$act   = array_shift($aActionKeys);
+ 
+         if ($proto == 'mailto') {
+ 
+diff -urN src/configtest.php src/configtest.php
+--- src/configtest.php	2005-05-23 20:12:39.000000000 +0300
++++ src/configtest.php	2005-07-14 09:44:30.071926944 +0300
+@@ -314,7 +314,7 @@
+ echo "$IND iconv - ";
+ if (function_exists('iconv')) {
+     echo "Iconv functions are available.<br />\n";
+-} elseif ($use_php_iconv) {
++} elseif (isset($use_php_iconv) && $use_php_iconv) {
+     echo "Iconv functions are unavailable.<br />\n";
+     do_err('Your configuration requires iconv support, but iconv support is missing.');
+ } else {
+@@ -365,7 +365,8 @@
+         }
+ 
+         foreach($dsns as $type => $dsn) {
+-            $dbtype = array_shift(explode(':', $dsn));
++            $aDsn = explode(':', $dsn);
++            $dbtype = array_shift($aDsn);
+             if(isset($db_functions[$dbtype]) && function_exists($db_functions[$dbtype])) {
+                 echo "$IND$dbtype database support present.<br />\n";
+ 
+@@ -380,7 +381,7 @@
+                 echo "$IND$type database connect successful.<br />\n";
+ 
+             } else {
+-                do_err($db.' database support not present!');
++                do_err($dbtype.' database support not present!');
+             }
+         }
+     } else {
+diff -urN src/search.php src/search.php
+--- src/search.php	2005-06-22 17:24:12.000000000 +0300
++++ src/search.php	2005-07-14 09:35:24.000000000 +0300
+@@ -297,7 +297,11 @@
+ /*  update the recent and saved searches from the pref files  */
+ $attributes = get_recent($username, $data_dir);
+ $saved_attributes = get_saved($username, $data_dir);
+-$saved_count = count($saved_attributes['saved_what']);
++if (isset($saved_attributes['saved_what'])) {
++    $saved_count = count($saved_attributes['saved_what']);
++} else {
++    $saved_count = 0;
++}
+ $count_all = 0;
+ 
+ /* Saved Search Table */
>Release-Note:
>Audit-Trail:
>Unformatted: