ports/153425: [PATCH] www/limesurvey: Added a switch to use PostgreSQL
Fumiyuki Shimizu 清水 文行
fumifumi at abacustech.jp
Fri Dec 24 12:40:11 UTC 2010
>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: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Dec 24 12:40:10 UTC 2010
>Closed-Date:
>Last-Modified:
>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 at 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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list