diff --git a/dev-libs/rocksdb/patches/rocksdb-9.6.1.patchset b/dev-libs/rocksdb/patches/rocksdb-9.10.0.patchset similarity index 85% rename from dev-libs/rocksdb/patches/rocksdb-9.6.1.patchset rename to dev-libs/rocksdb/patches/rocksdb-9.10.0.patchset index 74f065cf8..d08806aea 100644 --- a/dev-libs/rocksdb/patches/rocksdb-9.6.1.patchset +++ b/dev-libs/rocksdb/patches/rocksdb-9.10.0.patchset @@ -1,11 +1,11 @@ -From 3789d30392874d46d134329395c54b9fcfb9f8c5 Mon Sep 17 00:00:00 2001 +From 9691aa202cf82c88808721ad0816d4514944c779 Mon Sep 17 00:00:00 2001 From: "Mika T. Lindqvist" Date: Mon, 30 Sep 2024 18:13:32 +0000 Subject: Initial support for Haiku. diff --git a/CMakeLists.txt b/CMakeLists.txt -index 93b884d..3ba2ed9 100644 +index f1103c5..2271309 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -506,6 +506,8 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "DragonFly") @@ -18,10 +18,10 @@ index 93b884d..3ba2ed9 100644 add_definitions(-DWIN32 -DOS_WIN -D_MBCS -DWIN64 -DNOMINMAX) if(MINGW) diff --git a/env/fs_posix.cc b/env/fs_posix.cc -index 6d95d9a..b1eb25d 100644 +index 82fb9fb..4c83c95 100644 --- a/env/fs_posix.cc +++ b/env/fs_posix.cc -@@ -584,8 +584,15 @@ class PosixFileSystem : public FileSystem { +@@ -585,8 +585,15 @@ class PosixFileSystem : public FileSystem { while ((entry = readdir(d)) != nullptr) { // filter out '.' and '..' directory entries // which appear only on some platforms @@ -31,14 +31,14 @@ index 6d95d9a..b1eb25d 100644 + bool is_directory = S_ISDIR(entry_stat.st_mode); +#else + bool is_directory = entry->d_type = DT_DIR; -+#endif ++#endif const bool ignore = - entry->d_type == DT_DIR && + is_directory && (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0 #ifndef ASSERT_STATUS_CHECKED -@@ -726,8 +733,12 @@ class PosixFileSystem : public FileSystem { +@@ -727,8 +734,12 @@ class PosixFileSystem : public FileSystem { return IOError("stat file", second, errno); } @@ -52,10 +52,10 @@ index 6d95d9a..b1eb25d 100644 *res = false; } else { diff --git a/env/io_posix.cc b/env/io_posix.cc -index a509a1a..12fb437 100644 +index 231e88d..0159bca 100644 --- a/env/io_posix.cc +++ b/env/io_posix.cc -@@ -1189,6 +1189,10 @@ IOStatus PosixMmapFile::Sync(const IOOptions& /*opts*/, +@@ -1234,6 +1234,10 @@ IOStatus PosixMmapFile::Sync(const IOOptions& /*opts*/, if (::fcntl(fd_, F_FULLFSYNC) < 0) { return IOError("while fcntl(F_FULLSYNC) mmapped file", filename_, errno); } @@ -66,7 +66,7 @@ index a509a1a..12fb437 100644 #else // HAVE_FULLFSYNC if (fdatasync(fd_) < 0) { return IOError("While fdatasync mmapped file", filename_, errno); -@@ -1407,6 +1411,10 @@ IOStatus PosixWritableFile::Sync(const IOOptions& /*opts*/, +@@ -1453,6 +1457,10 @@ IOStatus PosixWritableFile::Sync(const IOOptions& /*opts*/, if (::fcntl(fd_, F_FULLFSYNC) < 0) { return IOError("while fcntl(F_FULLFSYNC)", filename_, errno); } @@ -77,7 +77,7 @@ index a509a1a..12fb437 100644 #else // HAVE_FULLFSYNC if (fdatasync(fd_) < 0) { return IOError("While fdatasync", filename_, errno); -@@ -1604,6 +1612,10 @@ IOStatus PosixRandomRWFile::Sync(const IOOptions& /*opts*/, +@@ -1650,6 +1658,10 @@ IOStatus PosixRandomRWFile::Sync(const IOOptions& /*opts*/, if (::fcntl(fd_, F_FULLFSYNC) < 0) { return IOError("while fcntl(F_FULLFSYNC) random rw file", filename_, errno); } @@ -89,15 +89,15 @@ index a509a1a..12fb437 100644 if (fdatasync(fd_) < 0) { return IOError("While fdatasync random read/write file", filename_, errno); diff --git a/env/io_posix.h b/env/io_posix.h -index 603af2f..d3c5011 100644 +index 60788df..e816021 100644 --- a/env/io_posix.h +++ b/env/io_posix.h @@ -30,7 +30,7 @@ // For non linux platform, the following macros are used only as place // holder. #if !(defined OS_LINUX) && !(defined OS_FREEBSD) && !(defined CYGWIN) && \ -- !(defined OS_AIX) -+ !(defined OS_AIX) && !(defined OS_HAIKU) +- !(defined OS_AIX) && !(defined OS_ANDROID) ++ !(defined OS_AIX) && !(defined OS_ANDROID) && !(defined OS_HAIKU) #define POSIX_FADV_NORMAL 0 /* [MC1] no further special treatment */ #define POSIX_FADV_RANDOM 1 /* [MC1] expect random page refs */ #define POSIX_FADV_SEQUENTIAL 2 /* [MC1] expect sequential page refs */ diff --git a/dev-libs/rocksdb/rocksdb-9.6.1.recipe b/dev-libs/rocksdb/rocksdb-9.10.0.recipe similarity index 78% rename from dev-libs/rocksdb/rocksdb-9.6.1.recipe rename to dev-libs/rocksdb/rocksdb-9.10.0.recipe index 4e6308ef3..e46db837c 100644 --- a/dev-libs/rocksdb/rocksdb-9.6.1.recipe +++ b/dev-libs/rocksdb/rocksdb-9.10.0.recipe @@ -12,11 +12,10 @@ 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" +REVISION="1" SOURCE_URI="https://github.com/facebook/rocksdb/archive/refs/tags/v$portVersion.tar.gz" -CHECKSUM_SHA256="98cf497c1d6d0a927142d2002a0b6b4816a0998c74fda9ae7b1bdaf6b784e895" -SOURCE_FILENAME="v$portVersion.tar.gz" -SOURCE_DIR="rocksdb-$portVersion" +CHECKSUM_SHA256="fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724" +SOURCE_FILENAME="rocksdb-v$portVersion.tar.gz" PATCHES="rocksdb-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" @@ -40,7 +39,7 @@ REQUIRES=" PROVIDES_devel=" rocksdb${secondaryArchSuffix}_devel = $portVersion - devel:librocksdb${secondaryArchSuffix} + devel:librocksdb$secondaryArchSuffix " REQUIRES_devel=" rocksdb$secondaryArchSuffix == $portVersion base @@ -71,30 +70,30 @@ BUILD_PREREQUIRES=" cmd:python3 " -defineDebugInfoPackage rocksdb$secondaryArchSuffix \ - $libDir/librocksdb.so.9.6.1 - BUILD() { if [ "$effectiveTargetArchitecture" = x86 ]; then extraFlags=-DPORTABLE=1 fi - mkdir -p build && cd build + cmake -B build -S . -DCMAKE_BUILD_TYPE='Release' \ + $cmakeDirArgs \ + -DUSE_RTTI=ON $extraFlags \ + -DFAIL_ON_WARNINGS=OFF - cmake .. $cmakeDirArgs \ - -DCMAKE_BUILD_TYPE='Release' \ - -DUSE_RTTI=ON $extraFlags - make $jobArgs + make -C build $jobArgs } INSTALL() { - cd build - make install + make -C build install + # delete static library rm $libDir/librocksdb.a - prepareInstalledDevelLibs librocksdb + + prepareInstalledDevelLib \ + librocksdb + fixPkgconfig # devel package packageEntries devel \ @@ -103,10 +102,10 @@ INSTALL() # tools package mkdir -p $commandBinDir - cp cache_bench $commandBinDir - cp db_bench $commandBinDir - cp tools/ldb $commandBinDir - cp tools/sst_dump $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 }