From aa4e33bcb6e48eb1bdd6646b2dd184dfee060058 Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Sat, 31 May 2014 11:08:34 +0000 Subject: [PATCH] - 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 --- java/jakarta-oro/Makefile | 40 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 30 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 +OPTIONS_DEFINE= DOCS -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 +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