Skip to content

Commit 3069942

Browse files
committed
Revert "ci: let git Makefile auto-detect Homebrew deps on macOS"
This reverts commit 00ddf88. Git's config.mak.uname Homebrew auto-detection for gettext was added after git 2.34.1, so older versions fail with 'libintl.h' not found on macOS. Restore explicit CFLAGS/LDFLAGS to support all git versions in the matrix.
1 parent 00ddf88 commit 3069942

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ jobs:
6363
6464
NPROC=$(nproc 2>/dev/null || sysctl -n hw.ncpu)
6565
66+
# On macOS, Homebrew keg-only packages (openssl, curl, gettext) are
67+
# not linked into the default search paths. Git's config.mak.uname
68+
# gained Homebrew auto-detection for gettext around v2.47, but older
69+
# versions in our matrix (2.34.1, 2.39.5) lack it and fail with
70+
# 'libintl.h' not found. Explicit CFLAGS/LDFLAGS ensure all versions
71+
# build consistently. See: git INSTALL docs, config.mak.uname.
72+
if [ "$RUNNER_OS" = "macOS" ]; then
73+
BREW_PREFIX=$(brew --prefix)
74+
export CFLAGS="-I${BREW_PREFIX}/opt/openssl/include -I${BREW_PREFIX}/opt/curl/include -I${BREW_PREFIX}/opt/expat/include -I${BREW_PREFIX}/opt/gettext/include"
75+
export LDFLAGS="-L${BREW_PREFIX}/opt/openssl/lib -L${BREW_PREFIX}/opt/curl/lib -L${BREW_PREFIX}/opt/expat/lib -L${BREW_PREFIX}/opt/gettext/lib"
76+
fi
77+
6678
make prefix="$HOME/git-install" -j"$NPROC" all
6779
make prefix="$HOME/git-install" install
6880

0 commit comments

Comments
 (0)