Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/leveldb/
Date: Fri, 31 Dec 2021 16:13:38
Message-Id: 1640966953.6f08888b9077ab113eff4c786b3b89c992334bf0.arthurzam@gentoo
1 commit: 6f08888b9077ab113eff4c786b3b89c992334bf0
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 31 16:09:13 2021 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 31 16:09:13 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f08888b
7
8 dev-libs/leveldb: enable RTTI for consumers
9
10 needed for ceph and plyvel and possibly other consumers
11 Arch Linux also enables it
12
13 https://github.com/google/leveldb/issues/731
14
15 Reported-by: Louis Sautier <sbraz <AT> gentoo.org>
16 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
17
18 dev-libs/leveldb/leveldb-1.23-r2.ebuild | 42 +++++++++++++++++++++++++++++++++
19 1 file changed, 42 insertions(+)
20
21 diff --git a/dev-libs/leveldb/leveldb-1.23-r2.ebuild b/dev-libs/leveldb/leveldb-1.23-r2.ebuild
22 new file mode 100644
23 index 000000000000..a245acc26713
24 --- /dev/null
25 +++ b/dev-libs/leveldb/leveldb-1.23-r2.ebuild
26 @@ -0,0 +1,42 @@
27 +# Copyright 1999-2021 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=7
31 +
32 +inherit cmake
33 +
34 +DESCRIPTION="A fast key-value storage library written at Google"
35 +HOMEPAGE="https://github.com/google/leveldb"
36 +SRC_URI="https://github.com/google/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
37 +
38 +LICENSE="BSD"
39 +SLOT="0/1"
40 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
41 +IUSE="+crc32c +snappy +tcmalloc test"
42 +
43 +RESTRICT="!test? ( test )"
44 +
45 +DEPEND="crc32c? ( dev-libs/crc32c )
46 + snappy? ( app-arch/snappy )
47 + tcmalloc? ( dev-util/google-perftools )"
48 +RDEPEND="${DEPEND}"
49 +BDEPEND="test? ( dev-cpp/gtest )"
50 +
51 +PATCHES=(
52 + "${FILESDIR}"/${PN}-1.23-system-testdeps.patch
53 + "${FILESDIR}"/${PN}-1.23-remove-benchmark-dep.patch
54 +)
55 +
56 +src_prepare() {
57 + sed -e '/fno-rtti/d' -i CMakeLists.txt || die
58 + cmake_src_prepare
59 +}
60 +
61 +src_configure() {
62 + local mycmakeargs=(
63 + -DBUILD_SHARED_LIBS=ON
64 + -DLEVELDB_BUILD_BENCHMARKS=OFF
65 + -DLEVELDB_BUILD_TESTS=$(usex test)
66 + )
67 + cmake_src_configure
68 +}