summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2023-11-20 17:37:48 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2023-11-24 12:14:37 +0100
commit3f1b41f2d7103c1381bca7d36e8b60c9c9f73bfc (patch)
tree83773406a4fea9f3f6b0391f8217cddc90d317ef /dev-java/eclipse-ecj
parentdev-java/eclipse-ecj: fix runtime error (slot 4.29) (diff)
downloadgentoo-3f1b41f2d7103c1381bca7d36e8b60c9c9f73bfc.tar.gz
gentoo-3f1b41f2d7103c1381bca7d36e8b60c9c9f73bfc.tar.bz2
gentoo-3f1b41f2d7103c1381bca7d36e8b60c9c9f73bfc.zip
dev-java/eclipse-ecj: merge ant-eclipse-ecj
Upstream builds both in the same jar file, see https://download.eclipse.org/eclipse/downloads/drops4/R-4.29-202309031000/#JDTCORE Removes reference to https://bugs.eclipse.org/bugs/show_bug.cgi?id=479134 Adds MAVEN_ID Adds Automatic-module-name Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/eclipse-ecj')
-rw-r--r--dev-java/eclipse-ecj/eclipse-ecj-4.29-r1.ebuild27
-rw-r--r--dev-java/eclipse-ecj/files/ecj-4.297
2 files changed, 22 insertions, 12 deletions
diff --git a/dev-java/eclipse-ecj/eclipse-ecj-4.29-r1.ebuild b/dev-java/eclipse-ecj/eclipse-ecj-4.29-r1.ebuild
index 6ea7cb328bd8..0de20cf2511c 100644
--- a/dev-java/eclipse-ecj/eclipse-ecj-4.29-r1.ebuild
+++ b/dev-java/eclipse-ecj/eclipse-ecj-4.29-r1.ebuild
@@ -4,21 +4,22 @@
EAPI=8
JAVA_PKG_IUSE="doc source"
+# 3.35.0 according to
+# https://github.com/eclipse-jdt/eclipse.jdt.core/blob/R4_29/org.eclipse.jdt.core.compiler.batch/pom.xml#L20
+MAVEN_ID="org.eclipse.jdt:org.eclipse.jdt.core.compiler.batch:3.35.0"
-inherit java-pkg-2 java-pkg-simple
+inherit java-pkg-2 java-pkg-simple prefix
-MY_PN="ecj"
DMF="R-${PV}-202309031000"
DESCRIPTION="Eclipse Compiler for Java"
HOMEPAGE="https://www.eclipse.org/"
-SRC_URI="https://download.eclipse.org/eclipse/downloads/drops4/${DMF}/${MY_PN}src-${PV}.jar"
+SRC_URI="https://download.eclipse.org/eclipse/downloads/drops4/${DMF}/ecjsrc-${PV}.jar"
S="${WORKDIR}"
LICENSE="EPL-1.0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
SLOT="4.29"
-IUSE="+ant"
BDEPEND="
app-arch/unzip
@@ -34,24 +35,19 @@ DEPEND="${COMMON_DEP}
# pattern matching in instanceof is not supported in -source 11
RDEPEND="${COMMON_DEP}
>=virtual/jre-17:*"
-PDEPEND="ant? ( ~dev-java/ant-eclipse-ecj-${PV} )"
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="${MY_PN}.jar"
-JAVA_LAUNCHER_FILENAME="${MY_PN}-${SLOT}"
+JAVA_JAR_FILENAME="ecj.jar"
+JAVA_LAUNCHER_FILENAME="ecj-${SLOT}"
JAVA_MAIN_CLASS="org.eclipse.jdt.internal.compiler.batch.Main"
JAVA_RESOURCE_DIRS="res"
-# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=479134 for details
src_prepare() {
java-pkg-2_src_prepare
- # These have their own package.
- rm org/eclipse/jdt/core/JDTCompilerAdapter.java || die
- rm -r org/eclipse/jdt/internal/antadapter || die
-
mkdir "${JAVA_RESOURCE_DIRS}" || die
find -type f \
! -name '*.java' \
@@ -66,6 +62,13 @@ src_compile() {
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"
diff --git a/dev-java/eclipse-ecj/files/ecj-4.29 b/dev-java/eclipse-ecj/files/ecj-4.29
new file mode 100644
index 000000000000..4cb14c005ddf
--- /dev/null
+++ b/dev-java/eclipse-ecj/files/ecj-4.29
@@ -0,0 +1,7 @@
+JAVAC="@GENTOO_PORTAGE_EPREFIX@/usr/bin/ecj-4.29"
+PACKAGE="=dev-java/ant-eclipse-ecj-4.29*"
+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.29,ant-eclipse-ecj-4.29"
+GENERATION="2"