From fba7922ca4cab55630deb63c44ff86bfdbff3755 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Fri, 25 May 2012 13:51:37 +0000 Subject: [PATCH] Commons Math is a library of lightweight, self-contained mathematics and statistics components addressing the most common problems not available in the Java programming language or Commons Lang. WWW: http://jakarta.apache.org/commons/math/ PR: ports/166398 Submitted by: Muhammad Moinur Rahmanh <5u623l20@gmail.com> --- math/Makefile | 1 + math/jakarta-commons-math3/Makefile | 82 +++++++++++++++++++ math/jakarta-commons-math3/distinfo | 2 + .../files/patch-build.xml | 11 +++ math/jakarta-commons-math3/pkg-descr | 5 ++ 5 files changed, 101 insertions(+) create mode 100644 math/jakarta-commons-math3/Makefile create mode 100644 math/jakarta-commons-math3/distinfo create mode 100644 math/jakarta-commons-math3/files/patch-build.xml create mode 100644 math/jakarta-commons-math3/pkg-descr diff --git a/math/Makefile b/math/Makefile index 154a92f50cab..16f9ac4c0ac9 100644 --- a/math/Makefile +++ b/math/Makefile @@ -169,6 +169,7 @@ SUBDIR += jacal SUBDIR += jags SUBDIR += jakarta-commons-math + SUBDIR += jakarta-commons-math3 SUBDIR += jama SUBDIR += javanns SUBDIR += javaview diff --git a/math/jakarta-commons-math3/Makefile b/math/jakarta-commons-math3/Makefile new file mode 100644 index 000000000000..f3ba249089fa --- /dev/null +++ b/math/jakarta-commons-math3/Makefile @@ -0,0 +1,82 @@ +# New ports collection makefile for: Jakarta Commons Math 3 +# Date created: 25 May, 2012 +# Whom: Muhammad Moinur Rahmanh <5u623l20@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= commons-math3 +PORTVERSION= 3.0 +CATEGORIES= math java +MASTER_SITES= ${MASTER_SITE_APACHE_COMMONS_SOURCE} +MASTER_SITE_SUBDIR= ${PORTNAME:S,commons-math3,math,} +PKGNAMEPREFIX= jakarta- +DISTNAME= ${PORTNAME}-${PORTVERSION}-src + +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 + +USE_JAVA= yes +JAVA_VERSION= 1.5+ +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" + +COMMONS_LOGGING_API= ${LOCALBASE}/share/doc/commons-logging/api +.if exists(${COMMONS_LOGGING_API}) +MAKE_ARGS+= -Dcommons-logging.api=${COMMONS_LOGGING_API} +.endif + +COMMONS_DISCOVERY_API= ${LOCALBASE}/share/doc/commons-discovery/api +.if exists(${COMMONS_DISCOVERY_API}) +MAKE_ARGS+= -Dcommons-logging.api=${COMMONS_DISCOVERY_API} +.endif + +.if !defined(NOPORTDOCS) +ALL_TARGET+= javadoc +OTHERDOCS= LICENSE.txt NOTICE.txt +PORTDOCS= apidocs ${OTHERDOCS} +.endif +JARFILE= ${PORTNAME:S,3,,}-${PORTVERSION}-SNAPSHOT.jar +DESTJARFILE= ${PORTNAME}.jar +PLIST_FILES+= %%JAVAJARDIR%%/${DESTJARFILE} + +.include + +JDK_API!= (${FIND} -s ${LOCALBASE}/share/doc/jdk1.? -maxdepth 1 -name api -type d 2>/dev/null || ${TRUE}) | ${TAIL} -n 1 +.if ${JDK_API} != "" +MAKE_ARGS+= -Djdk.api=${JDK_API} +.endif + +post-patch: + ${REINPLACE_CMD} -e 's#4.4##g' \ + -e 's#junit-#junit#g' \ + -e 's#/usr/share/junit#${JAVAJARDIR}#g' \ + ${WRKSRC}/build.xml + +do-install: + @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${DESTJARFILE}..." + @${MKDIR} ${JAVAJARDIR} + @${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${JAVAJARDIR}/${DESTJARFILE} + @${ECHO_MSG} " [ DONE ]" + +.if !defined(NOPORTDOCS) + @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..." + @${MKDIR} ${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}/ + @${ECHO_MSG} " [ DONE ]" +.endif + +.include diff --git a/math/jakarta-commons-math3/distinfo b/math/jakarta-commons-math3/distinfo new file mode 100644 index 000000000000..14f4c4fd5a62 --- /dev/null +++ b/math/jakarta-commons-math3/distinfo @@ -0,0 +1,2 @@ +SHA256 (commons-math3-3.0-src.tar.gz) = 987616f2e953dadd7f40c51e84a7480971a4788dc9464a9faba82b5e5f5ff22c +SIZE (commons-math3-3.0-src.tar.gz) = 1646334 diff --git a/math/jakarta-commons-math3/files/patch-build.xml b/math/jakarta-commons-math3/files/patch-build.xml new file mode 100644 index 000000000000..979022a68fd9 --- /dev/null +++ b/math/jakarta-commons-math3/files/patch-build.xml @@ -0,0 +1,11 @@ +--- 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 @@ + + + +- ++ + + + diff --git a/math/jakarta-commons-math3/pkg-descr b/math/jakarta-commons-math3/pkg-descr new file mode 100644 index 000000000000..73b50f45eba5 --- /dev/null +++ b/math/jakarta-commons-math3/pkg-descr @@ -0,0 +1,5 @@ +Commons Math is a library of lightweight, self-contained mathematics and +statistics components addressing the most common problems not available in the +Java programming language or Commons Lang. + +WWW: http://jakarta.apache.org/commons/math/