Bug 171092 - [patch] mail/squirrelmail - add OPTIONS support
Summary: [patch] mail/squirrelmail - add OPTIONS support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-26 21:20 UTC by Adam Weinberger
Modified: 2012-09-09 16:50 UTC (History)
0 users

See Also:


Attachments
sq_options.patch (1.47 KB, patch)
2012-08-26 21:20 UTC, Adam Weinberger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Weinberger freebsd_committer freebsd_triage 2012-08-26 21:20:01 UTC
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.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-26 21:20:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->tabthorpe

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Thomas Abthorpe freebsd_committer freebsd_triage 2012-09-09 04:37:10 UTC
Responsible Changed
From-To: tabthorpe->adamw

Over to maintainer.
Comment 3 Adam Weinberger freebsd_committer freebsd_triage 2012-09-09 16:44:35 UTC
State Changed
From-To: open->closed

You are the most awesome PR submitter ever.
Comment 4 dfilter service freebsd_committer freebsd_triage 2012-09-09 16:44:35 UTC
Author: adamw
Date: Sun Sep  9 15:44:26 2012
New Revision: 303973
URL: http://svn.freebsd.org/changeset/ports/303973

Log:
  Convert the WITH_DATABASE and WITH_LDAP tunables to optionsNG.
  
  PR:	ports/171092

Modified:
  head/mail/squirrelmail/Makefile

Modified: head/mail/squirrelmail/Makefile
==============================================================================
--- head/mail/squirrelmail/Makefile	Sun Sep  9 15:33:37 2012	(r303972)
+++ head/mail/squirrelmail/Makefile	Sun Sep  9 15:44:26 2012	(r303973)
@@ -25,13 +25,8 @@ IGNORE_WITH_PHP=5 # known incompatibilit
 USE_BZIP2=	yes
 USE_GETTEXT=	yes
 
-.ifdef WITH_DATABASE
-RUN_DEPENDS+=	${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
-.endif
-
-.ifdef WITH_LDAP
-USE_PHP+=	ldap
-.endif
+OPTIONS_DEFINE=	DATABASE LDAP
+DATABASE_DESC=	PEAR database support (must also intall a driver)
 
 .ifndef WITHOUT_WWWDIR
 SQUIRRELDIR?=	${PREFIX}/www/${PORTNAME}
@@ -49,15 +44,26 @@ PORTDOCS=	*
 
 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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"