diff options
author | Marek Szuba <marecki@gentoo.org> | 2021-09-02 03:32:17 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2021-09-02 03:34:33 +0100 |
commit | 0ef031f6fe3e7439b9b50048c530819966aa49b2 (patch) | |
tree | 0721c123071ebce687df7d337e0b4ebb1a975461 /dev-libs/rocksdb | |
parent | app-portage/iwdevtools: add 0.5.1 (diff) | |
download | gentoo-0ef031f6fe3e7439b9b50048c530819966aa49b2.tar.gz gentoo-0ef031f6fe3e7439b9b50048c530819966aa49b2.tar.bz2 gentoo-0ef031f6fe3e7439b9b50048c530819966aa49b2.zip |
dev-libs/rocksdb: keyword 6.14.6-r1 for ~riscv
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-libs/rocksdb')
-rw-r--r-- | dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch | 29 | ||||
-rw-r--r-- | dev-libs/rocksdb/rocksdb-6.14.6-r1.ebuild | 6 |
2 files changed, 34 insertions, 1 deletions
diff --git a/dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch b/dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch new file mode 100644 index 000000000000..5ffcc8eee9ff --- /dev/null +++ b/dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch @@ -0,0 +1,29 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -325,6 +325,26 @@ + add_definitions(-DROCKSDB_SUPPORT_THREAD_LOCAL) + endif() + ++set(ATOMIC_TEST_SOURCE " ++#include <atomic> ++int main() { ++ std::atomic<bool> y (false); ++ std::atomic<uint64_t> x (0); ++ bool expected = true; ++ bool j = y.compare_exchange_weak(expected,false); ++ x++; ++ return 0; ++}") ++CHECK_CXX_SOURCE_COMPILES("${ATOMIC_TEST_SOURCE}" ATOMICS_ARE_BUILTIN) ++if (NOT ATOMICS_ARE_BUILTIN) ++ set(CMAKE_REQUIRED_LIBRARIES atomic) ++ check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMICS_REQUIRE_LIBATOMIC) ++ unset(CMAKE_REQUIRED_LIBRARIES) ++ if (ATOMICS_REQUIRE_LIBATOMIC) ++ string(APPEND CMAKE_CXX_STANDARD_LIBRARIES " -latomic") ++ endif () ++endif () ++ + option(FAIL_ON_WARNINGS "Treat compile warnings as errors" ON) + if(FAIL_ON_WARNINGS) + if(MSVC) diff --git a/dev-libs/rocksdb/rocksdb-6.14.6-r1.ebuild b/dev-libs/rocksdb/rocksdb-6.14.6-r1.ebuild index 52fa5972a51b..337b328a43cf 100644 --- a/dev-libs/rocksdb/rocksdb-6.14.6-r1.ebuild +++ b/dev-libs/rocksdb/rocksdb-6.14.6-r1.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~arm64 ~ppc64 ~x86" +KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv ~x86" IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_sse4_2 jemalloc static-libs" DEPEND=" @@ -25,6 +25,10 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-6.14.6-libatomic.patch +) + src_configure() { mycmakeargs=( -DFAIL_ON_WARNINGS=OFF |