From 7ccd417e1c5fc19ce8012757a588bbcb5c14f9d0 Mon Sep 17 00:00:00 2001 From: "Volkmar W. Pogatzki" Date: Tue, 23 Jan 2024 20:43:27 +0100 Subject: dev-java/eclipse-ecj: 4.30-r1 for >=dev-java/ant-1.10.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Volkmar W. Pogatzki Signed-off-by: Miroslav Ć ulc --- dev-java/eclipse-ecj/eclipse-ecj-4.30-r1.ebuild | 81 +++++++++++++++++++++++++ dev-java/eclipse-ecj/eclipse-ecj-4.30.ebuild | 81 ------------------------- 2 files changed, 81 insertions(+), 81 deletions(-) create mode 100644 dev-java/eclipse-ecj/eclipse-ecj-4.30-r1.ebuild delete mode 100644 dev-java/eclipse-ecj/eclipse-ecj-4.30.ebuild (limited to 'dev-java') diff --git a/dev-java/eclipse-ecj/eclipse-ecj-4.30-r1.ebuild b/dev-java/eclipse-ecj/eclipse-ecj-4.30-r1.ebuild new file mode 100644 index 000000000000..8198793a6a85 --- /dev/null +++ b/dev-java/eclipse-ecj/eclipse-ecj-4.30-r1.ebuild @@ -0,0 +1,81 @@ +# 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.36.0" + +inherit java-pkg-2 java-pkg-simple prefix + +DMF="R-${PV/_rc/RC}-202312010110" + +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" +SLOT="4.30" + +BDEPEND=" + app-arch/unzip + app-arch/zip +" +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 ) + +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() { + java-pkg-2_src_prepare + + mkdir "${JAVA_RESOURCE_DIRS}" || die + find -type f \ + ! -name '*.java' \ + | xargs cp --parent -t "${JAVA_RESOURCE_DIRS}" || die +} + +src_compile() { + java-pkg-simple_src_compile + # Error: A JNI error has occurred, please check your installation and try again + # Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes + zip -d ecj.jar "META-INF/ECLIPSE_.RSA" || die "Failed to remove ECLIPSE_.RSA" + zip -d ecj.jar "META-INF/ECLIPSE_.SF" || die "Failed to remove ECLIPSE_.SF" +} + +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/eclipse-ecj-4.30.ebuild b/dev-java/eclipse-ecj/eclipse-ecj-4.30.ebuild deleted file mode 100644 index 4dcc76c35f8f..000000000000 --- a/dev-java/eclipse-ecj/eclipse-ecj-4.30.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2023 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.36.0" - -inherit java-pkg-2 java-pkg-simple prefix - -DMF="R-${PV/_rc/RC}-202312010110" - -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 ~amd64-linux ~x86-linux" -SLOT="4.30" - -BDEPEND=" - app-arch/unzip - app-arch/zip -" -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-core: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 ) - -JAVA_AUTOMATIC_MODULE_NAME="org.eclipse.jdt.core.compiler.batch" -JAVA_CLASSPATH_EXTRA="ant-core" -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() { - java-pkg-2_src_prepare - - mkdir "${JAVA_RESOURCE_DIRS}" || die - find -type f \ - ! -name '*.java' \ - | xargs cp --parent -t "${JAVA_RESOURCE_DIRS}" || die -} - -src_compile() { - java-pkg-simple_src_compile - # Error: A JNI error has occurred, please check your installation and try again - # Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes - zip -d ecj.jar "META-INF/ECLIPSE_.RSA" || die "Failed to remove ECLIPSE_.RSA" - zip -d ecj.jar "META-INF/ECLIPSE_.SF" || die "Failed to remove ECLIPSE_.SF" -} - -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 -} -- cgit v1.2.3-65-gdbad