diff options
author | Locke Shinseiko <wizzleby@gmail.com> | 2010-05-17 21:41:00 -0400 |
---|---|---|
committer | Locke Shinseiko <wizzleby@gmail.com> | 2010-05-17 21:41:00 -0400 |
commit | a62e4ca09d67f1f60072339a8bd3595e5dc294d0 (patch) | |
tree | 3a6e4dd33740383bd7de2514de6effd9079b5b6c | |
parent | [dev-cpp/luabind] some fixes (diff) | |
download | gamerlay-a62e4ca09d67f1f60072339a8bd3595e5dc294d0.tar.gz gamerlay-a62e4ca09d67f1f60072339a8bd3595e5dc294d0.tar.bz2 gamerlay-a62e4ca09d67f1f60072339a8bd3595e5dc294d0.zip |
[games-simulation/openttd-1.0.1] Message cleanup and midi fixes:
Unbind --with-midi definition from alsa useflag, offer timidity
useflag (no requirement to mess with env vars) to set
--with-midi='/usr/bin/timidity' (and RDEP on media-sound/timidity++)
Removed misleading elog about ALSA and midi ports.
Generally fixed up grammar in elogs at suggestion of upstream.
Thanks to Rubidium and planetmaker.
[profiles/categories] Added games-simulation.
-rw-r--r-- | games-simulation/openttd/Manifest | 4 | ||||
-rwxr-xr-x | games-simulation/openttd/files/openttd.initd | 20 | ||||
-rw-r--r-- | games-simulation/openttd/metadata.xml | 14 | ||||
-rw-r--r-- | games-simulation/openttd/openttd-1.0.1.ebuild | 150 | ||||
-rw-r--r-- | profiles/categories | 1 |
5 files changed, 189 insertions, 0 deletions
diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest new file mode 100644 index 0000000..164f9f7 --- /dev/null +++ b/games-simulation/openttd/Manifest @@ -0,0 +1,4 @@ +AUX openttd.initd 529 RMD160 ff9fdf7a787ae3d08ec4dbef1b1b37eee12d1ccd SHA1 f833206fc430c6e7afec76c39e97af0f7ec6578a SHA256 a16e5c64a073d0b7e7092bb906b7f064414870a8607bebce16b4b08cff7f4112 +DIST openttd-1.0.1-source.tar.bz2 5341259 RMD160 b14e45853e0475fe25508be888f38e6467ebc495 SHA1 8f1a35b3dea0c41386399d9889e2147c6b6e49c0 SHA256 6067601979736e8b1acb1b67919c13a9f53f3407d0f0704bd310a55ac15bbc1f +EBUILD openttd-1.0.1.ebuild 4196 RMD160 b32685f17e4aa2ec44b7fa3def7be65a42d3269a SHA1 1c0dbd14ebc3475656bcb7bf1cc38ce791841b14 SHA256 acdff3b38e70c89a85e1ba2eaf71ad4b9a17debc6375909cf97b16c42a5e0da8 +MISC metadata.xml 655 RMD160 d61ce0c9527329f894aa27ed9071769bccbe7e7b SHA1 66784d42c79cc7b607126ff0fc624d271b8f94cd SHA256 c7b0e542afd0502cf9aa7cd03bbfe459c49ab609958c094a0e98a2ddd9faa2df 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/metadata.xml b/games-simulation/openttd/metadata.xml new file mode 100644 index 0000000..47fe9ae --- /dev/null +++ b/games-simulation/openttd/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>games</herd> + <maintainer> + <email>wizzleby@gmail.com</email> + <name>Locke Shinseiko</name> + </maintainer> + <use> + <flag name='openmedia'>Enables the free open media sets: OpenGFX, OpenSFX, OpenMSX, removing the requirement for proprietary TTD assets to play OpenTTD.</flag> + <flag name='lzo'>Enables LZO compression for savegames. This is only needed to load extremely old savegames. (versions before 0.2)</flag> + <flag name='dedicated'>Build only the openttd server, and not the client.</flag> + </use> +</pkgmetadata> diff --git a/games-simulation/openttd/openttd-1.0.1.ebuild b/games-simulation/openttd/openttd-1.0.1.ebuild new file mode 100644 index 0000000..bd0de5f --- /dev/null +++ b/games-simulation/openttd/openttd-1.0.1.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 +inherit eutils games + +MY_PV=${PV/_rc/-RC} +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" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="alsa debug dedicated iconv icu lzo +openmedia +png +timidity +truetype zlib" +RESTRICT="test" + +DEPEND=" + !dedicated? ( + media-libs/libsdl[audio,X,video] + icu? ( dev-libs/icu ) + truetype? ( + media-libs/fontconfig + media-libs/freetype:2 + sys-libs/zlib + ) + ) + lzo? ( dev-libs/lzo:2 ) + iconv? ( virtual/libiconv ) + png? ( media-libs/libpng ) + zlib? ( sys-libs/zlib )" +RDEPEND="${DEPEND} + !dedicated? ( + alsa? ( media-sound/alsa-utils ) + timidity? ( media-sound/timidity++ ) +)" +PDEPEND=" + openmedia? ( + games-misc/opengfx + games-misc/opensfx + games-misc/openmsx + )" + +src_configure() { + # 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. + local myopts="${myopts} --without-allegro" + + # libtimidity not needed except for some embedded platform + # nevertheless, it will be automagically linked if it is + # installed. Hence, we disable it. + myopts="${myopts} --without-libtimidity" + + use debug && myopts="${myopts} --enable-debug=3" + + if use dedicated ; then + myopts="${myopts} --enable-dedicated" + else + use timidity && myopts="${myopts} --with-midi='/usr/bin/timidity'" + 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 + + # configure is a hand-written bash-script, so econf will not work. + # It's all built as C++, upstream uses CFLAGS internally. + CFLAGS="" ./configure \ + --disable-strip \ + --prefix-dir="${EPREFIX}" \ + --binary-dir="${GAMES_BINDIR}" \ + --data-dir="${GAMES_DATADIR}/${PN}" \ + --install-dir="${D}" \ + --icon-dir=/usr/share/pixmaps \ + --menu-dir=/usr/share/applications \ + --icon-theme-dir=/usr/share/icons/hicolor \ + --man-dir=/usr/share/man/man6 \ + --doc-dir=/usr/share/doc/${PF} \ + --menu-group="Game;Simulation;" \ + ${myopts} \ + $(use_with iconv) \ + $(use_with png) \ + $(use_with lzo liblzo2) \ + || die "configure failed" +} + +src_compile() { + emake VERBOSE=1 || die +} + +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 + + if ! use openmedia ; then + elog + elog "OpenTTD was compiled without the 'openmedia' USE flag." + elog + elog "In order to play, you must at least install:" + elog "games-misc/opengfx, and games-misc/opensfx, or copy the " + elog "following 6 files from a version of Transport Tycoon Deluxe" + elog "(windows or DOS) to ~/.openttd/data/ or" + elog "${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, but should work either with" + elog "all upper or all lower case names" + elog + elog "In addition, in-game music will be unavailable: for music," + elog "install games-misc/openmsx, or use the in-game download" + elog "functionality to get a music set" + elog + fi + + if ! use lzo ; then + elog "OpenTTD was built without 'lzo' in USE. While 'lzo' is not" + elog "required, disabling it does mean that loading old savegames" + elog "or scenarios from ancient versions (~0.2) will fail." + elog + fi + + if use dedicated ; then + ewarn "Warning: The init script will kill all running openttd" + ewarn "processes when triggered, including any running client sessions!" + fi +} diff --git a/profiles/categories b/profiles/categories index abe30f7..a0562ca 100644 --- a/profiles/categories +++ b/profiles/categories @@ -7,6 +7,7 @@ games-engines games-fps games-puzzle games-rpg +games-simulation games-strategy games-util media-libs |