Files
haikuports/app-arch/snappy/snappy-1.1.7.recipe
2017-11-20 20:36:51 +01:00

81 lines
1.9 KiB
Bash

SUMMARY="A fast compressor/decompressor"
DESCRIPTION="Snappy is a compression/decompression library. It does not aim \
for maximum compression, or compatibility with any other compression library; \
instead, it aims for very high speeds and reasonable compression. For instance, \
compared to the fastest mode of zlib, Snappy is an order of magnitude faster \
for most inputs, but the resulting compressed files are anywhere from 20% to \
100% bigger."
HOMEPAGE="https://google.github.io/snappy/"
COPYRIGHT="2005-2017 Google Inc"
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="https://github.com/google/snappy/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
snappy$secondaryArchSuffix = $portVersion compat >= 1
lib:libsnappy$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
snappy${secondaryArchSuffix}_devel = $portVersion compat >= 1
devel:libsnappy$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES_devel="
snappy$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
mkdir -p build && cd build
cmake .. $cmakeDirArgs -DBUILD_SHARED_LIBS=ON
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLib libsnappy
mkdir -p $developLibDir/pkgconfig
cat > $developLibDir/pkgconfig/snappy.pc << EOF
prefix=${prefix}
exec_prefix=${prefix}
libdir=${libDir}
includedir=${includeDir}
Name: snappy
Description: A fast compression/decompression library
Version: $portVersion
Libs: -L${developLibDir} -lsnappy
Cflags: -I${includedir}
EOF
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
build/snappy_unittest
}