summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapp-emulation/steam/files/redcore-steam48
-rw-r--r--app-emulation/steam/steam-1.0.0.45-r2.ebuild50
-rw-r--r--app-emulation/steam/steam-1.0.0.45-r3.ebuild52
3 files changed, 73 insertions, 77 deletions
diff --git a/app-emulation/steam/files/redcore-steam b/app-emulation/steam/files/redcore-steam
index 72b29002..c73ad8c2 100755
--- a/app-emulation/steam/files/redcore-steam
+++ b/app-emulation/steam/files/redcore-steam
@@ -1,47 +1,41 @@
#!/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
+# steam-runtime is a somewhat a mess bundled with old libraries
+# due to this reason, system native graphic drivers may not load
#
-# but we have to do this everytime when we launch steam, because
+# if we remove some bundled libs and preload some system libs
+# system native graphic drivers will be able to load
+#
+# however we must 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
+source /lib/gentoo/functions.sh
+
+do_remove () {
+ einfo "Removing bundled libraries (libxcb, libstdc++, libgcc_s)"
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/7.3.0/32/libstdc++.so.6 /usr/lib32/gcc/x86_64-pc-linux-gnu/7.3.0/32/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/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 ""
+do_preload () {
+ einfo "Preloading system libraries (libstdc++, libgcc_s)"
+ export LD_PRELOAD='/usr/lib32/gcc/x86_64-pc-linux-gnu/8.2.0/32/libstdc++.so.6 /usr/lib32/gcc/x86_64-pc-linux-gnu/8.2.0/32/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/32/libstdc++.so.6'
+}
+
+do_nvidia () {
+ if [[ "$(lsmod|grep nvidia)" ]] ; then
+ einfo "Preloading nvidia libraries"
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
+ do_remove
+ do_preload
+ do_nvidia
export DISPLAY=:0
steam
}
diff --git a/app-emulation/steam/steam-1.0.0.45-r2.ebuild b/app-emulation/steam/steam-1.0.0.45-r2.ebuild
deleted file mode 100644
index 993c0659..00000000
--- a/app-emulation/steam/steam-1.0.0.45-r2.ebuild
+++ /dev/null
@@ -1,50 +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
- media-libs/libtxc_dxtn
- 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}"/redcore-${PN}.patch
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "make install failed"
- exeinto /usr/bin || die
- doexe ${FILESDIR}/redcore-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-r3.ebuild b/app-emulation/steam/steam-1.0.0.45-r3.ebuild
new file mode 100644
index 00000000..8cd20e10
--- /dev/null
+++ b/app-emulation/steam/steam-1.0.0.45-r3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+EAPI=6
+
+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
+ sys-apps/gentoo-functions
+ media-libs/freetype
+ media-libs/libtxc_dxtn
+ x11-libs/gdk-pixbuf
+ gnome-extra/zenity
+ amd64? (
+ media-libs/alsa-lib[abi_x86_32(-)]
+ media-libs/mesa[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libxcb[abi_x86_32(-)]
+ )
+ x86? (
+ media-libs/alsa-lib
+ media-libs/mesa
+ x11-libs/libX11
+ x11-libs/libxcb
+ )"
+
+S=${WORKDIR}/${PN}
+
+PATCHES=( "${FILESDIR}/redcore-${PN}.patch" )
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin "${FILESDIR}"/redcore-steam
+ rm -rf "${D}"/usr/bin/steamdeps
+ dosym /bin/true /usr/bin/steamdeps
+ rm -rf "${D}"/usr/share/doc/"${PN}"
+ dodoc steam_install_agreement.txt
+}