summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-12-31 18:09:13 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2021-12-31 18:09:13 +0200
commit6f08888b9077ab113eff4c786b3b89c992334bf0 (patch)
tree633c5fa961782a3996f9ca5a777a5aa61ec7893d
parentdev-python/pygments: Keyword 2.11.0 ppc, #830328 (diff)
downloadgentoo-6f08888b9077ab113eff4c786b3b89c992334bf0.tar.gz
gentoo-6f08888b9077ab113eff4c786b3b89c992334bf0.tar.bz2
gentoo-6f08888b9077ab113eff4c786b3b89c992334bf0.zip
dev-libs/leveldb: enable RTTI for consumers
needed for ceph and plyvel and possibly other consumers Arch Linux also enables it https://github.com/google/leveldb/issues/731 Reported-by: Louis Sautier <sbraz@gentoo.org> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--dev-libs/leveldb/leveldb-1.23-r2.ebuild42
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-libs/leveldb/leveldb-1.23-r2.ebuild b/dev-libs/leveldb/leveldb-1.23-r2.ebuild
new file mode 100644
index 000000000000..a245acc26713
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.23-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="A fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://github.com/google/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/1"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+crc32c +snappy +tcmalloc test"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="crc32c? ( dev-libs/crc32c )
+ snappy? ( app-arch/snappy )
+ tcmalloc? ( dev-util/google-perftools )"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-cpp/gtest )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.23-system-testdeps.patch
+ "${FILESDIR}"/${PN}-1.23-remove-benchmark-dep.patch
+)
+
+src_prepare() {
+ sed -e '/fno-rtti/d' -i CMakeLists.txt || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+ -DLEVELDB_BUILD_BENCHMARKS=OFF
+ -DLEVELDB_BUILD_TESTS=$(usex test)
+ )
+ cmake_src_configure
+}