Date: Thu, 15 Sep 2011 21:46:34 +0900 (JST) From: Fumiyuki Shimizu <fumifumi@abacustech.jp> To: FreeBSD-gnats-submit@FreeBSD.org Cc: janos.mohacsi@bsd.hu Subject: ports/160748: [PATCH] www/limesurvey: Add knobs to reduce dependencies. Message-ID: <20110915124634.272F778C4C@bordeaux.abacustech.jp> Resent-Message-ID: <201109151250.p8FCo74s092253@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 160748 >Category: ports >Synopsis: [PATCH] www/limesurvey: Add knobs to reduce dependencies. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Sep 15 12:50:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Fumiyuki Shimizu >Release: FreeBSD 8.1-RELEASE i386 >Organization: Abacus Technologies, Inc. >Environment: System: 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 >Description: Thank you for maintaining this useful port. Updated the PR ports/153425 to fit the current port. Added knobs mainly to use PostgreSQL, and to disable LDAP and others. Cheers, Port maintainer (janos.mohacsi@bsd.hu) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- limesurvey-1.91.patch begins here --- diff -ruN --exclude=CVS /usr/ports/www/limesurvey/Makefile /usr/ports/www/limesurvey-knobs/Makefile --- /usr/ports/www/limesurvey/Makefile 2011-06-12 16:08:38.000000000 +0900 +++ /usr/ports/www/limesurvey-knobs/Makefile 2011-09-15 21:30:24.000000000 +0900 @@ -14,9 +14,41 @@ MAINTAINER= janos.mohacsi@bsd.hu COMMENT= A PHP-based survey building and runing system -USE_PHP= ctype dom gd iconv json ldap mbstring mysql pcre \ - simplexml session xmlwriter zip -USE_MYSQL= server +LICENSE= GPLv2 + +# http://docs.limesurvey.org/Installation&structure=English+Instructions+for+LimeSurvey +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> + +# http://docs.limesurvey.org/Installation&structure=English+Instructions+for+LimeSurvey#Make_sure_you_can_use_LimeSurvey_on_your_website +.if defined(WITH_PGSQL) +IGNORE_WITH_PGSQL= 73 74 80 +USE_PGSQL= yes +USE_PHP= pgsql +.else +IGNORE_WITH_MYSQL= 323 40 +# server is not neccesery on this host. +#USE_MYSQL= server +USE_MYSQL= client +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+= ctype dom iconv json mbstring pcre \ + simplexml session xmlwriter +WANT_PHP_WEB=yes WWWDOCROOT?= www PHPSURVEYORURL?= ${PORTNAME} @@ -30,13 +62,25 @@ PHPSURVEYORDIR= ${WWWDOCROOT}/${PHPSURVEYORURL} do-install: - ${MKDIR} ${WWWDIR} - @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 + ${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.91.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110915124634.272F778C4C>