git: d33ede1043fa - main - java/apache-commons-httpclient: make backwards compatible with java 8
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 23 Feb 2026 13:28:49 UTC
The branch main has been updated by ronald:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d33ede1043fa5f4dd20a3cbaf5a1ef9c83d5bb6c
commit d33ede1043fa5f4dd20a3cbaf5a1ef9c83d5bb6c
Author: Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2026-02-20 19:55:06 +0000
Commit: Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2026-02-23 13:28:12 +0000
java/apache-commons-httpclient: make backwards compatible with java 8
Dependency openoffice needs java 8. Without this patch openoffice fails
with:
bad class file: /usr/local/share/java/classes/commons-httpclient.jar(org/apache/commons/httpclient/HttpClient.class)
class file has wrong version 65.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
So make httpclient target java 8 for now.
While here I added encoding= to javac instead of the REINPLACE_CMD statement.
PR: 293317
Approved-by: Alex Dupre (maintainer)
---
java/apache-commons-httpclient/Makefile | 5 ----
.../files/patch-build.xml | 34 ++++++++++++++++++++--
2 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/java/apache-commons-httpclient/Makefile b/java/apache-commons-httpclient/Makefile
index fcb964cfcfbd..4ca6b44aef3f 100644
--- a/java/apache-commons-httpclient/Makefile
+++ b/java/apache-commons-httpclient/Makefile
@@ -32,11 +32,6 @@ PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar
PORTDOCS= *
-post-patch:
- @${REINPLACE_CMD} 's/Ortwin Gl.*ck/Ortwin Glueck/' \
- ${WRKSRC}/src/java/org/apache/commons/httpclient/*.java \
- ${WRKSRC}/src/java/org/apache/commons/httpclient/*/*.java
-
do-install:
@${ECHO_MSG} -n ">> Installing JAR file as ${JAVAJARDIR}/${PORTNAME}.jar..."
@${INSTALL_DATA} ${WRKSRC}/dist/${PORTNAME}.jar ${STAGEDIR}${JAVAJARDIR}/
diff --git a/java/apache-commons-httpclient/files/patch-build.xml b/java/apache-commons-httpclient/files/patch-build.xml
index 98ba3dfbfef7..c1458323a02f 100644
--- a/java/apache-commons-httpclient/files/patch-build.xml
+++ b/java/apache-commons-httpclient/files/patch-build.xml
@@ -1,12 +1,23 @@
---- build.xml.orig 2007-10-28 09:00:18.000000000 +0100
-+++ build.xml 2007-10-28 09:00:37.000000000 +0100
-@@ -184,13 +184,13 @@
+--- build.xml.orig 2007-08-18 09:02:14 UTC
++++ build.xml
+@@ -179,24 +179,33 @@ -->
+ description="Compile shareable components">
+ <javac srcdir ="${source.home}/java"
+ destdir ="${build.home}/classes"
++ encoding ="ISO-8859-1"
++ source ="8"
++ target ="8"
+ debug ="${compile.debug}"
+ deprecation ="${compile.deprecation}"
optimize ="${compile.optimize}">
<classpath refid="compile.classpath"/>
</javac>
- <javac srcdir ="${source.home}/examples"
+ <!--javac srcdir ="${source.home}/examples"
destdir ="${build.home}/examples"
++ encoding ="ISO-8859-1"
++ source ="8"
++ target ="8"
debug ="${compile.debug}"
deprecation ="${compile.deprecation}"
optimize ="${compile.optimize}">
@@ -16,3 +27,20 @@
</target>
<target name="compile.tests" depends="compile"
+ description="Compile unit test cases">
+ <javac srcdir ="${test.home}"
+ destdir ="${build.home}/tests"
++ encoding ="ISO-8859-1"
++ source ="8"
++ target ="8"
+ debug ="${compile.debug}"
+ deprecation ="${compile.deprecation}"
+ optimize ="${compile.optimize}">
+@@ -248,6 +257,7 @@ -->
+ doctitle ="<h1>${component.title}</h1>"
+ windowtitle ="${component.title} (Version ${component.version})"
+ bottom ="Copyright (c) 1999-2005 - Apache Software Foundation"
++ encoding ="ISO-8859-1"
+ >
+ <classpath refid="test.classpath"/>
+ <link href="${javadoc.j2sdk.link}"/>