1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools eutils toolchain-funcs games
12 DESCRIPTION="Unique multiplayer wargame between liquids"
13 HOMEPAGE="https://www.gnu.org/software/liquidwar6/"
14 SRC_URI="http://www.ufoot.org/download/liquidwar/v6/${MY_PV}/${MY_P}.tar.gz
15 maps? ( http://www.ufoot.org/download/liquidwar/v6/${MY_PV}/${PN}-extra-maps-${MY_PV}.tar.gz )"
20 IUSE="doc gles2 gtk libcaca +maps nls +ogg openmp readline test"
23 # Drop the libtool dep once libltdl goes stable.
24 RDEPEND="dev-db/sqlite:3
30 media-libs/libsdl[X,opengl,video]
31 media-libs/sdl-image[jpeg,png]
34 || ( dev-libs/libltdl:0 <sys-devel/libtool-2.4.3-r2:2 )
39 libcaca? ( media-libs/libcaca )
40 gles2? ( media-libs/mesa[gles2] )
41 gtk? ( x11-libs/gtk+:2 )
42 nls? ( virtual/libintl
45 media-libs/libsdl[X,sound,opengl,video]
46 media-libs/sdl-mixer[vorbis]
48 readline? ( sys-libs/ncurses
52 nls? ( sys-devel/gettext )"
55 S_MAPS=${WORKDIR}/${PN}-extra-maps-${MY_PV}
59 if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp ; then
60 ewarn "OpenMP is not available in your current selected gcc"
61 die "need openmp capable gcc"
69 "${FILESDIR}"/${P}-{ldconfig,paths}.patch \
70 "${FILESDIR}"/${P}-check-headers.patch
79 # configure fails with cunit disabled
85 $(use_enable gles2 mod-gles2) \
86 $(use_enable libcaca mod-caca) \
87 $(use_enable openmp) \
88 $(use_enable ogg mod-ogg) \
89 $(use_enable !ogg silent) \
90 $(use_enable readline console) \
92 --datarootdir=/usr/share \
93 --mandir=/usr/share/man \
94 --docdir=/usr/share/doc/${PF} \
95 --htmldir=/usr/share/doc/${PF}/html
105 use doc && emake html
106 use maps && emake -C "${S_MAPS}"
110 emake DESTDIR="${D}" install
111 use maps && emake -C "${S_MAPS}" DESTDIR="${D}" install
112 prune_libtool_files --all