1 |
commit: 7b2992fd44c5df1a80931e28cb8c1faa7ed2bb89 |
2 |
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> |
3 |
AuthorDate: Sun May 15 11:33:58 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 30 08:36:04 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b2992fd |
7 |
|
8 |
dev-java/eclipse-ecj: virtual/jdk-11:*" -> -17:* |
9 |
|
10 |
Bug: https://bugs.gentoo.org/831559 |
11 |
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/25501 |
13 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
14 |
|
15 |
dev-java/eclipse-ecj/eclipse-ecj-4.22-r1.ebuild | 72 +++++++++++++++++++++++++ |
16 |
1 file changed, 72 insertions(+) |
17 |
|
18 |
diff --git a/dev-java/eclipse-ecj/eclipse-ecj-4.22-r1.ebuild b/dev-java/eclipse-ecj/eclipse-ecj-4.22-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 000000000000..82bd5d06ebf2 |
21 |
--- /dev/null |
22 |
+++ b/dev-java/eclipse-ecj/eclipse-ecj-4.22-r1.ebuild |
23 |
@@ -0,0 +1,72 @@ |
24 |
+# Copyright 1999-2022 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=8 |
28 |
+ |
29 |
+JAVA_PKG_IUSE="doc source" |
30 |
+ |
31 |
+inherit java-pkg-2 java-pkg-simple |
32 |
+ |
33 |
+MY_PN="ecj" |
34 |
+DMF="R-${PV}-202111241800" |
35 |
+ |
36 |
+DESCRIPTION="Eclipse Compiler for Java" |
37 |
+HOMEPAGE="https://www.eclipse.org/" |
38 |
+SRC_URI="https://download.eclipse.org/eclipse/downloads/drops4/${DMF}/${MY_PN}src-${PV}.jar" |
39 |
+ |
40 |
+LICENSE="EPL-1.0" |
41 |
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" |
42 |
+SLOT="4.22" |
43 |
+IUSE="+ant" |
44 |
+ |
45 |
+COMMON_DEP=" |
46 |
+ app-eselect/eselect-java |
47 |
+ dev-java/ant-core:0" |
48 |
+RDEPEND="${COMMON_DEP} |
49 |
+ >=virtual/jre-11:*" |
50 |
+DEPEND="${COMMON_DEP} |
51 |
+ >=virtual/jdk-17:* |
52 |
+ app-arch/unzip" |
53 |
+PDEPEND=" |
54 |
+ ant? ( ~dev-java/ant-eclipse-ecj-${PV} )" |
55 |
+ |
56 |
+JAVA_JAR_FILENAME="${MY_PN}.jar" |
57 |
+JAVA_GENTOO_CLASSPATH="ant-core" |
58 |
+ |
59 |
+S="${WORKDIR}" |
60 |
+ |
61 |
+# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=479134 for details |
62 |
+src_prepare() { |
63 |
+ default |
64 |
+ |
65 |
+ # These have their own package. |
66 |
+ rm org/eclipse/jdt/core/JDTCompilerAdapter.java || die |
67 |
+ rm -r org/eclipse/jdt/internal/antadapter || die |
68 |
+ |
69 |
+ # JavaCore is not distributed in the jar |
70 |
+ sed -i -e '/import org.eclipse.jdt.core.JavaCore;/d' \ |
71 |
+ -e 's|JavaCore.getOptions()||g' \ |
72 |
+ org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java |
73 |
+} |
74 |
+ |
75 |
+src_compile() { |
76 |
+ java-pkg-simple_src_compile |
77 |
+ find org META-INF -type f ! -name "*.java" | xargs jar uvf "${JAVA_JAR_FILENAME}" || die "jar update failed" |
78 |
+} |
79 |
+ |
80 |
+src_install() { |
81 |
+ java-pkg-simple_src_install |
82 |
+ java-pkg_dolauncher ${MY_PN}-${SLOT} --main \ |
83 |
+ org.eclipse.jdt.internal.compiler.batch.Main |
84 |
+} |
85 |
+ |
86 |
+pkg_postinst() { |
87 |
+ einfo "To select between slots of ECJ..." |
88 |
+ einfo " # eselect ecj" |
89 |
+ |
90 |
+ eselect ecj update ecj-${SLOT} |
91 |
+} |
92 |
+ |
93 |
+pkg_postrm() { |
94 |
+ eselect ecj update |
95 |
+} |