diff options
author | 2009-02-18 21:39:45 -0500 | |
---|---|---|
committer | 2009-02-18 21:39:45 -0500 | |
commit | 015c0c710ffa3e3713c85a91e24357a1a44bab23 (patch) | |
tree | 0fe955c07678443d9ea0e5507f573b3dadeb3316 | |
parent | Add ebuild for idea-8.1 (diff) | |
download | eatnumber1-015c0c710ffa3e3713c85a91e24357a1a44bab23.tar.gz eatnumber1-015c0c710ffa3e3713c85a91e24357a1a44bab23.tar.bz2 eatnumber1-015c0c710ffa3e3713c85a91e24357a1a44bab23.zip |
Add ebuild for openttd-0.7.0-beta1
-rw-r--r-- | games-simulation/openttd/Manifest | 5 | ||||
-rwxr-xr-x | games-simulation/openttd/files/openttd.initd | 20 | ||||
-rw-r--r-- | games-simulation/openttd/openttd-0.7.0_beta1.ebuild | 153 |
3 files changed, 178 insertions, 0 deletions
diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest new file mode 100644 index 0000000..23da4ca --- /dev/null +++ b/games-simulation/openttd/Manifest @@ -0,0 +1,5 @@ +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.7.0-beta1-source.tar.bz2 4734104 RMD160 c38e9f55bbc59e486940ff365d2913cb5e1af749 SHA1 f0f3cd4fc47b20163ffd1ac94ca4de41acdafa31 SHA256 ff68fb4300026482bdd5c41dd21261c792cf34ff4c7184588a5f30553a91d824 +EBUILD openttd-0.7.0_beta1.ebuild 4156 RMD160 5143f53146e3189adcf99b31e0616d9ed8150a47 SHA1 3393866dbf63d95b18890380dd9264722d31bd31 SHA256 ee7bbf718fd9b0e098a04d92194aac51d4c0499a68c3816279e206955150a1da diff --git a/games-simulation/openttd/files/openttd.initd b/games-simulation/openttd/files/openttd.initd new file mode 100755 index 0000000..e2f5fbf --- /dev/null +++ b/games-simulation/openttd/files/openttd.initd @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/games-simulation/openttd/files/openttd.initd,v 1.1 2005/01/25 13:55:04 dholm Exp $ + +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-0.7.0_beta1.ebuild b/games-simulation/openttd/openttd-0.7.0_beta1.ebuild new file mode 100644 index 0000000..7d18939 --- /dev/null +++ b/games-simulation/openttd/openttd-0.7.0_beta1.ebuild @@ -0,0 +1,153 @@ +# 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_PV=${PV/_rc/-RC} +MY_PV=${MY_PV/_beta/-beta} +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe" +HOMEPAGE="http://www.openttd.org/" +SRC_URI="http://binaries.openttd.org/releases/${MY_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" +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}" +} + +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 +} |