Line
Link Here
|
0 |
-- eclass/games.eclass |
0 |
++ eclass/games.eclass |
Lines 18-23
Link Here
|
18 |
2|3|4|5) EXPORT_FUNCTIONS pkg_setup src_configure src_compile pkg_preinst pkg_postinst ;; |
18 |
2|3|4|5) EXPORT_FUNCTIONS pkg_setup src_configure src_compile pkg_preinst pkg_postinst ;; |
19 |
*) die "no support for EAPI=${EAPI} yet" ;; |
19 |
*) die "no support for EAPI=${EAPI} yet" ;; |
20 |
esac |
20 |
esac |
|
|
21 |
|
22 |
if [[ ${PN} != "gentoo-envd" ]] ; then |
23 |
# environment file |
24 |
RDEPEND="games-misc/gentoo-envd" |
25 |
fi |
21 |
|
26 |
|
22 |
export GAMES_PREFIX=${GAMES_PREFIX:-/usr/games} |
27 |
export GAMES_PREFIX=${GAMES_PREFIX:-/usr/games} |
23 |
export GAMES_PREFIX_OPT=${GAMES_PREFIX_OPT:-/opt} |
28 |
export GAMES_PREFIX_OPT=${GAMES_PREFIX_OPT:-/opt} |
Lines 124-146
Link Here
|
124 |
find "${D}/${GAMES_BINDIR}" -maxdepth 1 -type f -exec chmod 750 '{}' \; |
129 |
find "${D}/${GAMES_BINDIR}" -maxdepth 1 -type f -exec chmod 750 '{}' \; |
125 |
} |
130 |
} |
126 |
|
131 |
|
127 |
gamesenv() { |
|
|
128 |
local d libdirs |
129 |
|
130 |
for d in $(get_all_libdirs) ; do |
131 |
libdirs="${libdirs}:${GAMES_PREFIX}/${d}" |
132 |
done |
133 |
|
134 |
# Wish we could use doevnd here, but we dont want the env |
135 |
# file to be tracked in the CONTENTS of every game |
136 |
cat <<-EOF > "${ROOT}"/etc/env.d/${GAMES_ENVD} |
137 |
LDPATH="${libdirs:1}" |
138 |
PATH="${GAMES_BINDIR}" |
139 |
EOF |
140 |
gamesowners "${ROOT}"/etc/env.d/${GAMES_ENVD} |
141 |
gamesperms "${ROOT}"/etc/env.d/${GAMES_ENVD} |
142 |
} |
143 |
|
144 |
games_pkg_setup() { |
132 |
games_pkg_setup() { |
145 |
tc-export CC CXX LD AR RANLIB |
133 |
tc-export CC CXX LD AR RANLIB |
146 |
|
134 |
|
Lines 183-191
Link Here
|
183 |
done < <(find "${D}/${GAMES_STATEDIR}" -type f -printf '%P\n' 2>/dev/null) |
171 |
done < <(find "${D}/${GAMES_STATEDIR}" -type f -printf '%P\n' 2>/dev/null) |
184 |
} |
172 |
} |
185 |
|
173 |
|
186 |
# pkg_postinst function ... create env.d entry and warn about games group |
174 |
# pkg_postinst function ... warn about games group |
187 |
games_pkg_postinst() { |
175 |
games_pkg_postinst() { |
188 |
gamesenv |
|
|
189 |
if [[ -z "${GAMES_SHOW_WARNING}" ]] ; then |
176 |
if [[ -z "${GAMES_SHOW_WARNING}" ]] ; then |
190 |
ewarn "Remember, in order to play games, you have to" |
177 |
ewarn "Remember, in order to play games, you have to" |
191 |
ewarn "be in the '${GAMES_GROUP}' group." |
178 |
ewarn "be in the '${GAMES_GROUP}' group." |