summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2006-11-02 19:11:15 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2006-11-02 19:11:15 +0000
commita81e3d978a3283e0748a8daad85d173131eba2e8 (patch)
tree69fe60379b795fb8634a448a2561626d244cd942 /eclass/games-mods.eclass
parentDropped ppc-macos, see you in prefix. (diff)
downloadgentoo-2-a81e3d978a3283e0748a8daad85d173131eba2e8.tar.gz
gentoo-2-a81e3d978a3283e0748a8daad85d173131eba2e8.tar.bz2
gentoo-2-a81e3d978a3283e0748a8daad85d173131eba2e8.zip
Since Unreal Engine games are all binary-only, I made some minor adjustments so they work with the mod being in GAMES_DATADIR and the game being in GAMES_PREFIX_OPT.
Diffstat (limited to 'eclass/games-mods.eclass')
-rw-r--r--eclass/games-mods.eclass15
1 files changed, 12 insertions, 3 deletions
diff --git a/eclass/games-mods.eclass b/eclass/games-mods.eclass
index 73e04949f20c..651e3b6d5be9 100644
--- a/eclass/games-mods.eclass
+++ b/eclass/games-mods.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.5 2006/10/25 22:46:53 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.6 2006/11/02 19:11:15 wolf31o2 Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -237,8 +237,17 @@ games-mods_src_install() {
|| die "newexe failed"
new_bin_name=
bin_name=$(echo ${binary} | sed -e 's:[-_.]: :g')
+ # We want our wrapper to use the libraries/starting
+ # directory of our game. If the game is in
+ # GAMES_PREFIX_OPT, then we want to start there.
+ if [[ -d "${GAMES_PREFIX_OPT}"/${GAME} ]]
+ then
+ GAME_DIR="${GAMES_PREFIX_OPT}/${GAME}"
+ else
+ GAME_DIR="${dir}"
+ fi
games_make_wrapper "${GAME_EXE}-${binary}" \
- "${GAME_EXE}-${binary}" "${dir}" "${dir}"
+ ./"${GAME_EXE}-${binary}" "${GAME_DIR}" "${GAME_DIR}"
if [[ "${bin_name}" == "${binary}" ]]
then
bin_name=${MOD_NAME}
@@ -341,7 +350,7 @@ games-mods_src_install() {
if [ ! -e "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]
then
# Why don´t we use symlinks? Because these use ./$bin when they
- # run and that doesn work if the binary is in GAMES_PREFIX_OPT
+ # run and that doesn't work if the binary is in GAMES_PREFIX_OPT
# but the mod is in GAMES_DATADIR.
# dosym "${INS_DIR}"/${i} \
# "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} || die