diff --git a/zstd/build_mingw.sh b/zstd/build_mingw.sh index 21b078ec5..bdf94e17c 100755 --- a/zstd/build_mingw.sh +++ b/zstd/build_mingw.sh @@ -4,6 +4,7 @@ set -e tool_name="zstd" tool_version="1.5.5" +tool_zlib_version="1.3" self_toolset_name="build-mingw" download_url="https://github.com/facebook/zstd/archive/refs/tags/v$tool_version.tar.gz" @@ -21,12 +22,15 @@ echo "::endgroup::" echo "::group::build" -git clone --depth 1 --branch v1.3 https://github.com/madler/zlib -make -C zlib -f win32/Makefile.gcc libz.a +download_url_zlib="https://github.com/madler/zlib/archive/refs/tags/v$tool_zlib_version.tar.gz" +wget "$download_url_zlib" -O "tool-$tool_zlib_version.tar.gz" +"$bsdtar" -xf "tool-$tool_zlib_version.tar.gz" + +make -C "zlib-$tool_zlib_version" -f win32/Makefile.gcc libz.a cd "$dp0/release/$tool_name-$tool_version" -export CPPFLAGS=-I"$dp0/release/zlib" -export LDFLAGS="$dp0/release/zlib/libz.a" +export CPPFLAGS=-I"$dp0/release/zlib-$tool_zlib_version" +export LDFLAGS="$dp0/release/zlib-$tool_zlib_version/libz.a" make -j allzstd MOREFLAGS=-static V=1 cp -f "./programs/$tool_name.exe" "$dp0/release/build/" @@ -38,7 +42,8 @@ SHA-256: %s %s -' "$self_toolset_name.tar.gz" "$(sha256sum $tool_name)" "$download_url" +%s +' "$self_toolset_name.tar.gz" "$(sha256sum $tool_name)" "$download_url_zlib" "$download_url" } > "$self_toolset_name.md" cat "$self_toolset_name.md" diff --git a/zstd/build_musl.sh b/zstd/build_musl.sh index 56cffdb19..2816e1cca 100755 --- a/zstd/build_musl.sh +++ b/zstd/build_musl.sh @@ -38,7 +38,8 @@ strip "$tool_name" ### %s SHA-256: %s -' "$("./$tool_name" --version)" "$self_toolset_name.tar.gz" "$(sha256sum $tool_name)" +%s +' "$("./$tool_name" --version)" "$self_toolset_name.tar.gz" "$(sha256sum $tool_name)" "$(apk version zlib-static)" } > "$self_toolset_name.md" cat "$self_toolset_name.md"