mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 14:08:51 +02:00
110 lines
2.6 KiB
Bash
110 lines
2.6 KiB
Bash
SUMMARY="Blocking, shuffling and lossless compression library"
|
|
DESCRIPTION="Blosc is a high performance compressor optimized for binary \
|
|
data. It has been designed to transmit data to the processor cache faster \
|
|
than the traditional, non-compressed, direct memory fetch approach via a \
|
|
memcpy() OS call. Blosc is the first compressor (that I'm aware of) that is \
|
|
meant not only to reduce the size of large datasets on-disk or in-memory, but \
|
|
also to accelerate memory-bound computations."
|
|
HOMEPAGE="http://www.blosc.org/"
|
|
COPYRIGHT="2012-2017 Francesc Alted"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/Blosc/c-blosc/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="7217659d8ef383999d90207a98c9a2555f7b46e10fa7d21ab5a1f92c861d18f7"
|
|
SOURCE_FILENAME="c_blosc-$portVersion.tar.gz"
|
|
SOURCE_DIR="c-blosc-$portVersion"
|
|
PATCHES="c_blosc-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
c_blosc$secondaryArchSuffix = $portVersion
|
|
lib:libblosc$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:liblz4$secondaryArchSuffix
|
|
lib:libsnappy$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
lib:libzstd$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
c_blosc${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libblosc$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
c_blosc$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:liblz4$secondaryArchSuffix
|
|
devel:libsnappy$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
devel:libzstd$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:perl >= 5
|
|
cmd:sed
|
|
"
|
|
|
|
defineDebugInfoPackage c_blosc$secondaryArchSuffix \
|
|
"$libDir"/libblosc.so.$portVersion
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p haiku_build
|
|
cd haiku_build
|
|
|
|
cmake .. \
|
|
-DPREFER_EXTERNAL_LZ4=ON \
|
|
-DPREFER_EXTERNAL_SNAPPY=ON \
|
|
-DPREFER_EXTERNAL_ZLIB=ON \
|
|
-DPREFER_EXTERNAL_ZSTD=ON \
|
|
-DLIB_SUFFIX=$secondaryArchSubDir \
|
|
$cmakeDirArgs
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd haiku_build
|
|
|
|
make install
|
|
|
|
# move include dir to correct location
|
|
mkdir -p $(dirname $includeDir)
|
|
mv $prefix/include $includeDir
|
|
|
|
if [ -n "$secondaryArchSuffix" ]; then
|
|
# On secondary arch the pkgconfig subdir should also go to $libDir
|
|
# instead of $prefix/lib
|
|
mv "$prefix"/lib/pkgconfig "$libDir"
|
|
fi
|
|
|
|
# prepare develop/lib
|
|
prepareInstalledDevelLibs libblosc
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
cd haiku_build
|
|
|
|
make test
|
|
}
|