diff --git a/dev-libs/leveldb/leveldb-1.20.recipe b/dev-libs/leveldb/leveldb-1.22.recipe similarity index 75% rename from dev-libs/leveldb/leveldb-1.20.recipe rename to dev-libs/leveldb/leveldb-1.22.recipe index c01810fe7..03b57d547 100644 --- a/dev-libs/leveldb/leveldb-1.20.recipe +++ b/dev-libs/leveldb/leveldb-1.22.recipe @@ -11,15 +11,14 @@ HOMEPAGE="http://leveldb.org/" COPYRIGHT="2017 The LevelDB Authors" LICENSE="BSD (3-clause)" REVISION="1" -SOURCE_URI="https://github.com/google/leveldb/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664" +SOURCE_URI="https://github.com/google/leveldb/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2" SOURCE_FILENAME="leveldb-$portVersion.tar.gz" -PATCHES="leveldb-$portVersion.patchset" ARCHITECTURES="!x86_gcc2 ?x86 x86_64" SECONDARY_ARCHITECTURES="x86" -libVersion="$portVersion" +libVersion="${portVersion}.0" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" @@ -46,9 +45,9 @@ BUILD_REQUIRES=" " BUILD_PREREQUIRES=" haiku${secondaryArchSuffix}_devel + cmd:cmake cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix - cmd:libtoolize$secondaryArchSuffix cmd:make " @@ -57,25 +56,27 @@ defineDebugInfoPackage leveldb$secondaryArchSuffix \ BUILD() { + mkdir -p build && cd build + cmake .. $cmakeDirArgs \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=1 make $jobArgs } INSTALL() { - install -d -m 755 "$libDir" "$includeDir" "$developDocDir" + cd build + make install - cp -R include/* "$includeDir" - cp out-static/*.a "$libDir" - cp --no-dereference out-shared/libleveldb.so* "$libDir" - cp -R doc/* "$developDocDir" - - prepareInstalledDevelLibs libleveldb libmemenv + prepareInstalledDevelLibs libleveldb packageEntries devel \ - "$developDir" + "$developDir" \ + "$libDir/cmake" } TEST() { - make check + cd build + make test } diff --git a/dev-libs/leveldb/patches/leveldb-1.20.patchset b/dev-libs/leveldb/patches/leveldb-1.20.patchset deleted file mode 100644 index fcc6d238b..000000000 --- a/dev-libs/leveldb/patches/leveldb-1.20.patchset +++ /dev/null @@ -1,44 +0,0 @@ -From 0adb7c07e094fad72120b8a86fcf386a95f9be06 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= -Date: Sun, 13 May 2018 17:00:39 +0200 -Subject: Haiku supporting patches - - -diff --git a/build_detect_platform b/build_detect_platform -index d2a20ce..e1fa25e 100755 ---- a/build_detect_platform -+++ b/build_detect_platform -@@ -131,6 +131,13 @@ case "$TARGET_OS" in - PORT_FILE=port/port_posix.cc - PORT_SSE_FILE=port/port_posix_sse.cc - ;; -+ Haiku) -+ PLATFORM=OS_HAIKU -+ COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_HAIKU" -+ PLATFORM_LIBS="-lpthread" -+ PORT_FILE=port/port_posix.cc -+ PORT_SSE_FILE=port/port_posix_sse.cc -+ ;; - OS_ANDROID_CROSSCOMPILE) - PLATFORM=OS_ANDROID - COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_ANDROID -DLEVELDB_PLATFORM_POSIX" -diff --git a/util/env_posix.cc b/util/env_posix.cc -index 84aabb2..58b00ee 100644 ---- a/util/env_posix.cc -+++ b/util/env_posix.cc -@@ -280,10 +280,12 @@ class PosixWritableFile : public WritableFile { - if (!s.ok()) { - return s; - } -+ #ifndef __HAIKU__ - if (fflush_unlocked(file_) != 0 || - fdatasync(fileno(file_)) != 0) { - s = Status::IOError(filename_, strerror(errno)); - } -+ #endif - return s; - } - }; --- -2.16.2 -