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.
This commit is contained in:
Andrew Kaster 2024-07-06 06:28:14 -06:00 committed by Daniel Bertalan
parent a3e24163aa
commit 233320ef17
Notes: sideshowbarker 2024-07-17 17:49:11 +09:00

View file

@ -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
}