fix: use build-time AHFAIL_INSTALL_DIR on macOS, not hardcoded /usr/local/lib
Some checks failed
Test / test (push) Has been cancelled

Apple Silicon Homebrew uses /opt/homebrew as prefix, so hardcoding
/usr/local/lib/ahfail/ahfail-display as DEFAULT_PATH breaks there.
build.rs now falls back to /usr/local/lib on macOS and /usr/lib on Linux
when AHFAIL_LIBDIR is not set; macOS uses the same concat!(env!(...))
approach as Linux.

install-macos.sh passes -Dlibdir so the baked-in path matches INSTALL_DIR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Asger Geel Weirsøe
2026-05-06 15:24:34 +02:00
parent f951cb9c6d
commit b8a03d72bb
3 changed files with 12 additions and 12 deletions

View File

@@ -34,10 +34,11 @@ PROJECT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
cd "$PROJECT_DIR"
step "Building ahfail..."
MESON_FLAGS=("--buildtype=release" "-Dlibdir=${INSTALL_DIR%/ahfail}")
if [[ -d builddir ]]; then
meson setup builddir --wipe
meson setup builddir "${MESON_FLAGS[@]}" --wipe
else
meson setup builddir
meson setup builddir "${MESON_FLAGS[@]}"
fi
meson compile -C builddir