pantry/projects/facebook.com/zstd/package.yml
Jacob Heider 00c76bb75b fix(zstd)
darwin needs an explicit `-std=c++11` flag to compile as of the newest release.

fixes #245
fixes #246
2023-02-13 22:00:24 -05:00

52 lines
1.1 KiB
YAML

distributable:
url: https://github.com/facebook/zstd/archive/v{{version}}.tar.gz
strip-components: 1
versions:
github: facebook/zstd/releases/tags
dependencies:
lz4.org: ^1
tukaani.org/xz: ^5
zlib.net: ^1
provides:
- bin/pzstd
- bin/unzstd
- bin/zstd
- bin/zstdcat
- bin/zstdgrep
- bin/zstdless
- bin/zstdmt
build:
dependencies:
tea.xyz/gx/cc: c99
cmake.org: ^3
ninja-build.org: ^1
working-directory: build/out
script: |
cmake ../cmake $ARGS
cmake --build .
cmake --install .
env:
ARGS:
- -GNinja
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX="{{prefix}}"
- -DZSTD_PROGRAMS_LINK_SHARED=ON # link `zstd` to `libzstd`
- -DZSTD_BUILD_CONTRIB=ON
- -DZSTD_LEGACY_SUPPORT=ON
- -DZSTD_ZLIB_SUPPORT=ON
- -DZSTD_LZMA_SUPPORT=ON
- -DZSTD_LZ4_SUPPORT=ON
darwin:
ARGS:
# Otherwise we get errors from clang
- -DCMAKE_CXX_FLAGS="-std=c++11"
test: |
export fixture="asdf123%!*"
for x in zstd pzstd xz lz4 gzip; do
test $(echo "$fixture" | $x | zstd -d) = "$fixture"
done