summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2021-05-28 11:20:21 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-05-29 11:27:43 +0200
commitfe00273a40c467a5acc1f2f9f99384c5b93a8160 (patch)
tree043eeabd84577affb9997a0c8fd1c8eba3055f7d /app-text/jabref
parentnet-print/hplip: add Python 3.9 (diff)
downloadgentoo-fe00273a40c467a5acc1f2f9f99384c5b93a8160.tar.gz
gentoo-fe00273a40c467a5acc1f2f9f99384c5b93a8160.tar.bz2
gentoo-fe00273a40c467a5acc1f2f9f99384c5b93a8160.zip
app-text/jabref: fix broken build with jdk-11
Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/21021 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'app-text/jabref')
-rw-r--r--app-text/jabref/jabref-2.10-r6.ebuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/app-text/jabref/jabref-2.10-r6.ebuild b/app-text/jabref/jabref-2.10-r6.ebuild
new file mode 100644
index 000000000000..6a4ad2464020
--- /dev/null
+++ b/app-text/jabref/jabref-2.10-r6.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+inherit desktop java-pkg-2 java-ant-2 java-utils-2
+
+MY_PV="${PV/_beta/b}"
+
+DESCRIPTION="Java GUI for managing BibTeX and other bibliographies"
+HOMEPAGE="https://www.jabref.org/"
+SRC_URI="mirror://sourceforge/${PN}/JabRef-${MY_PV}-src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+COMMON_DEP="
+ dev-java/antlr:0
+ dev-java/antlr:3
+ dev-java/fontbox:1.7
+ dev-java/jempbox:1.7
+ dev-java/log4j:0
+ dev-java/spin:0
+ dev-java/microba:0
+ >=dev-java/glazedlists-1.8.0:0
+ "
+
+DEPEND="
+ virtual/jdk:1.8
+ ${COMMON_DEP}"
+
+RDEPEND="
+ virtual/jre:1.8
+ ${COMMON_DEP}"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+ default
+
+ # If we cleanup it complains about missing jarbundler
+ # BUILD FAILED
+ # taskdef class net.sourceforge.jarbundler.JarBundler cannot be found
+# java-pkg_clean
+
+ # Remove bundled dependencies.
+ rm lib/antlr*.jar || die
+ rm lib/fontbox*.jar || die
+ rm lib/jempbox*.jar || die
+ rm lib/spin.jar || die
+ rm lib/microba.jar || die
+ rm lib/glazedlists*.jar || die
+
+ # Remove unjarlib target (do this only once we have removed all
+ # bundled dependencies in lib).
+ #sed -i -e 's:depends="build, unjarlib":depends="build":' build.xml
+
+ # Fix license file copy operation for microba bundled lib.
+ sed -i -e 's:^.*microba-license.*::' build.xml
+}
+
+src_compile() {
+ local EXTERNAL_JARS="antlr,antlr-3,fontbox-1.7,jempbox-1.7,log4j,spin,microba,glazedlists"
+ local CLASSPATH="$(java-pkg_getjars --with-dependencies ${EXTERNAL_JARS})"
+ eant \
+ -Dgentoo.classpath=${CLASSPATH} \
+ jars \
+ $(usex doc docs "")
+}
+
+src_install() {
+ java-pkg_newjar build/lib/JabRef-${MY_PV}.jar
+
+ use doc && java-pkg_dojavadoc build/docs/API
+ dodoc src/txt/README
+
+ java-pkg_dolauncher ${PN} --main net.sf.jabref.JabRef
+ newicon src/images/JabRef-icon-48.png JabRef-icon.png
+ make_desktop_entry ${PN} JabRef JabRef-icon Office
+}