summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Eklöf2020-12-19 12:13:54 +0100
committerDaniel Eklöf2020-12-19 12:13:54 +0100
commit74b3733b3b4da35a75e7b2553bf5ca58f6a5c678 (patch)
treea13c3f3f10ffda82bd790e556e58bd9d12274d63
parentd2363f52fc9822ee065c34ecc9963585da71b42c (diff)
downloadaur-74b3733b3b4da35a75e7b2553bf5ca58f6a5c678.tar.gz
Use pgo helper to do a headless PGO build when building in a non-Wayland session
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD31
2 files changed, 23 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 98dece3096e..e2988355cd5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = foot
pkgver = 1.6.0
- pkgrel = 1
+ pkgrel = 2
url = https://codeberg.org/dnkl/foot
arch = x86_64
arch = aarch64
diff --git a/PKGBUILD b/PKGBUILD
index c86958eef73..40260c989dc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Daniel Eklöf <daniel at ekloef dot se>
pkgname=('foot' 'foot-terminfo')
pkgver=1.6.0 # Don’t forget to update CHANGELOG.md
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'aarch64')
url=https://codeberg.org/dnkl/foot
license=(mit)
@@ -27,18 +27,31 @@ build() {
meson --prefix=/usr --buildtype=release -Db_lto=true . build
- if [[ -v WAYLAND_DISPLAY ]]; then
- meson configure -Db_pgo=generate build
- find -name "*.gcda" -delete
- ninja -C build
+ find -name "*.gcda" -delete
+ meson configure -Db_pgo=generate build
+ ninja -C build
+
+ script_options="--scroll --scroll-region --colors-regular --colors-bright --colors-256 --colors-rgb --attr-bold --attr-italic --attr-underline"
- tmp_file=$(mktemp)
- build/foot --config /dev/null --term=xterm -- sh -c "./scripts/generate-alt-random-writes.py --scroll --scroll-region --colors-regular --colors-bright --colors-rgb ${tmp_file} && cat ${tmp_file}"
- rm "${tmp_file}"
+ tmp_file=$(mktemp)
- meson configure -Db_pgo=use build
+ if [[ -v WAYLAND_DISPLAY ]]; then
+ build/foot \
+ --config /dev/null \
+ --term=xterm \
+ sh -c "./scripts/generate-alt-random-writes.py ${script_options} ${tmp_file} && cat ${tmp_file}"
+ else
+ ./scripts/generate-alt-random-writes.py \
+ --rows=67 \
+ --cols=135 \
+ ${script_options} \
+ ${tmp_file}
+ build/pgo ${tmp_file} ${tmp_file} ${tmp_file}
fi
+ rm "${tmp_file}"
+
+ meson configure -Db_pgo=use build
ninja -C build
}