[packages/leveldb] - updated to 1.23 - removed obsolete soname patch - added system-libs patch (use system gmock/gtest/
qboosh
qboosh at pld-linux.org
Tue Feb 15 22:17:03 CET 2022
commit f24a9a9611789e1c7bc9f1619e63b4424efd82fa
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 15 22:18:38 2022 +0100
- updated to 1.23
- removed obsolete soname patch
- added system-libs patch (use system gmock/gtest/benchmark libs)
leveldb-soname.patch | 10 ----------
leveldb-system-libs.patch | 24 ++++++++++++++++++++++++
leveldb.spec | 18 +++++++++++++-----
3 files changed, 37 insertions(+), 15 deletions(-)
---
diff --git a/leveldb.spec b/leveldb.spec
index 47b1c11..dd07f4d 100644
--- a/leveldb.spec
+++ b/leveldb.spec
@@ -10,19 +10,23 @@
Summary: LevelDB - key-value store library
Summary(pl.UTF-8): LevelDB - biblioteka bazy danych klucz-wartość
Name: leveldb
-Version: 1.22
+Version: 1.23
Release: 1
License: BSD
Group: Libraries
#Source0Download: https://github.com/google/leveldb/releases
Source0: https://github.com/google/leveldb/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: e1dbde14dcda1b58b49f0c214464fdd9
-Patch0: %{name}-soname.patch
+# Source0-md5: afbde776fb8760312009963f09a586c7
+Patch0: %{name}-system-libs.patch
URL: https://github.com/google/leveldb
BuildRequires: cmake >= 3.9
+%{?with_tests:BuildRequires: gmock-devel}
+%{?with_tests:BuildRequires: google-benchmark-devel}
+%{?with_tests:BuildRequires: gtest-devel}
BuildRequires: libstdc++-devel >= 6:4.7
%{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
BuildRequires: snappy-devel
+# sqlite3-devel kyotocabinet-devel for benchmarks
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -70,7 +74,9 @@ Statyczna biblioteka LevelDB.
install -d build-static
cd build-static
%cmake .. \
- -DBUILD_SHARED_LIBS:BOOL=OFF
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
+ %{!?with_tests:-DLEVELDB_BUILD_TESTS:BOOL=OFF} \
+ -DLEVELDB_BUILD_BENCHMARKS:BOOL=OFF
%{__make}
cd ..
@@ -78,7 +84,9 @@ cd ..
install -d build
cd build
-%cmake ..
+%cmake .. \
+ %{!?with_tests:-DLEVELDB_BUILD_TESTS:BOOL=OFF} \
+ -DLEVELDB_BUILD_BENCHMARKS:BOOL=OFF
%{__make}
diff --git a/leveldb-soname.patch b/leveldb-soname.patch
deleted file mode 100644
index 5c3065d..0000000
--- a/leveldb-soname.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- leveldb-1.21/CMakeLists.txt.orig 2019-03-29 22:37:39.000000000 +0100
-+++ leveldb-1.21/CMakeLists.txt 2019-03-30 21:39:02.866319971 +0100
-@@ -95,6 +95,7 @@
- endif(BUILD_SHARED_LIBS)
-
- add_library(leveldb "")
-+set_target_properties(leveldb PROPERTIES SOVERSION 1 VERSION 1.22)
- target_sources(leveldb
- PRIVATE
- "${PROJECT_BINARY_DIR}/${LEVELDB_PORT_CONFIG_DIR}/port_config.h"
diff --git a/leveldb-system-libs.patch b/leveldb-system-libs.patch
new file mode 100644
index 0000000..badf6e8
--- /dev/null
+++ b/leveldb-system-libs.patch
@@ -0,0 +1,24 @@
+--- leveldb-1.23/CMakeLists.txt.orig 2022-02-15 21:59:23.011808037 +0100
++++ leveldb-1.23/CMakeLists.txt 2022-02-15 22:06:56.232686062 +0100
+@@ -296,21 +296,9 @@ if(LEVELDB_BUILD_TESTS)
+ set(install_gmock OFF)
+ set(build_gmock ON)
+
+- # This project is tested using GoogleTest.
+- add_subdirectory("third_party/googletest")
+-
+ # This project uses Google benchmark for benchmarking.
+ set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
+ set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
+- add_subdirectory("third_party/benchmark")
+-
+- # GoogleTest triggers a missing field initializers warning.
+- if(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+- set_property(TARGET gtest
+- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
+- set_property(TARGET gmock
+- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
+- endif(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+
+ function(leveldb_test test_file)
+ get_filename_component(test_target_name "${test_file}" NAME_WE)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/leveldb.git/commitdiff/f24a9a9611789e1c7bc9f1619e63b4424efd82fa
More information about the pld-cvs-commit
mailing list