games-strategy/widelands: Added live ebuild
[gentoo.git] / games-strategy / asc / asc-2.6.0.0-r2.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 WX_GTK_VER=3.0
6 inherit autotools toolchain-funcs flag-o-matic wxwidgets
7
8 DESCRIPTION="turn based strategy game designed in the tradition of the Battle Isle series"
9 HOMEPAGE="http://www.asc-hq.org/"
10 SRC_URI="mirror://sourceforge/asc-hq/${P}.tar.bz2
11         http://www.asc-hq.org/music/frontiers.ogg
12         http://www.asc-hq.org/music/time_to_strike.ogg
13         http://www.asc-hq.org/music/machine_wars.ogg"
14
15 LICENSE="GPL-2+"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE=""
19
20 RDEPEND="app-arch/bzip2
21         dev-games/physfs
22         dev-lang/lua:0
23         dev-libs/boost
24         dev-libs/expat
25         dev-libs/libsigc++:1.2
26         media-libs/libpng:0
27         media-libs/libsdl[video]
28         media-libs/sdl-image[gif,jpeg,png]
29         media-libs/sdl-mixer[vorbis]
30         media-libs/sdl-sound
31         media-libs/freetype
32         media-libs/xvid
33         x11-libs/wxGTK:${WX_GTK_VER}[X]"
34
35 DEPEND="${RDEPEND}
36         app-arch/zip
37         dev-lang/perl
38         virtual/pkgconfig"
39
40 PATCHES=(
41         "${FILESDIR}/"/${P}-gcc6-nothrow-in-dtors.patch
42         "${FILESDIR}/"/${P}-freetype_pkgconfig.patch #657998
43 )
44
45 src_unpack() {
46         local f
47
48         unpack ${P}.tar.bz2
49         for f in ${A}
50         do
51                 case ${f} in
52                 *ogg)
53                         cp "${DISTDIR}/${f}" "${S}/data/music" || die
54                         ;;
55                 esac
56         done
57 }
58
59 src_prepare() {
60         default
61         # required for freetype_pkgconfig patch
62         eautoreconf
63 }
64
65 src_configure() {
66         need-wxwidgets unicode
67         # Added --disable-paraguitest for bugs 26402 and 4488
68         # Added --disable-paragui for bug 61154 since it's not really used much
69         # and the case is well documented at http://www.asc-hq.org/
70         if [[ $(gcc-major-version) -eq 4 ]] ; then
71                 replace-flags -O3 -O2
72         fi
73         local myeconfargs=(
74                 --disable-paraguitest
75                 --disable-paragui
76                 --datadir="/usr/share"
77         )
78         econf "${myeconfargs[@]}"
79 }
80
81 src_install() {
82         default
83         dodoc -r doc/*
84 }