Allow building libgit2 with Chromium zlib (#831) (#832)

This change allows the caller to set the `USE_CHROMIUM_ZLIB=ON`
environment variable to use the Chromium implementation of zlib when
building libgit2.

(cherry picked from commit c6da3b97a8)

Co-authored-by: lhchavez <lhchavez@lhchavez.com>
This commit is contained in:
github-actions[bot] 2021-09-06 05:26:01 -07:00 committed by GitHub
parent 4a1a8951e0
commit c26c144a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -58,12 +58,18 @@ else
mkdir -p "${BUILD_PATH}/install/lib" mkdir -p "${BUILD_PATH}/install/lib"
fi fi
USE_BUNDLED_ZLIB="ON"
if [ "${USE_CHROMIUM_ZLIB}" = "ON" ]; then
USE_BUNDLED_ZLIB="Chromium"
fi
mkdir -p "${BUILD_PATH}/build" && mkdir -p "${BUILD_PATH}/build" &&
cd "${BUILD_PATH}/build" && cd "${BUILD_PATH}/build" &&
cmake -DTHREADSAFE=ON \ cmake -DTHREADSAFE=ON \
-DBUILD_CLAR=OFF \ -DBUILD_CLAR=OFF \
-DBUILD_SHARED_LIBS"=${BUILD_SHARED_LIBS}" \ -DBUILD_SHARED_LIBS"=${BUILD_SHARED_LIBS}" \
-DREGEX_BACKEND=builtin \ -DREGEX_BACKEND=builtin \
-DUSE_BUNDLED_ZLIB="${USE_BUNDLED_ZLIB}" \
-DUSE_HTTPS=OFF \ -DUSE_HTTPS=OFF \
-DUSE_SSH=OFF \ -DUSE_SSH=OFF \
-DCMAKE_C_FLAGS=-fPIC \ -DCMAKE_C_FLAGS=-fPIC \