summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-10-24 10:45:10 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2021-10-24 10:48:21 +0300
commit7bc9121746499f5c207cdd4c20893f5ab60c5952 (patch)
tree00d67f92a258ac9de7f33ed311ec636ea64bc976 /dev-libs
parentdev-db/pgadmin4: add upper bound on psycopg version (diff)
downloadgentoo-7bc9121746499f5c207cdd4c20893f5ab60c5952.tar.gz
gentoo-7bc9121746499f5c207cdd4c20893f5ab60c5952.tar.bz2
gentoo-7bc9121746499f5c207cdd4c20893f5ab60c5952.zip
dev-libs/leveldb: remove test dependency on dev-cpp/benchmark
Only one test executable is using benchmark, and that is only for a badly placed benchmark. So just patch it out. dev-cpp/benchmark is problematic to keyword for multiple arches (for example sparc #762727), so it is better to just patch it out. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/leveldb/files/leveldb-1.23-remove-benchmark-dep.patch44
-rw-r--r--dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch3
-rw-r--r--dev-libs/leveldb/leveldb-1.23-r1.ebuild (renamed from dev-libs/leveldb/leveldb-1.23.ebuild)6
3 files changed, 47 insertions, 6 deletions
diff --git a/dev-libs/leveldb/files/leveldb-1.23-remove-benchmark-dep.patch b/dev-libs/leveldb/files/leveldb-1.23-remove-benchmark-dep.patch
new file mode 100644
index 000000000000..be5ce7386ed4
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.23-remove-benchmark-dep.patch
@@ -0,0 +1,44 @@
+Only one test executable is using benchmark, and that is only for a badly
+placed benchmark.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -323,7 +323,7 @@ if(LEVELDB_BUILD_TESTS)
+
+ "${test_file}"
+ )
+- target_link_libraries("${test_target_name}" leveldb gmock gtest benchmark)
++ target_link_libraries("${test_target_name}" leveldb gmock gtest)
+ target_compile_definitions("${test_target_name}"
+ PRIVATE
+ ${LEVELDB_PLATFORM_NAME}=1
+--- a/db/db_test.cc
++++ b/db/db_test.cc
+@@ -9,7 +9,6 @@
+ #include <string>
+
+ #include "gtest/gtest.h"
+-#include "benchmark/benchmark.h"
+ #include "db/db_impl.h"
+ #include "db/filename.h"
+ #include "db/version_set.h"
+@@ -2301,6 +2300,7 @@ std::string MakeKey(unsigned int num) {
+ return std::string(buf);
+ }
+
++#if 0
+ static void BM_LogAndApply(benchmark::State& state) {
+ const int num_base_files = state.range(0);
+
+@@ -2357,10 +2357,10 @@ static void BM_LogAndApply(benchmark::State& state) {
+ }
+
+ BENCHMARK(BM_LogAndApply)->Arg(1)->Arg(100)->Arg(10000)->Arg(100000);
++#endif
+ } // namespace leveldb
+
+ int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+- benchmark::RunSpecifiedBenchmarks();
+ return RUN_ALL_TESTS();
+ }
diff --git a/dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch b/dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch
index 232d74aa2ccd..8165050048c9 100644
--- a/dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch
+++ b/dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch
@@ -1,6 +1,6 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -296,20 +296,12 @@
+@@ -296,20 +296,11 @@
set(build_gmock ON)
# This project is tested using GoogleTest.
@@ -19,7 +19,6 @@
- set_property(TARGET gmock
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- endif(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
-+ find_package(benchmark REQUIRED)
function(leveldb_test test_file)
get_filename_component(test_target_name "${test_file}" NAME_WE)
diff --git a/dev-libs/leveldb/leveldb-1.23.ebuild b/dev-libs/leveldb/leveldb-1.23-r1.ebuild
index c5f192ceb0ac..0d2eed03d098 100644
--- a/dev-libs/leveldb/leveldb-1.23.ebuild
+++ b/dev-libs/leveldb/leveldb-1.23-r1.ebuild
@@ -20,13 +20,11 @@ DEPEND="crc32c? ( dev-libs/crc32c )
snappy? ( app-arch/snappy )
tcmalloc? ( dev-util/google-perftools )"
RDEPEND="${DEPEND}"
-BDEPEND="test? (
- dev-cpp/benchmark
- dev-cpp/gtest
-)"
+BDEPEND="test? ( dev-cpp/gtest )"
PATCHES=(
"${FILESDIR}"/${PN}-1.23-system-testdeps.patch
+ "${FILESDIR}"/${PN}-1.23-remove-benchmark-dep.patch
)
src_configure() {