mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
app-text/jabref: new package, add 5.15
This was my first attempt to create gradle based ebuild. I suspect I've done some mistakes with the "-deps" tarball, but it does work well on 2 of my PCs, and in a stage3 container. Closes: https://bugs.gentoo.org/851219 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
7
app-text/jabref/Manifest
Normal file
7
app-text/jabref/Manifest
Normal file
@@ -0,0 +1,7 @@
|
||||
DIST jabref-5.15-abbrv.tar.gz 1044290 BLAKE2B 0aeaf5307849fe8a7822e6a1bffbd1db7e3f14b6e5d5c4923084777c91dad7a42c4e6cbdd53197d6e454cab12fd9e6472369cec5a91ec783bd94f377a7b9c3d4 SHA512 8604451e685a943b8a8c9c212dc083bfd314435c5484c3d694b428b22d03093579ea3e576980f313d110ac98baaa3d24fa05eb8094f735bf5222e0f96447f631
|
||||
DIST jabref-5.15-fix-11517.patch 762 BLAKE2B 319e81d292be30d390bb5866d74c9a3c7851ebef4d9b938060d6352af968093833e97312c79e96dc3d60018181a35955b1dc3dd9cf854ba103970a891d826a23 SHA512 a2a724b37fcfac731152d5f790585f2ea994f5b4754df2dacf4249ddfe4417633c5fe37e982ef4260417faae39a5c36314b067ac782db18b7de01e96bfc3f60e
|
||||
DIST jabref-5.15-fix-11544.patch 1337 BLAKE2B 612296d8efb28f6efd4bf000ea774e7538ec29d02e6c5d345ed065355f5c8e7130bc44b2a9b8fa00a42c716c9e405868803beda62d5f0d9afa8e5d7d44e41221 SHA512 95785e7d0df7cb3789c6785a25db6ba0c742f1067ede3a920d9474de03da149883961dae53c387151cadcb94f6f287d7e128bfcc1f3667214c29c4b963ff4704
|
||||
DIST jabref-5.15-gradle-deps.tar.xz 152137652 BLAKE2B 7a5b60f6c3470fea6c9121ca744e21edf7a4d57f2f90159d4615dd9ab6212a08488ae0eb3f6d177c79aa449f238e554737cccfd31e24ab2286b5796409d55b85 SHA512 b6753ed109b26d06574d9d568474775270a9d82b99a763d8270cd62272df1d864e8284861cb7d63c192cd21b105367b3cd70efe1cc608479311c1d2f389734dd
|
||||
DIST jabref-5.15-locales.tar.gz 109775 BLAKE2B cfb48ec1eac1407ab84db782d669e62df98201f8d01051a1cc54a972665da23f049d9ee66e6260efe0d6e60ec51efe98c25a409b7cbcb61c7b243fcdbf7e25a0 SHA512 9f46e5d3f62c65510deb0bfc33cb94a2ead59a72d14fa5d5562ddb33216646d7fcbcca4583a95995326b92668b08f2cbfea1bf8fc141bebb548ff3bd6fe461df
|
||||
DIST jabref-5.15-styles.tar.gz 3970487 BLAKE2B 00036cc517b43c0d0c514ef1f99187824cea6b4b130c67074e1c0c2a16a133af76fc7455e0ab4e534858d3ef3af0b0e01822c97967874e64e11da1654b0f5a93 SHA512 f86ada293304be147969c2b88646bbef774d60b865f8625a7a7dcf5064d7a42fc41f49f2f105ad51a39a3dd5627d012e48719ba5d2be1b338225f27170ffc8e0
|
||||
DIST jabref-5.15.tar.gz 26875537 BLAKE2B b5a13416a6b07410434e68032507b5104bddb89317c25392ac0371707ce75c0aff62aa5173e7d24aa7e6ceeba73db08ab44dc0a57f6c3bff139e73cd33d30aee SHA512 69170c254085b355c565ce11c5434049f1c961607a93c8a39792f1a7dacb57530065bcd80f5eb2050de0d09960d300702f61e14e6a815515fb83c14509e31f3a
|
||||
12
app-text/jabref/files/jabref.desktop
Normal file
12
app-text/jabref/files/jabref.desktop
Normal file
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Name=JabRef
|
||||
GenericName=BibTeX Editor
|
||||
Comment=Graphical Java application for managing BibTeX and biblatex (.bib) databases
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Icon=jabref
|
||||
Exec=JabRef %U
|
||||
Keywords=bibtex;biblatex;latex;bibliography
|
||||
Categories=Office;
|
||||
StartupWMClass=org.jabref.gui.JabRefGUI
|
||||
MimeType=text/x-bibtex;
|
||||
38
app-text/jabref/files/jabref.sh
Normal file
38
app-text/jabref/files/jabref.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# JabRef may need some custom options to work and look properly on certain
|
||||
# systems. You can set them via the JABREF_OPTIONS environment variable.
|
||||
# -Dglass.gtk.uiScale=144dpi scale up the UI to look better on high DPI displays
|
||||
# -Djdk.gtk.version=2 workaround for misbehaving menus, e.g. on i3wm
|
||||
# You can for example run JabRef as follows:
|
||||
# JABREF_OPTIONS="-Dglass.gtk.uiScale=144dpi -Djdk.gtk.version=2" jabref
|
||||
|
||||
# This script has been created based on the instructions at
|
||||
# https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace,
|
||||
# the output of `./gradlew -d run` and the contents of build/scripts/JabRef in the build
|
||||
# directory.
|
||||
|
||||
ROOT=/usr/share/jabref
|
||||
|
||||
exec java \
|
||||
--add-exports javafx.controls/com.sun.javafx.scene.control=org.controlsfx.controls \
|
||||
--add-exports org.controlsfx.controls/impl.org.controlsfx.skin=org.jabref \
|
||||
--add-exports javafx.graphics/com.sun.javafx.scene=org.controlsfx.controls \
|
||||
--add-exports javafx.graphics/com.sun.javafx.scene.traversal=org.controlsfx.controls \
|
||||
--add-exports javafx.graphics/com.sun.javafx.css=org.controlsfx.controls \
|
||||
--add-exports javafx.controls/com.sun.javafx.scene.control.behavior=org.controlsfx.controls \
|
||||
--add-exports javafx.controls/com.sun.javafx.scene.control.inputmap=org.controlsfx.controls \
|
||||
--add-exports javafx.base/com.sun.javafx.event=org.controlsfx.controls \
|
||||
--add-exports javafx.base/com.sun.javafx.collections=org.controlsfx.controls \
|
||||
--add-exports javafx.base/com.sun.javafx.runtime=org.controlsfx.controls \
|
||||
--add-exports javafx.web/com.sun.webkit=org.controlsfx.controls \
|
||||
--add-opens javafx.controls/javafx.scene.control=org.jabref \
|
||||
--add-opens org.controlsfx.controls/org.controlsfx.control.textfield=org.jabref \
|
||||
--add-opens javafx.controls/com.sun.javafx.scene.control=org.jabref \
|
||||
--add-opens javafx.controls/javafx.scene.control.skin=org.controlsfx.controls \
|
||||
--add-opens javafx.graphics/javafx.scene=org.controlsfx.controls \
|
||||
--module-path ${ROOT}/lib \
|
||||
--patch-module org.jabref=${ROOT}/resources/main \
|
||||
${JABREF_OPTIONS} \
|
||||
--module org.jabref/org.jabref.Launcher \
|
||||
"$@"
|
||||
72
app-text/jabref/jabref-5.15.ebuild
Normal file
72
app-text/jabref/jabref-5.15.ebuild
Normal file
@@ -0,0 +1,72 @@
|
||||
# Copyright 2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop edo 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"
|
||||
|
||||
DEPEND=">=virtual/jdk-21:*"
|
||||
RDEPEND=">=virtual/jre-21"
|
||||
BDEPEND="
|
||||
>=dev-java/gradle-bin-8
|
||||
dev-java/java-config
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${DISTDIR}/${P}-fix-11517.patch"
|
||||
"${DISTDIR}/${P}-fix-11544.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_compile() {
|
||||
local -x JAVA_HOME="$(java-config --jdk-home || die)"
|
||||
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
|
||||
}
|
||||
11
app-text/jabref/metadata.xml
Normal file
11
app-text/jabref/metadata.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>arthurzam@gentoo.org</email>
|
||||
<name>Arthur Zamarin</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">JabRef/jabref</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user