summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-simulation/vegastrike/vegastrike-9999.ebuild')
-rw-r--r--games-simulation/vegastrike/vegastrike-9999.ebuild73
1 files changed, 23 insertions, 50 deletions
diff --git a/games-simulation/vegastrike/vegastrike-9999.ebuild b/games-simulation/vegastrike/vegastrike-9999.ebuild
index f6be640..ae62039 100644
--- a/games-simulation/vegastrike/vegastrike-9999.ebuild
+++ b/games-simulation/vegastrike/vegastrike-9999.ebuild
@@ -3,19 +3,19 @@
# $Header: $
# Derived from bug 65084
-inherit flag-o-matic eutils games
+inherit cmake-utils flag-o-matic eutils games
[ "$PV" == "9999" ] && inherit subversion
ESVN_REPO_URI="https://vegastrike.svn.sourceforge.net/svnroot/vegastrike/trunk"
ESVN_PROJECT="vegastrike"
-ESVN_BOOTSTRAP="vegastrike/bootstrap-sh"
+#ESVN_BOOTSTRAP="vegastrike/bootstrap-sh"
+ESVN_BOOTSTRAP=""
DESCRIPTION="A 3D space simulator that allows you to trade and bounty hunt"
HOMEPAGE="http://vegastrike.sourceforge.net/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
-# FIXME: check configure options
IUSE="ffmpeg gtk debug"
# FIXME: check dependencies
@@ -39,12 +39,11 @@ DEPEND="${RDEPEND}
S="${WORKDIR}"
+CMAKE_USE_DIR="${S}/${PN}"
+#CMAKE_VERBOSE=true
+
pkg_setup() {
games_pkg_setup
- if ! use gtk; then
- ewarn "Without USE=gtk vssetup will not get built. You will"
- ewarn "have to manually edit ~/.vegastrike/vegastrike.config."
- fi
# FIXME: is this still a problem?
einfo "If compiling fails for you on gl_globals.h, try to replace your"
@@ -65,7 +64,7 @@ src_unpack() {
fi
einfo "Copying source to work directory..."
- cp -a "${svn}"/{vegastrike,vssetup} "${S}" >&/dev/null
+ cp -a "${svn}"/vegastrike/* "${S}" >&/dev/null
# Sort out directory references
cd "${S}/${PN}"
@@ -84,55 +83,27 @@ src_unpack() {
"s!\"readme.txt\"! \"${GAMES_DATADIR}/${PN}/data/documentation/readme.txt\"!" \
setup/src/include/display_gtk.cpp \
|| die "sed setup/src/include/display_gtk.cpp failed"
-
- # FIXME: is this still a problem?
- # is not possible here to use built in function subversion_bootstrap: it
- # won't work as expected: ./bootstrap isn't in main compile dir
- ./bootstrap-sh
}
src_compile() {
- cd "${S}"/vegastrike
- local conf_opts="${conf_opts} --disable-dependency-tracking"
-
- # DATA_DIR
- conf_opts="${conf_opts} --with-data-dir=${GAMES_DATADIR}/${PN}/data"
+ MYCMAKEARGS="$(MYCMAKEARGS) -DNV_CUBE_MAP"
+ MYCMAKEARGS="$(MYCMAKEARGS) -DBOOST_PYTHON_NO_PY_SIGNATURES"
+# -DBOOST_PYTHON_STATIC_LIB
+# -DDATA_DIR=\"${GAMES_DATADIR}/${PN}/data\"
if use debug; then
- conf_opts="${conf_opts} --enable-debug"
+ CMAKE_BUILD_TYPE="Debug"
else
- # FIXME: This actually enables -O2.
- # -O3 appears to make problems in some cases.
- # Might not be a great idea to mix with user -O flags.
- conf_opts="${conf_opts} --enable-release=2"
- fi
-
- if ! use gtk; then
- conf_opts="${conf_opts} --disable-gtk"
+ CMAKE_BUILD_TYPE="Release"
fi
- if ! use ffmpeg; then
- conf_opts="${conf_opts} --disable-ffmpeg"
- fi
-
- CONFIGURE_OPTIONS="
- ${conf_opts}"
-
- egamesconf $CONFIGURE_OPTIONS \
- || die "egamesconf failed"
+ cmake-utils_src_configure
- # FIXME: Is this still a problem?
- # FIXME: CXXFLAGS can be supplied in a better way.
- # it causes corruptions
- filter-flags -ffast-math
-# # Let's optimize, removing also broken -ffast-math
- sed -i -e "s:-ffast-math:${CXXFLAGS}:g" Makefile \
- || die "sed of CXXFLAGS failed"
-
- emake || die "emake failed"
+ cmake-utils_src_make
}
src_install() {
+
cat << EOF > vsinstall
#!/bin/sh
(
@@ -148,16 +119,18 @@ echo "Each playlist represents a place or situation in Vega Strike"
exit 0
EOF
- dogamesbin vegastrike/vegastrike \
+ dogamesbin vegastrike_build/vegastrike \
|| die "Creation of vegastrike (the binary) failed"
dogamesbin vsinstall \
|| die "Creation of vsinstall failed"
- dogamesbin vegastrike/vegaserver \
+ dogamesbin vegastrike_build/vegaserver \
|| die "Creation of vegaserver failed"
- dogamesbin vegastrike/mesher \
- || die "Creation of mesher failed"
+# dogamesbin vegastrike/mesher \
+# || die "Creation of mesher failed"
+
+# cmake-utils_src_install
- newgamesbin vegastrike/vssetup vssetup \
+ newgamesbin vegastrike_build/setup/vssetup vssetup \
|| { ewarn "vssetup was not built. You will have to"; \
ewarn "manually edit ~/.vegastrike/vegastrike.config."; }