From 4c787304b395c85b65e839bcdadb4da8242f7658 Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Mon, 28 Mar 2011 22:07:32 +0200 Subject: First set of ebuilds --- games-strategy/freeorion/freeorion-9999-r5.ebuild | 106 ++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 games-strategy/freeorion/freeorion-9999-r5.ebuild (limited to 'games-strategy/freeorion/freeorion-9999-r5.ebuild') diff --git a/games-strategy/freeorion/freeorion-9999-r5.ebuild b/games-strategy/freeorion/freeorion-9999-r5.ebuild new file mode 100644 index 0000000..477574d --- /dev/null +++ b/games-strategy/freeorion/freeorion-9999-r5.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" + +inherit cmake-utils games subversion + +DESCRIPTION="FreeOrion is a free and open source clone of Master Of Orion" +HOMEPAGE="http://www.freeorion.org" +ESVN_REPO_URI="https://${PN}.svn.sourceforge.net/svnroot/${PN}/trunk" +ESVN_PROJECT="${PN}" + +LICENSE="GPL-2 CCPL-Attribution-ShareAlike-3.0" +KEYWORDS="~amd64 ~x86" +IUSE="cg debug threads xml" + +SLOT="0" + +RDEPEND=" + dev-games/gigi[ogre,threads=] + || ( threads? ( >=dev-games/ogre-1.7.1[boost,cg=,boost-threads] ) + !threads? ( >=dev-games/ogre-1.7.1[boost,cg=,-boost-threads] ) + ) + =media-libs/libogg-1.1.3 + >=media-libs/libsdl-1.2 + >=media-libs/libvorbis-1.1.2 + media-libs/openal + sci-physics/bullet + sys-devel/libtool + sys-libs/zlib" + +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +CMAKE_USE_DIR="${S}/FreeOrion" + +src_prepare() { + # Let's make the autorevision work. + subversion_wc_info + sed -i -e \ + "s:svn_revision_number ???:svn_revision_number ${ESVN_WC_REVISION}:" \ + FreeOrion/CMakeLists.txt || die "sed FreeOrion/CMakeLists.txt failed" +} + +src_configure() { + # Due to the testing nature of gigi and freeorion, + # and all the ogre+boost stuff, flags should be filtered: + strip-flags + + # Type-Pun pointers always break strict aliasing rules, + # and this thing is full of those + append-flags -fno-strict-aliasing + + # using xml serialization seems to break on linker level with + # boost-1.45. For this the new xml USE flag will switch to + # binary archives if -xml is used: + use xml || sed -i -e \ + "s:define FREEORION_BINARY_SERIALIZATION 0:define FREEORION_BINARY_SERIALIZATION 1:" \ + FreeOrion/util/Serialize.h || die "sed FreeOrion/util/Serialize.h failed" + + local mycmakeargs+=( + $(cmake-utils_use_enable debug DEBUG) + $(cmake-utils_use_build debug DEBUG) + ) + + mycmakeargs+=( + "-DCMAKE_INSTALL_PREFIX=${GAMES_PREFIX}/${PN}" + "-DCMAKE_INSTALL_ICONDIR=${GAMES_DATADIR_BASE}/pixmaps/" + "-DCMAKE_INSTALL_DESKTOPDIR=${GAMES_DATADIR_BASE}/applications/" + "-DCMAKE_DOC_DIR=/usr/share/doc/${PF}" + "-DCMAKE_MAN_DIR=/usr/share/man" + "-DCMAKE_DATA_DIR=${GAMES_DATADIR}" + "-DCMAKE_DATA_PATH=${GAMES_DATADIR}" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + ## This is a rather wild thing, but I can't think of a quicker way right now: + # Add ogre_plugins config: + + OGRECFG="${D}/${GAMES_PREFIX}/${PN}/ogre_plugins.cfg" + cat > ${OGRECFG} <> ${OGRECFG} + + prepgamesdirs +} -- cgit v1.2.3-65-gdbad