Files
haikuports/dev-libs/rocksdb/rocksdb-9.10.0.recipe
2025-01-30 14:10:14 +00:00

115 lines
2.9 KiB
Bash

SUMMARY="A persistent key-value store for fast storage"
DESCRIPTION="RocksDB is an embeddable persistent key-value store for fast storage.
* Uses a log structured database engine, written entirely in C++, for \
maximum performance. Keys and values are just arbitrarily-sized byte streams.
* Is optimized for fast, low latency storage such as flash drives and \
high-speed disk drives. RocksDB exploits the full potential of high read/write \
rates offered by flash or RAM.
* Is adaptable to different workloads.
* Provides basic operations such as opening and closing a database, reading \
and writing to more advanced operations such as merging and compaction filters."
HOMEPAGE="https://rocksdb.org"
COPYRIGHT="2011 Facebook, Inc."
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="https://github.com/facebook/rocksdb/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724"
SOURCE_FILENAME="rocksdb-v$portVersion.tar.gz"
PATCHES="rocksdb-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
rocksdb$secondaryArchSuffix = $portVersion
lib:librocksdb$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgflags$secondaryArchSuffix
"
PROVIDES_devel="
rocksdb${secondaryArchSuffix}_devel = $portVersion
devel:librocksdb$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
rocksdb$secondaryArchSuffix == $portVersion base
"
PROVIDES_tools="
rocksdb${secondaryArchSuffix}_tools = $portVersion
cmd:cache_bench$commandSuffix
cmd:db_bench$commandSuffix
cmd:ldb$commandSuffix
cmd:sst_dump$commandSuffix
"
REQUIRES_tools="
haiku$secondaryArchSuffix
rocksdb$secondaryArchSuffix == $portVersion base
lib:libgflags$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgflags${secondaryArchSuffix}
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python3
"
BUILD()
{
if [ "$effectiveTargetArchitecture" = x86 ]; then
extraFlags=-DPORTABLE=1
fi
cmake -B build -S . -DCMAKE_BUILD_TYPE='Release' \
$cmakeDirArgs \
-DUSE_RTTI=ON $extraFlags \
-DFAIL_ON_WARNINGS=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# delete static library
rm $libDir/librocksdb.a
prepareInstalledDevelLib \
librocksdb
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$libDir/cmake
# tools package
mkdir -p $commandBinDir
cp build/cache_bench $commandBinDir
cp build/db_bench $commandBinDir
cp build/tools/ldb $commandBinDir
cp build/tools/sst_dump $commandBinDir
packageEntries tools \
$commandBinDir
}