diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2024-07-14 08:32:13 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-09-03 10:08:49 +0200 |
commit | e40b6922428589fffd9ca1364a3bd69a708a079f (patch) | |
tree | 086534c5ec4b3da836f679881baa2573b673b803 /games-board | |
parent | media-tv/mythtv: build without BSFIX, drop java-ant-2 (diff) | |
download | gentoo-e40b6922428589fffd9ca1364a3bd69a708a079f.tar.gz gentoo-e40b6922428589fffd9ca1364a3bd69a708a079f.tar.bz2 gentoo-e40b6922428589fffd9ca1364a3bd69a708a079f.zip |
games-board/megamek: build without BSFIX, drop java-ant-2
an update to 0.49.19 failed. it could be built but had runtime errors
see https://bugs.gentoo.org/680770
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/37468/commits/8a4773cd67d02d6d3c5e8c1dda4dd85f6a4d9796
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'games-board')
-rw-r--r-- | games-board/megamek/files/megamek-0.34.10-source8.patch | 22 | ||||
-rw-r--r-- | games-board/megamek/megamek-0.34.10-r3.ebuild | 60 |
2 files changed, 82 insertions, 0 deletions
diff --git a/games-board/megamek/files/megamek-0.34.10-source8.patch b/games-board/megamek/files/megamek-0.34.10-source8.patch new file mode 100644 index 000000000000..27d4596d8d92 --- /dev/null +++ b/games-board/megamek/files/megamek-0.34.10-source8.patch @@ -0,0 +1,22 @@ +diff --git a/build.xml b/build.xml +index 9d3a7d6..a6732b6 100644 +--- a/build.xml ++++ b/build.xml +@@ -60,7 +60,7 @@ +
+ <target name="compile" depends="init" description="Compile java sources into class files">
+ <!-- compile -->
+- <javac debug="true" debuglevel="lines,source" target="1.5" source="1.5" destdir="${builddir}" srcdir="${srcdir}" memoryInitialSize="512m" memoryMaximumSize="512m" fork="true">
++ <javac debug="true" debuglevel="lines,source" destdir="${builddir}" srcdir="${srcdir}" memoryInitialSize="512m" memoryMaximumSize="512m" fork="true">
+ <classpath>
+ <pathelement location="${basedir}" />
+ <fileset dir="${libdir}" includes="*.jar" />
+@@ -208,7 +208,7 @@ +
+ <!-- compile -->
+ <echo message="building MegaMek from svn sources" />
+- <javac debug="true" debuglevel="lines,source" target="1.5" source="1.5" destdir="${svnbuilddir}" srcdir="${svndir}/${srcdir}" memoryInitialSize="512m" memoryMaximumSize="512m" fork="true">
++ <javac debug="true" debuglevel="lines,source" destdir="${svnbuilddir}" srcdir="${svndir}/${srcdir}" memoryInitialSize="512m" memoryMaximumSize="512m" fork="true">
+ <classpath>
+ <pathelement location="${svndir}" />
+ <fileset dir="${svndir}/${libdir}" includes="*.jar" />
diff --git a/games-board/megamek/megamek-0.34.10-r3.ebuild b/games-board/megamek/megamek-0.34.10-r3.ebuild new file mode 100644 index 000000000000..1de1e9c1f80e --- /dev/null +++ b/games-board/megamek/megamek-0.34.10-r3.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop edos2unix java-pkg-2 + +DESCRIPTION="Unofficial online version of the Classic BattleTech board game" +HOMEPAGE="https://megamek.org/" +SRC_URI=" + https://downloads.sourceforge.net/project/megamek/Archived%20Stable/MegaMek%20v${PV}/MegaMek-v${PV}.zip + https://dev.gentoo.org/~ionen/distfiles/${PN}.png" +S="${WORKDIR}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND="app-arch/unzip" +DEPEND=" + >=dev-java/ant-1.10.14-r3 + >=virtual/jdk-1.8:* +" +RDEPEND=">=virtual/jre-1.8:*" + +PATCHES=( "${FILESDIR}/megamek-0.34.10-source8.patch" ) + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + + 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 +} + +src_compile() { + eant \ + -Dant.build.javac.source="$(java-pkg_get-source)" \ + -Dant.build.javac.target="$(java-pkg_get-target)" +} + +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 + + doicon "${DISTDIR}"/${PN}.png + make_desktop_entry ${PN} MegaMek +} |