diff options
author | Peter Levine <plevine457@gmail.com> | 2023-02-07 21:27:48 -0500 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-02-09 16:42:48 +0200 |
commit | 9a2c62b023f130c3723fee1b3682e10004292747 (patch) | |
tree | 01f873ede83c77d84dce06bca208b313e3b12365 /dev-libs | |
parent | net-misc/remmina: use EAPI=8, remove telemetry flag, use webkit:4.1 (diff) | |
download | gentoo-9a2c62b023f130c3723fee1b3682e10004292747.tar.gz gentoo-9a2c62b023f130c3723fee1b3682e10004292747.tar.bz2 gentoo-9a2c62b023f130c3723fee1b3682e10004292747.zip |
dev-libs/leveldb: fix building against dev-cpp/gtest-1.13.0
Closes: https://bugs.gentoo.org/893378
Closes: https://github.com/gentoo/gentoo/pull/29476
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/leveldb/leveldb-1.23-r5.ebuild | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/dev-libs/leveldb/leveldb-1.23-r5.ebuild b/dev-libs/leveldb/leveldb-1.23-r5.ebuild new file mode 100644 index 000000000000..0bbce8ae65f1 --- /dev/null +++ b/dev-libs/leveldb/leveldb-1.23-r5.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2023 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 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+snappy +tcmalloc test" +RESTRICT="!test? ( test )" + +DEPEND=" + dev-libs/crc32c + snappy? ( app-arch/snappy:= ) + tcmalloc? ( dev-util/google-perftools:=[-minimal] ) +" +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=( + -DCMAKE_CXX_STANDARD=14 # C++14 or later required for >=gtest-1.13.0 + -DHAVE_CRC32C=ON + -DLEVELDB_BUILD_BENCHMARKS=OFF + -DHAVE_SNAPPY=$(usex snappy) + -DHAVE_TCMALLOC=$(usex tcmalloc) + -DLEVELDB_BUILD_TESTS=$(usex test) + ) + cmake_src_configure +} + +src_test() { + TEST_TMPDIR="${T}" TEMP="${T}" cmake_src_test +} |