#!/bin/sh set -eu PROJECT_ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) HOST_ROOT=$PROJECT_ROOT/build/host-tools VENV=$HOST_ROOT/venv PKGCONF_SOURCE=$HOST_ROOT/pkgconf-source PKGCONF_BUILD=$HOST_ROOT/pkgconf-build PKGCONF_PREFIX=$HOST_ROOT/pkgconf NINJA_DIR=/Applications/DevEco-Studio.app/Contents/sdk/default/openharmony/native/build-tools/cmake/bin mkdir -p "$HOST_ROOT" test -x "$VENV/bin/python" || python3 -m venv "$VENV" "$VENV/bin/python" -m pip install --disable-pip-version-check --quiet 'meson==1.9.0' if test ! -d "$PKGCONF_SOURCE/.git"; then git clone --branch pkgconf-3.0.6 --depth 1 https://github.com/pkgconf/pkgconf.git "$PKGCONF_SOURCE" fi PATH="$VENV/bin:$NINJA_DIR:$PATH" export PATH meson setup "$PKGCONF_BUILD" "$PKGCONF_SOURCE" --prefix "$PKGCONF_PREFIX" --buildtype release --wipe meson compile -C "$PKGCONF_BUILD" meson install -C "$PKGCONF_BUILD" meson --version "$PKGCONF_PREFIX/bin/pkgconf" --version ninja --version