Skip to content

Instantly share code, notes, and snippets.

@bulletmark
Last active August 16, 2023 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bulletmark/215e7b94a9cbbe5806ea3eb9b3b7d1e0 to your computer and use it in GitHub Desktop.
Save bulletmark/215e7b94a9cbbe5806ea3eb9b3b7d1e0 to your computer and use it in GitHub Desktop.
Arch Linux patch for mutter 44.3-1 to revert commit 3ac82a58 to fix issue https://gitlab.gnome.org/GNOME/mutter/-/issues/2690
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Michael Kanis <mkanis_at_gmx_dot_de>
# Contributor: Mark Blakeney <mark dot blakeney at bullet dash systems dot net>
pkgbase=mutter
pkgname=(
mutter
)
pkgver=44.3+r0+g99d83f298
pkgrel=2
pkgdesc="Window manager and compositor for GNOME"
url="https://gitlab.gnome.org/GNOME/mutter"
arch=(x86_64)
license=(GPL)
depends=(
colord
dconf
gnome-desktop-4
gnome-settings-daemon
graphene
gsettings-desktop-schemas
iio-sensor-proxy
lcms2
libcanberra
libgudev
libinput
libsm
libsysprof-capture
libxkbcommon-x11
libxkbfile
pipewire
startup-notification
xorg-xwayland
)
makedepends=(
egl-wayland
gi-docgen
git
gobject-introspection
gtk3
meson
sysprof
wayland-protocols
xorg-server
xorg-server-xvfb
)
checkdepends=(
python-dbusmock
wireplumber
zenity
)
_commit=99d83f2985483bc192e1271665c442c7c480a588 # tags/44.3^0
source=(
"git+https://gitlab.gnome.org/GNOME/mutter.git#commit=$_commit"
"https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3186.patch"
)
b2sums=('SKIP'
'3d0387881c6aca2bb6af3f9e164371145d2ace238d75857b237d0fc85e88f9dd1475a4dac842d0a5bb6e96c8689ef71a6bf73122fdf7a000a70007aed939403e')
pkgver() {
cd mutter
git describe --long --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}
prepare() {
cd mutter
# Unbreak tests with Mesa 23.1
# https://gitlab.gnome.org/GNOME/mutter/-/issues/2848
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3047
git cherry-pick -n '5a83e8ef8250526a40e8e69c^..d65883e0d7d70987e3888b86'
# Fix https://gitlab.gnome.org/GNOME/mutter/-/issues/2690
git apply --index $srcdir/3186.patch
}
build() {
local meson_options=(
-D docs=true
-D egl_device=true
-D installed_tests=false
-D wayland_eglstream=true
)
CFLAGS="${CFLAGS/-O2/-O3} -fno-semantic-interposition"
LDFLAGS+=" -Wl,-Bsymbolic-functions"
arch-meson mutter build "${meson_options[@]}"
meson compile -C build
}
_check() (
export XDG_RUNTIME_DIR="$PWD/rdir" GSETTINGS_SCHEMA_DIR="$PWD/build/data"
mkdir -p -m 700 "$XDG_RUNTIME_DIR"
glib-compile-schemas "$GSETTINGS_SCHEMA_DIR"
pipewire &
_p1=$!
wireplumber &
_p2=$!
trap "kill $_p1 $_p2; wait" EXIT
meson test -C build --print-errorlogs -t 3
)
# check() {
# dbus-run-session xvfb-run -s '-nolisten local +iglx -noreset' \
# bash -c "$(declare -f _check); _check"
# }
_pick() {
local p="$1" f d; shift
for f; do
d="$srcdir/$p/${f#$pkgdir/}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
package_mutter() {
provides=(libmutter-12.so)
meson install -C build --destdir "$pkgdir"
_pick docs "$pkgdir"/usr/share/mutter-*/doc
}
package_mutter-docs() {
pkgdesc+=" (documentation)"
depends=()
mv docs/* "$pkgdir"
}
# vim:set sw=2 sts=-1 et:
@bulletmark
Copy link
Author

bulletmark commented Jul 8, 2023

Create a directory and copy this file to it. Then from within that directory, type makepkg -si to build and install the fixed mutter. Takes only a couple of minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment