Skip to content

Commit

Permalink
tool_zlib_version
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill committed Oct 12, 2023
1 parent 8bbafb8 commit 89dc13f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions zstd/build_mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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/"
Expand All @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion zstd/build_musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 89dc13f

Please sign in to comment.