]> Pileus Git - ~andy/sunrise/blob - games-board/dreamchess/dreamchess-0.2.0.ebuild
dev-db/dabo: Adding ~amd64 keyword, fixing deps, fixing distutils usage
[~andy/sunrise] / games-board / dreamchess / dreamchess-0.2.0.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils autotools games
6
7 MY_MUSIC="${PN}-music-1.0.run"
8
9 DESCRIPTION="3D OpenGL moderately-strong chess engine"
10 HOMEPAGE="http://www.dreamchess.org/"
11 SRC_URI="mirror://berlios/${PN}/${P}.tar.gz
12         sound? ( music? ( mirror://berlios/${PN}/${MY_MUSIC}.tar ) )"
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="~amd64"
17 IUSE="music sound"
18
19 RDEPEND="virtual/opengl
20         media-libs/libsdl
21         media-libs/sdl-image
22         sound? ( media-libs/sdl-mixer )
23         dev-libs/mini-xml"
24 DEPEND="${RDEPEND}"
25
26 src_unpack() {
27         unpack ${A}
28         cd "${S}"
29         epatch "${FILESDIR}/${P}-configure.ac.patch"
30         eautoreconf
31         if use music ; then
32                 if use sound ; then
33                         "${WORKDIR}/${MY_MUSIC}" --tar xf
34                 else
35                         ewarn "You need to enable the sound use flag to play music."
36                 fi
37         fi
38 }
39
40 src_compile() {
41         egamesconf $( use_with sound mixer-sdl )
42         emake || die "emake failed"
43 }
44
45 src_install() {
46         emake DESTDIR="${D}" install || die "emake install"
47         dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed"
48         newicon data/icon.png ${PN}.png || die "newicon failed"
49         make_desktop_entry ${PN} "DreamChess" ${PN}.png
50         prepgamesdirs
51 }