Merge remote-tracking branch 'github/pr/461'.
[gentoo.git] / games-engines / scummvm-tools / scummvm-tools-1.7.0.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=2.8
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:2.8"
27 DEPEND="${RDEPEND}
28         virtual/pkgconfig"
29
30 src_prepare() {
31         rm -rf *.bat dists/win32
32         sed -ri -e '/^(CC|CXX)\b/d' Makefile || die
33         epatch "${FILESDIR}/${P}-binprefix.patch"
34 }
35
36 src_configure() {
37         # Not an autoconf script
38         ./configure \
39                 --enable-verbose-build \
40                 --mandir=/usr/share/man \
41                 --prefix="${GAMES_PREFIX}" \
42                 --libdir="${GAMES_PREFIX}/lib" \
43                 --datadir="${GAMES_DATADIR}" \
44                 $(use_enable flac) \
45                 $(use_enable iconv) \
46                 $(use_enable iconv freetype) \
47                 $(use_enable mad) \
48                 $(use_enable png) \
49                 $(use_enable vorbis) || die
50 }
51
52 src_install() {
53         emake DESTDIR="${D}" EXEPREFIX="${PN}-" install
54         dodoc README TODO
55         prepgamesdirs
56 }