diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2024-03-06 14:17:31 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-03-29 14:57:38 +0100 |
commit | 4d7bd2153de16ff8e8c5b0750f413b86a9b3dc4a (patch) | |
tree | 56a38fca2f66115d1c4cfeab8970c6bfac015371 /dev-java/eclipse-ecj | |
parent | dev-java/swt: add 4.31 (diff) | |
download | gentoo-4d7bd2153de16ff8e8c5b0750f413b86a9b3dc4a.tar.gz gentoo-4d7bd2153de16ff8e8c5b0750f413b86a9b3dc4a.tar.bz2 gentoo-4d7bd2153de16ff8e8c5b0750f413b86a9b3dc4a.zip |
dev-java/eclipse-ecj: add 4.31
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/35982
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/eclipse-ecj')
-rw-r--r-- | dev-java/eclipse-ecj/Manifest | 1 | ||||
-rw-r--r-- | dev-java/eclipse-ecj/eclipse-ecj-4.31.ebuild | 75 | ||||
-rw-r--r-- | dev-java/eclipse-ecj/files/ecj-4.31 | 7 | ||||
-rw-r--r-- | dev-java/eclipse-ecj/files/eclipse-ecj-4.31-java21.patch | 12 |
4 files changed, 95 insertions, 0 deletions
diff --git a/dev-java/eclipse-ecj/Manifest b/dev-java/eclipse-ecj/Manifest index 81bfdcd45d4d..4da4516ce4b0 100644 --- a/dev-java/eclipse-ecj/Manifest +++ b/dev-java/eclipse-ecj/Manifest @@ -2,3 +2,4 @@ DIST ecjsrc-4.15.jar 2166228 BLAKE2B 794e0ba1a19b325e2dd8ad0b288ccbe04866627670b DIST ecjsrc-4.20.jar 2255761 BLAKE2B 42e16e1bd3d90b8d9bf3e57f83b3e06f2857a20db3e3ac065ce39e95fc47e75de33186115c36dede691bc37fd55fa8123f2220d13f3d5819404f5de702b10fd2 SHA512 fb27c0a37ed5cdfdcdbc904d067bfdd0477ddfd873a6cd8477d3b473734fd0e37329f0e9ab85dc5f89994d68d9886a488bd88568bc00e25f54c1a5a468dc1384 DIST ecjsrc-4.26.jar 2347137 BLAKE2B 22e627178fe35f34cee7ba63e740ef2699bca691d460c81e97c2f18c197042cc0d901eea988331b3fa2ac7daa87daef9ee90bc1e62901935a6f2f3fe5f1e8534 SHA512 e53534160e6a2cdc8c5db7caec617d5671eb59954a86b9dcb36a514024c3205167c8416560796ce61d1aa188f551660f3bfd8eab46fefe9111c8f0b7a977342f DIST ecjsrc-4.30.jar 2330181 BLAKE2B 7f3ba7f8dbfcaea9f8bbcdb8161ae8f164e2bf3469cf2242b6b7df5d375c98322f810b9c6de7209f622740a2cc61704915d255559bd376bf158b114e30a17d40 SHA512 ddc1569082fad0dcf91a9d41d5ef5f2f694f007e1378af5f5f28893aeb91e99acef91af59c762010eba071fa8b8b8a9d367b08e23f91b8c73ceacc6e6150bb23 +DIST ecjsrc-4.31.jar 2347993 BLAKE2B edb1a525646fc3152661a6583ab5c50a1dd7f06dac0b7cdae0913843e0ed6ef2c9862889351557857140c79c479505aeca154958b649d05ace6a5b83f6ccac45 SHA512 3e72ae5e5209dd80f7b3f208aeb0a6eece28ab416c56eedd590c67724c6a905b39b8f27a41394e3cf6a96acc16a9c7dd91d12df9651bc289839648036ac2d430 diff --git a/dev-java/eclipse-ecj/eclipse-ecj-4.31.ebuild b/dev-java/eclipse-ecj/eclipse-ecj-4.31.ebuild new file mode 100644 index 000000000000..a85b35c482a6 --- /dev/null +++ b/dev-java/eclipse-ecj/eclipse-ecj-4.31.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source" +# 3.36.0 according to +# https://github.com/eclipse-jdt/eclipse.jdt.core/blob/R4_30/org.eclipse.jdt.core.compiler.batch/pom.xml#L20 +MAVEN_ID="org.eclipse.jdt:org.eclipse.jdt.core.compiler.batch:3.37.0" + +inherit java-pkg-2 java-pkg-simple prefix + +DMF="R-${PV/_rc/RC}-202402290520" + +DESCRIPTION="Eclipse Compiler for Java" +HOMEPAGE="https://www.eclipse.org/" +SRC_URI="https://download.eclipse.org/eclipse/downloads/drops4/${DMF}/ecjsrc-${PV/_rc/RC}.jar" +S="${WORKDIR}" + +LICENSE="EPL-1.0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +SLOT="4.31" + +BDEPEND="app-arch/unzip" +COMMON_DEP="app-eselect/eselect-java" +# ElementsImpl9.java:206: error: +# method does not override or implement a method from a supertype +DEPEND="${COMMON_DEP} + >=dev-java/ant-1.10.14:0 + >=virtual/jdk-21:*" +# Parser.java:1095: error: +# pattern matching in instanceof is not supported in -source 11 +RDEPEND="${COMMON_DEP} + >=virtual/jre-17:*" + +DOCS=( org/eclipse/jdt/core/README.md ) +PATCHES=( "${FILESDIR}/eclipse-ecj-4.31-java21.patch" ) + +JAVA_AUTOMATIC_MODULE_NAME="org.eclipse.jdt.core.compiler.batch" +JAVA_CLASSPATH_EXTRA="ant" +JAVA_JAR_FILENAME="ecj.jar" +JAVA_LAUNCHER_FILENAME="ecj-${SLOT}" +JAVA_MAIN_CLASS="org.eclipse.jdt.internal.compiler.batch.Main" +JAVA_RESOURCE_DIRS="res" + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + + # Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes + rm META-INF/ECLIPSE_* || die + + mkdir "${JAVA_RESOURCE_DIRS}" || die + find -type f \ + ! -name '*.java' \ + | xargs cp --parent -t "${JAVA_RESOURCE_DIRS}" || die +} + +src_install() { + java-pkg-simple_src_install + insinto /usr/share/java-config-2/compiler + doins "${FILESDIR}/ecj-${SLOT}" + eprefixify "${ED}"/usr/share/java-config-2/compiler/ecj-${SLOT} +} + +pkg_postinst() { + einfo "To select between slots of ECJ..." + einfo " # eselect ecj" + + eselect ecj update ecj-${SLOT} +} + +pkg_postrm() { + eselect ecj update +} diff --git a/dev-java/eclipse-ecj/files/ecj-4.31 b/dev-java/eclipse-ecj/files/ecj-4.31 new file mode 100644 index 000000000000..245976d4ed6d --- /dev/null +++ b/dev-java/eclipse-ecj/files/ecj-4.31 @@ -0,0 +1,7 @@ +JAVAC="@GENTOO_PORTAGE_EPREFIX@/usr/bin/ecj-4.31" +PACKAGE="=dev-java/eclipse-ecj-4.31*" +SUPPORTED_TARGET="1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 9 10 11 12 13 14 15 16 17 18 19 20 21" +SUPPORTED_SOURCE="1.3 1.4 1.5 1.6 1.7 1.8 9 10 11 12 13 14 15 16 17 18 19 20 21" +ANT_BUILD_COMPILER="org.eclipse.jdt.core.JDTCompilerAdapter" +ANT_BUILD_COMPILER_DEPS="eclipse-ecj-4.31" +GENERATION="2" diff --git a/dev-java/eclipse-ecj/files/eclipse-ecj-4.31-java21.patch b/dev-java/eclipse-ecj/files/eclipse-ecj-4.31-java21.patch new file mode 100644 index 000000000000..fc131777bcba --- /dev/null +++ b/dev-java/eclipse-ecj/files/eclipse-ecj-4.31-java21.patch @@ -0,0 +1,12 @@ +# ./org/eclipse/jdt/internal/compiler/parser/Parser.java:4511: \ +# error: reference to StringTemplate is ambiguous +--- a/org/eclipse/jdt/internal/compiler/parser/Parser.java ++++ b/org/eclipse/jdt/internal/compiler/parser/Parser.java +@@ -56,6 +56,7 @@ import org.eclipse.jdt.core.compiler.InvalidInputException; + import org.eclipse.jdt.internal.compiler.ASTVisitor; + import org.eclipse.jdt.internal.compiler.CompilationResult; + import org.eclipse.jdt.internal.compiler.ast.*; ++import org.eclipse.jdt.internal.compiler.ast.StringTemplate; + import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; + import org.eclipse.jdt.internal.compiler.codegen.ConstantPool; + import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; |