public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/eclipse-ecj/, dev-java/eclipse-ecj/files/
Date: Fri, 29 Mar 2024 13:57:44 +0000 (UTC)	[thread overview]
Message-ID: <1711720658.4d7bd2153de16ff8e8c5b0750f413b86a9b3dc4a.fordfrog@gentoo> (raw)

commit:     4d7bd2153de16ff8e8c5b0750f413b86a9b3dc4a
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Wed Mar  6 13:17:31 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Fri Mar 29 13:57:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d7bd215

dev-java/eclipse-ecj: add 4.31

Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/35982
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/eclipse-ecj/Manifest                      |  1 +
 dev-java/eclipse-ecj/eclipse-ecj-4.31.ebuild       | 75 ++++++++++++++++++++++
 dev-java/eclipse-ecj/files/ecj-4.31                |  7 ++
 .../files/eclipse-ecj-4.31-java21.patch            | 12 ++++
 4 files changed, 95 insertions(+)

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;


             reply	other threads:[~2024-03-29 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 13:57 Miroslav Šulc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-07  6:38 [gentoo-commits] repo/gentoo:master commit in: dev-java/eclipse-ecj/, dev-java/eclipse-ecj/files/ Miroslav Šulc
2024-01-24  9:03 Miroslav Šulc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1711720658.4d7bd2153de16ff8e8c5b0750f413b86a9b3dc4a.fordfrog@gentoo \
    --to=fordfrog@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox