From 75cf178abda328200ad5a56fed774eb18c640576 Mon Sep 17 00:00:00 2001 From: jackun Date: Tue, 6 Jul 2021 20:08:46 +0300 Subject: [PATCH] Update build scripts for libdrm/SRT --- build-srt.sh | 6 +++--- build-with-srt-docker.sh | 4 ++-- build.sh | 9 +++++---- steamrt.Dockerfile.in | 8 ++++++-- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/build-srt.sh b/build-srt.sh index e29821d9..67c299ce 100755 --- a/build-srt.sh +++ b/build-srt.sh @@ -28,7 +28,7 @@ dependencies() { } echo "# Checking Dependencies" - DEPS=(${LOCAL_CC}-multilib ${LOCAL_CXX}-multilib unzip) + DEPS=(${LOCAL_CC}-multilib ${LOCAL_CXX}-multilib unzip libdrm-dev) install @@ -42,7 +42,7 @@ dependencies() { set -e if [[ ! -f ./bin/get-pip.py ]]; then - curl https://bootstrap.pypa.io/get-pip.py -o bin/get-pip.py + curl https://bootstrap.pypa.io/pip/3.5/get-pip.py -o bin/get-pip.py python3 ./bin/get-pip.py fi pip3 install 'meson>=0.54' mako @@ -81,7 +81,7 @@ configure() { build() { if [[ ! -f "build-srt/meson64/build.ninja" || ! -f "build-srt/meson32/build.ninja" ]]; then - configure + configure $@ fi DESTDIR="$PWD/build-srt/release" ninja -C build-srt/meson32 install DESTDIR="$PWD/build-srt/release" ninja -C build-srt/meson64 install diff --git a/build-with-srt-docker.sh b/build-with-srt-docker.sh index 80898e11..a6828030 100755 --- a/build-with-srt-docker.sh +++ b/build-with-srt-docker.sh @@ -9,8 +9,8 @@ fi SRCDIR=$PWD BRANCH="${1:-master}" -# soldier 0.20201022.1 or newer -# scout 0.20201104.0 or newer +# soldier 0.20210618.0 or newer +# scout 0.20210630.0 or newer RUNTIME="${2:-soldier}" VERSION="${3:-0.20210618.0}" IMAGE="steamrt_${RUNTIME}_${VERSION}_amd64:mango-${RUNTIME}" diff --git a/build.sh b/build.sh index 1e297c85..5a068ebf 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,7 @@ LAYER="build/release/usr/share/vulkan/implicit_layer.d/mangohud.json" INSTALL_DIR="build/package/" IMPLICIT_LAYER_DIR="$XDG_DATA_HOME/vulkan/implicit_layer.d" VERSION=$(git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//') -SU_CMD=$(command -v sudo || command -v doas) +SU_CMD=$(command -v sudo || command -v doas || echo) # doas requires a double dash if the command it runs will include any dashes, # so append a double dash to the command @@ -56,7 +56,7 @@ dependencies() { "Arch Linux"|"Manjaro Linux") MANAGER_QUERY="pacman -Q" MANAGER_INSTALL="pacman -S" - DEPS="{gcc,meson,pkgconf,python-mako,glslang,libglvnd,lib32-libglvnd,libxnvctrl}" + DEPS="{gcc,meson,pkgconf,python-mako,glslang,libglvnd,lib32-libglvnd,libxnvctrl,libdrm}" dep_install ;; "Fedora") @@ -81,7 +81,7 @@ dependencies() { if [[ ! -f /usr/local/bin/glslangValidator ]]; then wget https://github.com/KhronosGroup/glslang/releases/download/SDK-candidate-26-Jul-2020/glslang-master-linux-Release.zip unzip glslang-master-linux-Release.zip bin/glslangValidator - $SU_CMD install -m755 bin/glslangValidator /usr/local/bin/ + $SU_CMD /usr/bin/install -m755 bin/glslangValidator /usr/local/bin/ rm bin/glslangValidator glslang-master-linux-Release.zip fi ;; @@ -101,7 +101,7 @@ dependencies() { MANAGER_QUERY="rpm -q" MANAGER_INSTALL="zypper install" - DEPS="{gcc-c++,gcc-c++-32bit,libpkgconf-devel,ninja,python3-pip,python3-Mako,libX11-devel,glslang-devel,glibc-devel,glibc-devel-32bit,libstdc++-devel,libstdc++-devel-32bit,Mesa-libGL-devel,dbus-1-devel,${PACKMAN_PKGS}}" + DEPS="{gcc-c++,gcc-c++-32bit,libpkgconf-devel,ninja,python3-pip,python3-Mako,libX11-devel,glslang-devel,glibc-devel,glibc-devel-32bit,libstdc++-devel,libstdc++-devel-32bit,Mesa-libGL-devel,dbus-1-devel,libdrm-devel,${PACKMAN_PKGS}}" dep_install if [[ $(pip3 show meson; echo $?) == 1 ]]; then @@ -294,6 +294,7 @@ while [ $# -gt 0 ]; do "pull") git pull ${OPTS[@]};; "configure") configure ${OPTS[@]};; "build") build ${OPTS[@]};; + "build_dbg") build --buildtype=debug -Dglibcxx_asserts=true ${OPTS[@]};; "package") package;; "install") install;; "reinstall") reinstall;; diff --git a/steamrt.Dockerfile.in b/steamrt.Dockerfile.in index a6ea0ad5..915a66c8 100644 --- a/steamrt.Dockerfile.in +++ b/steamrt.Dockerfile.in @@ -6,9 +6,13 @@ set -e; \ mkdir -p /run/systemd; \ echo 'docker' > /run/systemd/container; \ mkdir -p /prep; cd /prep; \ -curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py; \ +if [ -f /usr/bin/python3.5 ]; then \ + ln -sf python3.5 /usr/bin/python3; \ + curl https://bootstrap.pypa.io/pip/3.5/get-pip.py -o get-pip.py; \ +else \ + curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py; \ +fi; \ if [ ! -f /usr/bin/unzip ]; then apt-get update; apt-get -y install unzip; fi; \ -if [ -f /usr/bin/python3.5 ]; then ln -sf python3.5 /usr/bin/python3; fi; \ python3 ./get-pip.py; \ pip3 install meson mako; \ curl -LO http://mirrors.kernel.org/ubuntu/pool/main/n/nvidia-settings/libxnvctrl0_440.64-0ubuntu1_amd64.deb; \