summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2009-11-09 22:36:39 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2009-11-09 22:36:39 +0000
commit149e0e362fb34a28d6ee0d90b1689619ed1b8c43 (patch)
tree6b0c6d333ac306c15f7d116b7de53eaef2a36821 /games-simulation
parentold (diff)
downloadhistorical-149e0e362fb34a28d6ee0d90b1689619ed1b8c43.tar.gz
historical-149e0e362fb34a28d6ee0d90b1689619ed1b8c43.tar.bz2
historical-149e0e362fb34a28d6ee0d90b1689619ed1b8c43.zip
old
Package-Manager: portage-2.1.6.13/cvs/Linux i686
Diffstat (limited to 'games-simulation')
-rw-r--r--games-simulation/openttd/Manifest19
-rw-r--r--games-simulation/openttd/files/install.patch115
-rw-r--r--games-simulation/openttd/files/libiconv.patch49
-rw-r--r--games-simulation/openttd/files/menu_name.patch15
-rw-r--r--games-simulation/openttd/openttd-0.6.3.ebuild154
-rw-r--r--games-simulation/openttd/openttd-0.7.2.ebuild119
6 files changed, 0 insertions, 471 deletions
diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest
index af5f4299080e..aa66edcbd8d6 100644
--- a/games-simulation/openttd/Manifest
+++ b/games-simulation/openttd/Manifest
@@ -1,24 +1,5 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-AUX install.patch 5471 RMD160 3db7bbfcf7b1e8da872263d24184220296f2d982 SHA1 3d1fab46598dc8c20558dad18488e6b5f08352c2 SHA256 02b3ff940a49ad59e24846b6488a81e01828260cd33c4f620262e3d009fc2043
-AUX libiconv.patch 1461 RMD160 8122de4e7a15f877c3948ee23231376640b7bde0 SHA1 651dd41c29ed0b260c4a7056950b8f346025bcae SHA256 38208cd0c32bbc367356620f9f2e4452b2004d59496ac8fb05dc165aea307c16
-AUX menu_name.patch 439 RMD160 eab4d7d23fdea12c4589b5735d22a7bccfa38376 SHA1 513ab0ccc9d75fd118030d88659a731f55c7fe8b SHA256 8b5a9c0cc3d804dee0cc6f7a8298f69370951593cec2b2644ee1bc8c4a0b3b52
AUX openttd.initd 529 RMD160 ff9fdf7a787ae3d08ec4dbef1b1b37eee12d1ccd SHA1 f833206fc430c6e7afec76c39e97af0f7ec6578a SHA256 a16e5c64a073d0b7e7092bb906b7f064414870a8607bebce16b4b08cff7f4112
-DIST openttd-0.4.8-scenarios.tar.bz2 5000799 RMD160 a6c2fa9f81e4e4628adb9c3932dec46ab4789777 SHA1 88b3caff739fbf7bd4eb143ae97925556e813ce4 SHA256 61788035bd78a3c0e393d5992432c37e0b6036d19a960543f26d43a46e39e6ca
-DIST openttd-0.5.0-scenarios.tar.bz2 917117 RMD160 f6ea4a4004bb0c90de9283a92b14da4bd99bc33c SHA1 965fc34bbe9998741ea07531772c9673b33aab99 SHA256 c89e652aca1a9ad9f0f4936dd99cd8a9c96f4c53450990ff87d87483f8e74a31
-DIST openttd-0.6.3-source.tar.bz2 4609714 RMD160 ab1f2ae17cbc97c2ebc4eceb1496bc708e6d83d4 SHA1 5fb359789fae9b03550da268973fb1238ddf224c SHA256 2d60e8a08768a9c81f37e699df6890c12d53f4d56b5562724c3a9ffa302c7197
-DIST openttd-0.7.2-source.tar.bz2 4874252 RMD160 da1c95310988c1f58d3d0a2e35aa57e6d323b985 SHA1 d020a2e371c2317e43b248964742483229d35b87 SHA256 43bd8c7139cf681425a790c668eb397b83c18879f6c8ae3ca55f264c8cf6b1d8
DIST openttd-0.7.3-source.tar.bz2 4876403 RMD160 9455d2e25bc0123f858309906c558544c7f076dc SHA1 3e34ceec85b00c0918423790aad0d72ef4cd14c1 SHA256 eccfa15038c5f7991d2692cb190f34ba1fd9deaff8f181dd99145e41790fdbc3
-EBUILD openttd-0.6.3.ebuild 4226 RMD160 1b9c87b272b79aa0a7b5ca3ecab1654092b6bb3f SHA1 b2de50caf8c5c37423dcd988783af6abb6536649 SHA256 00cb692cd9a906e3d2185008f48f8c57a2e8743029a012934daa134bc759dabc
-EBUILD openttd-0.7.2.ebuild 3311 RMD160 060efbcd12e3d7f33c80260835faa1b55c4703aa SHA1 167102ee3132edc5b37c97f1cfccb31da8222bc5 SHA256 47a7bb6c18522e57fba760ebb686504e30434e1b5c8e036fe9088c94bc749167
EBUILD openttd-0.7.3.ebuild 3323 RMD160 840a97ad10656b74c9ef7bd30563f607e068f1c2 SHA1 f6d2f75f006fe09925a0c7995ec18e717a7d5a58 SHA256 5f16b7ff6a97d0af6824e2ca463c5d16972175e76117d7320d6fe22151d1a1ab
MISC ChangeLog 10369 RMD160 70b8175050be9772f1e0a9709497f2adecfdcb03 SHA1 68208ded7b78328936a63f0473c026f3089b2ae6 SHA256 c116e96186f7275e14da863b349bb0103fbfed96cd7ae210ad8960ba3a3ac6bb
MISC metadata.xml 307 RMD160 83f20da47827470c3f19c6849fc14217b47389a7 SHA1 ca4ccf0fe4b5abf21a994189f9d689e8a2616128 SHA256 ab66512663eaf8f6d321f0efb9643951f9dab6fda5d8789d1cb83eb6cc82e8e7
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
-
-iEYEARECAAYFAkr4iggACgkQcsIHjyDViGRXZACg5y/nltBUrWQbwWdKvP2zlFxz
-75UAn18GdrBgxeTbJcmmPMv1XgOG1ceb
-=vnSP
------END PGP SIGNATURE-----
diff --git a/games-simulation/openttd/files/install.patch b/games-simulation/openttd/files/install.patch
deleted file mode 100644
index 17f479c30e35..000000000000
--- a/games-simulation/openttd/files/install.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-Index: Makefile.in
-===================================================================
---- Makefile.in (revision 14474)
-+++ Makefile.in (working copy)
-@@ -28,6 +28,7 @@
- INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)"
- INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!!
- INSTALL_DOC_DIR = "$(INSTALL_DIR)/"!!DOC_DIR!!
-+BINARY_NAME = !!BINARY_NAME!!
- TTD = !!TTD!!
- TTDS = $(SRC_DIRS:%=%/$(TTD))
- OS = !!OS!!
-Index: Makefile.bundle.in
-===================================================================
---- Makefile.bundle.in (revision 14474)
-+++ Makefile.bundle.in (working copy)
-@@ -139,35 +140,41 @@
- $(Q)install -d "$(INSTALL_DATA_DIR)/data"
- $(Q)install -d "$(INSTALL_DATA_DIR)/lang"
- $(Q)install -d "$(INSTALL_DOC_DIR)"
-- $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)"
-+ifeq ($(TTD), openttd.exe)
-+ $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}.exe"
-+else
-+ $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}"
-+endif
- $(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
- $(Q)install -m 644 "$(BUNDLE_DIR)/data/"* "$(INSTALL_DATA_DIR)/data"
- $(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(INSTALL_DOC_DIR)"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/"*.txt "$(INSTALL_DOC_DIR)"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/COPYING" "$(INSTALL_DOC_DIR)"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)/${BINARY_NAME}.32.xpm"
- ifdef ICON_THEME_DIR
- $(Q)install -d "$(INSTALL_ICON_THEME_DIR)"
- $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/16x16/apps"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps/${BINARY_NAME}.png"
- $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/32x32/apps"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps/${BINARY_NAME}.png"
- $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/48x48/apps"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps/${BINARY_NAME}.png"
- $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/64x64/apps"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps/${BINARY_NAME}.png"
- $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/128x128/apps"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps/${BINARY_NAME}.png"
- $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/256x256/apps"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps/${BINARY_NAME}.png"
- else
- $(Q)install -m 644 "$(BUNDLE_DIR)/media/"*.png "$(INSTALL_ICON_DIR)"
- endif
- ifdef MAN_DIR
- $(Q)install -d "$(INSTALL_MAN_DIR)"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6.gz"
- endif
- ifdef MENU_DIR
- $(Q)install -d "$(INSTALL_MENU_DIR)"
-- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.desktop" "$(INSTALL_MENU_DIR)"
-+ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.desktop" "$(INSTALL_MENU_DIR)/${BINARY_NAME}.desktop"
- endif
- $(Q)cp -R "$(BUNDLE_DIR)/scenario" "$(INSTALL_DATA_DIR)"
- endif # OSXAPP
-Index: config.lib
-===================================================================
---- config.lib (revision 14474)
-+++ config.lib (working copy)
-@@ -37,6 +37,7 @@
- man_dir="1"
- menu_dir="1"
- menu_group="Game;"
-+ binary_name="openttd"
- enable_debug="0"
- enable_desync_debug="0"
- enable_profiling="0"
-@@ -100,6 +101,7 @@
- shared_dir
- install_dir
- menu_group
-+ binary_name
- enable_debug
- enable_desync_debug
- enable_profiling
-@@ -213,6 +215,9 @@
- --menu-dir=*) menu_dir="$optarg";;
- --without-menu-entry) menu_dir="";;
-
-+ --binary-name) prevp_p="binary_name";;
-+ --binary-name=*) binary_name="$optarg";;
-+
- --man-dir) prevp_p="man_dir";;
- --man-dir=*) man_dir="$optarg";;
-
-@@ -2298,6 +2303,7 @@
- s#!!PERSONAL_DIR!!#$personal_dir#g;
- s#!!SHARED_DIR!!#$shared_dir#g;
- s#!!INSTALL_DIR!!#$install_dir#g;
-+ s#!!BINARY_NAME!!#$binary_name#g;
- s#!!STRGEN!!#$STRGEN#g;
- s#!!ENDIAN_CHECK!!#$ENDIAN_CHECK#g;
- s#!!ENDIAN_FORCE!!#$endian#g;
-@@ -2507,6 +2513,8 @@
- echo " [$shared_dir]"
- echo " --install-dir=dir specifies the root to install to."
- echo " Useful to install into jails [$install_dir]"
-+ echo " --binary-name the name used for the binary, icons,"
-+ echo " desktop file, etc. when installing [openttd]"
- echo ""
- echo "Features and packages:"
- echo " --enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)"
diff --git a/games-simulation/openttd/files/libiconv.patch b/games-simulation/openttd/files/libiconv.patch
deleted file mode 100644
index 9e56ab314b21..000000000000
--- a/games-simulation/openttd/files/libiconv.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Index: config.lib
-===================================================================
---- config.lib (revision 14474)
-+++ config.lib (working copy)
-@@ -1225,10 +1225,12 @@
-
- if [ "$with_iconv" != "0" ]; then
- CFLAGS="$CFLAGS -DWITH_ICONV"
-- LIBS="$LIBS -liconv"
-- if [ "$with_iconv" != "2" ]; then
-- CFLAGS="$CFLAGS -I$with_iconv/include"
-- LIBS="$LIBS -L$with_iconv/lib"
-+ if [ "$link_to_iconv" = "yes" ]; then
-+ LIBS="$LIBS -liconv"
-+ if [ "$with_iconv" != "2" ]; then
-+ CFLAGS="$CFLAGS -I$with_iconv/include"
-+ LIBS="$LIBS -L$with_iconv/lib"
-+ fi
- fi
-
- if [ "$have_broken_iconv" != "no" ]; then
-@@ -2161,6 +2163,27 @@
- log 2 " exit code $ret"
- if [ "$ret" = "0" ]; then have_broken_iconv="no"; else have_broken_iconv="yes"; fi
- log 1 "checking if iconv has non-const inbuf... $have_broken_iconv"
-+
-+ cat > tmp.iconv.cpp << EOF
-+#include "src/stdafx.h"
-+#include <iconv.h>
-+int main() {
-+ static char buf[1024];
-+ iconv_t convd = 0;
-+ char *inbuf = "";
-+ char *outbuf = buf;
-+ size_t outlen = 1023;
-+ size_t inlen = 0;
-+ return iconv(convd, &inbuf, &inlen, &outbuf, &outlen);
-+}
-+EOF
-+ execute="$cxx_host $CFLAGS tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1"
-+ eval $execute >&/dev/null
-+ ret=$?
-+ log 2 "executing $execute"
-+ log 2 " exit code $ret"
-+ if [ "$ret" = "0" ]; then link_to_iconv="no"; else link_to_iconv="yes"; fi
-+ log 1 "checking whether to link to iconv... $link_to_iconv"
- rm -f tmp.iconv tmp.iconv.cpp
- }
-
diff --git a/games-simulation/openttd/files/menu_name.patch b/games-simulation/openttd/files/menu_name.patch
deleted file mode 100644
index c0e3c0f9b14b..000000000000
--- a/games-simulation/openttd/files/menu_name.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: media/openttd.desktop.in
-===================================================================
---- media/openttd.desktop.in (revision 14471)
-+++ media/openttd.desktop.in (working copy)
-@@ -4,9 +4,8 @@
- Encoding=UTF-8
- Type=Application
- Version=1.1
- Name=OpenTTD
--GenericName=A clone of Transport Tycoon Deluxe
--Comment=A business simulation game
-+Comment=A clone of Transport Tycoon Deluxe
- Icon=openttd
- Exec=!!TTD!!
- Terminal=false
diff --git a/games-simulation/openttd/openttd-0.6.3.ebuild b/games-simulation/openttd/openttd-0.6.3.ebuild
deleted file mode 100644
index 1f1f40f5c124..000000000000
--- a/games-simulation/openttd/openttd-0.6.3.ebuild
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-simulation/openttd/openttd-0.6.3.ebuild,v 1.6 2009/02/02 15:14:49 ranger Exp $
-
-EAPI="2"
-
-inherit eutils games
-
-MY_P=${P/_rc/-RC}
-
-DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe"
-HOMEPAGE="http://www.openttd.org/"
-SRC_URI="http://binaries.openttd.org/releases/${PV}/${MY_P}-source.tar.bz2"
-SCENARIOS="0.4.8 0.5.0"
-for scenario in ${SCENARIOS}; do
- SRC_URI="${SRC_URI} scenarios? (
- http://binaries.openttd.org/scenarios/${PN}-${scenario}-scenarios.tar.bz2 )"
-done
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc ppc64 x86"
-IUSE="alsa debug dedicated iconv +png scenarios timidity +truetype +zlib"
-RESTRICT="test"
-
-DEPEND="!dedicated? (
- media-libs/libsdl[X]
- truetype? (
- media-libs/fontconfig
- media-libs/freetype:2
- )
- )
- iconv? ( virtual/libiconv )
- png? ( media-libs/libpng )
- zlib? ( sys-libs/zlib )"
-RDEPEND="${DEPEND}
- !dedicated? (
- timidity? ( media-sound/timidity++ )
- !timidity? ( alsa? ( media-sound/alsa-utils ) )
- )"
-
-S=${WORKDIR}/${MY_P}
-
-src_unpack() {
- unpack ${MY_P}-source.tar.bz2
-
- if use scenarios ; then
- cd "${S}"/bin/scenario/
- for scenario in ${SCENARIOS}; do
- unpack ${PN}-${scenario}-scenarios.tar.bz2
- done
- fi
-
- cd "${S}"
- epatch "${FILESDIR}/libiconv.patch"
- epatch "${FILESDIR}/install.patch"
- epatch "${FILESDIR}/menu_name.patch"
-}
-
-src_configure() {
- local myopts=""
- use debug && myopts="${myopts} --enable-debug=3"
- if use dedicated; then
- myopts="${myopts} --enable-dedicated "
- else
- myopts="${myopts} --with-sdl $(use_with truetype freetype)
- $(use_with truetype fontconfig)"
- if ! use timidity; then
- use alsa && myopts="${myopts} --with-midi=/usr/bin/aplaymidi"
- fi
- fi
- # configure is a hand-written sh-script, so econf will not work
- ./configure --disable-strip \
- --prefix-dir=/usr \
- --binary-dir=games/bin \
- --data-dir=share/games/${PN} \
- --install-dir="${D}" \
- --doc-dir=share/doc/${P} \
- --menu-group="Game;Simulation;" \
- $(use_with iconv) \
- $(use_with png) \
- $(use_with zlib) \
- ${myopts} \
- || die "configure failed"
-}
-
-src_compile() {
- emake || die "emake failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
-
- if use scenarios ; then
- insinto "${GAMES_DATADIR}"/${PN}/scenario
- doins bin/scenario/*.scn || die "doins failed (scenario)"
- doins bin/scenario/*/*.scn || die "doins failed (scenario)"
- fi
-
- prepgamesdirs
-}
-
-pkg_postinst() {
- games_pkg_postinst
-
- elog
- elog "In order to play, you must copy the following 6 files from "
- elog "a version of TTD to ${GAMES_DATADIR}/${PN}/data/."
- elog
- elog "From the WINDOWS version you need: "
- elog " sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf"
- elog "OR from the DOS version you need: "
- elog " SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF"
- elog
- elog "File names are case sensitive so make sure they are "
- elog "correct for whichever version you have."
- elog
-
- if use scenarios ; then
- elog "Scenarios are installed into:"
- elog "${GAMES_DATADIR}/${PN}/scenario,"
- elog "you will have to symlink them to ~/.openttd/scenario in order"
- elog "to use them."
- elog "Example:"
- elog " ln -s ${GAMES_DATADIR}/${PN}/scenario ~/.openttd/scenario"
- elog
- fi
-
- if use dedicated ; then
- ewarn "Warning: The init script will kill all running openttd"
- ewarn "processes when run, including any running client sessions!"
- else
- if use timidity || use alsa ; then
- elog "If you want music, you must copy the gm/ directory to"
- elog "${GAMES_DATADIR}/${PN}/"
- elog "You can enable MIDI by running:"
- elog " openttd -m extmidi"
- elog
- if use timidity ; then
- elog "You also need soundfonts for timidity, if you don't"
- elog "know what that is, do:"
- elog
- elog "emerge media-sound/timidity-eawpatches"
- else
- elog "You have emerged with 'aplaymidi' for playing MIDI."
- elog "You have to set the environment variable ALSA_OUTPUT_PORTS."
- elog "Available ports can be listed by using 'aplaymidi -l'."
- fi
- else
- elog "timidity and/or alsa not in USE so music will not be played during the game."
- fi
- elog
- fi
-}
diff --git a/games-simulation/openttd/openttd-0.7.2.ebuild b/games-simulation/openttd/openttd-0.7.2.ebuild
deleted file mode 100644
index 11806b87ee81..000000000000
--- a/games-simulation/openttd/openttd-0.7.2.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-simulation/openttd/openttd-0.7.2.ebuild,v 1.3 2009/09/26 20:04:41 ranger Exp $
-
-EAPI=2
-inherit eutils 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.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~ppc ppc64 x86"
-IUSE="alsa debug dedicated iconv icu +png +truetype zlib"
-RESTRICT="test"
-
-DEPEND="
- !dedicated? (
- media-libs/libsdl[X]
- icu? ( dev-libs/icu )
- truetype? (
- media-libs/fontconfig
- media-libs/freetype:2
- sys-libs/zlib
- )
- )
- iconv? ( virtual/libiconv )
- png? ( media-libs/libpng )
- zlib? ( sys-libs/zlib )"
-RDEPEND="${DEPEND}
- !dedicated? (
- alsa? ( media-sound/alsa-utils )
- )"
-
-src_configure() {
- local myopts
-
- use debug && myopts="${myopts} --enable-debug=3"
-
- if use dedicated ; then
- myopts="${myopts} --enable-dedicated"
- else
- use alsa && myopts="${myopts} --with-midi=/usr/bin/aplaymidi"
- myopts="${myopts}
- $(use_with truetype freetype)
- $(use_with icu)
- --with-sdl"
- fi
- if use png || { use !dedicated && use truetype; } || use zlib ; then
- myopts="${myopts} --with-zlib"
- else
- myopts="${myopts} --without-zlib"
- fi
-
- # there is an allegro interface available as well as sdl, but
- # the configure for it looks broken so the sdl interface is
- # always built instead.
- myopts="${myopts} --without-allegro"
-
- # configure is a hand-written bash-script, so econf will not work
- ./configure \
- --disable-strip \
- --prefix-dir=/ \
- --binary-dir="${GAMES_BINDIR}" \
- --data-dir="${GAMES_DATADIR}/${PN}" \
- --install-dir="${D}" \
- --icon-theme-dir=/usr/share/icons \
- --icon-dir=/usr/share/pixmaps \
- --menu-dir=/usr/share/applications \
- --man-dir=/usr/share/man \
- --doc-dir=/usr/share/doc/${PF} \
- --menu-group="Game;Simulation;" \
- ${myopts} \
- $(use_with iconv) \
- $(use_with png) \
- || die "configure failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
- if use dedicated ; then
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
- rm -rf "${D}"/usr/share/{applications,icons,pixmaps}
- fi
- rm -f "${D}"/usr/share/doc/${PF}/COPYING
- prepalldocs
- prepgamesdirs
-}
-
-pkg_postinst() {
- games_pkg_postinst
-
- elog
- elog "In order to play, you must copy the following 6 files from "
- elog "a version of TTD to ${GAMES_DATADIR}/${PN}/data/."
- elog
- elog "From the WINDOWS version you need: "
- elog " sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf"
- elog "OR from the DOS version you need: "
- elog " SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF"
- elog
- elog "File names are case sensitive so make sure they are "
- elog "correct for whichever version you have."
- elog
-
- if use dedicated ; then
- ewarn "Warning: The init script will kill all running openttd"
- ewarn "processes when run, including any running client sessions!"
- else
- if use alsa ; then
- elog "You have emerged with 'aplaymidi' for playing MIDI."
- elog "You have to set the environment variable ALSA_OUTPUT_PORTS."
- elog "Available ports can be listed by using 'aplaymidi -l'."
- else
- elog "alsa not in USE so music will not be played during the game."
- fi
- fi
-}