From 24c755dc2ad54e7add8c111233094b5db08b0909 Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Fri, 4 Feb 2022 22:11:49 +0200 Subject: dev-libs/leveldb: various fixes - Redirect test suite temp directories to ${T}. This fixes an issue I had when running the test suite in some arm chroots. - Remove crc32c USE flag (otherwise uses bundled same code) - Add flags during compilation for the USE flags - Fix SLOT deps for app-arch/snappy and dev-util/google-perftools (thanks iwdevtools for noting those) - small styling fixes - all those changes were tested on all stabilized arches just to be sure. Signed-off-by: Arthur Zamarin --- dev-libs/leveldb/leveldb-1.23-r2.ebuild | 42 ---------------------------- dev-libs/leveldb/leveldb-1.23-r3.ebuild | 49 +++++++++++++++++++++++++++++++++ dev-libs/leveldb/metadata.xml | 3 -- 3 files changed, 49 insertions(+), 45 deletions(-) delete mode 100644 dev-libs/leveldb/leveldb-1.23-r2.ebuild create mode 100644 dev-libs/leveldb/leveldb-1.23-r3.ebuild (limited to 'dev-libs/leveldb') diff --git a/dev-libs/leveldb/leveldb-1.23-r2.ebuild b/dev-libs/leveldb/leveldb-1.23-r2.ebuild deleted file mode 100644 index 9adbd1551ad0..000000000000 --- a/dev-libs/leveldb/leveldb-1.23-r2.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2022 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="+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 -} diff --git a/dev-libs/leveldb/leveldb-1.23-r3.ebuild b/dev-libs/leveldb/leveldb-1.23-r3.ebuild new file mode 100644 index 000000000000..13684bcf2b50 --- /dev/null +++ b/dev-libs/leveldb/leveldb-1.23-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2022 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:= ) +" +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=( + -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 +} diff --git a/dev-libs/leveldb/metadata.xml b/dev-libs/leveldb/metadata.xml index e937f6bb5998..0c3bde759c88 100644 --- a/dev-libs/leveldb/metadata.xml +++ b/dev-libs/leveldb/metadata.xml @@ -9,7 +9,4 @@ google/leveldb https://github.com/google/leveldb/issues - - Link against dev-libs/crc32c for accelerated CRC32C calculation - -- cgit v1.2.3-65-gdbad