You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/games-util/steam-launcher/files/steam-libraries.patch

36 lines
1.2 KiB

diff -Naur a/steam b/steam
--- a/steam 2019-03-24 23:05:23.035074609 +0000
+++ b/steam 2019-03-24 23:15:11.768471262 +0000
@@ -17,6 +17,31 @@
# Set up domain for script localization
export TEXTDOMAIN=steam
+# Add paths to occasionally needed libraries not found in /usr/lib.
+export LD_LIBRARY_PATH+="${LD_LIBRARY_PATH+:}@@GENTOO_LD_LIBRARY_PATH@@"
+
+# Steam appends /usr/lib32 to LD_LIBRARY_PATH. We need to make sure that
+# OpenGL implementation dir goes before that, so we need to append it to
+# user's LD_LIBRARY_PATH ourselves. But that's needed only with the new
+# eselect-opengl that uses 000opengl file. GL_LDPATH is also used by
+# by Gentoo's execve wrapper.
+if [[ -f /etc/env.d/000opengl ]]; then
+ export GL_LDPATH=$(. /etc/env.d/000opengl >/dev/null; echo "${LDPATH}")
+
+ # Append only when GL_LDPATH is non-empty -- i.e. using nvidia or ati.
+ if [[ -n ${GL_LDPATH} ]]; then
+ LD_LIBRARY_PATH+=":${GL_LDPATH}"
+ else
+ unset GL_LDPATH
+ fi
+else
+ unset GL_LDPATH
+fi
+
+# Preload Gentoo's execve wrapper so that steamwebhelper prefers system
+# libraries over older bundled libraries.
+[[ ${STEAM_RUNTIME} = 0 ]] && export LD_PRELOAD+="${LD_PRELOAD+:}@@GENTOO_LD_PRELOAD@@"
+
function show_message()
{
style=$1