Date: Sun, 26 Aug 2012 16:12:48 -0400 (EDT) From: Adam Weinberger <adamw@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/171092: [patch] mail/squirrelmail - add OPTIONS support Message-ID: <20120826201249.02D084574D@apnoea.adamw.org> Resent-Message-ID: <201208262020.q7QKK116059895@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 171092 >Category: ports >Synopsis: [patch] mail/squirrelmail - add OPTIONS support >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: Sun Aug 26 20:20:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Adam Weinberger >Release: FreeBSD 9.1-PRERELEASE i386 >Organization: >Environment: System: FreeBSD apnoea.adamw.org 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Sat Aug 25 18:46:02 EDT 2012 root@apnoea.adamw.org:/usr/obj/usr/src/sys/PEEP i386 >Description: WITH_DATABASE is one of those variables that you don't want to have to define globally in /etc/make.conf Because squirrelmail doesn't support OPTIONS, however, it requires you to do that (or a .if ${.CURDIR:M...} magic that I presume the generic squirrelmail-installer isn't familiar with). The attached patch puts DATABASE and LDAP into OPTIONS, and updates the pre-everything:: message accordingly. >How-To-Repeat: >Fix: --- sq_options.patch begins here --- Index: Makefile =================================================================== --- Makefile (revision 303206) +++ Makefile (working copy) @@ -24,14 +24,9 @@ USE_BZIP2= yes USE_GETTEXT= yes -.ifdef WITH_DATABASE -RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB -.endif +OPTIONS_DEFINE= DATABASE LDAP +DATABASE_DESC= PEAR database support (must also intall a driver) -.ifdef WITH_LDAP -USE_PHP+= ldap -.endif - .ifndef WITHOUT_WWWDIR SQUIRRELDIR?= ${PREFIX}/www/${PORTNAME} .else @@ -48,15 +43,26 @@ CONFLICTS= squirreloutlook-[0-9]* +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MDATABASE} +RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB +.endif + +.if ${PORT_OPTIONS:MLDAP} +USE_PHP+= ldap +.endif + pre-everything:: @${ECHO_CMD} "SquirrelMail is installed into ${SQUIRRELDIR}" @${ECHO_CMD} "To use the old location ${PREFIX}/${PORTNAME} define" @${ECHO_CMD} "WITHOUT_WWWDIR when patching or installing" @${ECHO_CMD} - @${ECHO_CMD} "Use WITH_LDAP to ensure PHP LDAP support is installed" - @${ECHO_CMD} "Use WITH_DATABASE to ensure PEAR framework for database support is installed" - @${ECHO_CMD} " (note that this does not install the database specific PEAR support, e.g. MySQL)" +.if ${PORT_OPTIONS:MDATABASE} + @${ECHO_CMD} "Note that the PEAR database framework still requires you to install a" + @${ECHO_CMD} "database-specific PEAR driver, e.g. MySQL." @${ECHO_CMD} +.endif post-patch: .ifndef PATCH_DEBUG --- sq_options.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?20120826201249.02D084574D>