diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-06-23 07:00:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-06-23 07:00:28 +0100 |
commit | e23cdda4dbb0c83b9e682ab5e916085a35203da5 (patch) | |
tree | 5a4ac448a3b288b731c24d947e0ce52df3cab07b /dev-libs/leveldb/leveldb-1.20.ebuild | |
parent | 8187a741807f3e9a9e26304973cf18087dcf2560 (diff) |
gentoo resync : 23.06.2018
Diffstat (limited to 'dev-libs/leveldb/leveldb-1.20.ebuild')
-rw-r--r-- | dev-libs/leveldb/leveldb-1.20.ebuild | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-libs/leveldb/leveldb-1.20.ebuild b/dev-libs/leveldb/leveldb-1.20.ebuild new file mode 100644 index 000000000000..e8b13b5798a1 --- /dev/null +++ b/dev-libs/leveldb/leveldb-1.20.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib toolchain-funcs + +DESCRIPTION="a fast key-value storage library written at Google" +HOMEPAGE="http://leveldb.org/ https://github.com/google/leveldb" +SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +# https://github.com/google/leveldb/issues/536 +SLOT="0/1" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux" +IUSE="+snappy static-libs kernel_FreeBSD +tcmalloc test" + +DEPEND="tcmalloc? ( dev-util/google-perftools ) + snappy? ( + app-arch/snappy:= + )" +RDEPEND="${DEPEND}" + +# https://bugs.gentoo.org/651604 +REQUIRED_USE="snappy? ( !static-libs )" + +# https://github.com/google/leveldb/issues/234 +# https://github.com/google/leveldb/issues/236 +PATCHES=( "${FILESDIR}"/{${PN}-1.18-configure.patch,${P}-memenv-so.patch} ) + +src_configure() { + # These vars all get picked up by build_detect_platform + tc-export AR CC CXX + export OPT="-DNDEBUG ${CPPFLAGS}" + + TARGET_OS=$(usex kernel_FreeBSD FreeBSD Linux) \ + USE_SNAPPY=$(usex snappy) \ + USE_TCMALLOC=no \ + TMPDIR=${T} \ + sh -x ./build_detect_platform build_config.mk ./ || die +} + +src_compile() { + default + usex static-libs && emake out-static/lib{leveldb,memenv}.a + use test && emake static_programs +} + +src_test() { + emake check +} + +src_install() { + insinto /usr/include + doins -r include/. + # This matches the path Debian picked. Upstream provides no guidance. + insinto /usr/include/leveldb/helpers + doins helpers/memenv/memenv.h + + dolib.so out-shared/libleveldb*$(get_libname)* + use static-libs && dolib.a out-static/lib{leveldb,memenv}.a + dolib.so out-shared/libmemenv*$(get_libname)* +} |