1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
7 inherit cmake-utils python-single-r1 xdg
9 DESCRIPTION="A free turn-based space empire and galactic conquest game"
10 HOMEPAGE="https://www.freeorion.org"
12 if [[ ${PV} == 9999 ]]; then
14 EGIT_REPO_URI="https://github.com/freeorion/freeorion.git"
17 if [[ ${PV} = *_p* ]]; then
18 COMMIT="2a49c05796f1c92b96ce9b2aeaf0124fc8be7a77"
19 SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
20 S="${WORKDIR}/${PN}-${COMMIT}"
22 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz"
23 S="${WORKDIR}/${PN}-${PV/_/-}"
27 LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
31 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
37 >=dev-libs/boost-1.58:=[python,threads,${PYTHON_USEDEP}]
40 >=media-libs/freetype-2.5.5
42 >=media-libs/libogg-1.1.3
44 media-libs/libsdl2[X,opengl,video]
45 >=media-libs/libvorbis-1.1.2
56 # build system is using FindPythonLibs.cmake which needs python:2
57 python-single-r1_pkg_setup
61 sed -e "s/-O3//" -i CMakeLists.txt || die
63 cmake-utils_src_prepare
68 -DCMAKE_BUILD_TYPE=Release
70 -DBUILD_HEADLESS="$(usex dedicated)"
73 cmake-utils_src_configure
77 cmake-utils_src_install
79 newenvd "${FILESDIR}/${PN}.envd" 99${PN}