]> Pileus Git - ~andy/sunrise/blob - games-fps/gzdoom/gzdoom-9999.ebuild
games-fps/gzdoom: Warn only if media-sound/fluid-soundfont is not installed
[~andy/sunrise] / games-fps / gzdoom / gzdoom-9999.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit games cmake-utils subversion
8
9 DESCRIPTION="Enhanced OpenGL port of the official DOOM source code that also supports Heretic, Hexen, and Strife"
10 HOMEPAGE="http://grafzahl.drdteam.org/"
11 ESVN_REPO_URI="http://mancubus.net/svn/hosted/gzdoom/trunk/"
12
13 LICENSE="DOOMLIC BUILDLIC BSD"
14 SLOT="0"
15 KEYWORDS=""
16 IUSE="mmx gtk fluidsynth"
17
18 RDEPEND="
19         fluidsynth? ( media-sound/fluidsynth )
20         gtk? ( x11-libs/gtk+:2 )
21         media-libs/flac
22         media-libs/fmod:1
23         media-libs/jpeg
24         media-libs/libsdl"
25
26 DEPEND="${RDEPEND}
27         mmx? ( || ( dev-lang/nasm dev-lang/yasm ) )"
28
29 src_prepare() {
30         # Use default game data path
31         sed -i \
32                 -e "s:/usr/local/share/:${GAMES_DATADIR}/doom-data/:" \
33                 src/sdl/i_system.h || die
34 }
35
36 src_configure() {
37         local mycmakeargs=(
38                 $(cmake-utils_use_no mmx ASM)
39                 $(cmake-utils_use_no gtk GTK)
40                 -DFMOD_INCLUDE_DIR=/opt/fmodex/api/inc/
41                 -DFMOD_LIBRARY=/opt/fmodex/api/lib/libfmodex.so
42         )
43
44         cmake-utils_src_configure
45 }
46
47 src_install() {
48         dodoc docs/*.{txt,TXT} || die
49         dohtml docs/console*.{css,html} || die
50
51         cd "${CMAKE_BUILD_DIR}" || die
52         dogamesbin ${PN} || die
53
54         insinto "${GAMES_DATADIR}/doom-data"
55         doins ${PN}.pk3 || die
56
57         prepgamesdirs
58 }
59
60 pkg_postinst() {
61         games_pkg_postinst
62
63         elog "Copy or link wad files into ${GAMES_DATADIR}/doom-data/"
64         elog "(the files must be readable by the 'games' group)."
65         elog
66         elog "To play, simply run:"
67         elog "   gzdoom"
68         elog
69         if use fluidsynth && ! has_version media-sound/fluid-soundfont; then
70                 ewarn "You may need to install media-sound/fluid-soundfont"
71                 ewarn "for fluidsynth to play music, depending on your sound card."
72         fi
73         elog "See /usr/share/doc/${P}/zdoom.txt.* for more info"
74 }