summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDaniel Eklöf2021-09-12 19:20:28 +0200
committerDaniel Eklöf2021-09-12 19:20:28 +0200
commita7895f7486f0bee1272971bd74e2ec5c7ffb1dc5 (patch)
tree329620da8f50798e48ba0bd0acb2c50435cc7174 /PKGBUILD
parentb0bc0c4305e5f3fbe3d54f9cbe148e9405200abf (diff)
downloadaur-a7895f7486f0bee1272971bd74e2ec5c7ffb1dc5.tar.gz
Use the new pgo.sh helper script
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD81
1 files changed, 5 insertions, 76 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6be7231878f6..b25f2c3d41f7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,11 @@
# Maintainer: Daniel Eklöf <daniel at ekloef dot se>
+
+PGO=auto # auto|none|partial|full-current-session|full-headless-sway|full-headless-cage
+
pkgdesc='Wayland terminal emulator - fast, lightweight and minimalistic'
pkgname=foot-git
pkgver=1.9.0
-pkgrel=4
+pkgrel=5
conflicts=('foot')
provides=('foot')
arch=('x86_64' 'aarch64')
@@ -24,81 +27,7 @@ pkgver() {
build() {
cd foot
-
- local compiler=other
- local do_pgo=no
-
- # makepkg uses -O2 by default, but we *really* want -O3
- CFLAGS+=" -O3"
-
- # Figure out which compiler we're using, and whether or not to do PGO
- case $(${CC-cc} --version) in
- *GCC*)
- compiler=gcc
- do_pgo=yes
- ;;
-
- *clang*)
- compiler=clang
-
- # We need llvm to be able to manage the profiling data
- if command -v llvm-profdata > /dev/null; then
- do_pgo=yes
-
- # Meson adds -fprofile-correction, which Clang doesn't
- # understand
- CFLAGS+=" -Wno-ignored-optimization-argument"
- fi
- ;;
- esac
-
- meson \
- --prefix=/usr \
- --buildtype=release \
- -Db_lto=true \
- -Dterminfo=disabled \
- . build
-
- if [[ ${do_pgo} == yes ]]; then
- find -name "*.gcda" -delete
- meson configure -Db_pgo=generate build
- ninja -C build
-
- # Need to run tests here, to ensure *all* generated binaries have
- # profiling data (including e.g. unit tests from fcft/tllist).
- ninja -k 0 -C build test || true
-
- local script_options="--scroll --scroll-region --colors-regular --colors-bright --colors-256 --colors-rgb --attr-bold --attr-italic --attr-underline --sixel"
-
- local tmp_file=$(mktemp)
-
- if [[ -v WAYLAND_DISPLAY ]]; then
- build/footclient --version
- build/foot \
- --config /dev/null \
- --term=xterm \
- sh -c "./scripts/generate-alt-random-writes.py ${script_options} ${tmp_file} && cat ${tmp_file}"
- else
- build/footclient --version
- build/foot --version
- ./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}"
-
- if [[ ${compiler} == clang ]]; then
- llvm-profdata merge default_*profraw --output=build/default.profdata
- fi
-
- meson configure -Db_pgo=use build
- fi
-
- ninja -C build
+ ./pgo/pgo.sh ${PGO} . build --prefix=/usr --wrap-mode=nodownload -Dterminfo=disabled
}
check() {