From c6da3b97a8a2c7bbbed4496f50c990a1aab4f7bf Mon Sep 17 00:00:00 2001 From: lhchavez Date: Mon, 6 Sep 2021 05:13:55 -0700 Subject: [PATCH] Allow building libgit2 with Chromium zlib (#831) This change allows the caller to set the `USE_CHROMIUM_ZLIB=ON` environment variable to use the Chromium implementation of zlib when building libgit2. --- script/build-libgit2.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/script/build-libgit2.sh b/script/build-libgit2.sh index e490b4bc..dbc19e42 100755 --- a/script/build-libgit2.sh +++ b/script/build-libgit2.sh @@ -61,12 +61,18 @@ else mkdir -p "${BUILD_PATH}/install/lib" fi +USE_BUNDLED_ZLIB="ON" +if [ "${USE_CHROMIUM_ZLIB}" = "ON" ]; then + USE_BUNDLED_ZLIB="Chromium" +fi + mkdir -p "${BUILD_PATH}/build" && cd "${BUILD_PATH}/build" && cmake -DTHREADSAFE=ON \ -DBUILD_CLAR=OFF \ -DBUILD_SHARED_LIBS"=${BUILD_SHARED_LIBS}" \ -DREGEX_BACKEND=builtin \ + -DUSE_BUNDLED_ZLIB="${USE_BUNDLED_ZLIB}" \ -DUSE_HTTPS=OFF \ -DUSE_SSH=OFF \ -DCMAKE_C_FLAGS=-fPIC \