blob: 000cc1da301d2afb7294933210428199739453e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop edo java-pkg-2 multiprocessing xdg
VER_ABBRV=7f27d794befacdb279039c3bae807ea0f3faacca
VER_LOCALES=606fa26be1d87837c4e607362b28ed58a7576875
VER_STYLES=616763159e5fbedcfb574ac02648e727b8166dad
DESCRIPTION="Graphical Java application for managing BibTeX and biblatex (.bib) databases"
HOMEPAGE="https://www.jabref.org/ https://github.com/JabRef/jabref"
SRC_URI="
https://github.com/JabRef/jabref/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~arthurzam/distfiles/app-text/${PN}/${P}-gradle-deps.tar.xz
https://github.com/JabRef/abbrv.jabref.org/archive/${VER_ABBRV}.tar.gz -> ${P}-abbrv.tar.gz
https://github.com/citation-style-language/locales/archive/${VER_LOCALES}.tar.gz -> ${P}-locales.tar.gz
https://github.com/citation-style-language/styles/archive/${VER_STYLES}.tar.gz -> ${P}-styles.tar.gz
https://github.com/JabRef/jabref/commit/a64bb070259dd93de8cb88188e4c5bf892f2af2b.patch -> ${P}-fix-11517.patch
https://github.com/JabRef/jabref/commit/e2ab9c016e41902d867da1d7e13ce0e5da44615f.patch -> ${P}-fix-11544.patch
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
# Using jdk:25 or higher, depending on version of gradle-bin, leads to:
# BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 69
DEPEND="|| ( virtual/jdk:21 virtual/jdk:17 virtual/jdk:11 )"
RDEPEND=">=virtual/jre-11:*"
BDEPEND="
>=dev-java/gradle-bin-8
dev-java/java-config
"
PATCHES=(
"${DISTDIR}/${P}-fix-11517.patch"
"${DISTDIR}/${P}-fix-11544.patch"
"${FILESDIR}/${P}-gradle9-reporting.patch"
)
src_unpack() {
default
cp -a "${WORKDIR}"/abbrv.jabref.org-${VER_ABBRV}/* "${S}"/buildres/abbrv.jabref.org/ || die
cp -a "${WORKDIR}"/locales-${VER_LOCALES}/* "${S}"/src/main/resources/csl-locales/ || die
cp -a "${WORKDIR}"/styles-${VER_STYLES}/* "${S}"/src/main/resources/csl-styles/ || die
}
src_prepare() {
default # bug #780585
java-pkg-2_src_prepare
}
src_compile() {
local -x JAVA_HOME="$(java-config --jdk-home || die)"
local -x HOME="${T}/home"
mkdir -p "${HOME}" || die
local -x JAVA_TOOL_OPTIONS="-Duser.home=${HOME}"
einfo "Using JAVA_HOME: ${JAVA_HOME}"
local GRADLE_ARGS=(
--offline
--no-daemon
--no-watch-fs
--parallel --max-workers="$(get_makeopts_jobs)"
--gradle-user-home="${WORKDIR}/gradle-deps"
-PprojVersion="${PV}"
-PprojVersionInfo="${PV}--Gentoo"
)
edo gradle "${GRADLE_ARGS[@]}" assemble
}
src_install() {
doicon -s scalable src/main/resources/icons/jabref.svg
domenu "${FILESDIR}"/jabref.desktop
newbin "${FILESDIR}"/jabref.sh JabRef
dosym "JabRef" "/usr/bin/jabref"
dodir /usr/share/${PN}
cp -r build/resources "${ED}"/usr/share/${PN} || die
tar -xf build/distributions/JabRef-${PV}.tar -C "${ED}"/usr/share/${PN} --strip-components=1 || die
}
|