Files
haikuports/app-arch/zstd/zstd-1.3.2.recipe
2017-10-13 19:39:19 +02:00

107 lines
2.8 KiB
Bash

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-2017 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="ac5054a3c64e6510bc1ae890d05e3d271cc33ceebc9d06ac9f08105766d2798a"
PATCHES="zstd-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
zstd$secondaryArchSuffix = $portVersion
lib:libzstd$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_bin="
zstd${secondaryArchSuffix}_bin = $portVersion
cmd:gzstd$commandSuffix = $portVersion
cmd:pzstd$commandSuffix = $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
"
REQUIRES_bin="
haiku$secondaryArchSuffix
zstd$secondaryArchSuffix == $portVersion base
cmd:grep
cmd:less
"
PROVIDES_devel="
zstd${secondaryArchSuffix}_devel = $portVersion
devel:libzstd$secondaryArchSuffix = $portVersion compat >= 1
"
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
make -C contrib/pzstd
make -C contrib/gen_html
contrib/gen_html/gen_html $portVersion lib/zstd.h zstd_manual.html
}
INSTALL()
{
mkdir -p $libDir
make install PREFIX=$prefix LIBDIR=$libDir INCLUDEDIR=$includeDir \
BINDIR=$commandBinDir MANDIR=$manDir/man1
make -C contrib/pzstd install PREFIX=$prefix BINDIR=$commandBinDir
prepareInstalledDevelLib libzstd
fixPkgconfig
packageEntries bin \
$commandBinDir \
$manDir/man1
packageEntries devel \
$developDir
rmdir $manDir
install -d $docDir
install -t $docDir -m 444 LICENSE zstd_manual.html
}
TEST()
{
make test
}