]> Pileus Git - ~andy/sunrise/blob - games-fps/chocolate-doom/chocolate-doom-1.2.1.ebuild
games-fps/chocolate-doom: Add suggested RDEPEND=${DEPEND}
[~andy/sunrise] / games-fps / chocolate-doom / chocolate-doom-1.2.1.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit games autotools
6
7 DESCRIPTION="Doom port designed to act identically to the original game"
8 HOMEPAGE="http://www.chocolate-doom.org/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="server"
15
16 DEPEND=">=media-libs/libsdl-1.1.3
17         media-libs/sdl-mixer
18         media-libs/sdl-net"
19 RDEPEND=${DEPEND}
20
21 src_unpack() {
22         unpack ${A}
23         cd "${S}"
24
25         # Change default search path for IWAD
26         sed -i \
27                 -e "s:/usr/share/games/doom:${GAMES_DATADIR}/doom-data:" \
28                 src/d_iwad.c || die "sed main.c failed"
29
30         sed -i \
31                 -e "s:^gamesdir =.*:gamesdir = ${GAMES_BINDIR}:" \
32                 setup/Makefile.am || die "sed Makefile.am failed"
33
34         eautoreconf
35 }
36
37 src_compile() {
38
39         egamesconf \
40                 --disable-sdltest \
41                 --disable-dependency-tracking \
42                 || die "egamesconf failed"
43
44         emake || die "emake failed"
45 }
46
47 src_install() {
48         dogamesbin "src/${PN}" || die "dogamesbin ${PN} failed"
49         dogamesbin setup/chocolate-setup || die "dogamesbin chocolate-setup failed"
50         if use server ; then
51                 dogamesbin src/chocolate-server || die "dogamesbin chocolate-server failed"
52         fi
53
54         newicon data/doom.png "${PN}.png" || die "doicon failed"
55         make_desktop_entry "${PN}" "Chocolate Doom"
56         newicon data/setup.png chocolate-setup.png || die "doicon failed"
57         make_desktop_entry chocolate-setup "Chocolate Doom Setup" chocolate-setup.png
58
59         doman man/*.{5,6} || die "doman failed"
60         dodoc AUTHORS BUGS CMDLINE ChangeLog NEWS README TODO || die "dodoc failed"
61
62         dodir "${GAMES_DATADIR}/doom-data" || die "dodir failed"
63
64         prepgamesdirs
65 }
66
67 pkg_postinst() {
68         games_pkg_postinst
69
70         echo
71         elog "To play the original Doom levels, place doom.wad and/or doom2.wad"
72         elog "into "${GAMES_DATADIR}"/doom-data, then run: ${PN}"
73         elog
74         elog "To configure game options run:  chocolate-setup"
75         echo
76 }