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)
This commit is contained in:
Ronald Klop
2026-02-20 20:55:06 +01:00
parent 42d84f475d
commit d33ede1043
2 changed files with 31 additions and 8 deletions
-5
View File
@@ -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}/
@@ -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 ="&lt;h1&gt;${component.title}&lt;/h1&gt;"
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}"/>