1
0
Fork 0
mutter-performance-pkgbuild/PKGBUILD

167 lines
5.4 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) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
2019-07-09 09:35:01 +00:00
# Contributor: Michael Kanis <mkanis_at_gmx_dot_de>
### MERGE REQUESTS SELECTION
# Merge Requests List: ('579' '1309' '1050' '1441')
_merge_requests_to_use=('1050' '1309' '1441') # 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
pkgver=3.38.1+9+g54936263c
2020-09-14 10:41:47 +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)
provides=(mutter mutter-781835-workaround libmutter-7.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
_commit=54936263cdfda48b5bf38d79b6f218d59e2c7f07 # tags/3.38.1^9
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 [ "$3" = "patch" ]; then
if [ -e ../"$2" ]; then
echo "Patching with $2..."
patch -Np1 -i ../"$2"
else
echo "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
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-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: Use new pango API to compare attribute lists
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1050
# Type: 1
# Status: 2
pick_mr '1050'
2020-07-18 16:17:06 +00:00
# Title: cogl-winsys-glx: Add a heuristically calculated presentation_time
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1309
2020-07-18 16:17:06 +00:00
# Type: 1
# Status: 3
# Comment: Fix high latency on nvidia driver
pick_mr '1309'
2020-07-23 20:14:09 +00:00
# Title: WIP: clutter-frame-clock: Triple buffering support (v4)
# URL: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441
# Type: 1
# Status: 3
# Comment: Help GPU frequencies to scale up
pick_mr '1441'
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
2020-06-16 13:35:45 +00:00
meson compile -C build
2019-07-09 09:35:01 +00:00
}
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
}