games-engines/scummvm-tools: x86 stable wrt bug #568820
[gentoo.git] / games-engines / scummvm-tools / scummvm-tools-1.7.0-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 WX_GTK_VER=3.0
7 inherit wxwidgets eutils flag-o-matic games
8
9 DESCRIPTION="utilities for the SCUMM game engine"
10 HOMEPAGE="http://scummvm.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/scummvm/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd"
16 IUSE="flac iconv mad png vorbis"
17 RESTRICT="test" # some tests require external files
18
19 RDEPEND="png? ( media-libs/libpng:0 )
20         mad? ( media-libs/libmad )
21         flac? ( media-libs/flac )
22         vorbis? ( media-libs/libvorbis )
23         iconv? ( virtual/libiconv media-libs/freetype:2 )
24         sys-libs/zlib
25         >=dev-libs/boost-1.32
26         x11-libs/wxGTK:${WX_GTK_VER}"
27 DEPEND="${RDEPEND}
28         virtual/pkgconfig"
29
30 src_prepare() {
31         need-wxwidgets unicode
32         rm -rf *.bat dists/win32
33         sed -ri -e '/^(CC|CXX)\b/d' Makefile || die
34         epatch "${FILESDIR}/${P}-binprefix.patch"
35 }
36
37 src_configure() {
38         # Not an autoconf script
39         ./configure \
40                 --enable-verbose-build \
41                 --mandir=/usr/share/man \
42                 --prefix="${GAMES_PREFIX}" \
43                 --libdir="${GAMES_PREFIX}/lib" \
44                 --datadir="${GAMES_DATADIR}" \
45                 --disable-tremor \
46                 $(use_enable flac) \
47                 $(use_enable iconv) \
48                 $(use_enable iconv freetype) \
49                 $(use_enable mad) \
50                 $(use_enable png) \
51                 $(use_enable vorbis) || die
52 }
53
54 src_install() {
55         emake DESTDIR="${D}" EXEPREFIX="${PN}-" install
56         dodoc README TODO
57         prepgamesdirs
58 }