summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-simulation')
-rw-r--r--games-simulation/simutrans/Manifest8
-rw-r--r--games-simulation/simutrans/files/simutrans-0.122.0-Fix-Makefile.patch21
-rw-r--r--games-simulation/simutrans/files/simutrans.desktop9
-rw-r--r--games-simulation/simutrans/metadata.xml14
-rw-r--r--games-simulation/simutrans/simutrans-0.122.0.ebuild106
5 files changed, 156 insertions, 2 deletions
diff --git a/games-simulation/simutrans/Manifest b/games-simulation/simutrans/Manifest
index f604b92dcbb2..404b39b85fea 100644
--- a/games-simulation/simutrans/Manifest
+++ b/games-simulation/simutrans/Manifest
@@ -1,3 +1,11 @@
DIST language_pack-Base+texts.zip 1097263 BLAKE2B 08678f36a2425b84bf5f440a546af7ca6507ee17bdcfd3096335c20ce60c23a5375eb133f597806bed28db2d9ed067669e83a4df47443be0cb48bf151ba91ef2 SHA512 015caafaeace03bd5475e66c93bb433d9b07b600c3fcf125a4bda9b2856ba41dc43b923e032920df4a060087ead7180df59092f23ab6dcf12579b580827b1248
DIST simupak64-120-2.zip 4453079 BLAKE2B 910f7937d5eabe8c97f9b9fb6b1d0a63ffe5c7a897a83d5649581f629c1e6d000442399f3e181c0a6e2b08a6f9948354df1848b84df6c2d37bd65d4c303d1626 SHA512 c7f819142b66c093c8631fcfe8e70c3be667680d745a66eab65e06979f849592d2c09ed18eb33ca2e359b2830f57874ae23d989ab5aa901eece69de83180f357
DIST simutrans-src-120-2-2.zip 3900947 BLAKE2B 69e9f78883d1b611bc76bbff1dc46ab1a645580ec0114f342aeb5e243c643c0fa4d3684e8102a0196f95320b4f93a0a50a93bb61802e81236f286a2989ac646f SHA512 db9797be132bb1936d8c3192e536523d1249d20a513f3758037097ef46c2bab40d4be8adb68cb21eda2b4820369e89bd0a6e2abc4fe2bbcefe40bb414a3d1ab2
+DIST simutrans-src-122-0.zip 4534293 BLAKE2B c4117baf82530adced1fbb60e099176b7b63ade07e10f741e19e41aedd4b65f5d7b6ab60145f3bce7ff88def9836eac88323b14aa74f2ce5f1c76eeaa6beb713 SHA512 7a044ceda9359847353c1dcd23c380d1ddcca901fd674a25b66d7bd0ede7f974525c5fc3b37781977e9946626f30b538c483166983ab8b7be9e73903dc9be0bd
+DIST simutrans_PAK128.german_2.0_for_ST_122.0.zip 186572954 BLAKE2B 1f21655660f947767657f79fa45f66cd434888c37596e17dbd8400ce684251c33617dc78096c34b23bad3f241cc4641029d0f12b5f09d199013582c89fa02ab3 SHA512 9e6250b333e6b31e0ad23f2629409c2b4914e5fb9cb0304baa1e70f0c268d5eca7db27d77b51f18fff57569df56eecb82c8ec9b48c3a3efacf7d47501546347d
+DIST simutrans_coalwagonfix.rar 10769 BLAKE2B 4ebb14c5585fcb09b2c9e70451a0a4f1133d1bf7a184c898463c4393026dcbaf10954430d83e64cd7430ec3e3708e0d51f04b805ac0c32656c138b001e617079 SHA512 503c795b4fdc168cc925a3b5ff385880dd28c8e3214a7c5aeb80e937378cf19b1f2408d19f2ab6ef066f47d6f6ab0955e6d5ec59981d1e76fbe3cd661b8bd22e
+DIST simutrans_language_pack-Base+texts-0.122.0.zip 1172877 BLAKE2B 6a1646d8bd1e74a54506cd32508b5dd9da3d2ce77c7920049fea6bd42c6b46b91e9b248860a352380a5f2bb1393f2bbc9b837dcb347c132c7132f6813a608212 SHA512 d87b4f65188f6efd7e277f6ae5796584e58a1302dae7246cd7b6e3c06d8cdc81c5eae647e12cdf7598230c588f66f5682d2be0e6628311343daf4bd46b441278
+DIST simutrans_pak128-2.8.1.zip 97430218 BLAKE2B 95b6788fd8e4f539b232e9de563227704f16c05951d8cd42ca3faf6b9f625d08108bda068417e9e04c14db8ee6fe860e9b8d958c703719223de770da36ee686b SHA512 c4635a446d9874fe1cf1a15a1ca8eaa50a0888c7679df540aa7509e30db6cb8f9519a27aad10dc481a7762c6c16bb5df64e18665652dcd777885adf0dae6736a
+DIST simutrans_pak128.Britain.1.18-120-3.zip 67251660 BLAKE2B 6dbebdf77985e2610f4283b1ae252a19cbfcc37cc1c6974e4132300f87c7d881bd87aba29bb01974d56d261ee6694fd81d0d4b09eb0a2854e38de6f278f91b53 SHA512 234a6c3dffa236ae98ba3372efb2e2b2808c0dcc0933ea5f339aa639e0705674435599e27228f0ee82f24af49ffbd7cb7c6c076ff6569a7ce622c6b8009c8472
+DIST simutrans_pak192.comic.0.5.zip 70896173 BLAKE2B 63557e08387802a788f8e77157674847d757a23f329aa452c9ea6c096f875d665bb2090df34886437a2d35519c83b38f03d06566bf052c1ffe3cad718c7c3dfe SHA512 f61ad804d63027e181bb99a92f48d23cf6a6f47047a1ba9e8f83383cc4e6d603c7fe260d0846613d43765d3fc933bf13ae063d8d8176f8aef41db8d6bf187773
+DIST simutrans_simupak64-122-0.zip 4537410 BLAKE2B 300d0248f4f3781578579f31056810c3f1261660b7d1eaa4ec21e735625c3b499548c560d1b1ee918fd7111ca4f872f77119cffc82014c95753520225226665b SHA512 de099d71392130e26a907f4cd30d5e714cc472cb91c606b3dc5e499653a277750cd971440351fd384c368b453704633ad4eda8ec3e6e16e9ea797080371aaa9d
diff --git a/games-simulation/simutrans/files/simutrans-0.122.0-Fix-Makefile.patch b/games-simulation/simutrans/files/simutrans-0.122.0-Fix-Makefile.patch
new file mode 100644
index 000000000000..5effe170758b
--- /dev/null
+++ b/games-simulation/simutrans/files/simutrans-0.122.0-Fix-Makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile 2020-10-15 08:32:29.000000000 +0200
++++ b/Makefile 2020-10-23 17:59:29.008159331 +0200
+@@ -17,8 +17,7 @@
+ SDL_CONFIG ?= sdl-config
+ SDL2_CONFIG ?= pkg-config sdl2
+ #SDL2_CONFIG ?= sdl2-config
+-FREETYPE_CONFIG ?= freetype-config
+-#FREETYPE_CONFIG ?= pkg-config freetype2
++FREETYPE_CONFIG ?= pkg-config freetype2
+
+ BACKENDS = allegro gdi sdl sdl2 mixer_sdl mixer_sdl2 posix
+ OSTYPES = amiga beos freebsd haiku linux mingw mac openbsd
+@@ -91,8 +90,6 @@
+ endif
+ endif
+ endif
+-else
+- CFLAGS += -O
+ endif
+
+ ifdef DEBUG
diff --git a/games-simulation/simutrans/files/simutrans.desktop b/games-simulation/simutrans/files/simutrans.desktop
new file mode 100644
index 000000000000..a6a556c3b78e
--- /dev/null
+++ b/games-simulation/simutrans/files/simutrans.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Simutrans
+Encoding=UTF-8
+Comment=A free Transport Tycoon clone
+TryExec=simutrans
+Exec=simutrans
+Icon=simutrans
+Terminal=false
diff --git a/games-simulation/simutrans/metadata.xml b/games-simulation/simutrans/metadata.xml
index 9d88e43fb074..e411589b3ac1 100644
--- a/games-simulation/simutrans/metadata.xml
+++ b/games-simulation/simutrans/metadata.xml
@@ -1,11 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+ <maintainer type="person">
+ <email>gentoo@tastytea.de</email>
+ <name>Ronny (tastytea) Gutbrod</name>
+ </maintainer>
<maintainer type="project">
- <email>games@gentoo.org</email>
- <name>Gentoo Games Project</name>
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
</maintainer>
<upstream>
<remote-id type="sourceforge">simutrans</remote-id>
</upstream>
+ <use>
+ <flag name="pak128">Install more detailed scenario data</flag>
+ <flag name="pak128-britain">Install British scenario data</flag>
+ <flag name="pak128-german">Install German scenario data</flag>
+ <flag name="pak192-comic">Install comic-like scenario data</flag>
+ </use>
</pkgmetadata>
diff --git a/games-simulation/simutrans/simutrans-0.122.0.ebuild b/games-simulation/simutrans/simutrans-0.122.0.ebuild
new file mode 100644
index 000000000000..1d54030950e5
--- /dev/null
+++ b/games-simulation/simutrans/simutrans-0.122.0.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop flag-o-matic xdg
+
+MY_PV=${PV/0./}
+MY_PV=${MY_PV//./-}
+SIMUPAK_64="simupak64-${MY_PV%-[0-9]*}-0.zip"
+SIMUPAK_128_V="2.8.1"
+SIMUPAK_128_BRITAIN="pak128.Britain.1.18-120-3.zip"
+SIMUPAK_128_GERMAN="PAK128.german_2.0_for_ST_122.0.zip"
+SIMUPAK_192_COMIC="pak192.comic.0.5.zip"
+
+DESCRIPTION="A free Transport Tycoon clone"
+HOMEPAGE="https://www.simutrans.com/"
+SRC_URI="mirror://sourceforge/simutrans/simutrans-src-${MY_PV}.zip
+ https://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip -> simutrans_language_pack-Base+texts-${PV}.zip
+ mirror://sourceforge/simutrans/${SIMUPAK_64} -> simutrans_${SIMUPAK_64}
+ pak128? ( https://download.sourceforge.net/simutrans/pak128/pak128%20for%20ST%20120.4.1%20%28${SIMUPAK_128_V}%2C%20priority%20signals%20%2B%20bugfix%29/pak128.zip -> simutrans_pak128-${SIMUPAK_128_V}.zip )
+ pak128-britain? ( mirror://sourceforge/simutrans/${SIMUPAK_128_BRITAIN} -> simutrans_${SIMUPAK_128_BRITAIN} )
+ pak128-german? ( mirror://sourceforge/simutrans/${SIMUPAK_128_GERMAN} -> simutrans_${SIMUPAK_128_GERMAN} )
+ pak192-comic? (
+ mirror://sourceforge/simutrans/${SIMUPAK_192_COMIC} -> simutrans_${SIMUPAK_192_COMIC}
+ https://www.dropbox.com/s/3wwyrajrr2oqzo6/coalwagons.rar?dl=1 -> simutrans_coalwagonfix.rar
+ )"
+S=${WORKDIR}
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+pak128 +pak128-britain +pak128-german +pak192-comic truetype upnp zstd"
+
+RDEPEND="
+ app-arch/bzip2
+ app-arch/zstd
+ media-libs/libpng:0
+ media-libs/libsdl2[sound,video]
+ media-libs/sdl-mixer[midi]
+ sys-libs/zlib
+ truetype? ( media-libs/freetype )
+ upnp? ( net-libs/miniupnpc:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-arch/unrar
+ app-arch/unzip
+ virtual/imagemagick-tools[png]
+ virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/simutrans-0.122.0-Fix-Makefile.patch" )
+
+src_unpack() {
+ unpack "simutrans-src-${MY_PV}.zip"
+ unpack "simutrans_${SIMUPAK_64}"
+ use pak128 && unpack "simutrans_pak128-${SIMUPAK_128_V}.zip"
+ use pak128-britain && unpack "simutrans_${SIMUPAK_128_BRITAIN}"
+ use pak128-german && unpack "simutrans_${SIMUPAK_128_GERMAN}"
+ if use pak192-comic; then
+ unpack "simutrans_${SIMUPAK_192_COMIC}"
+ cd simutrans/pak192.comic || die
+ unpack "simutrans_coalwagonfix.rar" # Fixes invisible wagons.
+ fi
+
+ # 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
+
+ cat > config.default <<-EOF || die
+ BACKEND=mixer_sdl
+ OSTYPE=linux
+ MULTI_THREAD=1
+ USE_UPNP=$(usex upnp 1 0)
+ USE_FREETYPE=$(usex truetype 1 0)
+ USE_ZSTD=$(usex zstd 1 0)
+ VERBOSE=1
+ STATIC=0
+ EOF
+
+ # make it look in the install location for the data
+ sed -i -e "s:argv\[0\]:\"/usr/share/${PN}/\":" simmain.cc || die
+}
+
+src_compile() {
+ default
+
+ # Convert icon to PNG for Desktop Entry.
+ convert simutrans.ico simutrans.png || die
+}
+
+src_install() {
+ newbin build/default/sim ${PN}
+ insinto /usr/share/${PN}
+ doins -r simutrans/*
+ doicon simutrans.png
+ domenu "${FILESDIR}/${PN}.desktop"
+}