ports/181747: [patch] www/mod_rivet -- support configuration options

Pietro Cerutti gahr at FreeBSD.org
Mon Sep 2 08:40:02 UTC 2013


>Number:         181747
>Category:       ports
>Synopsis:       [patch] www/mod_rivet -- support configuration options
>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:   Mon Sep 02 08:40:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Pietro Cerutti
>Release:        
>Organization:
The FreeBSD Project
>Environment:
>Description:
The patch adds support for turning on/off the following configuration options

- The ::rivet namespace is automatically imported
- Commands of the ::rivet namespace are exported

The default is ON for both options, which keeps the current functionality. Also, I also added DOCS to OPTIONS.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 325946)
+++ Makefile	(working copy)
@@ -15,6 +15,11 @@
 
 LIB_DEPENDS=	libitcl.so:${PORTSDIR}/lang/itcl
 
+OPTIONS_DEFINE=	IMP_NS EXP_CMD DOCS
+OPTIONS_DEFAULT=IMP_NS EXP_CMD
+IMP_NS_DESC=	Import the ::rivet namespace
+EXP_CMD_DESC=	Export commands from the ::rivet namespace
+
 USE_APACHE=	22+
 USE_TCL=	85+
 USE_LDCONFIG=	${PREFIX}/lib/rivet
@@ -22,20 +27,40 @@
 USES=		gmake
 GNU_CONFIGURE=	yes
 
+PORTDOCS=	*
 INSTALL_TARGET=	install install-packages
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-CONFIGURE_ARGS+=	--with-apache-version=2 \
-			--prefix=${PREFIX} --with-apxs=${APXS} \
-			--with-tcl=${TCL_LIBDIR} --with-tclsh=${TCLSH} \
-			--with-rivet-target-dir=${PREFIX}/lib/rivet
+.if !${PORT_OPTIONS:MIMP_NS}
+CONFIGURE_ARGS+=--disable-import-rivet-commands
+.endif
 
+.if !${PORT_OPTIONS:MEXP_CMD}
+CONFIGURE_ARGS+=--disable-rivet-commands-export
+.endif
+
+.if ${PORT_OPTIONS:MPACKAGES}
+PLIST_SUB+=	PACKAGES=""
+INSTALL_TARGET+=install-packages
+.else
+PLIST_SUB+=	PACKAGES="@comment "
+.endif
+
+CONFIGURE_ARGS+=--with-apache-version=2 \
+		--prefix=${PREFIX} --with-apxs=${APXS} \
+		--with-tcl=${TCL_LIBDIR} --with-tclsh=${TCLSH} \
+		--with-rivet-target-dir=${PREFIX}/lib/rivet
+
 post-patch:
 	${REINPLACE_CMD}  -e 's|`$${apxs_found} -q LIBEXECDIR`|${PREFIX}/${APACHEMODDIR}|g' \
 	   ${WRKSRC}/configure.ac ${WRKSRC}/configure
 
 post-install:
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	@cd ${WRKSRC}/doc/html && ${COPYTREE_SHARE} \* ${DOCSDIR}
+.endif
 	@${ECHO_MSG} ""
 	@${ECHO_MSG} "===================================================="
 	@${ECHO_MSG} "Remember to modify your apache configuration file"
@@ -50,4 +75,4 @@
 	@${ECHO_MSG} ""
 	@${ECHO_MSG} "===================================================="
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list