1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python2_7 )
8 inherit cmake-utils python-any-r1 games
10 DESCRIPTION="A free turn-based space empire and galactic conquest game"
11 HOMEPAGE="http://www.freeorion.org"
12 SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/FreeOrion_v0.4.5_2015-09-01.f203162_Source.tar.gz -> ${P}.tar.gz"
14 LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
19 # Needs it's own version of GG(dev-games/gigi) which it ships.
20 # The split version dev-games/gigi is not used anymore as of 0.4.3
24 >=dev-libs/boost-1.47[python]
28 media-libs/libsdl[X,opengl,video]
42 # build system is using FindPythonLibs.cmake which needs python:2
43 python-any-r1_pkg_setup
49 mv src-tarball "${P}" || die
53 # parse subdir sets -O3
54 sed -e "s:-O3::" -i parse/CMakeLists.txt
56 # For snapshots, the following can be used to the set revision
57 # for display in game -- update on bump!
58 # sed -i -e 's/???/8051/' CMakeLists.txt
63 -DRELEASE_COMPILE_FLAGS=""
67 cmake-utils_src_configure
71 cmake-utils_src_compile
76 rm "${CMAKE_USE_DIR}"/default/COPYING || die
77 insinto "${GAMES_DATADIR}"/${PN}
78 doins -r "${CMAKE_USE_DIR}"/default || die
81 dogamesbin "${CMAKE_BUILD_DIR}"/${PN}{ca,d} || die
82 newgamesbin "${CMAKE_BUILD_DIR}"/${PN} ${PN}.bin || die
83 games_make_wrapper ${PN} \
84 "${GAMES_BINDIR}/${PN}.bin --resource-dir ${GAMES_DATADIR}/${PN}/default" \
85 "${GAMES_DATADIR}/${PN}"
88 dogameslib "${CMAKE_BUILD_DIR}"/libfreeorion{common,parse}.so || die
89 dogameslib "${CMAKE_BUILD_DIR}"/libGiGi*.so || die
92 dodoc "${CMAKE_USE_DIR}"/changelog.txt || die
93 newicon "${CMAKE_USE_DIR}"/default/data/art/icons/FO_Icon_32x32.png \
95 make_desktop_entry ${PN} ${PN} ${PN}