1 |
commit: 59646ae0e9bb45c86c2eb1b9da66738d51dbbb25 |
2 |
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> |
3 |
AuthorDate: Tue Dec 28 08:49:46 2021 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 29 08:45:56 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59646ae0 |
7 |
|
8 |
app-editors/jedit: EAPI 8 |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/23546 |
13 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
14 |
|
15 |
app-editors/jedit/jedit-5.4.0-r2.ebuild | 116 ++++++++++++++++++++++++++++++++ |
16 |
1 file changed, 116 insertions(+) |
17 |
|
18 |
diff --git a/app-editors/jedit/jedit-5.4.0-r2.ebuild b/app-editors/jedit/jedit-5.4.0-r2.ebuild |
19 |
new file mode 100644 |
20 |
index 000000000000..1394e4d5154d |
21 |
--- /dev/null |
22 |
+++ b/app-editors/jedit/jedit-5.4.0-r2.ebuild |
23 |
@@ -0,0 +1,116 @@ |
24 |
+# Copyright 1999-2021 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=8 |
28 |
+ |
29 |
+JAVA_PKG_IUSE="doc test" |
30 |
+inherit desktop java-pkg-2 java-ant-2 xdg-utils |
31 |
+ |
32 |
+DESCRIPTION="Programmer's editor written in Java" |
33 |
+HOMEPAGE="http://www.jedit.org" |
34 |
+SRC_URI="mirror://sourceforge/${PN}/${PN}${PV}source.tar.bz2" |
35 |
+ |
36 |
+LICENSE="BSD GPL-2" |
37 |
+KEYWORDS="~amd64 ~ppc64 ~x86" |
38 |
+SLOT="0" |
39 |
+ |
40 |
+# Same failure with 5.4.0.ebuild: |
41 |
+# See reports at /var/tmp/portage/app-editors/jedit-5.4.0/work/jEdit/build/test/reports/index.html |
42 |
+# "Failure" "No tests found in org.jedit.io.Native2ASCIIEncodingTest" |
43 |
+RESTRICT="test" |
44 |
+ |
45 |
+CP_DEPEND="dev-java/jsr305:0" |
46 |
+ |
47 |
+# Restricting to java 1.8 as it fails to compile with newer java versions, https://bugs.gentoo.org/828559 |
48 |
+#init: |
49 |
+# [echo] Buildfile for jedit (/var/tmp/portage/app-editors/jedit-5.4.0/work/jEdit/build.xml) |
50 |
+#Class org.apache.tools.ant.types.resources.selectors.Not loaded from parent loader (parentFirst) |
51 |
+#Class org.apache.tools.ant.taskdefs.condition.Equals loaded from parent loader (parentFirst) |
52 |
+# [fail] failing due to Java 1.8 is needed for jEdit to build, please install it and rerun (found Java version: '11') |
53 |
+RDEPEND=" |
54 |
+ ${CP_DEPEND} |
55 |
+ virtual/jre:1.8" |
56 |
+ |
57 |
+DEPEND=" |
58 |
+ ${CP_DEPEND} |
59 |
+ virtual/jdk:1.8 |
60 |
+ dev-java/ant-contrib:0 |
61 |
+ dev-java/ant-apache-bsf:0 |
62 |
+ dev-java/bsh:0 |
63 |
+ test? ( |
64 |
+ dev-java/ant-junit:0 |
65 |
+ dev-java/hamcrest-library:1.3 |
66 |
+ )" |
67 |
+ |
68 |
+S="${WORKDIR}/jEdit" |
69 |
+ |
70 |
+JEDIT_HOME="/usr/share/${PN}" |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ mkdir -p lib/{ant-contrib,compile,default-plugins,scripting,test} || die |
74 |
+ |
75 |
+ eapply "${FILESDIR}"/${P}-build-xml.patch |
76 |
+ |
77 |
+ java-ant_xml-rewrite -f "${S}/build.xml" -c \ |
78 |
+ -e javadoc \ |
79 |
+ -a failonerror \ |
80 |
+ -v no || die |
81 |
+ |
82 |
+ java-pkg-2_src_prepare |
83 |
+} |
84 |
+ |
85 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
86 |
+ |
87 |
+EANT_ANT_TASKS="ant-apache-bsf ant-contrib bsh" |
88 |
+EANT_TEST_GENTOO_CLASSPATH="hamcrest-library-1.3" |
89 |
+EANT_EXTRA_ARGS="-Divy.jar.present=true -Divy.done=true" |
90 |
+EANT_BUILD_TARGET="build" |
91 |
+# TODO could build more docs, ie generate-doc-faq generate-doc-news |
92 |
+# generate-doc-users-guide ua. |
93 |
+EANT_DOC_TARGET="generate-javadoc" |
94 |
+# in fact needed only for docs, but shouldn't hurt |
95 |
+EANT_NEEDS_TOOLS="true" |
96 |
+ |
97 |
+src_test() { |
98 |
+ java-pkg-2_src_test |
99 |
+} |
100 |
+ |
101 |
+src_install() { |
102 |
+ dodir ${JEDIT_HOME} |
103 |
+ |
104 |
+ cp -R build/${PN}.jar jars doc keymaps macros modes properties startup \ |
105 |
+ "${D}${JEDIT_HOME}" || die |
106 |
+ |
107 |
+ java-pkg_regjar "${JEDIT_HOME}/${PN}.jar" |
108 |
+ |
109 |
+ java-pkg_dolauncher "${PN}" --main org.gjt.sp.jedit.jEdit |
110 |
+ |
111 |
+ use doc && java-pkg_dojavadoc build/classes/javadoc/api |
112 |
+ |
113 |
+ make_desktop_entry ${PN} \ |
114 |
+ jEdit \ |
115 |
+ ${JEDIT_HOME}/doc/${PN}.png \ |
116 |
+ "Development;Utility;TextEditor" |
117 |
+ |
118 |
+ # keep the plugin directory |
119 |
+ keepdir ${JEDIT_HOME}/jars |
120 |
+} |
121 |
+ |
122 |
+pkg_postinst() { |
123 |
+ xdg_desktop_database_update |
124 |
+ elog "The system directory for jEdit plugins is" |
125 |
+ elog "${JEDIT_HOME}/jars" |
126 |
+ elog "If you get plugin related errors on startup, first try updating them." |
127 |
+} |
128 |
+ |
129 |
+pkg_postrm() { |
130 |
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then |
131 |
+ xdg_desktop_database_update |
132 |
+ elog "jEdit plugins installed into /usr/share/jedit/jars" |
133 |
+ elog "(after installation of jEdit itself) haven't been" |
134 |
+ elog "removed. To get rid of jEdit completely, you may" |
135 |
+ elog "want to run" |
136 |
+ elog "" |
137 |
+ elog " rm -r ${JEDIT_HOME}" |
138 |
+ fi |
139 |
+} |