From cb174c2d285f87604bc43b7027efa65db510eec0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 5 Feb 2017 12:26:57 +0000 Subject: take over maintanership of openttd for now, till we stabilise newer dev-libs/icu --- games-simulation/openttd/Manifest | 1 + .../openttd/files/openttd-1.6.0-cflags.patch | 42 +++++ games-simulation/openttd/files/openttd.initd | 20 +++ games-simulation/openttd/openttd-1.6.0.ebuild | 184 +++++++++++++++++++++ 4 files changed, 247 insertions(+) create mode 100644 games-simulation/openttd/Manifest create mode 100644 games-simulation/openttd/files/openttd-1.6.0-cflags.patch create mode 100644 games-simulation/openttd/files/openttd.initd create mode 100644 games-simulation/openttd/openttd-1.6.0.ebuild diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest new file mode 100644 index 00000000..c5734e3f --- /dev/null +++ b/games-simulation/openttd/Manifest @@ -0,0 +1 @@ +DIST openttd-1.6.0-source.tar.gz 10064454 SHA256 32f63477aba1ccf238dfe0538a6660163c2b725e077978e570e38d023d269cad SHA512 d235e6e094b2e3fda0cf58a2dce1e5d779654bee638def60f00da4e7c6443b00a6f3b204d5a63cf56e141074c8aa3700ce7e9f1b1eccbb5cd36260f1892ad501 WHIRLPOOL 497272ccc3836710a68cabfbf5b925a30c3d23ee332e5ba5fa24a2b79b199d2b7ce6bd22507ea977986382ae32193247b9eedee638419d1e6f41165f5fa8abd9 diff --git a/games-simulation/openttd/files/openttd-1.6.0-cflags.patch b/games-simulation/openttd/files/openttd-1.6.0-cflags.patch new file mode 100644 index 00000000..bb7f768b --- /dev/null +++ b/games-simulation/openttd/files/openttd-1.6.0-cflags.patch @@ -0,0 +1,42 @@ +--- openttd-1.4.4/config.lib ++++ openttd-1.4.4/config.lib +@@ -1450,12 +1450,6 @@ + CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS" + LDFLAGS="$LDFLAGS -noixemul" + fi +- +- if [ "$enable_profiling" = "0" ]; then +- # -fomit-frame-pointer and -pg do not go well together (gcc errors they are incompatible) +- CFLAGS="-fomit-frame-pointer $CFLAGS" +- fi +- CFLAGS="-O2 $CFLAGS" + else + OBJS_SUBDIR="debug" + +@@ -1466,14 +1460,6 @@ + CFLAGS="$CFLAGS -G0" + fi + fi +- if [ $enable_debug -ge 2 ]; then +- CFLAGS="$CFLAGS -fno-inline" +- fi +- if [ $enable_debug -ge 3 ]; then +- CFLAGS="$CFLAGS -O0" +- else +- CFLAGS="$CFLAGS -O2" +- fi + fi + + if [ $enable_debug -le 2 ]; then +@@ -1498,11 +1484,6 @@ + CFLAGS="$CFLAGS -fno-expensive-optimizations" + fi + +- if [ "$enable_profiling" != "0" ]; then +- CFLAGS="$CFLAGS -pg" +- LDFLAGS="$LDFLAGS -pg" +- fi +- + if [ "$with_threads" = "0" ]; then + CFLAGS="$CFLAGS -DNO_THREADS" + fi diff --git a/games-simulation/openttd/files/openttd.initd b/games-simulation/openttd/files/openttd.initd new file mode 100644 index 00000000..a14cf6d2 --- /dev/null +++ b/games-simulation/openttd/files/openttd.initd @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Id$ + +depend() { + need net +} + +start() { + ebegin "Starting OpenTTD dedicated server" + start-stop-daemon --start -q --exec /usr/games/bin/openttd -- -D -f > /dev/null + eend $? +} + +stop() { + ebegin "Stopping OpenTTD dedicated server" + start-stop-daemon --stop -q -n openttd + eend $? +} diff --git a/games-simulation/openttd/openttd-1.6.0.ebuild b/games-simulation/openttd/openttd-1.6.0.ebuild new file mode 100644 index 00000000..6a080a0e --- /dev/null +++ b/games-simulation/openttd/openttd-1.6.0.ebuild @@ -0,0 +1,184 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils gnome2-utils games + +DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe" +HOMEPAGE="http://www.openttd.org/" +SRC_URI="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc ~ppc64 x86" +IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib" +RESTRICT="test" # needs a graphics set in order to test + +RDEPEND="!dedicated? ( + media-libs/libsdl[sound,X,video] + icu? ( + || ( + ( + dev-libs/icu-layoutex + dev-libs/icu-le-hb + >=dev-libs/icu-58.1 + ) +