]> Pileus Git - ~andy/sunrise/blob - games-fps/gzdoom/gzdoom-1.5.5.ebuild
sunrise/ net-nntp/nzbperl/Manifest: Update copyright line to satisfy repoman
[~andy/sunrise] / games-fps / gzdoom / gzdoom-1.5.5.ebuild
1 # Copyright 1999-2012 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 eutils
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 SRC_URI="http://omploader.org/vNjdnZw/${P}.tar.bz2"
12
13 LICENSE="DOOMLIC BUILDLIC BSD"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="mmx gtk fluidsynth"
17
18 RDEPEND="gtk? ( x11-libs/gtk+:2 )
19         fluidsynth? ( media-sound/fluidsynth )
20         media-libs/flac
21         media-libs/fmod:1
22         virtual/glu
23         virtual/jpeg
24         virtual/opengl
25         media-libs/libsdl"
26
27 DEPEND="${REPEND}
28         mmx? ( || ( dev-lang/nasm dev-lang/yasm ) )"
29
30 src_prepare() {
31         # Use default game data path"
32         sed -i \
33                 -e "s:/usr/local/share/:${GAMES_DATADIR}/doom-data/:" \
34                 src/sdl/i_system.h || die
35         epatch "${FILESDIR}/${PN}-respect-fluidsynth-useflag.patch"
36         epatch "${FILESDIR}/${P}-fix-new-fmod.patch"
37 }
38
39 src_configure() {
40         local mycmakeargs=(
41                 $(cmake-utils_use_no mmx ASM)
42                 $(cmake-utils_use_no gtk GTK)
43                 $(cmake-utils_use_use fluidsynth FLUIDSYNTH)
44         )
45
46         cmake-utils_src_configure
47 }
48
49 src_install() {
50         dodoc docs/*.{txt,TXT} || die
51         dohtml docs/console*.{css,html} || die
52
53         cd "${CMAKE_BUILD_DIR}" || die
54         dogamesbin ${PN} || die
55
56         insinto "${GAMES_DATADIR}/doom-data"
57         doins ${PN}.pk3 || die
58
59         prepgamesdirs
60 }
61
62 pkg_postinst() {
63         games_pkg_postinst
64
65         elog "Copy or link wad files into ${GAMES_DATADIR}/doom-data/"
66         elog "(the files must be readable by the 'games' group)."
67         elog
68         elog "To play, simply run:"
69         elog "   gzdoom"
70         elog
71         if use fluidsynth && ! has_version media-sound/fluid-soundfont; then
72                 ewarn "You may need to install media-sound/fluid-soundfont"
73                 ewarn "for fluidsynth to play music, depending on your sound card."
74         fi
75         elog "See /usr/share/doc/${P}/zdoom.txt.bz2 for more info"
76 }