summaryrefslogtreecommitdiff
path: root/dev-java/antlr
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/antlr')
-rw-r--r--dev-java/antlr/Manifest3
-rw-r--r--dev-java/antlr/antlr-3.2-r2.ebuild (renamed from dev-java/antlr/antlr-3.2-r1.ebuild)17
-rw-r--r--dev-java/antlr/files/antlr-3.2-java21.patch31
3 files changed, 42 insertions, 9 deletions
diff --git a/dev-java/antlr/Manifest b/dev-java/antlr/Manifest
index e43f5d95ea16..6a40a9227c36 100644
--- a/dev-java/antlr/Manifest
+++ b/dev-java/antlr/Manifest
@@ -1,12 +1,13 @@
AUX 3.2-java-8.patch 1318 BLAKE2B f7cf19e6da346c50ed066782905fffeac9b9f42c9988bc3ba0d18bc434fecfaa6d4ad3e74d2c84c87854716435be4a596c47b919ce42b310e48dc70d184bc7f5 SHA512 70c9dc23ec64ba75bfcfc0597544b13c2c35c523c6f2c9d82dbc54a44c30a5432a56b6193db74ca9c3d92235bdadc5427857c364abc4df79ffdc1d2b55221d32
AUX 3.2-test-fixes.patch 10294 BLAKE2B e2bed0bc4acd8c7de9eacfa6755f81db2cab78fb20518a51051d5a38fb33e25442e5e39ced3a94b525f3dcb5d0bad4c640c3df9da5b431efdf6d76764b11c5bd SHA512 0af15f7e315182f54c65ebcd298ebc02d6715f2233996d0effe7f44eb433e73ed7a33ee12e96d29f72b4437cead864c99150fee60c3c1740b6451619396be72b
+AUX antlr-3.2-java21.patch 1174 BLAKE2B ad4655ffc1fd71e08cd3d8e198716dbff5d1ef3ada1b0f2b6f1a114f503adfaf2cb9e2e2c139ee3c11d251e501c0dd5bc279da188ff5ed2f659470b5629a3b6e SHA512 5d5720f521c704d1e1b85ffbcbe26e78d5c223f96a6b52597fe972f04095d3ab97f15175b7a01801c5d336aa601d6cff2dec55a84a455a73e6aca9f08b2bc18c
DIST antlr-2.7.7.tar.gz 1816180 BLAKE2B 3a9a51070f8651befeb4d22be344b544e119db34a78522828c2ffc3c481c14b9c7784f0a9997a61f6faedde5b6d1fe12214cfd84fb274f7065f3ffe6a44abf1c SHA512 faa72d2ddcba434ef1233e70c1549e63eba67c00793966322e821cf7f015cccb804448cb92d8fbef0429f59928fad65ec954f8ffbda0acbb8e983de0806d349d
DIST antlr-3.2.jar 1928009 BLAKE2B 9c56b0142abdb7d0caabebbae12618a665f91001e2f472519549a65b8601b81fcca485898c7420087a7b631351eb26e4b98589d7284960efcc3c65155919fd2a SHA512 25a61404c4b41e48eeaed49d41122f9400092248a10eb776d75ce3513295870eca1acc4b06c74925284a27cc64ca0506e34de39fb91996f09727cc5cc72dd9a6
DIST antlr-3.2.tar.gz 837320 BLAKE2B 3addcfed45e67a7f8f3841a890be418626d93229dc326fe4670c6b145a457203a26f01723695573692c65bb6c376349a8d8cd852b339b1f6da7b71a52e14bb4f SHA512 8984221cd89253c033a4596dd56cd51b297393a53b4682f5ab401172745d343371bf0d45417fa286ce972add1b4e474f1f3091fa1345158dbfc040702d61607c
DIST antlr-3.5.3.tar.gz 6752328 BLAKE2B 8ebd098c9475122cddcadd5991b9f882b7fda5868ad979b29c9f4dab97e39cd31e7fc943476c3a854f3e3aee9c1c56384b7fcc893f87548482af5d5d0839fd30 SHA512 c565e1ade7a62bb127df707015afded9a9cea54cbf5488730a327671c57e8718f93f76c4fa28edd856810cb9c7ccbcb27b53a7c8f7e3efc8169e64cfcc535a4c
DIST antlr-4.9.3.tar.gz 4640242 BLAKE2B fb58f5e533051cb2c439c32f0462c1d463c99df862ba7e1a37a1c61378ab36a9edb9525c2a342de5b517da6f02d8291de5976c550932314f3464aad1a778afb9 SHA512 61452404c9639b5a0908cda16605f17c0fed0c9adfc3278c7408f9971420e9d1fe8f9e974e0826c2e3e780fdd83324094c0246cd5b28fa63f5686b094ea08127
EBUILD antlr-2.7.7-r9.ebuild 1106 BLAKE2B 2be9b879a08cd66733a4319900674b3c15f0164fdf0078231cc617ec23137cca4c1b9a43e649addba3ab7a87e621c94430ee00b4365a80775b5638ccb2454cf6 SHA512 7b19f68f46867aaa9f2a3a68567669c14a3b155fc63cc844237052d54a285b5a00cf58e07ac75fc105a2d681f9650d2832984e06eca3b1818673d0b0c27eea0a
-EBUILD antlr-3.2-r1.ebuild 3204 BLAKE2B ddc76d551fcbfb2b1fd5dff04dd9d37ed2ef513568bd2453f9eea8fe410de84d9c5aa80621326879d8d90c424d3a1b32ce57fdf2c7c36889819c59fde98554cb SHA512 d87a6e984baf9710810914e29ed90da99bc8210381daf95e620a46126da95dc188ada0fb3149a424e01581ae936c324c34459ba6ad487ccf8b6ecaab92750c7e
+EBUILD antlr-3.2-r2.ebuild 3261 BLAKE2B 2295d630faf379ee027a33fcaf9b8f9ab877a717069f2f05a2ecb19663641374456f047c5cc2265de4871a1d20c07fe34b1d779c542b6cb39a99aaa35e7537ef SHA512 7dc7a30d913a804038e903df71e5d6db6f379b8355e21cd7506523cde9d5f088d68eff178ef08f1007d9bdb062155c4b259ccd16e8580d210379dff57af3727a
EBUILD antlr-3.5.3.ebuild 1567 BLAKE2B 68d3718034690e67f6eefd4f184d017b78cebee60593178eb706d23db55bc952f83f5fb2a636170664f3160b88fe37b5daca85ae385453683c593f631ec474f9 SHA512 64cfbec7d445af3fd6f95641f0de34675dadee2b2b12c3bc161d05e69d882e1bd7585ef0037ccbb38c20402a3cc5c0a2c0783945545f858d5a313d62664b024a
EBUILD antlr-4.9.3.ebuild 1595 BLAKE2B fd5186714b10efc3912027942eb4b39a94b21200d9a8b0470eb33960ff8562a9dda4bb25358f11964ee296e6adc72146e103da6b3f5636b570ba0bd6ce57e320 SHA512 a7834d9545685f1eb3fe714488d848ceee82aeb99f46d2de67308ddfee2418f794f814267797ac50f0780cdd8a0c73a5506e6885077f9146bf5f104992f4e3d0
MISC metadata.xml 314 BLAKE2B 997f9c85d72f9b4cae21a3ecd063374f769f369d66ce8531fb158a17b9408ae3d35f117386acd08b89c16d5e0e8130b26ddada87b448529bf41a02deb5c1cdf2 SHA512 ad99513f6581ce95415e908eeba185cd4b6d03a8297e99735c7e79bf3dca1fa0c61a7ae03e47d8ba7429269a29558fae7321583b4f7d328e1da6a091237d9fde
diff --git a/dev-java/antlr/antlr-3.2-r1.ebuild b/dev-java/antlr/antlr-3.2-r2.ebuild
index bf4946c25c62..9b58f9bff97e 100644
--- a/dev-java/antlr/antlr-3.2-r1.ebuild
+++ b/dev-java/antlr/antlr-3.2-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
JAVA_PKG_IUSE="doc test"
@@ -11,19 +11,20 @@ DESCRIPTION="A parser generator for many languages"
HOMEPAGE="https://www.antlr3.org/"
SRC_URI="https://www.antlr3.org/download/${P}.tar.gz
https://www.antlr3.org/download/${P}.jar" # Prebuilt version needed.
+S="${WORKDIR}/${P}"
LICENSE="BSD"
SLOT="3"
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
RESTRICT="!test? ( test )"
-CDEPEND=">=dev-java/antlr-2.7.7-r7:0
+CP_DEPEND=">=dev-java/antlr-2.7.7-r7:0
dev-java/stringtemplate:0"
-RDEPEND="${CDEPEND}
+RDEPEND="${CP_DEPEND}
>=virtual/jre-1.8:*"
-DEPEND="${CDEPEND}
+DEPEND="${CP_DEPEND}
>=virtual/jdk-1.8:*
test? ( dev-java/junit:4 )"
@@ -31,11 +32,10 @@ PATCHES=(
# These fixes have been applied in 3.5.
"${FILESDIR}/${PV}-test-fixes.patch"
"${FILESDIR}/${PV}-java-8.patch"
+ "${FILESDIR}/antlr-3.2-java21.patch"
)
-S="${WORKDIR}/${P}"
JAVA_GENTOO_CLASSPATH_EXTRA="${S}/${PN}-runtime.jar"
-JAVA_GENTOO_CLASSPATH="antlr,stringtemplate"
src_unpack() {
unpack ${P}.tar.gz
@@ -49,7 +49,8 @@ src_prepare() {
# to the tests. This is bad but upstream is never going to update
# 3.2 even though other projects still rely on it. If any issues
# arise, we can only put pressure on those projects to upgrade.
- if java-pkg_is-vm-version-ge 1.8; then
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+ if ver_test "${vm_version}" -ge 1.8; then
rm -v tool/src/test/java/org/antlr/test/Test{DFAConversion,SemanticPredicates,TopologicalSort}.java || die
fi
diff --git a/dev-java/antlr/files/antlr-3.2-java21.patch b/dev-java/antlr/files/antlr-3.2-java21.patch
new file mode 100644
index 000000000000..8d885f9a5f11
--- /dev/null
+++ b/dev-java/antlr/files/antlr-3.2-java21.patch
@@ -0,0 +1,31 @@
+bug #919684
+--- a/tool/src/main/java/org/antlr/codegen/CodeGenerator.java
++++ b/tool/src/main/java/org/antlr/codegen/CodeGenerator.java
+@@ -36,6 +36,7 @@ import org.antlr.Tool;
+ import org.antlr.analysis.*;
+ import org.antlr.misc.*;
+ import org.antlr.stringtemplate.*;
++import org.antlr.stringtemplate.StringTemplate;
+ import org.antlr.stringtemplate.language.AngleBracketTemplateLexer;
+ import org.antlr.tool.*;
+
+--- a/tool/src/main/antlr2/org/antlr/grammar/v2/codegen.g
++++ b/tool/src/main/antlr2/org/antlr/grammar/v2/codegen.g
+@@ -32,6 +32,7 @@ header {
+ import org.antlr.misc.*;
+ import java.util.*;
+ import org.antlr.stringtemplate.*;
++ import org.antlr.stringtemplate.StringTemplate;
+ import antlr.TokenWithIndex;
+ import antlr.CommonToken;
+ import org.antlr.codegen.*;
+--- a/tool/src/main/resources/org/antlr/codegen/templates/Java/ST.stg
++++ b/tool/src/main/resources/org/antlr/codegen/templates/Java/ST.stg
+@@ -33,6 +33,7 @@ group ST;
+ @outputFile.imports() ::= <<
+ <@super.imports()>
+ import org.antlr.stringtemplate.*;
++import org.antlr.stringtemplate.StringTemplate;
+ import org.antlr.stringtemplate.language.*;
+ import java.util.HashMap;
+ >>