ports/189978: [patch] Add staging support to www/apache-forrest

Joseph Benden joe at thrallingpenguin.com
Tue May 20 01:20:00 UTC 2014


>Number:         189978
>Category:       ports
>Synopsis:       [patch] Add staging support to www/apache-forrest
>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:   Tue May 20 01:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Joseph Benden
>Release:        FreeBSD 11
>Organization:
>Environment:
FreeBSD lucy 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r264887: Thu Apr 24 12:43:46 MST 2014     root at lucy:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Adds staging support to www/apache-forrest.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/www/apache-forrest/Makefile b/www/apache-forrest/Makefile
index 72e36a8..14748eb 100644
--- a/www/apache-forrest/Makefile
+++ b/www/apache-forrest/Makefile
@@ -16,6 +16,8 @@ MAINTAINER=		nivit at FreeBSD.org
 COMMENT=		A tool for rapid development of small sites
 
 USE_JAVA=		yes
+ANT=                    ${LOCALBASE}/bin/ant
+BUILD_DEPENDS+=         ${ANT}:${PORTSDIR}/devel/apache-ant
 JAVA_VERSION=		1.6
 
 REPLACE_FILES=		${WRKSRC}/bin/forrest ${WRKSRC}/tools/ant/bin/ant
@@ -29,11 +31,9 @@ FIND_ARGS1=		-type d \! -empty
 FIND_ARGS2=		\! -type d -and -perm -a+x -and \! -name "*.orig" -and \! -name "*.bak"
 FIND_ARGS3=		\! -type d -and \! -perm -a+x -and \! -name "*.bat" -and \! -name "*.orig" -and \! -name "LICENSE.txt" -and \! -name "KEYS" -and \! -name "NOTICE.txt" -and \! -name "*.license.txt"
 
-ANT=		${DATADIR}/tools/ant/bin/ant
 ANT_TARGET=	local-deploy
 PLUGINSDIR=	${DATADIR}/plugins/org.apache.forrest.plugin.output.pdf
 
-NO_STAGE=	yes
 post-patch:
 	@for FILE in ${REPLACE_FILES}; do \
 		${REINPLACE_CMD} -e "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/g" \
@@ -45,27 +45,27 @@ do-install:
 	@cd ${WRKSRC}; \
 	DIRS=$$(${FIND} . ${FIND_ARGS1}); \
 	for DIR in $${DIRS}; do \
-		${MKDIR} ${DATADIR}/$${DIR}; \
+		${MKDIR} ${STAGEDIR}${DATADIR}/$${DIR}; \
 	done; \
 	FILES=$$(${FIND} . ${FIND_ARGS2} ); \
 	for FILE in $${FILES}; do \
-		${INSTALL_SCRIPT} $${FILE} ${DATADIR}/$${FILE}; \
+		${INSTALL_SCRIPT} $${FILE} ${STAGEDIR}${DATADIR}/$${FILE}; \
 	done; \
 	FILES=$$(${FIND} . ${FIND_ARGS3}); \
 	for FILE in $${FILES}; do \
-		${INSTALL_DATA} $${FILE} ${DATADIR}/$${FILE}; \
+		${INSTALL_DATA} $${FILE} ${STAGEDIR}${DATADIR}/$${FILE}; \
 	done;
 
 # Links to executables
 	@cd ${WRKSRC}; \
 	FILES=$$(${FIND} bin ${FIND_ARGS2} ); \
 	for FILE in $${FILES}; do \
-		${LN} ${LINK_OPTS} ${DATADIR}/$${FILE} ${PREFIX}/$${FILE}; \
+		${LN} ${LINK_OPTS} ${DATADIR}/$${FILE} ${STAGEDIR}${PREFIX}/$${FILE}; \
 	done;
 
 post-install:
-	@cd ${PLUGINSDIR}; \
-	${SETENV} FORREST_HOME=${DATADIR} ${ANT} ${ANT_TARGET}; \
+	@cd ${STAGEDIR}${PLUGINSDIR}; \
+	${SETENV} FORREST_HOME=${STAGEDIR}${DATADIR} ${ANT} ${ANT_TARGET}; \
 	${SED} -e "/%%DATADIR%%/s//${DATADIR:S/\//\\\//g}/g" \
 		-e "/%%PORTVERSION%%/s//${PORTVERSION}/g" ${PKGMESSAGE};
 


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


More information about the freebsd-ports-bugs mailing list