# 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.14 2007/01/01 22:27:01 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.15 2007/01/09 23:17:33 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-"
# be ${GAMES_DATADIR}/${GAME}/${MOD_DIR} in most cases, and symlinking it
# into ${GAMES_PREFIX_OPT}/${GAME}/${MOD_DIR} for each game. This should
# allow us to support both binary and source-based games easily.
- if [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}" ]]
+ if [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}" ]] && \
+ [[ "${GAMES_PREFIX_OPT}" != "${GAMES_DATADIR}" ]]
then
dodir "${GAMES_PREFIX_OPT}"/"${GAME}"
mod=$(echo "${INS_DIR}" | sed -e "s:${GAMES_DATADIR}/${GAME}::" -e "s:^/::" )