From 2de90577222c9bb1d9d505e65ddbab8e562217b2 Mon Sep 17 00:00:00 2001 From: Alexander Tratsevskiy Date: Mon, 3 Apr 2017 16:43:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D1=91?= =?UTF-8?q?=D0=BD=20steam-launcher?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- games-util/steam-launcher/Manifest | 2 +- .../files/steam-fix-joystick-detection.patch | 30 ++++++------------- .../files/steam-fix-preload-libxcb.patch | 19 ++++++++++++ ....ebuild => steam-launcher-1.0.0.54.ebuild} | 8 ++++- 4 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 games-util/steam-launcher/files/steam-fix-preload-libxcb.patch rename games-util/steam-launcher/{steam-launcher-1.0.0.52.ebuild => steam-launcher-1.0.0.54.ebuild} (92%) diff --git a/games-util/steam-launcher/Manifest b/games-util/steam-launcher/Manifest index f44486bbc..5dee02c9d 100644 --- a/games-util/steam-launcher/Manifest +++ b/games-util/steam-launcher/Manifest @@ -1 +1 @@ -DIST steam_1.0.0.52.tar.gz 2730077 SHA256 dd3b1a9f597bf0e088094d6fd1e495068434b604346139f277ea26c41e009304 SHA512 eefff7b2d223305fa8ff8b2419f9806e21784044c2832b42c5583bac4b9391d66444903e2753153842a85eab196418ca47d9b4b3a1daaf839e1eb15edfff891e WHIRLPOOL 34928f4684265f4571cb5a1f709eb03db4e28b0851c9dd95802cb1883d0c39120e893b3393453b2264e3bb2c249c6eb78c1b71b5ecf0ce59c5c675d17b5d4aa5 +DIST steam_1.0.0.54.tar.gz 2750102 SHA256 42531bf2615afed54c333ae9afeebe8cb68a31304ddfcf90e61b3532a5597386 SHA512 1820f596359d829a4e119f1f916a741ecb7973d36684916cdbbfa435fcdc9c288852491fd6d0b064e8154a43c60d8dcce3c7ed9275aed8f5f116c2782489bf32 WHIRLPOOL e1e9e5b41dbdde07e93f4c959fe25e03f3c25f00964e306aa0887557782307706e0a352137ae6b264987cf3545eaa18b9fc2e0cd51cadbf22f306af20930e030 diff --git a/games-util/steam-launcher/files/steam-fix-joystick-detection.patch b/games-util/steam-launcher/files/steam-fix-joystick-detection.patch index 99862065a..58dade303 100644 --- a/games-util/steam-launcher/files/steam-fix-joystick-detection.patch +++ b/games-util/steam-launcher/files/steam-fix-joystick-detection.patch @@ -1,30 +1,18 @@ diff -Naur a/steam b/steam --- a/steam 2016-08-14 18:44:23.069675427 +0100 -+++ b/steam 2016-08-14 18:44:29.853577578 +0100 -@@ -38,6 +38,27 @@ ++++ b/steam 2016-10-04 12:52:42.144904337 +0100 +@@ -38,6 +38,15 @@ # Gentoo's lsb-release doesn't set this. export DISTRIB_RELEASE="2.2" +# Finds joystick devices so we can coerce Steam's old SDL library into using them -+function enum_joysticks { -+ local joyprop=ID_INPUT_JOYSTICK=1 -+ for f in /dev/input/*; do -+ if [ ! -c $f ]; then -+ continue -+ elif udevadm info --query=property --name=$f | grep --quiet $joyprop; then -+ echo $f -+ fi -+ done -+} -+ -+# Uses the first arg as a separator to join the remaining args -+function join { -+ local IFS="$1" -+ shift -+ echo "$*" -+} -+ -+export SDL_JOYSTICK_DEVICE=$(join : $(enum_joysticks)) ++IFS=$'\n' ++for f in $(find /dev/input -maxdepth 1 -type c | sort --version-sort); do ++ if udevadm info --query=property --name="$f" 2>/dev/null | grep --quiet ID_INPUT_JOYSTICK=1; then ++ export SDL_JOYSTICK_DEVICE+=${SDL_JOYSTICK_DEVICE+:}$f ++ fi ++done ++unset IFS + function show_message() { diff --git a/games-util/steam-launcher/files/steam-fix-preload-libxcb.patch b/games-util/steam-launcher/files/steam-fix-preload-libxcb.patch new file mode 100644 index 000000000..80788e516 --- /dev/null +++ b/games-util/steam-launcher/files/steam-fix-preload-libxcb.patch @@ -0,0 +1,19 @@ +diff --git a/steam/steam b/steam/steam +index c1c8067..eaa6b09 100755 +--- a/steam/steam ++++ b/steam/steam +@@ -3,6 +3,14 @@ + # This is the Steam script that typically resides in /usr/bin + # It will create the Steam bootstrap if necessary and then launch steam. + ++# Fix launch https://bbs.archlinux.org/viewtopic.php?id=219522 ++if [[ $(arch) == "x86_64" ]] ++then ++ export LD_PRELOAD="/usr/lib32/libxcb.so.1" ++else ++ export LD_PRELOAD="/usr/lib/libxcb.so.1" ++fi ++ + # Get the full name of this script + export STEAMSCRIPT="$(cd "${0%/*}" && echo "$PWD")/${0##*/}" + diff --git a/games-util/steam-launcher/steam-launcher-1.0.0.52.ebuild b/games-util/steam-launcher/steam-launcher-1.0.0.54.ebuild similarity index 92% rename from games-util/steam-launcher/steam-launcher-1.0.0.52.ebuild rename to games-util/steam-launcher/steam-launcher-1.0.0.54.ebuild index 705975188..2082593d4 100644 --- a/games-util/steam-launcher/steam-launcher-1.0.0.52.ebuild +++ b/games-util/steam-launcher/steam-launcher-1.0.0.54.ebuild @@ -55,6 +55,7 @@ PATCHES=( "${FILESDIR}"/steam-runtime-default.patch "${FILESDIR}"/steam-set-distrib-release.patch "${FILESDIR}"/steam-fix-joystick-detection.patch + "${FILESDIR}"/steam-fix-preload-libxcb.patch ) pkg_setup() { @@ -83,6 +84,11 @@ src_prepare() { -e "s:@@STEAM_RUNTIME@@:$(usex steamruntime 1 0):g" \ steam || die + # if STEAM_RUNTIME_PREFER_HOST_LIBRARIES is enabled, steam.sh wants to + # parse the output of ldconfig which is not in PATH for regular users + sed -i \ + -e "s,export TEXTDOMAIN=steam,export TEXTDOMAIN=steam\nexport PATH=\${PATH}:/sbin/," steam || die + # Still need EPREFIX in the DEBIAN_COMPAT sed replacement because # the regular expression used by hprefixify doesn't match here. hprefixify steam @@ -98,7 +104,7 @@ src_install() { insinto /usr/lib/steam/ doins bootstraplinux_ubuntu12_32.tar.xz - udev_dorules lib/udev/rules.d/99-steam-controller-perms.rules lib/udev/rules.d/99-HTC-Vive-perms.rules + udev_dorules lib/udev/rules.d/99-steam-controller-perms.rules lib/udev/rules.d/60-HTC-Vive-perms.rules dodoc debian/changelog steam_install_agreement.txt doman steam.6