1
0
Fork 0
mutter-performance-pkgbuild/PKGBUILD
Mingi Sung 3f32fca954
1:47.1.r2.g74cf8ac0f-2: Sync mr1441 to main
* Merge mr3961 and mr4057 into mr1441

Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-10-22 17:22:12 +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
epoch=1
pkgver=47.1.r2.g74cf8ac0f
pkgrel=2
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=74cf8ac0f070c52c63fa1613b7ea68124ce52557 # tags/47.1^2
source=("git+$url.git#commit=$_commit"
"git+https://gitlab.gnome.org/GNOME/gvdb.git#commit=b54bc5da25127ef416858a3ad92e57159ff565b3"
'mr1441.patch'
'mr3751.patch')
sha256sums=('6ba3d155e5b3d949cee82c2b5b6711b6f5be37b78c6614c8099368bc57c4a6bf'
'ba56c003c1c16f1f8e411f6d5213878bcf059d4d39ece100fc414228a1bf22d5'
'e045bcfbf78b56327970667f6b285da004259af3012b2cfd7832bcf7c19b04e6'
'67943a22cb75df955fc475e5ae101984d87e4a1f51d56be5f50696cc3355a3c4')
b2sums=('b753b64fcb62d2fa7db374414671992f4100d201bcf4bb5472e479d1765e8a7e88dc6ae99517bf542c67f37172c3301707ae0e17f30b5c0a8b899bcec6afb671'
'f989bc2ceb52aad3c6a23c439df3bbc672bc11d561a247d19971d30cc85ed5d42295de40f8e55b13404ed32aa44f12307c9f5b470f2e288d1c9c8329255c43bf'
'6fb581581d0fe819ff75ac330e2c3a2b316eb5aea5bdf5719bd906d0506c6327b1b09f4925f0f5557b128a5218de684458b589d8a7e30b22c03f18c5c28aaf42'
'e13742a68cd831827e88ddf1801caca39fa9c77dd8c08a851bc87914f2961119fc1a7643628fc63cad8dedf03533148539a242cca23313c250bd65867ea84d8d')
pkgver() {
cd $_pkgname
git describe --tags --abbrev=9 | 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.
# Included: !3961 !4015 !4027 !4057
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"
}