aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2014-05-31 19:08:34 +0800
committerpawel <pawel@FreeBSD.org>2014-05-31 19:08:34 +0800
commit71885438264b43a9aaa8d6ba5179dcb6a55c953b (patch)
tree7e61f5248acea0df4cf75adf3c88e581100d1384 /java
parent531651e1fc4c7ade737474ddb279fb614a7ea82a (diff)
downloadfreebsd-ports-gnome-71885438264b43a9aaa8d6ba5179dcb6a55c953b.tar.gz
freebsd-ports-gnome-71885438264b43a9aaa8d6ba5179dcb6a55c953b.tar.zst
freebsd-ports-gnome-71885438264b43a9aaa8d6ba5179dcb6a55c953b.zip
- Add staging support
- Convert to new options framework - USE_ANT, ALL_TARGET instead of custom do-build target - Use PLIST_FILES and not generated plist file
Diffstat (limited to 'java')
-rw-r--r--java/jakarta-oro/Makefile44
1 files changed, 12 insertions, 32 deletions
diff --git a/java/jakarta-oro/Makefile b/java/jakarta-oro/Makefile
index 8c003fd1b400..c4865fcba5b1 100644
--- a/java/jakarta-oro/Makefile
+++ b/java/jakarta-oro/Makefile
@@ -10,43 +10,23 @@ MASTER_SITES= http://archive.apache.org/dist/jakarta/oro/
MAINTAINER= ports@FreeBSD.org
COMMENT= Perl/awk/sh regular expressions for Java
-BUILD_DEPENDS= ${LOCALBASE}/bin/ant:${PORTSDIR}/devel/apache-ant
-
USE_JAVA= yes
+USE_ANT= yes
JAVA_VERSION= 1.6+
-
-PLIST= ${WRKDIR}/PLIST
+ALL_TARGET= jar javadocs
JAVALIBNAME= ${PORTNAME}-${PORTVERSION}
-.if !defined(NOPORTDOCS)
+PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar
PORTDOCS= *
-.endif
-
-NO_STAGE= yes
-do-build:
- @cd ${WRKSRC} && \
- ${SETENV} JAVA_HOME=${JAVA_HOME} ant jar javadocs
-
-pre-install:
- @${RM} -f ${PLIST}
- @${TOUCH} ${PLIST}
- @${ECHO} ${JAVAJARDIR}/${PORTNAME}.jar | \
- ${SED} "s,${PREFIX}/*,," >> ${PLIST}
- @${ECHO} "@unexec ${RMDIR} ${JAVAJARDIR} 2>/dev/null || true" | \
- ${SED} "s,${PREFIX}/*,," >> ${PLIST}
-
-do-install: do-install-jar do-install-apidocs
-
-do-install-jar:
- @${MKDIR} ${JAVAJARDIR}
- @${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}.jar
-
-do-install-apidocs:
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${CP} -r ${WRKSRC}/docs/api/* ${DOCSDIR}
- @${CHOWN} -h -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
-.endif
+
+OPTIONS_DEFINE= DOCS
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${JAVAJARDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-${PORTVERSION}.jar \
+ ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC}/docs/api && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>