Skip to content

Instantly share code, notes, and snippets.

@sharkautarch
Created February 29, 2024 15:11
Show Gist options
  • Save sharkautarch/25c774bd50a644b8116cc2988b7f78a0 to your computer and use it in GitHub Desktop.
Save sharkautarch/25c774bd50a644b8116cc2988b7f78a0 to your computer and use it in GitHub Desktop.
gamescope-git nvidia-fix-latest-upstream
# edited to build against my `nvidia-fix-latest-upstream` branch - sharkautarch
# PKGBUILD based on the official Arch gamescope PKGBUILD
# Maintainer - Sid Pranjale <sidpranjale127@protonmail.com>
# Maintainer: Sefa Eyeoglu <contact@scrumplex.net>
# Maintainer: Bouke Sybren Haarsma <boukehaarsma23 at gmail dot com>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Samuel "scrufulufugus" Monson <smonson@irbash.net>
# Contributor: PedroHLC <root@pedrohlc.com>
_pkgname=gamescope
pkgname=${_pkgname}-git
pkgver=3.14.2
pkgrel=1
pkgdesc='SteamOS session compositing window manager'
arch=(x86_64)
url=https://github.com/ValveSoftware/gamescope
license=(BSD)
depends=(
gcc-libs
glibc
glm
hwdata
libavif
libcap.so
libdisplay-info.so
libdrm
libliftoff.so
libinput
libpipewire-0.3.so
libvulkan.so
libx11
libxcb
libxcomposite
libxdamage
libxext
libxfixes
libxkbcommon
libxmu
libxrender
libxres
libxtst
libxxf86vm
seatd
sdl2
vulkan-icd-loader
wayland
xcb-util-wm
xcb-util-errors
xorg-server-xwayland
)
makedepends=(
benchmark
cmake
git
glslang
meson
ninja
vulkan-headers
wayland-protocols
)
source=('git+https://github.com/sharkautarch/gamescope.git')
b2sums=('SKIP')
provides=("$_pkgname")
conflicts=("$_pkgname")
prepare() {
cd $_pkgname
git checkout nvidia-fix-latest-upstream
# This really should be a pacman feature...
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
git apply "../$src"
done
meson subprojects download
git submodule init
git -c protocol.file.allow=always submodule update
# Use Arch provided libdisplay-info, do use other subprojects as is
rm -rf subprojects/libdisplay-info
}
#pkgver() {
# cd $_pkgname
# git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
#}
build() {
arch-meson "${_pkgname}" build \
-Dforce_fallback_for=stb \
-Dpipewire=enabled
meson compile -C build
}
package() {
meson install -C build --skip-subprojects --destdir="${pkgdir}"
cd "$srcdir/$_pkgname"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname/"
}
# vim: ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment