From 1dda6ea8445cdc8f65355e2366cb7648183f9e54 Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Fri, 30 May 2014 18:19:15 +0000 Subject: [PATCH] - Add staging support - Convert to new options framework --- java/jakarta-commons-lang/Makefile | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/java/jakarta-commons-lang/Makefile b/java/jakarta-commons-lang/Makefile index 0f9bc18a079c..92a68a299471 100644 --- a/java/jakarta-commons-lang/Makefile +++ b/java/jakarta-commons-lang/Makefile @@ -16,22 +16,22 @@ LICENSE= APACHE20 USE_JAVA= yes JAVA_VERSION= 1.6+ - USE_ANT= yes - ALL_TARGET= jar -.if !defined(NOPORTDOCS) -ALL_TARGET+= javadoc -PORTDOCS= * -.endif JARFILE= ${PORTNAME}-${PORTVERSION}.jar DESTJARFILE= ${PORTNAME}.jar PLIST_FILES= %%JAVAJARDIR%%/${DESTJARFILE} +PORTDOCS= * + +OPTIONS_DEFINE= DOCS -NO_STAGE= yes .include +.if ${PORT_OPTIONS:MDOCS} +ALL_TARGET+= javadoc +.endif + JDK_API!= (${FIND} -s ${LOCALBASE}/share/doc/jdk1.? -maxdepth 1 -name api -type d 2>/dev/null || ${ECHO_CMD}) | ${TAIL} -n 1 .if ${JDK_API} != "" @@ -39,16 +39,11 @@ MAKE_ARGS+= -Djdk.javadoc=${JDK_API} .endif do-install: - @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${DESTJARFILE}..." - @${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${JAVAJARDIR}/${DESTJARFILE} - @${ECHO_MSG} " [ DONE ]" - -.if !defined(NOPORTDOCS) - @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}/..." - @cd ${WRKSRC}/target/apidocs \ - && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \ - && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \; - @${ECHO_MSG} " [ DONE ]" + ${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} \ + ${STAGEDIR}${JAVAJARDIR}/${DESTJARFILE} +.if ${PORT_OPTIONS:MDOCS} + (cd ${WRKSRC}/target/apidocs && ${COPYTREE_SHARE} . \ + ${STAGEDIR}${DOCSDIR}) .endif .include