1
0
Fork 0
mutter-performance-pkgbuild/PKGBUILD

170 lines
5.3 KiB
Bash
Raw Normal View History

2019-07-09 09:35:01 +00:00
# Maintainer: Saren Arterius <saren@wtako.net>
# Maintainer: Térence Clastres <t.clastres@gmail.com>
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: Michael Kanis <mkanis_at_gmx_dot_de>
### MERGE REQUESTS SELECTION
2020-04-17 00:54:50 +00:00
# available MR: ('429' '493' '579' '983' '798')
_merge_requests_to_use=('983' '1124') # safe pick
### IMPORTANT: Do no edit below this line unless you know what you're doing
2019-07-09 09:35:01 +00:00
pkgname=mutter-performance
2020-04-27 22:12:03 +00:00
pkgver=3.36.1+53+g2cc8061f3
2020-03-09 03:57:46 +00:00
pkgrel=1
2019-07-09 09:38:09 +00:00
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"
2019-07-09 09:35:01 +00:00
arch=(x86_64)
license=(GPL)
depends=(dconf gobject-introspection-runtime gsettings-desktop-schemas libcanberra
startup-notification zenity libsm gnome-desktop upower libxkbcommon-x11
2019-09-20 04:41:54 +00:00
gnome-settings-daemon libgudev libinput pipewire xorg-server-xwayland)
2020-03-15 15:45:09 +00:00
makedepends=(gobject-introspection git egl-wayland meson xorg-server sysprof)
2019-07-09 09:35:01 +00:00
checkdepends=(xorg-server-xvfb)
2020-03-09 03:57:46 +00:00
provides=(mutter mutter-781835-workaround libmutter-6.so)
2019-07-09 09:35:01 +00:00
conflicts=(mutter)
replaces=(mutter-781835-workaround)
2019-07-09 09:35:01 +00:00
groups=(gnome)
2019-12-28 19:30:17 +00:00
install=mutter.install
2020-04-27 22:12:03 +00:00
_commit=2cc8061f352e99767a33536b37b241e974092adb # tags/3.36.1^53
2020-03-15 15:45:09 +00:00
source=("$pkgname::git+https://gitlab.gnome.org/GNOME/mutter.git#commit=$_commit")
sha256sums=('SKIP')
2019-07-09 09:35:01 +00:00
pkgver() {
cd $pkgname
git describe --tags | sed 's/-/+/g'
}
pick_mr() {
for mr in "${_merge_requests_to_use[@]}"; do
if [ "$1" = "$mr" ]; then
if [ "$2" = "merge" ] || [ -z "$2" ]; then
echo "Downloading then Merging $1..."
curl -O "https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/$mr.diff"
git apply "$mr.diff"
elif [ "$3" = "revert" ]; then
echo "Reverting $1..."
git revert "$2" --no-commit
elif [ "$2" = "patch" ]; then
2020-02-07 05:10:21 +00:00
echo "Patching $1..."
patch -Np1 -i "$2"
else
echo "ERROR: wrong argument given: $2"
fi
break
fi
done
}
2019-07-09 09:35:01 +00:00
prepare() {
cd $pkgname
### Adding and fetching remotes providing the selected merge-requests
### Only needed when there is no MR opened
2019-11-09 07:54:38 +00:00
git reset --hard
2019-08-20 11:55:46 +00:00
git cherry-pick --abort || true
2019-11-04 12:14:38 +00:00
#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
2019-07-09 09:35:01 +00:00
### Merge Requests
# Merge Request Prototype
# Title:
# 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...
#
2019-07-09 09:35:01 +00:00
# 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.
2019-07-09 09:35:01 +00:00
# Title: Resource scale computation optimizations
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/493
2019-07-09 09:35:01 +00:00
# Type: 1
# Status: 3
# Comment: Not picked by default because breaks the overview on Wayland. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/493#note_549833
pick_mr '493'
2019-07-09 09:35:01 +00:00
2019-07-27 22:39:16 +00:00
# Title: clutter/stage: Update input devices right after doing a relayout
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/429
2019-07-27 22:39:16 +00:00
# Type: 1
2019-09-20 04:41:54 +00:00
# Status: 1
pick_mr '429'
2019-08-06 12:04:10 +00:00
2019-10-28 16:24:42 +00:00
# Title: backends: Do not reload keymap on new keyboard notifications
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/579
2019-10-28 16:24:42 +00:00
# Type: 1
# Status: 4
# Comment: Was reverted: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/833
2019-10-28 16:24:42 +00:00
# If you use stenography software or play hardcore rhythm games like Lunatic Rave 2/osumania, use it.
pick_mr '579' ce86f90efbaa51522ba14c5b4cad933c2106de42 'revert'
2019-12-28 19:38:20 +00:00
# Title: clutter/text: Check if attributes are equal before applying
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/983
2019-12-28 19:38:20 +00:00
# Type: 1
# Status: 2
# Comment:
pick_mr '983'
2020-04-17 00:41:11 +00:00
# Title: Wayland surface fullscreen unredirect
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/798
# Type: 2
# Status: 4
# Comment:
pick_mr '798'
2019-12-28 19:38:20 +00:00
2019-07-09 09:35:01 +00:00
}
build() {
2020-03-09 03:57:46 +00:00
CFLAGS="${CFLAGS/-O2/-O3} -fno-semantic-interposition"
LDFLAGS+=" -Wl,-Bsymbolic-functions"
2019-07-09 09:35:01 +00:00
arch-meson $pkgname build \
-D egl_device=true \
-D wayland_eglstream=true \
2020-03-09 03:57:46 +00:00
-D xwayland_initfd=disabled \
2019-07-09 09:35:01 +00:00
-D installed_tests=false
ninja -C build
}
2019-09-20 04:41:54 +00:00
check() (
mkdir -p -m 700 "${XDG_RUNTIME_DIR:=$PWD/runtime-dir}"
glib-compile-schemas "${GSETTINGS_SCHEMA_DIR:=$PWD/build/data}"
export XDG_RUNTIME_DIR GSETTINGS_SCHEMA_DIR
# Stacking test flaky
2020-03-09 03:57:46 +00:00
dbus-run-session xvfb-run \
-s '-screen 0 1920x1080x24 -nolisten local +iglx -noreset' \
2020-03-15 15:45:09 +00:00
meson test -C build --print-errorlogs || :
)
2019-09-20 04:41:54 +00:00
2019-07-09 09:35:01 +00:00
package() {
DESTDIR="$pkgdir" meson install -C build
}