From dc6c9996f6a79a6322b05facb8050cb87a72c1ec Mon Sep 17 00:00:00 2001 From: Powei Feng Date: Mon, 7 Jul 2025 14:11:21 -0700 Subject: [PATCH] renderdiff: update get-mesa to use also macport on MacOS (#8920) --- build/common/get-mesa.sh | 22 +++++++++++++--------- docs_src/build/checks.py | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/build/common/get-mesa.sh b/build/common/get-mesa.sh index 0aef663f06..cfe38a9e2a 100755 --- a/build/common/get-mesa.sh +++ b/build/common/get-mesa.sh @@ -77,16 +77,20 @@ if [[ "$OS_NAME" == "Linux" ]]; then sudo ln -s /usr/bin/clang++-${CLANG_VERSION} /usr/bin/clang++ fi # [[ "$GITHUB_WORKFLOW" ]] elif [[ "$OS_NAME" == "Darwin" ]]; then - if [[ ! "$GITHUB_WORKFLOW" ]]; then - if ! command -v brew > /dev/null 2>&1; then - echo "Error: need to install homebrew to continue" - exit 1 - fi + if command -v brew > /dev/null 2>&1; then + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=true brew install autoconf automake libx11 libxext libxrandr \ + llvm@${LLVM_VERSION} ninja meson pkg-config libxshmfence + # For reasons unknown, this is necessary for pkg-config to find homebrew's packages + LOCAL_PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH" + elif command -v port > /dev/null 2>&1; then + sudo port install autoconf automake libx11 libXext libXrandr llvm-${LLVM_VERSION} \ + ninja meson pkgconfig libxshmfence + # For reasons unknown, this is necessary for pkg-config to find macport's packages + LOCAL_PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH" + else + echo "Error: need to install homebrew or macports to continue" + exit 1 fi - HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=true brew install autoconf automake libx11 libxext libxrandr llvm@${LLVM_VERSION} ninja meson pkg-config libxshmfence - - # For reasons unknown, this is necessary for pkg-config to find homebrew's packages - LOCAL_PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH" fi # [[ "$OS_NAME" == x ]] LOCAL_LDFLAGS=${LDFLAGS} diff --git a/docs_src/build/checks.py b/docs_src/build/checks.py index b264021177..4b8212b7c2 100644 --- a/docs_src/build/checks.py +++ b/docs_src/build/checks.py @@ -40,7 +40,7 @@ SRC_SRC_DIRS = [MARKDEEP_SRC_DIR, MDBOOK_SRC_DIR, RAW_SRC_DIR] def get_edited_files(commit_hash): INSERT = '#####?????' res, ret = execute(f'git show --name-only --pretty=%b{INSERT} {commit_hash}') - assert res == 0, 'Failed to get edited filed' + assert res == 0, f'Failed to get edited filed {res}: ' + ret files = [] _, after = ret.split(INSERT) for r in filter(lambda a: len(a) > 0, after.split('\n')):