summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2014-03-12 18:54:12 +0000
committerJulian Ospald <hasufell@gentoo.org>2014-03-12 18:54:12 +0000
commit1d7086e716d22b125e9cb2c3b8ab68fc4b47415b (patch)
tree0212fa728353a65dc37c4021a2d34cab3b44956f /eclass
parentWhitespace (diff)
downloadhistorical-1d7086e716d22b125e9cb2c3b8ab68fc4b47415b.tar.gz
historical-1d7086e716d22b125e9cb2c3b8ab68fc4b47415b.tar.bz2
historical-1d7086e716d22b125e9cb2c3b8ab68fc4b47415b.zip
fix games.eclass to use games-misc/games-envd
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/games.eclass27
2 files changed, 11 insertions, 21 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 2d27df3474c0..c556807d3be7 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1174 2014/03/12 09:29:39 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1175 2014/03/12 18:54:12 hasufell Exp $
+
+ 12 Mar 2014; Julian Ospald <hasufell@gentoo.org> games.eclass:
+ fix games.eclass to use games-misc/games-envd
12 Mar 2014; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
Use subslot operator deps on non-slotted PyPy.
diff --git a/eclass/games.eclass b/eclass/games.eclass
index a4a064555e0e..4a26f77d9194 100644
--- a/eclass/games.eclass
+++ b/eclass/games.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.156 2014/02/02 12:15:05 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.157 2014/03/12 18:54:12 hasufell Exp $
# devlist: games@gentoo.org
#
@@ -19,6 +19,11 @@ case ${EAPI:-0} in
*) die "no support for EAPI=${EAPI} yet" ;;
esac
+if [[ ${CATEGORY}/${PN} != "games-misc/games-envd" ]] ; then
+ # environment file
+ RDEPEND="games-misc/games-envd"
+fi
+
export GAMES_PREFIX=${GAMES_PREFIX:-/usr/games}
export GAMES_PREFIX_OPT=${GAMES_PREFIX_OPT:-/opt}
export GAMES_DATADIR=${GAMES_DATADIR:-/usr/share/games}
@@ -124,23 +129,6 @@ prepgamesdirs() {
find "${D}/${GAMES_BINDIR}" -maxdepth 1 -type f -exec chmod 750 '{}' \;
}
-gamesenv() {
- local d libdirs
-
- for d in $(get_all_libdirs) ; do
- libdirs="${libdirs}:${GAMES_PREFIX}/${d}"
- done
-
- # Wish we could use doevnd here, but we dont want the env
- # file to be tracked in the CONTENTS of every game
- cat <<-EOF > "${ROOT}"/etc/env.d/${GAMES_ENVD}
- LDPATH="${libdirs:1}"
- PATH="${GAMES_BINDIR}"
- EOF
- gamesowners "${ROOT}"/etc/env.d/${GAMES_ENVD}
- gamesperms "${ROOT}"/etc/env.d/${GAMES_ENVD}
-}
-
games_pkg_setup() {
tc-export CC CXX LD AR RANLIB
@@ -183,9 +171,8 @@ games_pkg_preinst() {
done < <(find "${D}/${GAMES_STATEDIR}" -type f -printf '%P\n' 2>/dev/null)
}
-# pkg_postinst function ... create env.d entry and warn about games group
+# pkg_postinst function ... warn about games group
games_pkg_postinst() {
- gamesenv
if [[ -z "${GAMES_SHOW_WARNING}" ]] ; then
ewarn "Remember, in order to play games, you have to"
ewarn "be in the '${GAMES_GROUP}' group."