summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonny (tastytea) Gutbrod <gentoo@tastytea.de>2022-06-11 17:38:01 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-06-21 09:01:45 +0200
commit954bd04dc394f664bb3f9be0c12d7b6d7f3a7726 (patch)
treeb6fb0282abb4e807f4ebfd25a83d98abcb4cab37 /games-simulation/simutrans
parentapp-text/asciidoc: bump to 10.20, take maintainership (diff)
downloadgentoo-954bd04dc394f664bb3f9be0c12d7b6d7f3a7726.tar.gz
gentoo-954bd04dc394f664bb3f9be0c12d7b6d7f3a7726.tar.bz2
gentoo-954bd04dc394f664bb3f9be0c12d7b6d7f3a7726.zip
games-simulation/simutrans: require sdl of fluidsynth dependency
Closes: https://bugs.gentoo.org/851114 Signed-off-by: Ronny (tastytea) Gutbrod <gentoo@tastytea.de> Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'games-simulation/simutrans')
-rw-r--r--games-simulation/simutrans/simutrans-123.0.1-r1.ebuild106
1 files changed, 106 insertions, 0 deletions
diff --git a/games-simulation/simutrans/simutrans-123.0.1-r1.ebuild b/games-simulation/simutrans/simutrans-123.0.1-r1.ebuild
new file mode 100644
index 00000000000..368ac8ebd06
--- /dev/null
+++ b/games-simulation/simutrans/simutrans-123.0.1-r1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools desktop flag-o-matic optfeature toolchain-funcs xdg
+
+MY_PV=${PV//./-}
+MY_PAK_64="simupak64-123-0.zip"
+# Required for network games, published in release announcement.
+MY_SVN_REVISION="10421"
+
+DESCRIPTION="A free Transport Tycoon clone"
+HOMEPAGE="https://www.simutrans.com/"
+SRC_URI="
+ mirror://sourceforge/simutrans/simutrans-src-${MY_PV}.zip
+ !minimal? ( mirror://sourceforge/simutrans/${MY_PAK_64} -> simutrans_${MY_PAK_64} )
+ https://tastytea.de/files/simutrans_language_pack-Base+texts-${PV}.zip
+ https://github.com/aburch/simutrans/raw/9c84822/simutrans.svg
+"
+S=${WORKDIR}
+
+# NOTE: Get the latest language pack from:
+# https://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="minimal truetype upnp zstd"
+
+DEPEND="
+ app-arch/bzip2
+ media-libs/libpng:0
+ media-libs/libsdl2[sound,video]
+ media-sound/fluidsynth[sdl]
+ sys-libs/zlib
+ truetype? ( media-libs/freetype )
+ upnp? ( net-libs/miniupnpc:= )
+ zstd? ( app-arch/zstd )
+"
+RDEPEND="
+ ${DEPEND}
+ media-sound/fluid-soundfont
+"
+BDEPEND="
+ app-arch/unzip
+ virtual/pkgconfig
+"
+RESTRICT="test" # Opens the program and doesn't close it.
+
+src_unpack() {
+ unpack "simutrans-src-${MY_PV}.zip"
+ use minimal || unpack "simutrans_${MY_PAK_64}"
+
+ # Bundled text files are incomplete, bug #580948
+ cd "${S}/simutrans/text" || die
+ unpack "simutrans_language_pack-Base+texts-${PV}.zip"
+}
+
+src_prepare() {
+ default
+ xdg_environment_reset
+
+ strip-flags # bug #293927
+
+ eautoreconf
+
+ # Make it look for the data in the right directory.
+ sed -i -e "s:argv\[0\]:\"/usr/share/${PN}/\":" simmain.cc || die
+}
+
+src_configure() {
+ default
+
+ cat > config.default <<-EOF || die
+ BACKEND=sdl2
+ OSTYPE=linux
+ OPTIMISE=0
+ STATIC=0
+ MULTI_THREAD=1
+ USE_UPNP=$(usex upnp 1 0)
+ USE_FREETYPE=$(usex truetype 1 0)
+ USE_ZSTD=$(usex zstd 1 0)
+ USE_FLUIDSYNTH_MIDI=1
+ VERBOSE=1
+ FLAGS := -DREVISION="${MY_SVN_REVISION}"
+
+ HOSTCC = $(tc-getCC)
+ HOSTCXX = $(tc-getCXX)
+ EOF
+}
+
+src_install() {
+ newbin build/default/sim ${PN}
+ insinto usr/share/${PN}
+ doins -r simutrans/*
+ doicon "${DISTDIR}"/${PN}.svg
+ domenu "${FILESDIR}"/${PN}.desktop
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature_header "Since 123.0 this ebuild only installs the Pak64 PakSet. You can install"
+ optfeature "other PakSets" games-simulation/simutrans-paksets
+}