View | Details | Raw Unified | Return to bug 189978
Collapse All | Expand All

(-)b/www/apache-forrest/Makefile (-8 / +8 lines)
Lines 16-21 MAINTAINER= nivit@FreeBSD.org Link Here
16
COMMENT=		A tool for rapid development of small sites
16
COMMENT=		A tool for rapid development of small sites
17
17
18
USE_JAVA=		yes
18
USE_JAVA=		yes
19
ANT=                    ${LOCALBASE}/bin/ant
20
BUILD_DEPENDS+=         ${ANT}:${PORTSDIR}/devel/apache-ant
19
JAVA_VERSION=		1.6
21
JAVA_VERSION=		1.6
20
22
21
REPLACE_FILES=		${WRKSRC}/bin/forrest ${WRKSRC}/tools/ant/bin/ant
23
REPLACE_FILES=		${WRKSRC}/bin/forrest ${WRKSRC}/tools/ant/bin/ant
Lines 29-39 FIND_ARGS1= -type d \! -empty Link Here
29
FIND_ARGS2=		\! -type d -and -perm -a+x -and \! -name "*.orig" -and \! -name "*.bak"
31
FIND_ARGS2=		\! -type d -and -perm -a+x -and \! -name "*.orig" -and \! -name "*.bak"
30
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"
32
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"
31
33
32
ANT=		${DATADIR}/tools/ant/bin/ant
33
ANT_TARGET=	local-deploy
34
ANT_TARGET=	local-deploy
34
PLUGINSDIR=	${DATADIR}/plugins/org.apache.forrest.plugin.output.pdf
35
PLUGINSDIR=	${DATADIR}/plugins/org.apache.forrest.plugin.output.pdf
35
36
36
NO_STAGE=	yes
37
post-patch:
37
post-patch:
38
	@for FILE in ${REPLACE_FILES}; do \
38
	@for FILE in ${REPLACE_FILES}; do \
39
		${REINPLACE_CMD} -e "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/g" \
39
		${REINPLACE_CMD} -e "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/g" \
Lines 45-71 do-install: Link Here
45
	@cd ${WRKSRC}; \
45
	@cd ${WRKSRC}; \
46
	DIRS=$$(${FIND} . ${FIND_ARGS1}); \
46
	DIRS=$$(${FIND} . ${FIND_ARGS1}); \
47
	for DIR in $${DIRS}; do \
47
	for DIR in $${DIRS}; do \
48
		${MKDIR} ${DATADIR}/$${DIR}; \
48
		${MKDIR} ${STAGEDIR}${DATADIR}/$${DIR}; \
49
	done; \
49
	done; \
50
	FILES=$$(${FIND} . ${FIND_ARGS2} ); \
50
	FILES=$$(${FIND} . ${FIND_ARGS2} ); \
51
	for FILE in $${FILES}; do \
51
	for FILE in $${FILES}; do \
52
		${INSTALL_SCRIPT} $${FILE} ${DATADIR}/$${FILE}; \
52
		${INSTALL_SCRIPT} $${FILE} ${STAGEDIR}${DATADIR}/$${FILE}; \
53
	done; \
53
	done; \
54
	FILES=$$(${FIND} . ${FIND_ARGS3}); \
54
	FILES=$$(${FIND} . ${FIND_ARGS3}); \
55
	for FILE in $${FILES}; do \
55
	for FILE in $${FILES}; do \
56
		${INSTALL_DATA} $${FILE} ${DATADIR}/$${FILE}; \
56
		${INSTALL_DATA} $${FILE} ${STAGEDIR}${DATADIR}/$${FILE}; \
57
	done;
57
	done;
58
58
59
# Links to executables
59
# Links to executables
60
	@cd ${WRKSRC}; \
60
	@cd ${WRKSRC}; \
61
	FILES=$$(${FIND} bin ${FIND_ARGS2} ); \
61
	FILES=$$(${FIND} bin ${FIND_ARGS2} ); \
62
	for FILE in $${FILES}; do \
62
	for FILE in $${FILES}; do \
63
		${LN} ${LINK_OPTS} ${DATADIR}/$${FILE} ${PREFIX}/$${FILE}; \
63
		${LN} ${LINK_OPTS} ${DATADIR}/$${FILE} ${STAGEDIR}${PREFIX}/$${FILE}; \
64
	done;
64
	done;
65
65
66
post-install:
66
post-install:
67
	@cd ${PLUGINSDIR}; \
67
	@cd ${STAGEDIR}${PLUGINSDIR}; \
68
	${SETENV} FORREST_HOME=${DATADIR} ${ANT} ${ANT_TARGET}; \
68
	${SETENV} FORREST_HOME=${STAGEDIR}${DATADIR} ${ANT} ${ANT_TARGET}; \
69
	${SED} -e "/%%DATADIR%%/s//${DATADIR:S/\//\\\//g}/g" \
69
	${SED} -e "/%%DATADIR%%/s//${DATADIR:S/\//\\\//g}/g" \
70
		-e "/%%PORTVERSION%%/s//${PORTVERSION}/g" ${PKGMESSAGE};
70
		-e "/%%PORTVERSION%%/s//${PORTVERSION}/g" ${PKGMESSAGE};

Return to bug 189978