aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2014-05-31 22:03:07 +0800
committerpawel <pawel@FreeBSD.org>2014-05-31 22:03:07 +0800
commit0e7a8698f01acf4eb6776ca44e167e780dbd858e (patch)
treeca6a089f4ae5424087496d4167196062ea61d61b /java
parent93b890454af1770a1344a1a73d74189c5565aad9 (diff)
downloadfreebsd-ports-gnome-0e7a8698f01acf4eb6776ca44e167e780dbd858e.tar.gz
freebsd-ports-gnome-0e7a8698f01acf4eb6776ca44e167e780dbd858e.tar.zst
freebsd-ports-gnome-0e7a8698f01acf4eb6776ca44e167e780dbd858e.zip
- Add staging support
- Convert to new options framework, add EXAMPLES option
Diffstat (limited to 'java')
-rw-r--r--java/jdom/Makefile49
1 files changed, 19 insertions, 30 deletions
diff --git a/java/jdom/Makefile b/java/jdom/Makefile
index f222878be996..b78221c58ba8 100644
--- a/java/jdom/Makefile
+++ b/java/jdom/Makefile
@@ -15,46 +15,35 @@ RUN_DEPENDS= ${JAVALIBDIR}/jaxen-jdom.jar:${PORTSDIR}/java/jaxen
USE_JAVA= yes
JAVA_VERSION= 1.6+
USE_ANT= yes
-
ALL_TARGET= package
-.if !defined(NOPORTDOCS)
-ALL_TARGET+= javadoc
-OTHERDOCS= README.txt TODO.txt CHANGES.txt COMMITTERS.txt LICENSE.txt
-PORTDOCS= apidocs ${OTHERDOCS}
-.endif
WRKSRC= ${WRKDIR}/${PORTNAME}
MAKE_ENV+= CLASSPATH=${JAVALIBDIR}/jaxen-jdom.jar
PLIST_FILES= %%JAVAJARDIR%%/jdom.jar
+PORTDOCS= *
+PORTEXAMPLES= *
-NO_STAGE= yes
-do-install:
- @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/jdom.jar..."
- @${MKDIR} ${JAVAJARDIR}
- @${INSTALL_DATA} ${WRKSRC}/build/jdom.jar ${JAVAJARDIR}/
- @${ECHO_MSG} " [ DONE ]"
-.if !defined(NOPORTDOCS)
- @${ECHO_MSG} -n ">> Installing samples in ${EXAMPLESDIR}..."
- @${MKDIR} ${EXAMPLESDIR}
- @cd ${WRKSRC}/build/samples/ && ${FIND} . \
- | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR} > /dev/null 2>&1
- @${ECHO_MSG} " [ DONE ]"
- @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
- @${MKDIR} ${DOCSDIR}/apidocs
- @cd ${WRKSRC}/build/ && ${FIND} apidocs \
- | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} > /dev/null 2>&1
- @${INSTALL_DATA} ${OTHERDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
- @${ECHO_MSG} " [ DONE ]"
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+ALL_TARGET+= javadoc
.endif
-.if !defined(NOPORTDOCS)
-post-install:
- @${FIND} -s ${WRKSRC}/build/samples -not -type d | \
- ${SED} -ne 's,^${WRKSRC}/build/samples,${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST}
- @${FIND} -s -d ${WRKSRC}/build/samples -type d | \
- ${SED} -ne 's,^${WRKSRC}/build/samples,@dirrm ${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST}
+do-install:
+ @${MKDIR} ${STAGEDIR}${JAVAJARDIR}
+ ${INSTALL_DATA} ${WRKSRC}/build/jdom.jar ${STAGEDIR}${JAVAJARDIR}
+ @${MKDIR} ${EXAMPLESDIR}
+ (cd ${WRKSRC}/build/samples/ && ${COPYTREE_SHARE} . \
+ ${STAGEDIR}${EXAMPLESDIR})
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC}/build && ${COPYTREE_SHARE} apidocs ${STAGEDIR}${DOCSDIR})
+ (cd ${WRKSRC} && ${INSTALL_DATA} README.txt TODO.txt CHANGES.txt \
+ COMMITTERS.txt LICENSE.txt ${STAGEDIR}${DOCSDIR})
.endif
.include <bsd.port.mk>