diff --git a/math/apache-commons-math/Makefile b/math/apache-commons-math/Makefile index 2939cf7ac7dc..efd30987afbf 100644 --- a/math/apache-commons-math/Makefile +++ b/math/apache-commons-math/Makefile @@ -1,57 +1,54 @@ PORTNAME= commons-math PORTVERSION= 3.6.1 PORTREVISION= 2 CATEGORIES= math java MASTER_SITES= APACHE_COMMONS_SOURCE \ https://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 WWW= https://commons.apache.org/proper/commons-math/ 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= compile jar MAKE_ARGS= -Dlibdir=${WRKDIR} -Dnoget=true JARFILE= ${PORTNAME:S,3,,}-3.6.jar DESTJARFILE= ${PORTNAME}.jar PLIST_FILES+= ${JAVAJARDIR}/${DESTJARFILE} OPTIONS_DEFINE= DOCS NO_ARCH= yes .include .if ${PORT_OPTIONS:MDOCS} ALL_TARGET+= javadoc PORTDOCS= LICENSE.txt NOTICE.txt RELEASE-NOTES.txt license-header.txt .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} ${INSTALL_DATA} ${WRKSRC}/*.txt ${STAGEDIR}${DOCSDIR}/ .endif .include diff --git a/math/apache-commons-math/files/patch-src_main_java_org_apache_commons_math3_optimization_direct_PowellOptimizer.java b/math/apache-commons-math/files/patch-src_main_java_org_apache_commons_math3_optimization_direct_PowellOptimizer.java new file mode 100644 index 000000000000..4cfd84630589 --- /dev/null +++ b/math/apache-commons-math/files/patch-src_main_java_org_apache_commons_math3_optimization_direct_PowellOptimizer.java @@ -0,0 +1,22 @@ +BROKEN_armv7= fails to compile: PowellOptimizer.java:301: error: Illegal static declaration in inner class PowellOptimizer.LineSearch + +--- src/main/java/org/apache/commons/math3/optimization/direct/PowellOptimizer.java.orig 2024-10-24 09:29:04 UTC ++++ src/main/java/org/apache/commons/math3/optimization/direct/PowellOptimizer.java +@@ -297,7 +297,7 @@ public class PowellOptimizer + * but will not pass the convergence check, so that the custom checker + * will always decide when to stop the line search. + */ +- private static final double ABS_TOL_UNUSED = Double.MIN_VALUE; ++// private static final double ABS_TOL_UNUSED = Double.MIN_VALUE; + /** + * Automatic bracketing. + */ +@@ -314,7 +314,7 @@ public class PowellOptimizer + LineSearch(double rel, + double abs) { + super(REL_TOL_UNUSED, +- ABS_TOL_UNUSED, ++ /* ABS_TOL_UNUSED */ Double.MIN_VALUE, + new SimpleUnivariateValueChecker(rel, abs)); + } +