4b8056c33acd8de357cdf2076e10d2a5e09e02dc
[gentoo.git] / dev-games / simgear / simgear-2018.3.1.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit cmake-utils toolchain-funcs
7
8 DESCRIPTION="Development library for simulation games"
9 HOMEPAGE="http://www.simgear.org/"
10 SRC_URI="mirror://sourceforge/flightgear/${P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="+dns debug gdal openmp subversion test"
16
17 COMMON_DEPEND="
18         dev-libs/expat
19         <dev-games/openscenegraph-3.5.6:=
20         media-libs/openal
21         net-misc/curl
22         sys-libs/zlib
23         virtual/opengl
24         dns? ( net-libs/udns )
25         gdal? ( sci-libs/gdal )
26 "
27 DEPEND="${COMMON_DEPEND}
28         >=dev-libs/boost-1.44
29 "
30 RDEPEND="${COMMON_DEPEND}
31         subversion? ( dev-vcs/subversion )
32 "
33
34 pkg_pretend() {
35         [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
36 }
37
38 pkg_setup() {
39         [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
40 }
41
42 src_configure() {
43         local mycmakeargs=(
44                 -DENABLE_DNS=$(usex dns)
45                 -DENABLE_GDAL=$(usex gdal)
46                 -DENABLE_OPENMP=$(usex openmp)
47                 -DENABLE_PKGUTIL=ON
48                 -DENABLE_RTI=OFF
49                 -DENABLE_SIMD=ON
50                 -DENABLE_SOUND=ON
51                 -DENABLE_TESTS=$(usex test)
52                 -DSIMGEAR_HEADLESS=OFF
53                 -DSIMGEAR_SHARED=ON
54                 -DSYSTEM_EXPAT=ON
55                 -DSYSTEM_UDNS=ON
56                 -DUSE_AEONWAVE=OFF
57                 -DOSG_FSTREAM_EXPORT_FIXED=OFF # TODO perhaps track it
58         )
59         cmake-utils_src_configure
60 }