Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2024 07:18:34 GMT
From:      Vladimir Druzenko <vvd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: c2c83f08f793 - 2024Q1 - math/apache-commons-math: build empty jar file (without classes) and doesn't build with jdk 11+
Message-ID:  <202401160718.40G7IY5m012525@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2024Q1 has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c2c83f08f79365059b73bbbefcc6375c2ab400bc

commit c2c83f08f79365059b73bbbefcc6375c2ab400bc
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-01-16 07:06:04 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-01-16 07:17:52 +0000

    math/apache-commons-math: build empty jar file (without classes) and doesn't build with jdk 11+
    
    1. Without target "compile" commons-math.jar was ~8KB only and without
    classes - whit patch it's ~2MB.
    2. Doesn't build with OpenJDK 11+: "compile.source" and "compile.target"
    1.5 deprecated and was removed in newer OpenJDKs.
    
    Approved by:            bofh (maintainer), arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D43462
    MFH:                    2024Q1
    
    (cherry picked from commit 11fc1e476c9d02bff164f4f37f7ba24ca6d7d87c)
---
 math/apache-commons-math/Makefile              |  4 ++--
 math/apache-commons-math/files/patch-build.xml | 11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/math/apache-commons-math/Makefile b/math/apache-commons-math/Makefile
index 59e38cc39ec5..2939cf7ac7dc 100644
--- a/math/apache-commons-math/Makefile
+++ b/math/apache-commons-math/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	commons-math
 PORTVERSION=	3.6.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	math java
 MASTER_SITES=	APACHE_COMMONS_SOURCE \
 		https://repo1.maven.org/maven2/junit/junit/4.8.2/:source2
@@ -23,7 +23,7 @@ USE_ANT=	yes
 USE_JAVA=	yes
 USE_LOCALE=	en_US.ISO8859-1
 
-ALL_TARGET=	jar
+ALL_TARGET=	compile jar
 MAKE_ARGS=	-Dlibdir=${WRKDIR} -Dnoget=true
 
 JARFILE=	${PORTNAME:S,3,,}-3.6.jar
diff --git a/math/apache-commons-math/files/patch-build.xml b/math/apache-commons-math/files/patch-build.xml
index 256c8c63f281..57ce05cc8e36 100644
--- a/math/apache-commons-math/files/patch-build.xml
+++ b/math/apache-commons-math/files/patch-build.xml
@@ -1,5 +1,16 @@
 --- build.xml.orig	2016-03-17 12:14:52 UTC
 +++ build.xml
+@@ -100,8 +100,8 @@
+   <property name="source.encoding"         value="UTF-8"/>
+     
+   <!-- JDK level -->
+-  <property name="compile.source"          value="1.5"/>
+-  <property name="compile.target"          value="1.5"/>
++  <property name="compile.source"          value="8"/>
++  <property name="compile.target"          value="8"/>
+ 
+   <!-- Base compile classpath -->
+   <path id="compile.classpath">
 @@ -174,7 +174,7 @@
  
  <!-- ========== Unit Test Targets ========================================= -->



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401160718.40G7IY5m012525>