diff options
author | Henning Schild <henning@hennsch.de> | 2024-09-26 13:56:00 +0200 |
---|---|---|
committer | Eli Schwartz <eschwartz@gentoo.org> | 2024-09-27 01:55:42 -0400 |
commit | 382d508259d8d87de085f1fe242b3ec7b7b680e2 (patch) | |
tree | b2af35412cdd79b5ad53dbae1f6fcc6fe5539991 /sci-geosciences | |
parent | dev-db/postgresql: Fix USE=-server (diff) | |
download | gentoo-382d508259d8d87de085f1fe242b3ec7b7b680e2.tar.gz gentoo-382d508259d8d87de085f1fe242b3ec7b7b680e2.tar.bz2 gentoo-382d508259d8d87de085f1fe242b3ec7b7b680e2.zip |
sci-geosciences/josm-bin: switch to upstream desktop file and add mime
The desktop entry from upstream is much more elaborate and offers more
features to users. Use it and the mime-type definitions but keep
changing the name from "josm" to "josm-bin" where needed.
Closes: https://bugs.gentoo.org/940259
Signed-off-by: Henning Schild <henning@hennsch.de>
Closes: https://github.com/gentoo/gentoo/pull/38778
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Diffstat (limited to 'sci-geosciences')
-rw-r--r-- | sci-geosciences/josm-bin/Manifest | 2 | ||||
-rw-r--r-- | sci-geosciences/josm-bin/josm-bin-19207-r1.ebuild | 57 |
2 files changed, 59 insertions, 0 deletions
diff --git a/sci-geosciences/josm-bin/Manifest b/sci-geosciences/josm-bin/Manifest index 1883e5e4ae66..8fff06e9ecf1 100644 --- a/sci-geosciences/josm-bin/Manifest +++ b/sci-geosciences/josm-bin/Manifest @@ -1,2 +1,4 @@ +DIST josm-bin-19207.desktop 638 BLAKE2B d3a5e0204d0188e72eed65e71edd079b5aa025b82f13c515605f7d5bb9f96fc93e4a24c9eea76c6c4027f54f1c449cda811f5c59e0f2ab54975ab3b1bf221ee7 SHA512 328bc131d5985cd164e3ffa27f61241098329ac01954e1cdde1dcab92261eb3e84d69c9b158f2bb944b02f373c3868bea1850ae335f9dabe3c2314d16d651394 +DIST josm-bin-19207.mime.xml 831 BLAKE2B cc37da2b38a38481e00df0b72dcb9699a4dddb6777a4e71d83bb26f3d48a62e6b4abcc5b6fe8b45624eb3ecfeb231feefa714655e5911eeba203d103a7ab17d6 SHA512 7828c6f281f2701ce0f9e5cfbb57e75ecffab7936ce508c97a796ca820d237c7599bea9fc784825a8006e8fc07ebdd7b091d4d20d6767f9de6ca4e1cf42b58b0 DIST josm-snapshot-19160.jar 18236258 BLAKE2B c0650ed766476aca4ff05fc07e1630e8a524f01a3c154233e4fba76db2998a7b18b18618815c6c44c091409f3dd922cbda61ea801974e0103adbfcb7e11bf378 SHA512 a8ba54e729b3699b0a380087ba1986cfd4061380c6fe2554e950751cf4a41803c1c92b480b93b0e17a41aedf789047f67494ef0a2495b9f360963a4f9508137a DIST josm-snapshot-19207.jar 18348268 BLAKE2B 35d8a35b6f2ba4553784d44c6928b2d179d82fae65a98c71c859fd7bb8ce5a26510cfa784318b83f21c38e944685fec2e83e3138f5c7a6cf47229e505ab80ad3 SHA512 7de9b9f4a70cd3b4788254d4b1ab979df311362671d47ec53d8abf5324b32ecb8577ffc1b7619d51df8f8e901cbd4710bfa25e01cba3d8495fd741e53a7966af diff --git a/sci-geosciences/josm-bin/josm-bin-19207-r1.ebuild b/sci-geosciences/josm-bin/josm-bin-19207-r1.ebuild new file mode 100644 index 000000000000..e7e8259415b6 --- /dev/null +++ b/sci-geosciences/josm-bin/josm-bin-19207-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop java-utils-2 xdg + +DESCRIPTION="Java-based editor for the OpenStreetMap project" +HOMEPAGE="https://josm.openstreetmap.de/" +# PV should be stable here https://josm.openstreetmap.de/wiki/StartupPage +SRC_URI=" + https://josm.openstreetmap.de/download/josm-snapshot-${PV}.jar + https://josm.openstreetmap.de/export/${PV}/josm/trunk/native/linux/tested/usr/share/applications/org.openstreetmap.josm.desktop -> ${P}.desktop + https://josm.openstreetmap.de/export/${PV}/josm/trunk/native/linux/tested/usr/share/mime/packages/josm.xml \ + -> ${P}.mime.xml +" +S="${WORKDIR}" + +LICENSE="Apache-2.0 GPL-2+ GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=">=virtual/jre-1.8" +BDEPEND="app-arch/unzip" + +src_unpack() { + default + + cp "${DISTDIR}/${P}.desktop" "org.openstreetmap.${PN}.desktop" || die +} + +src_prepare() { + default + + sed -i -e 's/^Exec=josm/Exec=josm-bin/' "org.openstreetmap.${PN}.desktop" || die + sed -i -e 's/^Icon=org.openstreetmap.josm/Icon=org.openstreetmap.josm-bin/' "org.openstreetmap.${PN}.desktop" || die +} + +src_install() { + java-pkg_newjar "${DISTDIR}/josm-snapshot-${PV}.jar" ${PN}.jar + java-pkg_dolauncher ${PN} --jar ${PN}.jar \ + --java_args "\ + --add-exports=java.base/sun.security.action=ALL-UNNAMED \ + --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED \ + --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED" + + local icon_size + for icon_size in 16 32 48; do + newicon -s ${icon_size} -t hicolor \ + images/logo_${icon_size}x${icon_size}x32.png "org.openstreetmap.${PN}.png" + newicon -s ${icon_size} -t locolor \ + images/logo_${icon_size}x${icon_size}x8.png "org.openstreetmap.${PN}.png" + done + domenu "${WORKDIR}/org.openstreetmap.${PN}.desktop" + insinto /usr/share/mime/packages + newins "${DISTDIR}/${P}.mime.xml" "${PN}.xml" +} |