1
0
Fork 0
mutter-performance-pkgbuild/PKGBUILD
Mingi Sung 255074eca5
1:47.0-1: mutter-performance-unstable
Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 15:13:55 +09:00

241 lines
6.8 KiB
Bash

# Patched package:
# Maintainer: Térence Clastres <t.clastres@gmail.com>
# Co-maintainer: Saren Arterius <saren@wtako.net>
# Co-maintainer: Mingi Sung <sungmg@saltyming.net>
# Official package:
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Michael Kanis <mkanis_at_gmx_dot_de>
### PACKAGE OPTIONS
## MERGE REQUESTS SELECTION
# Merge Requests List: ('579' '1441' '3751')
_merge_requests_to_use=('1441' '3751')
### IMPORTANT: Do no edit below this line unless you know what you're doing!
_pkgname=mutter
pkgname=mutter-performance-unstable
epoch=1
pkgver=47.0
pkgrel=1
pkgdesc="A window manager for GNOME | Attempts to improve performances with non-upstreamed merge-requests and frequent stable branch resync"
url="https://gitlab.gnome.org/GNOME/mutter"
arch=(x86_64 aarch64)
license=(GPL-2.0-or-later)
depends=(
at-spi2-core
cairo
colord
dconf
fontconfig
fribidi
gcc-libs
gdk-pixbuf2
glib2
glibc
gnome-desktop-4
gnome-settings-daemon
graphene
gsettings-desktop-schemas
gtk4
harfbuzz
iio-sensor-proxy
lcms2
libcanberra
libcolord
libdisplay-info
libdrm
libei
libglvnd
libgudev
libice
libinput
libpipewire
libsm
libsysprof-capture
libwacom
libx11
libxau
libxcb
libxcomposite
libxcursor
libxdamage
libxext
libxfixes
libxi
libxinerama
libxkbcommon
libxkbcommon-x11
libxkbfile
libxrandr
libxtst
mesa
pango
pipewire
pixman
python
startup-notification
systemd-libs
wayland
xorg-xwayland
)
makedepends=(
egl-wayland
gi-docgen
git
glib2-devel
gobject-introspection
gtk3
meson
sysprof
wayland-protocols
xorg-server
xorg-server-xvfb
)
_commit=8b8f052ff9cb778c5f7c403f9e57fc4555a56ec2 # tags/47.0^0
source=("git+$url.git#commit=$_commit"
"git+https://gitlab.gnome.org/GNOME/gvdb.git#commit=b54bc5da25127ef416858a3ad92e57159ff565b3"
'mr1441.patch'
'mr3751.patch')
sha256sums=('6f7c2bc14fe1fff7aa474aa0531a91b9a412827433850f693373d86f037afa53'
'ba56c003c1c16f1f8e411f6d5213878bcf059d4d39ece100fc414228a1bf22d5'
'68d67a39cc6297126f30230a696bfb1c15bb0f7836fec542f6e4fb26c731e2b9'
'67943a22cb75df955fc475e5ae101984d87e4a1f51d56be5f50696cc3355a3c4')
b2sums=('0dc3e7541707fe7c9fd24397f08fd29272bd3f104a51503f7657b9b4589a22ee3a6ce407c440785e06bd19b3347fd555c3187aae4f5c87052ce94783d599426d'
'f989bc2ceb52aad3c6a23c439df3bbc672bc11d561a247d19971d30cc85ed5d42295de40f8e55b13404ed32aa44f12307c9f5b470f2e288d1c9c8329255c43bf'
'f669646bea17505d095c9ac635299790e6b94a5589e568315d7a90f7fe337221fd6958831082582c37a3e082f052cdad87530ae15122b40defed6faf6c3cf5de'
'e13742a68cd831827e88ddf1801caca39fa9c77dd8c08a851bc87914f2961119fc1a7643628fc63cad8dedf03533148539a242cca23313c250bd65867ea84d8d')
pkgver() {
cd $_pkgname
git describe --tags | sed -r 's/\.([a-z])/\1/;s/([a-z])\./\1/;s/[^-]*-g/r&/;s/-/+/g'
}
pick_mr() {
for mr in "${_merge_requests_to_use[@]}"; do
if [ "$1" = "$mr" ]; then
if [ "$2" = "merge" ] || [ -z "$2" ]; then
msg2 "Downloading then Merging $1..."
curl -O "https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/$mr.diff"
git apply "$mr.diff"
elif [ "$3" = "revert" ]; then
msg2 "Reverting $1..."
git revert "$2" --no-commit
elif [ "$3" = "patch" ]; then
if [ -e ../"$2" ]; then
msg2 "Patching with $2..."
patch -Np1 -i ../"$2"
else
msg2 "Downloading $mr as $2 then patching..."
curl -O "https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/$mr.diff" -o "$2"
patch -Np1 -i "$2"
fi
else
msg2 "ERROR: wrong argument given: $2"
fi
break
fi
done
}
prepare() {
cd $_pkgname
git reset --hard
git cherry-pick --abort || true
git clean -fd
#git remote add vanvugt https://gitlab.gnome.org/vanvugt/mutter.git || true
#git remote add verdre https://gitlab.gnome.org/verdre/mutter.git || true
#git remote add 3v1no https://gitlab.gnome.org/3v1n0/mutter.git || true
#git fetch vanvugt
#git fetch verdre
#git fetch 3v1no
### Merge Requests
# Merge Request Prototype
# Title:
# Author:
# URL:
# Type:
# Status:
# Comment:
# git cherry-pick -n first_commit^..last_commit
#
# Possible Type:
# 1. Improvement: Makes an already existing feature behave better, more efficiently/reliably.
# 2. Feature: Adds a new functionality.
# 3. Fix: Regression/bug fix only available in master (not backported).
# 4. Cleanup: Code styling improvement, function deprecation, rearrangement...
#
# Possible Status:
# 1. Needs rebase: Conflicts with master branch.
# 2. Needs review: Mutter maintainers needs to review the new/updated MR and provide feedback.
# 3. Needs changes: MR needs to be adjusted based on maintainers feedback.
# 4. Merged: MR approved and it changes commited to master.
#
# Generally, a MR status oscillate between 2 and 3 and then becomes 4.
# Title: backends: Do not reload keymap on new keyboard notifications
# Author: Carlos Garnacho <carlosg@gnome.org>
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/579
# Type: 1
# Status: 4
# Comment: Was reverted: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/833
# If you use stenography software or play hardcore rhythm games like Lunatic Rave 2/osumania, use it.
pick_mr '579' ce86f90efbaa51522ba14c5b4cad933c2106de42 'revert'
# Title: wayland/text-input-v1: Implement basic text-input-v1 support
# Author: Alynx Zhou <alynx.zhou@gmail.com>
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3751
# Type: 1
# Status: Not gonna be merged considering the maintainers' feedbacks.
# Comment: This commit makes input methods work in text-input-v1 only clients.
# (mostly Chromium/Electron based apps with Ozone Wayland.)
pick_mr '3751' 'mr3751.patch' 'patch'
# Title: Draft: Dynamic triple/double buffering (v4)
# Author: Daniel van Vugt <daniel.van.vugt@canonical.com>
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441
# Type: 1
# Status: 2 & 3
# Comment: Helps GPU frequencies to scale up.
# Backported: !3184 !3265 !3799 !3817 !3829 !3830 !3891 !3934 !3958 !4015
pick_mr '1441' 'mr1441.patch' 'patch'
}
build() {
local meson_options=(
-D egl_device=true
-D wayland_eglstream=true
-D installed_tests=false
-D libdisplay_info=enabled
-D docs=false
-D tests=disabled
)
CFLAGS="${CFLAGS/-O2/-O3} -fno-semantic-interposition"
LDFLAGS+=" -Wl,-Bsymbolic-functions"
# Inject gvdb
export MESON_PACKAGE_CACHE_DIR="$srcdir"
arch-meson $_pkgname build "${meson_options[@]}"
meson compile -C build
}
package() {
provides=(mutter libmutter-15.so)
conflicts=(mutter)
groups=(gnome)
meson install -C build --destdir "$pkgdir"
}