From 233320ef17eb2f1216e7870335f58fe459ed293d Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 6 Jul 2024 06:28:14 -0600 Subject: [PATCH] Meta: Set proper PKG_CONFIG_EXECUTABLE and GN paths for aarch64 Linux We need to avoid using vcpkg's pkg-config on non-x86_64 platforms, because they do very strange things to the default paths. On Asahi Linux and other 16 KiB page distros, the user must also provide a properly compiled version of GN. --- Meta/ladybird.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Meta/ladybird.sh b/Meta/ladybird.sh index c1e98aa490f..1e6da871759 100755 --- a/Meta/ladybird.sh +++ b/Meta/ladybird.sh @@ -65,6 +65,23 @@ exit_if_running_as_root "Do not run ladybird.sh as root, your Build directory wi CMAKE_ARGS=() CMD_ARGS=( "$@" ) +if [ "$(uname -s)" = Linux ] && [ "$(uname -m)" = "aarch64" ]; then + PKGCONFIG=$(which pkg-config) + GN=$(command -v gn || echo "") + CMAKE_ARGS+=("-DPKG_CONFIG_EXECUTABLE=$PKGCONFIG") + # https://github.com/LadybirdBrowser/ladybird/issues/261 + if [ "$(getconf PAGESIZE)" != "4096" ]; then + if [ -z "$GN" ]; then + die "GN not found! Please build GN from source and put it in \$PATH" + fi + fi + cat <<- EOF > Meta/CMake/vcpkg/user-variables.cmake +set(PKGCONFIG $PKGCONFIG) +set(GN $GN) +EOF + +fi + get_top_dir() { git rev-parse --show-toplevel }