From fumifumi@abacustech.jp  Fri Dec 24 12:36:54 2010
Return-Path: <fumifumi@abacustech.jp>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 64F9C106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 24 Dec 2010 12:36:54 +0000 (UTC)
	(envelope-from fumifumi@abacustech.jp)
Received: from bordeaux.abacustech.jp (bordeaux.abacustech.jp [219.94.152.195])
	by mx1.freebsd.org (Postfix) with ESMTP id 1899B8FC19
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 24 Dec 2010 12:36:53 +0000 (UTC)
Received: from bordeaux.abacustech.jp (localhost [127.0.0.1])
	by bordeaux.abacustech.jp (Postfix) with ESMTP id 64C5378C75;
	Fri, 24 Dec 2010 21:23:25 +0900 (JST)
Received: from bordeaux.abacustech.jp (localhost [127.0.0.1])
	by bordeaux.abacustech.jp (Postfix) with ESMTP id 3014578C74;
	Fri, 24 Dec 2010 21:23:23 +0900 (JST)
Received: by bordeaux.abacustech.jp (Postfix, from userid 2323)
	id 09A6F78C73; Fri, 24 Dec 2010 21:23:23 +0900 (JST)
Message-Id: <20101224122323.09A6F78C73@bordeaux.abacustech.jp>
Date: Fri, 24 Dec 2010 21:23:23 +0900 (JST)
From: Fumiyuki Shimizu =?iso-2022-jp?B?GyRCQDY/ZRsoQiAbJEJKODlUGyhC?= <fumifumi@abacustech.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc: janos.mohacsi@bsd.hu
Subject: [PATCH] www/limesurvey: Added a switch to use PostgreSQL
X-Send-Pr-Version: 3.113
X-GNATS-Notify: janos.mohacsi@bsd.hu

>Number:         153425
>Category:       ports
>Synopsis:       [PATCH] www/limesurvey: Added a switch to use PostgreSQL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 24 12:40:10 UTC 2010
>Closed-Date:    Tue Oct 11 05:23:28 UTC 2011
>Last-Modified:  Tue Oct 11 05:23:28 UTC 2011
>Originator:     Fumiyuki Shimizu =?iso-2022-jp?B?GyRCQDY/ZRsoQiAbJEJKODlUGyhC?=
>Release:        FreeBSD 8.1-RELEASE-p2 i386
>Organization:
Abacus Technologies, Inc.
>Environment:
System: FreeBSD 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Hello,

Thank you for the useful ports, www/limesurvey.

I have Added some switches to:
  * use PostgreSQL instead of MySQL.
  * disable GD.
  * disable LDAP.
  * enable ZIP.

and have changed not to overwrite config.php, if exists,

and have added WANT_PHP_WEB.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
Type make.

>Fix:
Chages attached.

Thank you for everything.

--- limesurvey-1.90_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/limesurvey/Makefile /home/fumifumi/limesurvey.optionized/Makefile
--- /usr/ports/www/limesurvey/Makefile	2010-10-25 12:36:30.000000000 +0900
+++ /home/fumifumi/limesurvey.optionized/Makefile	2010-12-24 19:44:52.000000000 +0900
@@ -15,7 +15,34 @@
 MAINTAINER=	janos.mohacsi@bsd.hu
 COMMENT=	A PHP-based survey building and runing system
 
-USE_PHP=	mysql session mbstring pcre iconv gd ldap ctype
+OPTIONS=	PGSQL "Use PostgreSQL (instead of MySQL)" off \
+		GD   "Install PHP gd extention" on \
+		LDAP "Install PHP LDAP extention" off \
+		ZIP  "Install PHP zip extention" off
+#		ZLIB "Install PHP zlib extention" off # For ComfortUpdate
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_PGSQL)
+IGNORE_WITH_PGSQL=	73 74 80
+USE_PGSQL=	yes
+USE_PHP=	pgsql
+.else
+IGNORE_WITH_MYSQL=	323 40
+USE_MYSQL=	yes
+USE_PHP=	mysql
+.endif
+.if defined(WITH_GD)
+USE_PHP+=	gd
+.endif
+.if defined(WITH_LDAP)
+USE_PHP+=	ldap
+.endif
+.if defined(WITH_ZIP)
+USE_PHP+=	zip
+.endif
+USE_PHP+=	mbstring session pcre ctype iconv
+WANT_PHP_WEB=yes
 
 WWWDOCROOT?=		www
 PHPSURVEYORURL?=	${PORTNAME}
@@ -30,12 +57,24 @@
 
 do-install:
 	${MKDIR} ${WWWDIR}
+.if defined(WITH_PGSQL)
+	${SED} -E \
+		-e 's/^(\$$databasetype[[:space:]]*=[[:space:]]*'"')mysql('"'.*)$$/\1postgres\2/'	\
+		-e 's/^(\$$databaseuser[[:space:]]*=[[:space:]]*'"')root('"'.*)$$/\1pgsql\2/'	\
+		${WRKSRC}/config.php >${WRKSRC}/config.php-dist
+	${RM} ${WRKSRC}/config.php
+.else
+	${MV} ${WRKSRC}/config.php ${WRKSRC}/config.php-dist
+.endif
+	${TEST} -e ${WWWDIR}/config.php || ${CP} -p ${WRKSRC}/config.php-dist ${WRKSRC}/config.php
 	@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${WWWDIR}
 	${MKDIR} ${WWWDIR}/tmp
 	${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
 	${CHMOD} 755 ${WWWDIR}/tmp
 	${CHMOD} 755 ${WWWDIR}/templates
 	${CHMOD} 755 ${WWWDIR}/upload
+	${CHOWN} -R 0 ${WWWDIR}/admin
+	${CHMOD} -R go-w ${WWWDIR}/admin
 
 post-install:
 	@${CAT} ${PKGMESSAGE}
--- limesurvey-1.90_2.patch ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Dec 24 12:40:47 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: janos.mohacsi@bsd.hu
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/153425: [PATCH] www/limesurvey: Added a switch to use PostgreSQL
Date: Fri, 24 Dec 2010 12:40:45 UT

 Maintainer of www/limesurvey,
 
 Please note that PR ports/153425 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/153425
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: feedback->open 
State-Changed-By: arved 
State-Changed-When: Mon Aug 1 19:27:44 UTC 2011 
State-Changed-Why:  
maintainer timeout 

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

From: Fumiyuki Shimizu <fumifumi@abacustech.jp>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/153425: [PATCH] www/limesurvey: Added a switch to use
 PostgreSQL
Date: Tue, 11 Oct 2011 11:22:58 +0900 (JST)

 Hello,
 
 Please close this PR, which is obsoleted by PR ports/160748.
 
 Thanks in advance,
 ---
 F
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Oct 11 05:23:11 UTC 2011 
State-Changed-Why:  
Superseded by ports/160748. 

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