fix git link: use CURL_LIBCURL for static deps (#66)
This commit is contained in:
20
git/build.sh
20
git/build.sh
@@ -103,10 +103,16 @@ fi
|
|||||||
git -C git-src fetch --depth 1 origin "v${VERSION}"
|
git -C git-src fetch --depth 1 origin "v${VERSION}"
|
||||||
git -C git-src checkout --force FETCH_HEAD
|
git -C git-src checkout --force FETCH_HEAD
|
||||||
|
|
||||||
# Gather static link flags for curl's dependencies
|
# Gather static link flags for curl and openssl dependencies
|
||||||
CURL_LDFLAGS="-L$PREFIX/lib -lcurl -lssl -lcrypto -lz"
|
# CURL_LIBCURL: used by git-remote-http, git-http-fetch, git-http-push
|
||||||
|
# LIB_4_CRYPTO: used by git-imap-send and other direct openssl consumers
|
||||||
|
# Both need transitive deps (-ldl, -lpthread) since we link statically
|
||||||
|
CRYPTO_DEPS="-lpthread"
|
||||||
|
CURL_EXTRA=""
|
||||||
if [ "$PLATFORM" = "Linux" ]; then
|
if [ "$PLATFORM" = "Linux" ]; then
|
||||||
CURL_LDFLAGS="$CURL_LDFLAGS -lpthread -ldl"
|
CRYPTO_DEPS="$CRYPTO_DEPS -ldl"
|
||||||
|
elif [ "$PLATFORM" = "Darwin" ]; then
|
||||||
|
CURL_EXTRA="-framework SystemConfiguration -framework Security -framework CoreFoundation"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd git-src
|
cd git-src
|
||||||
@@ -119,7 +125,9 @@ make prefix="$PREFIX" \
|
|||||||
NO_EXPAT=YesPlease \
|
NO_EXPAT=YesPlease \
|
||||||
INSTALL_SYMLINKS=1 \
|
INSTALL_SYMLINKS=1 \
|
||||||
CURLDIR="$PREFIX" \
|
CURLDIR="$PREFIX" \
|
||||||
CURL_LDFLAGS="$CURL_LDFLAGS" \
|
CURL_LIBCURL="-L$PREFIX/lib -lcurl -lssl -lcrypto -lz $CRYPTO_DEPS $CURL_EXTRA" \
|
||||||
|
OPENSSL_LIBSSL="-L$PREFIX/lib -lssl" \
|
||||||
|
LIB_4_CRYPTO="-lcrypto $CRYPTO_DEPS" \
|
||||||
ZLIB_PATH="$PREFIX" \
|
ZLIB_PATH="$PREFIX" \
|
||||||
-j"$NJOBS" \
|
-j"$NJOBS" \
|
||||||
all
|
all
|
||||||
@@ -132,7 +140,9 @@ make prefix="$PREFIX" \
|
|||||||
NO_EXPAT=YesPlease \
|
NO_EXPAT=YesPlease \
|
||||||
INSTALL_SYMLINKS=1 \
|
INSTALL_SYMLINKS=1 \
|
||||||
CURLDIR="$PREFIX" \
|
CURLDIR="$PREFIX" \
|
||||||
CURL_LDFLAGS="$CURL_LDFLAGS" \
|
CURL_LIBCURL="-L$PREFIX/lib -lcurl -lssl -lcrypto -lz $CRYPTO_DEPS $CURL_EXTRA" \
|
||||||
|
OPENSSL_LIBSSL="-L$PREFIX/lib -lssl" \
|
||||||
|
LIB_4_CRYPTO="-lcrypto $CRYPTO_DEPS" \
|
||||||
ZLIB_PATH="$PREFIX" \
|
ZLIB_PATH="$PREFIX" \
|
||||||
install
|
install
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
|
|||||||
2
setup.sh
2
setup.sh
@@ -15,7 +15,7 @@ run_as_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
brew install nasm pkg-config ccache
|
brew install nasm pkg-config ccache autoconf automake libtool
|
||||||
elif command -v dnf &>/dev/null; then
|
elif command -v dnf &>/dev/null; then
|
||||||
dnf install -y nasm cmake gcc-c++ pkgconfig git perl-IPC-Cmd ccache autoconf automake libtool
|
dnf install -y nasm cmake gcc-c++ pkgconfig git perl-IPC-Cmd ccache autoconf automake libtool
|
||||||
elif command -v apt-get &>/dev/null; then
|
elif command -v apt-get &>/dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user