summaryrefslogtreecommitdiff
path: root/app-emulation/steam/files/redcore-steam
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-11-06 09:52:18 +0000
committerV3n3RiX <venerix@rogentos.ro>2016-11-06 09:52:18 +0000
commit93277a685b3bedd2a46c908e5690cf74c647a4f5 (patch)
treefe2b4cbd0587a59efa1a11a0c14d8ba68ce6468f /app-emulation/steam/files/redcore-steam
parent504532c0420a809db0dcda6269fd5b44b24256a0 (diff)
drop kupertino and elementary icons, adjust steam and calamares patches
Diffstat (limited to 'app-emulation/steam/files/redcore-steam')
-rwxr-xr-xapp-emulation/steam/files/redcore-steam49
1 files changed, 49 insertions, 0 deletions
diff --git a/app-emulation/steam/files/redcore-steam b/app-emulation/steam/files/redcore-steam
new file mode 100755
index 00000000..f83f5115
--- /dev/null
+++ b/app-emulation/steam/files/redcore-steam
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+# steam-runtime is a mess with old libraries from Ubuntu 12.04
+# so native drivers compiled on anything newer may not load
+# if we remove some bundled libs, like gcclibs, native drivers
+# will be able to load, because system libs will be used instead
+#
+# but we have to do this everytime when we launch steam, because
+# steam-runtime is being fixed right away by steam client
+
+
+remove_some_bundled_libs () {
+ # force steam to use some system libraries
+ find /home/$USER/.local/share/Steam -name 'libxcb*' -type f | grep -v installed | xargs rm -rf
+ find /home/$USER/.local/share/Steam -name 'libstdc++.so.6*' -type f | grep -v installed | xargs rm -rf
+ find /home/$USER/.local/share/Steam -name 'libgcc_s*' -type f | grep -v installed | xargs rm -rf
+}
+
+preload_some_system_libs () {
+ export LD_PRELOAD='/usr/lib32/gcc/x86_64-pc-linux-gnu/4.9.3/32/libstdc++.so.6 /usr/lib32/gcc/x86_64-pc-linux-gnu/4.9.3/32/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/32/libstdc++.so.6'
+ # steam must be told where nvidia opengl libs live on gentoo systems
+ # but this will break optimus, so check if we detect bbswitch in here
+ # if we do, we do not preload nvidia opengl, as it will break steam
+ if [[ "$(lsmod|grep bbswitch)" ]] ; then
+ echo ""
+ echo "nvidia optimus detected, we will not preload nvidia libs"
+ echo ""
+ export __GLVND_DISALLOW_PATCHING=1
+ elif [[ "$(lsmod|grep nvidia)" && ! "$(lsmod|grep bbswitch)" ]] ; then
+ echo ""
+ echo "nvidia optimus not detected, we will preload nvidia libs"
+ echo ""
+ export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib:/usr/lib64/opengl/nvidia/lib'
+ export __GLVND_DISALLOW_PATCHING=1
+ else
+ echo ""
+ echo "no nvidia card detected, moving on"
+ echo ""
+ fi
+}
+
+launch_steam () {
+ remove_some_bundled_libs
+ preload_some_system_libs
+ export DISPLAY=:0
+ steam
+}
+
+launch_steam