]> Pileus Git - ~andy/sunrise/blob - games-fps/chocolate-doom/chocolate-doom-1.2.1.ebuild
dev-libs/qextserialport: Fix qt deps, EAPI bump
[~andy/sunrise] / games-fps / chocolate-doom / chocolate-doom-1.2.1.ebuild
1 # Copyright 1999-2012 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         egamesconf \
39                 --disable-sdltest \
40                 --disable-dependency-tracking \
41                 || die "egamesconf failed"
42
43         emake || die "emake failed"
44 }
45
46 src_install() {
47         dogamesbin "src/${PN}" || die "dogamesbin ${PN} failed"
48         dogamesbin setup/chocolate-setup || die "dogamesbin chocolate-setup failed"
49         if use server ; then
50                 dogamesbin src/chocolate-server || die "dogamesbin chocolate-server failed"
51         fi
52
53         newicon data/doom.png "${PN}.png" || die "doicon failed"
54         make_desktop_entry "${PN}" "Chocolate Doom"
55         newicon data/setup.png chocolate-setup.png || die "doicon failed"
56         make_desktop_entry chocolate-setup "Chocolate Doom Setup" chocolate-setup.png
57
58         doman man/*.{5,6} || die "doman failed"
59         dodoc AUTHORS BUGS CMDLINE ChangeLog NEWS README TODO || die "dodoc failed"
60
61         dodir "${GAMES_DATADIR}/doom-data" || die "dodir failed"
62
63         prepgamesdirs
64 }
65
66 pkg_postinst() {
67         games_pkg_postinst
68
69         einfo
70         einfo "To play the original Doom levels, place doom.wad and/or doom2.wad"
71         einfo "into "${GAMES_DATADIR}"/doom-data, then run: ${PN}"
72         einfo
73         einfo "To configure game options run:  chocolate-setup"
74         einfo
75 }