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 }