summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-07-29 12:10:41 +0200
committerNicolas Kaiser <nikai@nikai.net>2010-07-29 12:10:41 +0200
commit18a0c1d44f3ba74a5408a77840ca83b27a76d4fd (patch)
tree030c53fa6e517496425a71d985fbe497ff3c474c
parentvs: enhanced test for vssetup in postinst, wrapped long lines (diff)
downloadnikai-18a0c1d44f3ba74a5408a77840ca83b27a76d4fd.tar.gz
nikai-18a0c1d44f3ba74a5408a77840ca83b27a76d4fd.tar.bz2
nikai-18a0c1d44f3ba74a5408a77840ca83b27a76d4fd.zip
vs: use cmake-utils
Major rework switching to cmake, which will happily use system boost instead of included one. vs-data now adds DATADIR to config, instead of doing this in the executable.
-rw-r--r--games-simulation/vegastrike-data/Manifest2
-rw-r--r--games-simulation/vegastrike-data/vegastrike-data-9999.ebuild6
-rw-r--r--games-simulation/vegastrike/Manifest2
-rw-r--r--games-simulation/vegastrike/vegastrike-9999.ebuild73
4 files changed, 31 insertions, 52 deletions
diff --git a/games-simulation/vegastrike-data/Manifest b/games-simulation/vegastrike-data/Manifest
index 0910b53..83c783a 100644
--- a/games-simulation/vegastrike-data/Manifest
+++ b/games-simulation/vegastrike-data/Manifest
@@ -1,2 +1,2 @@
-EBUILD vegastrike-data-9999.ebuild 2635 RMD160 999b8096e746c1ce53d9d61cc033e243d819fd9a SHA1 abcd38060aa180fec168885d2091ea66490972ee SHA256 d7c612d64c4ab4b8ea583cb73047cea27a7e6d1e4bf607c8adb0ef5d3b8b131c
+EBUILD vegastrike-data-9999.ebuild 2875 RMD160 b9a54dbbde360527b0cf5fae796da02879cab5c6 SHA1 97beb656688b7d7edfb9c9ccd3fa25b3e6e24269 SHA256 08b3df0fd66e6fb86ba0965928dca85c0360c8e1ba2f860e25f8680a6ef332ef
MISC metadata.xml 618 RMD160 13689f0a29e93676d4f3107055838145c9ccd43f SHA1 9fe6eae28e42208977fd4c0a82922fba6cfcac09 SHA256 61ca24fc4767b041e877c2ba71cf70011dc1d49824baffe3a6deed4685ffd3b4
diff --git a/games-simulation/vegastrike-data/vegastrike-data-9999.ebuild b/games-simulation/vegastrike-data/vegastrike-data-9999.ebuild
index 8c1c5f8..5584443 100644
--- a/games-simulation/vegastrike-data/vegastrike-data-9999.ebuild
+++ b/games-simulation/vegastrike-data/vegastrike-data-9999.ebuild
@@ -52,6 +52,12 @@ src_unpack() {
-e "s!/usr/local/lib/man!/usr/share/man!" \
"${S}/data/documentation/vegastrike.1" \
|| die "sed data/documentation/vegastrike.1 failed"
+
+ # Adding DATADIR to config
+ sed -i \
+ -e "s!<section name=\"data\">!<section name=\"data\"><var name=\"datadir\" value=\"${GAMES_DATADIR}/${PN}/data\" />!" \
+ "${S}/data/vegastrike.config" \
+ || die "sed data/vegastrike.config failed"
}
src_compile() {
diff --git a/games-simulation/vegastrike/Manifest b/games-simulation/vegastrike/Manifest
index 5c935bc..7b8b3e9 100644
--- a/games-simulation/vegastrike/Manifest
+++ b/games-simulation/vegastrike/Manifest
@@ -1,2 +1,2 @@
-EBUILD vegastrike-9999.ebuild 4979 RMD160 1048108b4d3a7ed83542aa571f1e46a32b616844 SHA1 7f8109a795fa1daa7a31fb22c2fe9cfa458abe6c SHA256 0ec30b88582d9d5a561a5fd549265c7a104e9c3cb9e588e0d6a580ab9e642433
+EBUILD vegastrike-9999.ebuild 4064 RMD160 24bbe71d665cf9aaece5f94a557435d0f6dcdaac SHA1 e32027cf77650930aedab0822c3edba931641a89 SHA256 a874fdf7ed5adaaac7bbde8f2bbacf34e4621d0c47892460ac28921f40b60ee6
MISC metadata.xml 661 RMD160 9590d3f59a89cefc68fc8d47a51e070c8ad62355 SHA1 ef1c5ae3612fd06b27369eb7e73dbf5d79439af7 SHA256 b84cf9e11ce628e37a3778ce5f1ce28a93e803847e5fc168130d039f396c8cf9
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."; }