Upgraded libdrm from 2.4.117 to 2.4.120

This commit is contained in:
dslm4515
2024-01-30 18:47:03 -06:00
parent 0dbcca5018
commit 71b68cf71d
2 changed files with 16 additions and 22 deletions

View File

@ -1,7 +1,7 @@
#! /bin/bash
# Libdrm
# Source: https://dri.freedesktop.org/libdrm/libdrm-2.4.117.tar.xz
# Source: https://dri.freedesktop.org/libdrm/libdrm-2.4.120.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
@ -18,15 +18,9 @@ export CFLAGS+="-ffat-lto-objects -flto=4 "
export CFLAGS+="-fno-semantic-interposition -mprefer-vector-width=256 "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
# Fix meson build for drm_intel
patch -Np1 -i ../patches/libdrm-chimera/intel.patch
# Fix tests
patch -Np1 -i ../patches/libdrm-chimera/tests.patch
mkdir build &&
cd build &&
case $(uname -m) in
i686|x86_64) export MARGS+=" -Dnouveau=enabled -Dradeon=enabled -Damdgpu=enabled "
export MARGS+=" -Dexynos=disabled -Dvc4=disabled -Dtegra=disabled "
@ -37,11 +31,22 @@ case $(uname -m) in
;;
esac
meson --prefix=/usr -Dudev=true ${MARGS} ..
# OR for intel only machines (i.e. laptops with intel iGPU)
export MARGS="-Dnouveau=disabled -Dradeon=disabled -Damdgpu=disabled "
export MARGS+="-Dexynos=disabled -Dvc4=disabled -Dtegra=disabled "
export MARGS+="-Dfreedreno=disabled -Dvmwgfx=disabled -Domap=disabled "
read -p "Compile?" && ninja -j2 &&
# OR for machines with AMD GPU:
export MARGS="-Dnouveau=disabled -Dradeon=enabled -Damdgpu=enabled "
export MARGS+="-Dexynos=disabled -Dvc4=disabled -Dtegra=disabled "
export MARGS+="-Dfreedreno=disabled -Dvmwgfx=disabled -Domap=disabled "
sudo -S DESTDIR=$BUILD ninja install &&
meson setup --prefix=/usr -Dudev=true ${MARGS} OUT
unset MARGS
read -p "Compile?" && ninja -C OUT -j2 &&
sudo -S DESTDIR=$BUILD ninja -C OUT install &&
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
@ -66,5 +71,5 @@ libdrm:
libdrm:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libdrm-2.4.117-$PSUFFIX &&
sudo -S makepkg -l y -c n $PKGS/libdrm-2.4.120-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*