From 2a97b3fa7a1c934e692eaa9bb66b8488a8f8cd90 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 13 Aug 2016 21:03:35 +0100 Subject: force steam to use native gcclibs, or in some situations, oss drivers will fail to load --- app-emulation/steam/files/kogaion-steam | 29 ++++++++++++++-- app-emulation/steam/steam-1.0.0.45-r3.ebuild | 49 ---------------------------- app-emulation/steam/steam-1.0.0.45-r4.ebuild | 49 ++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 52 deletions(-) delete mode 100644 app-emulation/steam/steam-1.0.0.45-r3.ebuild create mode 100644 app-emulation/steam/steam-1.0.0.45-r4.ebuild (limited to 'app-emulation/steam') diff --git a/app-emulation/steam/files/kogaion-steam b/app-emulation/steam/files/kogaion-steam index aac32526..7da83bf3 100755 --- a/app-emulation/steam/files/kogaion-steam +++ b/app-emulation/steam/files/kogaion-steam @@ -1,12 +1,35 @@ #!/usr/bin/env bash -main () { - export LD_PRELOAD='/usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/32/libstdc++.so.6 /usr/lib64/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-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' if [[ "$(lsmod|grep nvidia)" ]] ; then export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib:/usr/lib64/opengl/nvidia/lib' export __GLVND_DISALLOW_PATCHING=1 fi +} + +launch_steam () { + remove_some_bundled_libs + preload_some_system_libs export DISPLAY=:0 steam } -main + +launch_steam diff --git a/app-emulation/steam/steam-1.0.0.45-r3.ebuild b/app-emulation/steam/steam-1.0.0.45-r3.ebuild deleted file mode 100644 index 5d2ebc9d..00000000 --- a/app-emulation/steam/steam-1.0.0.45-r3.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - - -EAPI=5 - -inherit eutils - -DESCRIPTION="Digital distribution client bootstrap package" -HOMEPAGE="http://steampowered.com/" -SRC_URI="http://repo.steampowered.com/${PN}/pool/${PN}/s/${PN}/${PN}_${PV}.tar.gz" - -LICENSE="custom" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -RDEPEND=" - virtual/ttf-fonts - dev-util/desktop-file-utils - x11-themes/hicolor-icon-theme - net-misc/curl - sys-apps/dbus - media-libs/freetype - x11-libs/gdk-pixbuf - gnome-extra/zenity - amd64? ( - >=media-libs/alsa-lib-1.0.28[abi_x86_32(-)] - >=media-libs/mesa-10.0.4[abi_x86_32(-)] - >=x11-libs/libX11-1.6.2[abi_x86_32(-)] - ) - x86? ( - media-libs/alsa-lib - media-libs/mesa - x11-libs/libX11 - )" - -S=${WORKDIR}/${PN} - -src_prepare() { - epatch "${FILESDIR}"/kogaion-${PN}.patch -} - -src_install() { - emake DESTDIR="${D}" install || die "make install failed" - exeinto /usr/bin || die - doexe ${FILESDIR}/kogaion-steam || die - rm -rf "${D}"/usr/bin/steamdeps || die - dosym /bin/true /usr/bin/steamdeps || die -} diff --git a/app-emulation/steam/steam-1.0.0.45-r4.ebuild b/app-emulation/steam/steam-1.0.0.45-r4.ebuild new file mode 100644 index 00000000..5d2ebc9d --- /dev/null +++ b/app-emulation/steam/steam-1.0.0.45-r4.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + + +EAPI=5 + +inherit eutils + +DESCRIPTION="Digital distribution client bootstrap package" +HOMEPAGE="http://steampowered.com/" +SRC_URI="http://repo.steampowered.com/${PN}/pool/${PN}/s/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="custom" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + virtual/ttf-fonts + dev-util/desktop-file-utils + x11-themes/hicolor-icon-theme + net-misc/curl + sys-apps/dbus + media-libs/freetype + x11-libs/gdk-pixbuf + gnome-extra/zenity + amd64? ( + >=media-libs/alsa-lib-1.0.28[abi_x86_32(-)] + >=media-libs/mesa-10.0.4[abi_x86_32(-)] + >=x11-libs/libX11-1.6.2[abi_x86_32(-)] + ) + x86? ( + media-libs/alsa-lib + media-libs/mesa + x11-libs/libX11 + )" + +S=${WORKDIR}/${PN} + +src_prepare() { + epatch "${FILESDIR}"/kogaion-${PN}.patch +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + exeinto /usr/bin || die + doexe ${FILESDIR}/kogaion-steam || die + rm -rf "${D}"/usr/bin/steamdeps || die + dosym /bin/true /usr/bin/steamdeps || die +} -- cgit v1.2.3