dev-libs/leveldb: fix build on amd64-fbsd and keyword
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Tue, 6 Oct 2015 22:04:20 +0000 (00:04 +0200)
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Tue, 6 Oct 2015 22:04:20 +0000 (00:04 +0200)
Bug: https://bugs.gentoo.org/show_bug.cgi?id=562432

Package-Manager: portage-2.2.20.1

dev-libs/leveldb/leveldb-1.18-r1.ebuild

index d50d0bedf217aa6214a0e9b4d910a7d3cdaa5de3..e31c42c6746a25ecf61ce1d4ae503d8bbe6d2bed 100644 (file)
@@ -12,8 +12,8 @@ SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ~mips ~ppc ppc64 x86 ~amd64-linux ~x86-linux"
-IUSE="+snappy static-libs +tcmalloc"
+KEYWORDS="amd64 arm ~arm64 ~mips ~ppc ppc64 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc kernel_FreeBSD"
 
 DEPEND="tcmalloc? ( dev-util/google-perftools )
        snappy? (
@@ -38,8 +38,14 @@ src_configure() {
        # which the Makefile runs for us automatically.
        tc-export AR CC CXX
        export OPT="-DNDEBUG ${CPPFLAGS}"
+       local targetos
+       if use kernel_FreeBSD; then
+               targetos="FreeBSD"
+       else
+               targetos="Linux"
+       fi
 
-       TARGET_OS="Linux" \
+       TARGET_OS=${targetos} \
        USE_SNAPPY=$(usex snappy) \
        USE_TCMALLOC=no \
        TMPDIR=${T} \