1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 inherit cmake-utils python subversion games
11 DESCRIPTION="A free and open source clone of Master Of Orion"
12 HOMEPAGE="http://www.freeorion.org"
13 ESVN_REPO_URI="https://${PN}.svn.sourceforge.net/svnroot/${PN}/trunk"
15 ESVN_REVISION="${PV#*_p}"
17 LICENSE="GPL-2 CCPL-Attribution-ShareAlike-3.0"
19 KEYWORDS="" # dependency gigi unkeyworded and potentially broken
23 dev-games/gigi[ogre,ois]
24 dev-games/ogre[cg?,opengl]
25 >=dev-libs/boost-1.47[python]
28 media-libs/libsdl[X,opengl,video]
37 CMAKE_USE_DIR="${S}"/FreeOrion
47 -e "s:PluginFolder=.:PluginFolder=$(pkg-config --variable=plugindir OGRE):" \
48 -i "${CMAKE_USE_DIR}"/ogre_plugins.cfg || die
52 -e "/svn_revision_number/s:???:${ESVN_REVISION}:" \
53 -i "${CMAKE_USE_DIR}"/CMakeLists.txt || die
56 # add cg ogre plugin to config
57 echo "Plugin=Plugin_CgProgramManager" \
58 >> "${CMAKE_USE_DIR}"/ogre_plugins.cfg || die
64 -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 ./default" \
85 "${GAMES_DATADIR}/${PN}"
88 insinto "${GAMES_SYSCONFDIR}"/${PN}
89 doins "${CMAKE_USE_DIR}"/{OISInput,ogre_plugins}.cfg || die
90 # game uses relative paths
91 dosym "${GAMES_SYSCONFDIR}"/${PN}/ogre_plugins.cfg \
92 "${GAMES_DATADIR}"/${PN}/ogre_plugins.cfg || die
93 dosym "${GAMES_SYSCONFDIR}"/${PN}/OISInput.cfg \
94 "${GAMES_DATADIR}"/${PN}/OISInput.cfg || die
97 dodoc "${CMAKE_USE_DIR}"/changelog.txt || die
98 newicon "${CMAKE_USE_DIR}"/default/data/art/icons/FO_Icon_32x32.png \
100 make_desktop_entry ${PN} ${PN} ${PN}