SUMMARY="Zstandard, a fast real-time compression algorithm" SUMMARY_bin="Command line tools to compress/decompress .zst files" DESCRIPTION="Zstd, short for Zstandard, is a fast lossless compression \ algorithm, targeting real-time compression scenarios at zlib-level and better \ compression ratios. The zstd compression library provides in-memory \ compression and decompression functions. It offers a very wide range of \ compression / speed trade-off, while being backed by a very fast decoder. It \ also offers a special mode for small data, called dictionary compression, and \ can create dictionaries from any sample set." HOMEPAGE="https://facebook.github.io/zstd/" COPYRIGHT="2016-2018 Facebook, Inc." LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="https://github.com/facebook/zstd/archive/v$portVersion.tar.gz" SOURCE_FILENAME="zstd-$portVersion.tar.gz" CHECKSUM_SHA256="92e41b6e8dd26bbd46248e8aa1d86f1551bc221a796277ae9362954f26d605a9" PATCHES="zstd-$portVersion.patchset" if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then PATCHES="$PATCHES zstd-$portVersion-gcc2.patchset " fi ARCHITECTURES="x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86_gcc2 x86" commandSuffix=$secondaryArchSuffix commandBinDir=$binDir if [ -n "$secondaryArchSuffix" ]; then # Comment out this block if you wish to co-install zstd_bin & e.g. zstd_x86_bin. commandSuffix= commandBinDir=$prefix/bin fi libVersion="$portVersion" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" zstd$secondaryArchSuffix = $portVersion lib:libzstd$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix " PROVIDES_bin=" zstd${secondaryArchSuffix}_bin = $portVersion cmd:unzstd$commandSuffix = $portVersion cmd:zstd$commandSuffix = $portVersion cmd:zstdcat$commandSuffix = $portVersion cmd:zstdgrep$commandSuffix = $portVersion cmd:zstdless$commandSuffix = $portVersion cmd:zstdmt$commandSuffix = $portVersion " if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then PROVIDES_bin="$PROVIDES_bin cmd:pzstd$commandSuffix = $portVersion " fi REQUIRES_bin=" haiku$secondaryArchSuffix zstd$secondaryArchSuffix == $portVersion base cmd:grep cmd:less " if [ -n "$secondaryArchSuffix" -a "$commandBinDir" = "$prefix"/bin ]; then CONFLICTS_bin=" zstd_bin " fi PROVIDES_devel=" zstd${secondaryArchSuffix}_devel = $portVersion devel:libzstd$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" zstd$secondaryArchSuffix == $portVersion base " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" cmd:gcc$secondaryArchSuffix cmd:make cmd:sed " BUILD() { make PREFIX=$prefix INCLUDEDIR=$includeDir LIBDIR=$libDir $jobArgs if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then make -C contrib/pzstd fi } INSTALL() { mkdir -p $libDir make install PREFIX=$prefix LIBDIR=$libDir INCLUDEDIR=$includeDir \ BINDIR=$commandBinDir mandir=$manDir if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then make -C contrib/pzstd install PREFIX="$prefix" BINDIR="$commandBinDir" fi prepareInstalledDevelLib libzstd fixPkgconfig packageEntries bin \ $commandBinDir \ $manDir/man1 packageEntries devel \ $developDir rmdir $manDir install -d $docDir install -t $docDir -m 444 LICENSE } TEST() { make test }