diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2020-01-24 19:02:45 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2020-01-24 19:02:45 +0000 |
commit | 5dbafb96752e99c2ecec229c36192984e7d69c15 (patch) | |
tree | 577dec6e4ca88a086646466eafd24d39f8a3e7ca /math/apache-commons-math | |
parent | New port: cad/PrusaSlicer (diff) |
math/jakarta-commons-math3 update and rename to apache-commons-math
Unbreak and move as it now an Apache Commons project.
PR: 241380
Approved by: bofh (maintainer)
Diffstat (limited to 'math/apache-commons-math')
-rw-r--r-- | math/apache-commons-math/Makefile | 58 | ||||
-rw-r--r-- | math/apache-commons-math/distinfo | 5 | ||||
-rw-r--r-- | math/apache-commons-math/files/patch-build.xml | 60 | ||||
-rw-r--r-- | math/apache-commons-math/pkg-descr | 17 |
4 files changed, 140 insertions, 0 deletions
diff --git a/math/apache-commons-math/Makefile b/math/apache-commons-math/Makefile new file mode 100644 index 000000000000..8093a59cc4a1 --- /dev/null +++ b/math/apache-commons-math/Makefile @@ -0,0 +1,58 @@ +# Created by: Muhammad Moinur Rahmanh <5u623l20@gmail.com> +# $FreeBSD$ + +PORTNAME= commons-math +PORTVERSION= 3.6.1 +CATEGORIES= math java +MASTER_SITES= APACHE_COMMONS_SOURCE \ + http://repo1.maven.org/maven2/junit/junit/4.8.2/:source2 +PKGNAMEPREFIX= apache- +DISTNAME= ${PORTNAME}3-${PORTVERSION}-src +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + junit-4.8.2.jar:source2 +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= bofh@FreeBSD.org +COMMENT= Java library of self-contained mathematics and statistics components + +LICENSE= APACHE20 + +BROKEN_armv6= fails to compile: build.xml: Compile failed; see the compiler error output for details +BROKEN_armv7= fails to compile: PowellOptimizer.java:301: error: Illegal static declaration in inner class PowellOptimizer.LineSearch + +USE_ANT= yes +USE_JAVA= yes +USE_LOCALE= en_US.ISO8859-1 + +ALL_TARGET= jar +MAKE_ARGS= -Dlibdir=${WRKDIR} -Dnoget=true + +JARFILE= ${PORTNAME:S,3,,}-3.6.jar +DESTJARFILE= ${PORTNAME}.jar +PLIST_FILES+= ${JAVAJARDIR}/${DESTJARFILE} + +OPTIONS_DEFINE= DOCS + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MDOCS} +ALL_TARGET+= javadoc +OTHERDOCS= LICENSE.txt NOTICE.txt +PORTDOCS= apidocs ${OTHERDOCS} +.endif + +post-extract: + ${MKDIR} ${WRKSRC}/lib + ${CP} ${DISTDIR}/junit-4.8.2.jar ${WRKSRC}/lib/ + +do-install: + ${MKDIR} ${STAGEDIR}${JAVAJARDIR} + ${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${STAGEDIR}${JAVAJARDIR}/${DESTJARFILE} + +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${DOCSDIR}/apidocs + (cd ${WRKSRC}/target/apidocs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/apidocs/${SDIR}) + ${INSTALL_DATA} ${WRKSRC}/*.txt ${STAGEDIR}${DOCSDIR}/ +.endif + +.include <bsd.port.mk> diff --git a/math/apache-commons-math/distinfo b/math/apache-commons-math/distinfo new file mode 100644 index 000000000000..860016f63547 --- /dev/null +++ b/math/apache-commons-math/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1571601170 +SHA256 (commons-math3-3.6.1-src.tar.gz) = 46171449bcfb7d76912275ed1af9ef7de03f7eb1cb9a801e3faf304cc8f586a6 +SIZE (commons-math3-3.6.1-src.tar.gz) = 3665572 +SHA256 (junit-4.8.2.jar) = a2aa2c3bb2b72da76c3e6a71531f1eefdc350494819baf2b1d80d7146e020f9e +SIZE (junit-4.8.2.jar) = 237344 diff --git a/math/apache-commons-math/files/patch-build.xml b/math/apache-commons-math/files/patch-build.xml new file mode 100644 index 000000000000..256c8c63f281 --- /dev/null +++ b/math/apache-commons-math/files/patch-build.xml @@ -0,0 +1,60 @@ +--- build.xml.orig 2016-03-17 12:14:52 UTC ++++ build.xml +@@ -174,7 +174,7 @@ + + <!-- ========== Unit Test Targets ========================================= --> + +- <target name="compile.tests" depends="compile, download-dependencies" description="Compile unit tests."> ++ <target name="compile.tests" depends="compile" description="Compile unit tests."> + + <javac srcdir="${test.home}" + destdir="${build.home}/test-classes" +@@ -256,7 +256,7 @@ + + <!-- ========== Create Jar ================================================ --> + +- <target name="jar" depends="test" description="Create jar file"> ++ <target name="jar" description="Create jar file"> + + <copy file="LICENSE.txt" tofile="${build.home}/classes/META-INF/LICENSE.txt"/> + <copy file="NOTICE.txt" tofile="${build.home}/classes/META-INF/NOTICE.txt"/> +@@ -339,38 +339,11 @@ + + <!-- ========== Gump Target ===================================================== --> + +- <target name="gump" depends="clean,test,javadoc,jar" description="Gump Target - clean,test,javadoc,jar"/> ++ <target name="gump" depends="clean,javadoc,jar" description="Gump Target - clean,test,javadoc,jar"/> + + + <!-- ========== Download Dependencies =========================================== --> + +- <target name="download-dependencies" +- depends="check-availability" unless="skip.download"> +- <echo message="doing download-dependencies..." /> +- <antcall target="download-junit" /> +- <antcall target="download-hamcrest" /> +- </target> +- +- <target name="check-availability"> +- <echo message="doing check-availability..." /> +- <available file="${junit.jar}" property="junit.found"/> +- </target> +- +- <target name="download-junit" unless="junit.found"> +- <echo message="Downloading junit..."/> +- <mkdir dir="${download.lib.dir}" /> +- <get dest="${download.lib.dir}/junit-${junit.version}.jar" +- usetimestamp="true" ignoreerrors="true" +- src="http://repo1.maven.org/maven2/junit/junit/${junit.version}/junit-${junit.version}.jar"/> +- </target> +- +- <target name="download-hamcrest" unless="hamcrest.found"> +- <echo message="Downloading hamcrest..."/> +- <mkdir dir="${download.lib.dir}" /> +- <get dest="${download.lib.dir}/${hamcrest.jar}" +- usetimestamp="true" ignoreerrors="true" +- src="http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/> +- </target> + + </project> + diff --git a/math/apache-commons-math/pkg-descr b/math/apache-commons-math/pkg-descr new file mode 100644 index 000000000000..3a15b8bccae8 --- /dev/null +++ b/math/apache-commons-math/pkg-descr @@ -0,0 +1,17 @@ +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. + +Guiding principles: + + * Real-world application use cases determine development priority. + * This package emphasizes small, easily integrated components rather than + large libraries with complex dependencies and configurations. + * All algorithms are fully documented and follow generally accepted best + practices. + * In situations where multiple standard algorithms exist, a Strategy pattern + is used to support multiple implementations. + * Limited dependencies. No external dependencies beyond Commons components + and the core Java platform. + +WWW: http://commons.apache.org/proper/commons-math/ |