From cc313d6b427d32d980f09575bc3adb8b116f7747 Mon Sep 17 00:00:00 2001 From: sunpoet Date: Sat, 26 Apr 2014 18:15:42 +0000 Subject: - Add LICENSE - Fix build - Converted to new options framework - Support STAGEDIR PR: ports/188820 Submitted by: Muhammad Moinur Rahman <5u623l20@gmail.com> (maintainer) --- math/jakarta-commons-math/Makefile | 71 +++++++++++-------------- math/jakarta-commons-math/distinfo | 2 + math/jakarta-commons-math/files/patch-build.xml | 46 ++++++++++++---- 3 files changed, 70 insertions(+), 49 deletions(-) (limited to 'math/jakarta-commons-math') diff --git a/math/jakarta-commons-math/Makefile b/math/jakarta-commons-math/Makefile index eb420fc57884..e8339a4457c6 100644 --- a/math/jakarta-commons-math/Makefile +++ b/math/jakarta-commons-math/Makefile @@ -3,76 +3,67 @@ PORTNAME= commons-math PORTVERSION= 2.2 +PORTREVISION= 1 CATEGORIES= math java -MASTER_SITES= ${MASTER_SITE_APACHE_COMMONS_SOURCE} -MASTER_SITE_SUBDIR= ${PORTNAME:S,commons-,,} +MASTER_SITES= ${MASTER_SITE_APACHE_COMMONS_SOURCE}/:source1 \ + http://repo1.maven.org/maven2/junit/junit/4.8.2/:source2 +MASTER_SITE_SUBDIR= ${PORTNAME:S,commons-math,math,}/:source1 PKGNAMEPREFIX= jakarta- -DISTNAME= ${PORTNAME}-${PORTVERSION}-src +DISTFILES= ${PORTNAME}-${PORTVERSION}-src.tar.gz:source1 \ + junit-4.8.2.jar:source2 +EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}-src.tar.gz MAINTAINER= 5u623l20@gmail.com COMMENT= Java library of self-contained mathematics and statistics components -BUILD_DEPENDS= ${JAVAJARDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \ - ${JAVAJARDIR}/junit.jar:${PORTSDIR}/java/junit \ - ${JAVAJARDIR}/commons-discovery.jar:${PORTSDIR}/java/jakarta-commons-discovery -RUN_DEPENDS= ${JAVAJARDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \ - ${JAVAJARDIR}/commons-discovery.jar:${PORTSDIR}/java/jakarta-commons-discovery +LICENSE= APACHE20 + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-src USE_JAVA= yes JAVA_VERSION= 1.6+ USE_ANT= yes ALL_TARGET= jar -MAKE_ARGS= -Dlibdir=${WRKDIR} -Dnoget=true \ - -Dcommons-logging.jar="file://${JAVAJARDIR}/commons-logging.jar" \ - -Dcommons-discovery.jar="file://${JAVAJARDIR}/commons-discovery.jar" +MAKE_ARGS= -Dlibdir=${WRKDIR} -Dnoget=true -COMMONS_LOGGING_API= ${LOCALBASE}/share/doc/commons-logging/api -.if exists(${COMMONS_LOGGING_API}) -MAKE_ARGS+= -Dcommons-logging.api=${COMMONS_LOGGING_API} -.endif +JARFILE= ${PORTNAME:S,3,,}-${PORTVERSION}.jar +DESTJARFILE= ${PORTNAME}.jar +PLIST_FILES+= %%JAVAJARDIR%%/${DESTJARFILE} -COMMONS_DISCOVERY_API= ${LOCALBASE}/share/doc/commons-discovery/api -.if exists(${COMMONS_DISCOVERY_API}) -MAKE_ARGS+= -Dcommons-logging.api=${COMMONS_DISCOVERY_API} -.endif +OPTIONS_DEFINE= DOCS -.if !defined(NOPORTDOCS) +.include + +.if ${PORT_OPTIONS:MDOCS} ALL_TARGET+= javadoc OTHERDOCS= LICENSE.txt NOTICE.txt PORTDOCS= apidocs ${OTHERDOCS} .endif -JARFILE= ${PORTNAME}-${PORTVERSION}.jar -DESTJARFILE= ${PORTNAME}.jar -PLIST_FILES+= %%JAVAJARDIR%%/${DESTJARFILE} - -NO_STAGE= yes -.include -JDK_API!= (${FIND} -s ${LOCALBASE}/share/doc/jdk1.? -maxdepth 1 -name api -type d 2>/dev/null || ${ECHO_CMD}) | ${TAIL} -n 1 +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} != "" -MAKE_ARGS+= -Djdk.api=${JDK_API} +MAKE_ARGS+= -Djdk.api=$$(${JDK_API}) .endif -post-patch: - ${REINPLACE_CMD} -e 's#junit-#junit#g' \ - -e 's#/usr/share/junit#${JAVAJARDIR}#g' \ - ${WRKSRC}/build.xml +post-extract: + ${MKDIR} ${WRKSRC}/lib + ${CP} ${DISTDIR}/junit-4.8.2.jar ${WRKSRC}/lib/ do-install: @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${DESTJARFILE}..." - @${MKDIR} ${JAVAJARDIR} - @${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${JAVAJARDIR}/${DESTJARFILE} + @${MKDIR} ${STAGEDIR}${JAVAJARDIR} + @${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${STAGEDIR}${JAVAJARDIR}/${DESTJARFILE} @${ECHO_MSG} " [ DONE ]" -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..." - @${MKDIR} ${DOCSDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} @cd ${WRKSRC}/target \ - && ${FIND} -s apidocs -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \ - && ${FIND} -s apidocs -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \; - @${INSTALL_DATA} ${OTHERDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/ + && ${FIND} -s apidocs -type d -exec ${MKDIR} ${STAGEDIR}${DOCSDIR}/{} \; \ + && ${FIND} -s apidocs -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/{} \; + @${INSTALL_DATA} ${OTHERDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ @${ECHO_MSG} " [ DONE ]" .endif -.include +.include diff --git a/math/jakarta-commons-math/distinfo b/math/jakarta-commons-math/distinfo index df3fa218f1cd..0ed7d23cc9d2 100644 --- a/math/jakarta-commons-math/distinfo +++ b/math/jakarta-commons-math/distinfo @@ -1,2 +1,4 @@ SHA256 (commons-math-2.2-src.tar.gz) = a7624c3a3e2581d9905f1f1090c78c25448678bddcec2a48a4dc8a80f16ed1b8 SIZE (commons-math-2.2-src.tar.gz) = 1321209 +SHA256 (junit-4.8.2.jar) = a2aa2c3bb2b72da76c3e6a71531f1eefdc350494819baf2b1d80d7146e020f9e +SIZE (junit-4.8.2.jar) = 237344 diff --git a/math/jakarta-commons-math/files/patch-build.xml b/math/jakarta-commons-math/files/patch-build.xml index 979022a68fd9..8e8037238c28 100644 --- a/math/jakarta-commons-math/files/patch-build.xml +++ b/math/jakarta-commons-math/files/patch-build.xml @@ -1,11 +1,39 @@ ---- build.xml.orig 2012-03-26 01:38:37.000000000 +0600 -+++ build.xml 2012-03-26 01:38:56.000000000 +0600 -@@ -36,7 +36,7 @@ - - - -- -+ +--- build.xml.bak 2014-04-19 21:14:45.345201138 +0600 ++++ build.xml 2014-04-19 21:17:15.132174422 +0600 +@@ -167,7 +167,7 @@ + + +- ++ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + - -- cgit