256 lines
7.4 KiB
Bash
256 lines
7.4 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' '3567' '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=46.5
|
|
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
|
|
)
|
|
if [ -n "$_enable_check" ]; then
|
|
checkdepends=(gnome-session xorg-server-xvfb pipewire-session-manager python-dbusmock zenity)
|
|
fi
|
|
_commit=f585134c114797aae27f1a82013c665a5c1b94ed # tags/46.5^0
|
|
source=("git+$url.git#commit=$_commit"
|
|
'mr1441.patch'
|
|
'mr3567.patch'
|
|
'mr3751.patch')
|
|
sha256sums=('caf3b0c514334e4684d294ba65a64e22c94bf3458118ea2a3f02de761e0b71f2'
|
|
'1fe74042bc5d4369680036918eae10fb3d788983d7b57043a75b291b7f1050c8'
|
|
'2e474a574edad8dc047a53a920fc7cbe005cac0102907eef80a252fc556d0517'
|
|
'4c15b0e6d0001c8c3feedf05a9140f7f17d52eb36ff7b8039e0281c1373ccdfe')
|
|
b2sums=('3c7990afd584836dd092e30813194ac24608416051a9b06c51d2f9577206360cb0f8bafceccc42ce1809d47e7a1676326fe8b87fa231c6abe2d9dddba10b6581'
|
|
'cd0ae704aefdee7052f18fa75b156027da93243e1abd32692fe7d264b1e63bb41b63c7ea7ca76b74650e4dcdc76c456c83e5d37972196864bbe185aa2819f876'
|
|
'65302b1fa24a7aba26915269fb694c7a64b134ee2062ec7e649036a3a41efb2f2f4110cff6194808af34985855ade641c5fb01f0b97536cd3c912892ea3a0d4c'
|
|
'f9f2284d7236d6072a818de3784a339c2d934490da8870876f49d4effd59ce807593ce8b8a3c5e06586fd5fd7e81fb31fedca84115acf1e71cfe23d4a5e727b3')
|
|
|
|
for mr in "${_merge_requests_to_use[@]}"; do
|
|
if [ '3567' = "$mr" ]; then
|
|
depends+=(gnome-settings-daemon-xwayland-scaling)
|
|
fi
|
|
done
|
|
|
|
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: Let scaling-aware Xwayland clients scale themselves with "scale-monitor-framebuffers"
|
|
# Author: Jonas Dreßler <verdre@v0yd.nl>
|
|
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3567
|
|
# Type: 1
|
|
# Status: 3
|
|
# Comment: Backported to gnome-46. It needs more testing.
|
|
# Goes with https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/353
|
|
pick_mr '3567' 'mr3567.patch' 'patch'
|
|
|
|
# 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=false
|
|
)
|
|
|
|
CFLAGS="${CFLAGS/-O2/-O3} -fno-semantic-interposition"
|
|
LDFLAGS+=" -Wl,-Bsymbolic-functions"
|
|
|
|
arch-meson $_pkgname build "${meson_options[@]}"
|
|
meson compile -C build
|
|
}
|
|
|
|
package() {
|
|
provides=(mutter libmutter-14.so)
|
|
conflicts=(mutter)
|
|
groups=(gnome)
|
|
|
|
meson install -C build --destdir "$pkgdir"
|
|
}
|