1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION
="OpenTTD is a clone of Transport Tycoon Deluxe"
10 HOMEPAGE
="http://www.openttd.org/"
11 SRC_URI
="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.bz2"
15 KEYWORDS
="amd64 ppc ppc64 x86"
16 IUSE
="alsa debug dedicated iconv icu +png +truetype +zlib"
22 media-libs/sdl-image[png]
29 iconv? ( virtual/libiconv )
30 png? ( media-libs/libpng )
31 zlib? ( sys-libs/zlib )"
34 alsa? ( media-sound/alsa-utils[midi] )
39 use debug
&& myopts
="${myopts} --enable-debug=3"
41 use dedicated
&& myopts
="${myopts} --enable-dedicated"
43 myopts
="${myopts} --with-midi=/usr/bin/aplaymidi"
46 # there is available allegro interface as opposite for sdl, but we always
47 # prefer sdl more and the configure for the other one looks broken.
49 # configure is a hand-written sh-script, so econf will not work
53 --binary-dir=games
/bin \
54 --data-dir=share
/games
/${PN} \
55 --install-dir="${D}" \
56 --doc-dir=share
/doc
/${PF} \
57 --menu-group="Game;Simulation;" \
60 $
(use_with truetype freetype
) \
66 || die
"configure failed"
70 emake DESTDIR
="${D}" install || die
"emake install failed"
79 elog
"In order to play, you must copy the following 6 files from "
80 elog
"a version of TTD to ${GAMES_DATADIR}/${PN}/data/."
82 elog
"From the WINDOWS version you need: "
83 elog
" sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf"
84 elog
"OR from the DOS version you need: "
85 elog
" SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF"
87 elog
"File names are case sensitive so make sure they are "
88 elog
"correct for whichever version you have."
91 if use dedicated
; then
92 ewarn
"Warning: The init script will kill all running openttd"
93 ewarn
"processes when run, including any running client sessions!"
96 elog
"You have emerged with 'aplaymidi' for playing MIDI."
97 elog
"You have to set the environment variable ALSA_OUTPUT_PORTS."
98 elog
"Available ports can be listed by using 'aplaymidi -l'."
100 elog
"alsa not in USE so music will not be played during the game."