community/java-lz4: fix build with openjdk21

This commit is contained in:
Celeste 2024-05-05 16:18:00 +00:00 committed by Patrycja Rosa
parent bbfcb18121
commit 68c7fc17b9
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From: Celeste <20312-Celeste@users.gitlab.alpinelinux.org>
Date: Sun, 05 May 2024 17:21:00 +0000
Subject: [PATCH] OpenJDK 21 compatibility
- Update -source/-target to 8, as OpenJDK 21
has removed support for 7.
- Upgrade mvel to 2.5.2, which fixes the
"java.lang.ClassNotFoundException: java.lang.Compiler" error
due to OpenJDK 21 removing that class.
---
--- a/build.xml
+++ b/build.xml
@@ -25,8 +25,8 @@
<property name="dist" location="dist"/>
<property name="lib" location="lib" />
- <property name="javac.source" value="1.7" />
- <property name="javac.target" value="1.7" />
+ <property name="javac.source" value="1.8" />
+ <property name="javac.target" value="1.8" />
<property name="ivy.jar.version" value="2.5.0"/>
<property name="ivy.jar.name" value="ivy-${ivy.jar.version}.jar"/>
@@ -131,7 +131,7 @@
</target>
<target name="generate-sources" depends="init">
- <ivy:cachepath organisation="org.mvel" module="mvel2" revision="2.3.2.Final"
+ <ivy:cachepath organisation="org.mvel" module="mvel2" revision="2.5.2.Final"
inline="true" conf="default" transitive="true" pathid="mvel.classpath"/>
<mkdir dir="${build}/java" />
<java

View File

@ -2,7 +2,7 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=java-lz4
pkgver=1.8.0
pkgrel=1
pkgrel=2
pkgdesc="LZ4 compression for Java"
url="https://github.com/lz4/lz4-java"
# aarch64, ppc64le: hangs during build
@ -15,6 +15,7 @@ subpackages="$pkgname-native"
source="https://github.com/lz4/lz4-java/archive/$pkgver/lz4-java-$pkgver.tar.gz
0001-ivy-location.patch
0002-dont-bundle-natives.patch
0003-openjdk21-compatibility.patch
"
builddir="$srcdir/lz4-java-$pkgver"
@ -43,4 +44,5 @@ sha512sums="
ae78748d984d2ede18018d5e9ae6aee0d5fe6ac8b56d717f863968cfad6e9f85b62305692345ba16002bee68278e87a0364aa98aeb92e2af6dc169e5d5b612d4 lz4-java-1.8.0.tar.gz
bd80cac3454db4cd95fab162d0031d4866cc7a9f9822f1231d5f9c766aa550398b9e27fad48c8150c0c8a538673ca3ad7de95edff9bd790d3351ba318ea44c49 0001-ivy-location.patch
9d435cd35af15988d8844b38d7d00ad423062680323e9d5d395f431e736668ee10148bc3a0147a430cea522983a4ca54e57557d7330c42347bd71c2c9a06d622 0002-dont-bundle-natives.patch
74d5a77fdbebcd9f92c44dd7053bfc76f6944b2702245c0ff3e2644babaa16a97cd5cdf7630882bd852f7cb636892f7d2e4cb61160d17ad617174ec1d0056b1c 0003-openjdk21-compatibility.patch
"