git-lfs/script/build-git
Chris Darroch 7dc8a98641 script/build-git: compile without gettext on macOS
Due to recent Homebrew changes, our CI builds of Git failed with
a missing gettext dependency.  While the upstream issue may
have been resolved, we can simply avoid the problem entirely
by building Git without gettext.

See also https://github.com/Homebrew/homebrew-core/issues/53485
and https://lore.kernel.org/git/20200426200932.3769-1-tboegi@web.de/
2020-04-27 19:53:10 -07:00

33 lines
693 B
Bash
Executable File

#!/bin/sh -ex
DIR="$1"
case $(uname -s) in
Darwin)
brew install curl zlib pcre2 openssl
brew reinstall curl zlib pcre2 openssl
for i in curl zlib pcre2 openssl
do
brew unlink $i || true;
brew link --force $i || true
done;;
Linux)
export DEBIAN_FRONTEND=noninteractive
sed -e 's/^deb/deb-src/' /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/src.list
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get -y build-dep git;;
esac
cd "$DIR"
printf "%s\n" \
"NO_GETTEXT=YesPlease" \
"NO_OPENSSL=YesPlease" \
"prefix=/usr/local" \
> config.mak
make -j2
sudo make install
echo "Git version:"
git --version