1 # Copyright 1999-2020 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 $(python_gen_cond_dep '
38 >=dev-libs/boost-1.58:=[python,threads,${PYTHON_MULTI_USEDEP}]
42 >=media-libs/freetype-2.5.5
44 >=media-libs/libogg-1.1.3
46 media-libs/libsdl2[X,opengl,video]
47 >=media-libs/libvorbis-1.1.2
58 # build system is using FindPythonLibs.cmake which needs python:2
59 python-single-r1_pkg_setup
63 sed -e "s/-O3//" -i CMakeLists.txt || die
65 cmake-utils_src_prepare
70 -DCMAKE_BUILD_TYPE=Release
72 -DBUILD_HEADLESS="$(usex dedicated)"
75 cmake-utils_src_configure
79 cmake-utils_src_install
81 newenvd "${FILESDIR}/${PN}.envd" 99${PN}