games-rpg/adonthell: Remove old
[gentoo.git] / games-rpg / daimonin-client / daimonin-client-0.10.5.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit eutils autotools games
6
7 MY_P=${PN}-${PV}
8 DESCRIPTION="a graphical 2D tile-based MMORPG"
9 HOMEPAGE="http://daimonin.sourceforge.net/"
10 SRC_URI="http://daimonin.svn.sourceforge.net/viewvc/daimonin/main/client/?view=tar&pathrev=6021
11                         -> daimonin-client-0.10.5.tar.gz
12                 music? ( mirror://sourceforge/daimonin/Addon%20packs/Music/AllMusic.zip
13                         -> daimonin-client-AllMusic-20100827.zip )"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="music debug"
19
20 RDEPEND="media-libs/libsdl[sound,video]
21         media-libs/sdl-mixer[vorbis]
22         media-libs/sdl-image[png]
23         dev-games/physfs
24         net-misc/curl"
25 DEPEND="${RDEPEND}
26         music? ( app-arch/unzip )"
27
28 S=${WORKDIR}/client/make/linux
29
30 src_unpack() {
31         unpack ${MY_P}.tar.gz
32         if use music ; then
33                 cd client/media
34                 rm -f *
35                 unpack ${PN}-AllMusic-20100827.zip
36         fi
37 }
38
39 src_prepare() {
40         epatch "${FILESDIR}"/${P}-nozlib.patch
41         rm ../../src/include/z{lib,conf}.h
42         sed -i \
43                 -e 's:$(d_datadir):$(DESTDIR)$(d_datadir):' \
44                 -e '/PROGRAMS/s:daimonin-updater::' \
45                 Makefile.am \
46                 || die "sed failed"
47         eautoreconf
48         cd ../../src
49         epatch "${FILESDIR}"/${P}-datadir.patch
50 }
51
52 src_configure() {
53         egamesconf \
54                 --disable-simplelayout \
55                 $(use_enable debug)
56 }
57
58 src_install() {
59         default
60         cd ../..
61         dodoc README*
62         newicon bitmaps/pentagram.png ${PN}.png
63         make_desktop_entry daimonin Daimonin
64         prepgamesdirs
65 }