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://dev.gentoo.org/~tomka/files/${P}.tar.bz2"
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 epatch "${FILESDIR}/${P}-boost-1.57.patch"
50 epatch "${FILESDIR}/${P}-boost-1.58.patch"
52 # parse subdir sets -O3
53 sed -e "s:-O3::" -i parse/CMakeLists.txt
55 # set revision for display in game -- update on bump!
56 sed -i -e 's/???/8051/' CMakeLists.txt
61 -DRELEASE_COMPILE_FLAGS=""
65 cmake-utils_src_configure
69 cmake-utils_src_compile
74 rm "${CMAKE_USE_DIR}"/default/COPYING || die
75 insinto "${GAMES_DATADIR}"/${PN}
76 doins -r "${CMAKE_USE_DIR}"/default || die
79 dogamesbin "${CMAKE_BUILD_DIR}"/${PN}{ca,d} || die
80 newgamesbin "${CMAKE_BUILD_DIR}"/${PN} ${PN}.bin || die
81 games_make_wrapper ${PN} \
82 "${GAMES_BINDIR}/${PN}.bin --resource-dir ${GAMES_DATADIR}/${PN}/default" \
83 "${GAMES_DATADIR}/${PN}"
86 dogameslib "${CMAKE_BUILD_DIR}"/libfreeorion{common,parse}.so || die
87 dogameslib "${CMAKE_BUILD_DIR}"/libGiGi*.so || die
90 dodoc "${CMAKE_USE_DIR}"/changelog.txt || die
91 newicon "${CMAKE_USE_DIR}"/default/data/art/icons/FO_Icon_32x32.png \
93 make_desktop_entry ${PN} ${PN} ${PN}