summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-06-15 19:05:50 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-06-15 19:20:25 -0400
commit8dbe7b9f7a7f257f4f22a33415d437e0ef1cf202 (patch)
tree52080f401ebecbf2870917588bd2e502f3ce3177 /games-board
parentgames-board/megamek: add github remote-id (diff)
downloadgentoo-8dbe7b9f7a7f257f4f22a33415d437e0ef1cf202.tar.gz
gentoo-8dbe7b9f7a7f257f4f22a33415d437e0ef1cf202.tar.bz2
gentoo-8dbe7b9f7a7f257f4f22a33415d437e0ef1cf202.zip
games-board/megamek: min java 1.8, EAPI-7 bump
Also builds with java 11. Closes: https://bugs.gentoo.org/787374 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-board')
-rw-r--r--games-board/megamek/megamek-0.34.10-r2.ebuild47
1 files changed, 47 insertions, 0 deletions
diff --git a/games-board/megamek/megamek-0.34.10-r2.ebuild b/games-board/megamek/megamek-0.34.10-r2.ebuild
new file mode 100644
index 000000000000..37c3e69d3b8e
--- /dev/null
+++ b/games-board/megamek/megamek-0.34.10-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop edos2unix java-pkg-2 java-ant-2
+
+DESCRIPTION="Unofficial online version of the Classic BattleTech board game"
+HOMEPAGE="https://www.megamek.org/"
+SRC_URI="mirror://sourceforge/${PN}/MegaMek-v${PV}.zip"
+S="${WORKDIR}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=virtual/jre-1.8:*"
+DEPEND=">=virtual/jdk-1.8:*"
+BDEPEND="app-arch/unzip"
+
+src_prepare() {
+ default
+
+ rm MegaMek.jar || die
+
+ sed -e "s|XmX|Xmx|" \
+ -e "s|/usr/share/java|${EPREFIX}/usr/share/${PN}|" \
+ -e "s|/usr/share/MegaMek|${EPREFIX}/usr/share/${PN}|" \
+ startup.sh > ${PN} || die
+ edos2unix ${PN}
+
+ # workaround encoding issues posing problems with >=jdk-1.8
+ find . -name '*.java' -exec sed -i 's/\xf6/\xc3\xb6/' {} + || die
+
+ java-pkg-2_src_prepare
+}
+
+src_install() {
+ dobin ${PN}
+
+ insinto /usr/share/${PN}
+ doins -r MegaMek.jar data docs l10n lib mmconf readme* # readme used at runtime
+
+ dodoc HACKING readme.txt
+
+ make_desktop_entry ${PN} MegaMek applications-games
+}