diff options
author | Guilherme Amadio <amadio@gentoo.org> | 2023-11-13 12:30:40 +0100 |
---|---|---|
committer | Guilherme Amadio <amadio@gentoo.org> | 2023-11-14 16:13:35 +0100 |
commit | 3d5d0e06dbabb3007ddf333526f6da1b6cc01a64 (patch) | |
tree | df7680617c3b589da5a454472d4a29e2f441f0d0 /dev-libs/rocksdb | |
parent | dev-libs/rocksdb: add myself as maintainer (diff) | |
download | gentoo-3d5d0e06dbabb3007ddf333526f6da1b6cc01a64.tar.gz gentoo-3d5d0e06dbabb3007ddf333526f6da1b6cc01a64.tar.bz2 gentoo-3d5d0e06dbabb3007ddf333526f6da1b6cc01a64.zip |
dev-libs/rocksdb: add 6.14.6-r3 with more features
- Update EAPI 7 -> 8
- Specify values for build options that may change defaults to
ensure that at least zlib, bz2, lz4, zstd, are actually enabled
- Add support for NUMA and TBB
Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
Diffstat (limited to 'dev-libs/rocksdb')
-rw-r--r-- | dev-libs/rocksdb/metadata.xml | 4 | ||||
-rw-r--r-- | dev-libs/rocksdb/rocksdb-6.14.6-r3.ebuild | 79 |
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-libs/rocksdb/metadata.xml b/dev-libs/rocksdb/metadata.xml index 17deb850e431..e8708dfa4d7c 100644 --- a/dev-libs/rocksdb/metadata.xml +++ b/dev-libs/rocksdb/metadata.xml @@ -12,4 +12,8 @@ <upstream> <remote-id type="github">facebook/rocksdb</remote-id> </upstream> + <use> + <flag name="numa">Enable NUMA support</flag> + <flag name="tbb">Enable support for <pkg>dev-cpp/tbb</pkg></flag> + </use> </pkgmetadata> diff --git a/dev-libs/rocksdb/rocksdb-6.14.6-r3.ebuild b/dev-libs/rocksdb/rocksdb-6.14.6-r3.ebuild new file mode 100644 index 000000000000..c146861ca057 --- /dev/null +++ b/dev-libs/rocksdb/rocksdb-6.14.6-r3.ebuild @@ -0,0 +1,79 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Embeddable, persistent key-value store for fast storage" +HOMEPAGE="http://rocksdb.org https://github.com/facebook/rocksdb/" +SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" +IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_sse4_2 jemalloc numa static-libs tbb test" + +# tests fail in this version +RESTRICT="test" + +DEPEND=" + app-arch/bzip2:= + app-arch/lz4:= + app-arch/snappy:= + app-arch/zstd:= + dev-cpp/gflags:= + sys-libs/zlib:= + sys-process/numactl + jemalloc? ( dev-libs/jemalloc:= ) + tbb? ( dev-cpp/tbb:= ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-6.17.3-libatomic.patch + "${FILESDIR}"/${PN}-6.14.6-gcc13.patch +) + +src_prepare() { + sed -i -e '/find_program(CCACHE_FOUND ccache)/d' CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DFAIL_ON_WARNINGS=OFF + -DFORCE_AVX2=$(usex cpu_flags_x86_avx2 ON OFF) + -DFORCE_AVX=$(usex cpu_flags_x86_avx ON OFF) + -DFORCE_SSE42=$(usex cpu_flags_x86_sse4_2 ON OFF) + -DPORTABLE=ON + -DWITH_BZ2=ON + -DWITH_CORE_TOOLS=ON + -DWITH_DYNAMIC_EXTENSION=ON + -DWITH_GFLAGS=ON + -DWITH_JEMALLOC=$(usex jemalloc ON OFF) + -DWITH_JNI=OFF + -DWITH_LIBRADOS=OFF + -DWITH_LZ4=ON + -DWITH_MD_LIBRARY=ON + -DWITH_NUMA=$(usex numa) + -DWITH_SNAPPY=ON + -DWITH_TBB=$(usex tbb) + -DWITH_ALL_TESTS=$(usex test) + -DWITH_TESTS=$(usex test) + -DWITH_TOOLS=ON + -DWITH_ZLIB=ON + -DWITH_ZSTD=ON + ) + # -DWITH_TESTS option works only with debug build, needs to be set here + # to not be overriden by cmake.eclass + CMAKE_BUILD_TYPE=$(usex test Debug RelWithDebInfo) cmake_src_configure +} + +src_install() { + cmake_src_install + + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/*.a || die + fi +} |