summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/leveldb
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/leveldb')
-rw-r--r--dev-libs/leveldb/Manifest9
-rw-r--r--dev-libs/leveldb/files/leveldb-1.18-configure.patch52
-rw-r--r--dev-libs/leveldb/files/leveldb-1.18-mips.patch48
-rw-r--r--dev-libs/leveldb/files/leveldb-1.9.0-configure.patch35
-rw-r--r--dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch81
-rw-r--r--dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch60
-rw-r--r--dev-libs/leveldb/leveldb-1.10.0-r1.ebuild57
-rw-r--r--dev-libs/leveldb/leveldb-1.11.0-r1.ebuild57
-rw-r--r--dev-libs/leveldb/leveldb-1.12.0-r1.ebuild57
-rw-r--r--dev-libs/leveldb/leveldb-1.13.0-r1.ebuild57
-rw-r--r--dev-libs/leveldb/leveldb-1.14.0.ebuild53
-rw-r--r--dev-libs/leveldb/leveldb-1.15.0-r1.ebuild60
-rw-r--r--dev-libs/leveldb/leveldb-1.15.0.ebuild53
-rw-r--r--dev-libs/leveldb/leveldb-1.17.ebuild69
-rw-r--r--dev-libs/leveldb/leveldb-1.18-r1.ebuild67
-rw-r--r--dev-libs/leveldb/leveldb-1.18.ebuild66
-rw-r--r--dev-libs/leveldb/leveldb-1.9.0-r5.ebuild57
-rw-r--r--dev-libs/leveldb/leveldb-1.9.0-r6.ebuild58
-rw-r--r--dev-libs/leveldb/metadata.xml19
19 files changed, 1015 insertions, 0 deletions
diff --git a/dev-libs/leveldb/Manifest b/dev-libs/leveldb/Manifest
new file mode 100644
index 000000000000..017cd05794fc
--- /dev/null
+++ b/dev-libs/leveldb/Manifest
@@ -0,0 +1,9 @@
+DIST leveldb-1.10.0.tar.gz 204270 SHA256 84a4ab34671e1271d895f093932f8c8cfecb45b2e085da738671599825d12f62 SHA512 ba9829a203c25d00184b77382ee8db6b383058c527771a795443e0d3ae02b93dd29c3362f12fd89b08ac24f784b7ed2f3e3325b30abe2763df1cc9e4b8a12948 WHIRLPOOL d9b46a0f6586203091f2b89e4d141f8c7ba65ea994a2352d7f063796f50ba0e7a8c2d3a93ac2591a554b293ac8cb8a6eb26bfb2879f8859cb985db2cfd5985ae
+DIST leveldb-1.11.0.tar.gz 205413 SHA256 f2eaffcb60d6368088a7ef0c2b889132ea42483fed541a7601fa22e54a8839ac SHA512 2b01227d3339d5ab09a6488e43f4b92f1c8f23d9d9b3a1636710aadfebb2a291622b83d636c96314a651f7a774ec39b404490dcf7cd4ac6ec2997d5d651582aa WHIRLPOOL 410e0433a3eaabc838af22e6667c07e639c64da0143cc4af4ca88bb44dc74dabd749e90d2bb5766a448d8c0e952f7a099a593a558eb89cf43cab4f0404cd6ad1
+DIST leveldb-1.12.0.tar.gz 205436 SHA256 a50b44bcae9680c2872081df98395a34a1ac3162ea41f646676e53fb5f691108 SHA512 b0798ecc598a7dcee38887867521face02b11ec93bc55e28fb3e1e16fb9c4d2068564f7779849a0dc0d758ee9665c2297c004947bedd149e392c129fc39a921f WHIRLPOOL 834777dfa5f7e6ecfd1360185ac31389d8e2c92679f496f6925b902caccb42fa05523016bbb6908ffe2ad8c543d2c14f7913a79384f5e8aa05a75efd5be58cc4
+DIST leveldb-1.13.0.tar.gz 207718 SHA256 083497a48ff54a3470ab5085730306a536013c0db54db6854bd9c8638c4f33f7 SHA512 f7fd7421a0c00fadae44cae4be8a473a8827472229bf95aed0642401943f4fdf3d14026270dce59cd7bda2b2a2856d92c253a360c80ea8188a3fb52985b7e3e9 WHIRLPOOL a30a26bb40cf2573f5b135bbb28761f49ade8b478c5862462ce37b875d16802d01c2801353ec418db19d2f55c65fa3ef7e4fa63afaf4f3926dd19b471bc56487
+DIST leveldb-1.14.0.tar.gz 208282 SHA256 9122d2c248ba40d6ce46d0c3e4738fcfa941d0d93fdba20a101471a98e8b00a3 SHA512 c8dc837b77b7aa0be4fca03f31061685534d4280c59b929e5c3e7ef9ceb29e7ea75f8836a55c9df49cd3bc67143d91a2512fc5d9a181f440ec4961a256c77108 WHIRLPOOL 445589cb1f6f540a5a0cc395907f04bb785ea98441d6c9ea19eee6888ebbcc659cf9b9a44a87693336b9cf14a0645de43c0761ad9aafadbd33f157ef05687a6e
+DIST leveldb-1.15.0.tar.gz 205691 SHA256 d7c4ec571ef2ee9719f31db06344a1eba495e6abeeac1bc349d0d38a911c6680 SHA512 af5b18a7750ac553659075c1c34aa2fddf6322b6837f096589cf5908c7050fd19053cd98d19fd7097e0840392b318f0166360d3a0595adcaaabcfdf393246775 WHIRLPOOL 10136e1b8686ef2993e4b45b371bf749972fe84e0cd615bf18fc85de676e589951689adefc3a14625e66cf6cc4f70ffd99bf0c832209a97ceccee834853a7503
+DIST leveldb-1.17.tar.gz 207037 SHA256 a538ccdc5b9d42f7d64578d186eb17dc3a1b3dbbb3c14bbe0cbff961456bddd1 SHA512 d35401a92fa2b59c46e97ab94a9c70d0d5f97dbc7868a75354e088489338c078f47feaa3371489c481317b45ace6bd207d29676f5c18076ced86aa3f9fa44e58 WHIRLPOOL c3790b0cb38219cd609d9efe0568f47cd31515334ef1cbaff7e5efb97b300de113509833978688ae22d94aa7c9a0aa8c4d35268de1cb678a974dce6f7607a91f
+DIST leveldb-1.18.tar.gz 209376 SHA256 4aa1a7479bc567b95a59ac6fb79eba49f61884d6fd400f20b7af147d54c5cee5 SHA512 3d9c55a7bf8692914784ec33c273704ce9978496b071c7b661708f049d0d4ccd51a44441f50c3e536725caeb9896575192f52708a4bb1c0222cecdeec89919a3 WHIRLPOOL 3d6434919d49b23e6ae7305c189a8823032d9f350fbf429513e4ec851ee3974b4a272c9fc5265d551e849f8929266d8b40698951c6b55b333d7e37b2d5819cad
+DIST leveldb-1.9.0.tar.gz 203872 SHA256 b2699b04e5aba8e98382c4955b94725d1f76bd0b5decd60c5628205b717a1d4f SHA512 47b0a3272eef2d677ddeb8d0c973e59a1be4bff580528c3bc3f83a654f41485ecc86892d9124ce21ef747c220f98cdad687436849dc978adfd42f8c8c05b9160 WHIRLPOOL 301ba45968095420ff72da36f128bd916d4e039385270eecd8e077aac3781ed12931c9a7d426842e197fd62a99ad6477e5eabbca7524fcba2a185a702f4ef22a
diff --git a/dev-libs/leveldb/files/leveldb-1.18-configure.patch b/dev-libs/leveldb/files/leveldb-1.18-configure.patch
new file mode 100644
index 000000000000..ba30fc731ad5
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.18-configure.patch
@@ -0,0 +1,52 @@
+we'll handle configure ourselves in src_configure
+
+--- a/Makefile
++++ b/Makefile
+@@ -14,9 +14,6 @@ OPT ?= -O2 -DNDEBUG
+ # OPT ?= -O2 -g2 -DNDEBUG
+ #-----------------------------------------------
+
+-# detect what platform we're building on
+-$(shell CC="$(CC)" CXX="$(CXX)" TARGET_OS="$(TARGET_OS)" \
+- ./build_detect_platform build_config.mk ./)
+ # this file is generated by the previous line to set build flags and sources
+ include build_config.mk
+
+
+control snappy/tcmalloc explicitly
+
+--- a/build_detect_platform
++++ a/build_detect_platform
+@@ -190,6 +190,7 @@
+ COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX"
+ fi
+
++if [ "${USE_SNAPPY:-auto}" = "auto" ]; then
+ # Test whether Snappy library is installed
+ # http://code.google.com/p/snappy/
+ $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT 2>/dev/null <<EOF
+@@ -197,15 +198,24 @@
+ int main() {}
+ EOF
+ if [ "$?" = 0 ]; then
++ USE_SNAPPY="yes"
++ fi
++fi
++ if [ "$USE_SNAPPY" = "yes" ]; then
+ COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY"
+ PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy"
+ fi
+
++if [ "${USE_TCMALLOC:-auto}" = "auto" ]; then
+ # Test whether tcmalloc is available
+ $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF
+ int main() {}
+ EOF
+ if [ "$?" = 0 ]; then
++ USE_TCMALLOC="yes"
++ fi
++fi
++ if [ "$USE_TCMALLOC" = "yes" ]; then
+ PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc"
+ fi
+
diff --git a/dev-libs/leveldb/files/leveldb-1.18-mips.patch b/dev-libs/leveldb/files/leveldb-1.18-mips.patch
new file mode 100644
index 000000000000..379223d210b6
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.18-mips.patch
@@ -0,0 +1,48 @@
+https://github.com/google/leveldb/pull/272
+
+From f216400e702a51c900f2ce0285fdd6a21d3dd87b Mon Sep 17 00:00:00 2001
+From: Ben Chan <benchan@chromium.org>
+Date: Thu, 11 Sep 2014 21:38:48 -0700
+Subject: [PATCH] CHROMIUMOS: Add memory barrier implementation for MIPS.
+
+This CL is based on the patch authored by David Turner <digit@google.com>,
+see https://code.google.com/p/leveldb/issues/detail?id=109
+
+BUG=chromium:413517
+TEST=`emerge-{x86,amd64,arm,mipsel-o32}-generic leveldb`
+
+Reviewed-on: https://chromium-review.googlesource.com/217834
+---
+ port/atomic_pointer.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h
+index 35ae550..341909e 100644
+--- a/port/atomic_pointer.h
++++ b/port/atomic_pointer.h
+@@ -36,6 +36,8 @@
+ #define ARCH_CPU_X86_FAMILY 1
+ #elif defined(__ARMEL__)
+ #define ARCH_CPU_ARM_FAMILY 1
++#elif defined(__mips__)
++#define ARCH_CPU_MIPS_FAMILY 1
+ #elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
+ #define ARCH_CPU_PPC_FAMILY 1
+ #endif
+@@ -83,6 +85,13 @@ inline void MemoryBarrier() {
+ }
+ #define LEVELDB_HAVE_MEMORY_BARRIER
+
++// MIPS
++#elif defined(ARCH_CPU_MIPS_FAMILY) && defined(__GNUC__)
++inline void MemoryBarrier() {
++ __asm__ __volatile__("sync" : : : "memory");
++}
++#define LEVELDB_HAVE_MEMORY_BARRIER
++
+ #endif
+
+ // AtomicPointer built using platform-specific MemoryBarrier()
+--
+2.3.0
+
diff --git a/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch b/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch
new file mode 100644
index 000000000000..d25fe01f6835
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch
@@ -0,0 +1,35 @@
+diff --git a/build_detect_platform b/build_detect_platform
+index 5801d20..4b4bb0d 100755
+--- a/build_detect_platform
++++ b/build_detect_platform
+@@ -169,20 +169,30 @@ EOF
+
+ # Test whether Snappy library is installed
+ # http://code.google.com/p/snappy/
++if [ "${USE_SNAPPY:-auto}" = "auto" ]; then
+ $CXX $CXXFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
+ #include <snappy.h>
+ int main() {}
+ EOF
+ if [ "$?" = 0 ]; then
++ USE_SNAPPY="yes"
++ fi
++fi
++ if [ "$USE_SNAPPY" = "yes" ]; then
+ COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY"
+ PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy"
+ fi
+
+ # Test whether tcmalloc is available
++if [ "${USE_TCMALLOC:-auto}" = "auto" ]; then
+ $CXX $CXXFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null <<EOF
+ int main() {}
+ EOF
+ if [ "$?" = 0 ]; then
++ USE_TCMALLOC="yes"
++ fi
++fi
++ if [ "$USE_TCMALLOC" = "yes" ]; then
+ PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc"
+ fi
+ fi
diff --git a/dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch b/dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch
new file mode 100644
index 000000000000..1c21dbe09ff5
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch
@@ -0,0 +1,81 @@
+diff -ur leveldb-1.9.0.orig/db/db_test.cc leveldb-1.9.0/db/db_test.cc
+--- leveldb-1.9.0.orig/db/db_test.cc 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/db_test.cc 2014-03-28 22:58:59.000000000 +0000
+@@ -139,7 +139,7 @@
+
+ Status s = target()->NewWritableFile(f, r);
+ if (s.ok()) {
+- if (strstr(f.c_str(), ".sst") != NULL) {
++ if (strstr(f.c_str(), ".sst") != NULL || strstr(f.c_str(), ".ldb") != NULL) {
+ *r = new SSTableFile(this, *r);
+ } else if (strstr(f.c_str(), "MANIFEST") != NULL) {
+ *r = new ManifestFile(this, *r);
+diff -ur leveldb-1.9.0.orig/db/filename.cc leveldb-1.9.0/db/filename.cc
+--- leveldb-1.9.0.orig/db/filename.cc 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/filename.cc 2014-03-28 23:07:48.000000000 +0000
+@@ -34,6 +34,11 @@
+ return MakeFileName(name, number, "sst");
+ }
+
++std::string LDBTableFileName(const std::string& name, uint64_t number) {
++ assert(number > 0);
++ return MakeFileName(name, number, "ldb");
++}
++
+ std::string DescriptorFileName(const std::string& dbname, uint64_t number) {
+ assert(number > 0);
+ char buf[100];
+@@ -106,7 +111,7 @@
+ Slice suffix = rest;
+ if (suffix == Slice(".log")) {
+ *type = kLogFile;
+- } else if (suffix == Slice(".sst")) {
++ } else if (suffix == Slice(".sst") || suffix == Slice(".ldb")) {
+ *type = kTableFile;
+ } else if (suffix == Slice(".dbtmp")) {
+ *type = kTempFile;
+diff -ur leveldb-1.9.0.orig/db/filename.h leveldb-1.9.0/db/filename.h
+--- leveldb-1.9.0.orig/db/filename.h 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/filename.h 2014-03-28 23:07:43.000000000 +0000
+@@ -36,6 +36,7 @@
+ // in the db named by "dbname". The result will be prefixed with
+ // "dbname".
+ extern std::string TableFileName(const std::string& dbname, uint64_t number);
++extern std::string LDBTableFileName(const std::string& dbname, uint64_t number);
+
+ // Return the name of the descriptor file for the db named by
+ // "dbname" and the specified incarnation number. The result will be
+diff -ur leveldb-1.9.0.orig/db/repair.cc leveldb-1.9.0/db/repair.cc
+--- leveldb-1.9.0.orig/db/repair.cc 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/repair.cc 2014-03-28 23:13:28.000000000 +0000
+@@ -263,6 +263,14 @@
+ std::string fname = TableFileName(dbname_, t->meta.number);
+ int counter = 0;
+ Status status = env_->GetFileSize(fname, &t->meta.file_size);
++ if (!status.ok()) {
++ // Try alternate file name.
++ fname = LDBTableFileName(dbname_, t->meta.number);
++ Status s2 = env_->GetFileSize(fname, &t->meta.file_size);
++ if (s2.ok()) {
++ status = Status::OK();
++ }
++ }
+ if (status.ok()) {
+ Iterator* iter = table_cache_->NewIterator(
+ ReadOptions(), t->meta.number, t->meta.file_size);
+diff -ur leveldb-1.9.0.orig/db/table_cache.cc leveldb-1.9.0/db/table_cache.cc
+--- leveldb-1.9.0.orig/db/table_cache.cc 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/table_cache.cc 2014-03-28 23:12:39.000000000 +0000
+@@ -54,6 +54,12 @@
+ RandomAccessFile* file = NULL;
+ Table* table = NULL;
+ s = env_->NewRandomAccessFile(fname, &file);
++ if (!s.ok()) {
++ std::string ldb_fname = LDBTableFileName(dbname_, file_number);
++ if (env_->NewRandomAccessFile(ldb_fname, &file).ok()) {
++ s = Status::OK();
++ }
++ }
+ if (s.ok()) {
+ s = Table::Open(*options_, file, file_size, &table);
+ }
diff --git a/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch b/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch
new file mode 100644
index 000000000000..0df587a3f9c9
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch
@@ -0,0 +1,60 @@
+--- leveldb-1.9.0.orig/Makefile 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/Makefile 2014-03-28 22:11:05.000000000 +0000
+@@ -61,37 +61,45 @@
+ # Should we build shared libraries?
+ ifneq ($(PLATFORM_SHARED_EXT),)
+
++SHARED1 = $(PLATFORM_SHARED_EXT)
++
+ ifneq ($(PLATFORM_SHARED_VERSIONED),true)
+-SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
+ SHARED2 = $(SHARED1)
+ SHARED3 = $(SHARED1)
+-SHARED = $(SHARED1)
++SHARED=%.$(SHARED1)
+ else
+ # Update db.h if you change these.
+ SHARED_MAJOR = 1
+ SHARED_MINOR = 9
+-SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
+ SHARED2 = $(SHARED1).$(SHARED_MAJOR)
+ SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
+-SHARED = $(SHARED1) $(SHARED2) $(SHARED3)
+-$(SHARED1): $(SHARED3)
+- ln -fs $(SHARED3) $(SHARED1)
+-$(SHARED2): $(SHARED3)
+- ln -fs $(SHARED3) $(SHARED2)
++SHARED=%.$(SHARED1) %.$(SHARED2) %.$(SHARED3)
++%.$(SHARED1): %.$(SHARED3)
++ ln -fs $< $@
++%.$(SHARED2): %.$(SHARED3)
++ ln -fs $< $@
+ endif
+
+-$(SHARED3):
+- $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SOURCES) -o $(SHARED3) $(LIBS)
++%.SHARED: $(SHARED)
++ @true
++
++%.$(SHARED3):
++ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$*.$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $^ -o $@ $(LIBS)
++
++libleveldb.$(SHARED3): $(SOURCES)
++libmemenv.$(SHARED3): $(MEMENV_SOURCES)
++
++.SECONDARY: $(subst %,libleveldb,$(SHARED)) $(subst %,libmemenv,$(SHARED))
+
+ endif # PLATFORM_SHARED_EXT
+
+-all: $(SHARED) $(LIBRARY)
++all: libleveldb.SHARED $(LIBRARY)
+
+ check: all $(PROGRAMS) $(TESTS)
+ for t in $(TESTS); do echo "***** Running $$t"; ./$$t || exit 1; done
+
+ clean:
+- -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
++ -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(subst %,libleveldb,$(SHARED)) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
+ -rm -rf ios-x86/* ios-arm/*
+
+ $(LIBRARY): $(LIBOBJECTS)
diff --git a/dev-libs/leveldb/leveldb-1.10.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.10.0-r1.ebuild
new file mode 100644
index 000000000000..79db7a2a2680
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.10.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.11.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.11.0-r1.ebuild
new file mode 100644
index 000000000000..79db7a2a2680
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.11.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.12.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.12.0-r1.ebuild
new file mode 100644
index 000000000000..79db7a2a2680
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.12.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.13.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.13.0-r1.ebuild
new file mode 100644
index 000000000000..79db7a2a2680
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.13.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.14.0.ebuild b/dev-libs/leveldb/leveldb-1.14.0.ebuild
new file mode 100644
index 000000000000..7d05e71e60b1
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.14.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild
new file mode 100644
index 000000000000..4008eff31828
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cp "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" "${S}/patch"
+ sed -i 's/\(^ SHARED_MINOR =\).*/\1 15/' "${S}/patch"
+ epatch "${S}/patch"
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a libmemenv.SHARED
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}
diff --git a/dev-libs/leveldb/leveldb-1.15.0.ebuild b/dev-libs/leveldb/leveldb-1.15.0.ebuild
new file mode 100644
index 000000000000..7d05e71e60b1
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.15.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.17.ebuild b/dev-libs/leveldb/leveldb-1.17.ebuild
new file mode 100644
index 000000000000..a80706c56823
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.17.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator
+
+GITCRAP="e353fbc7ea81"
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+#SRC_URI="https://${PN}.googlecode.com/archive/${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="http://dev.gentoo.org/~floppym/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${GITCRAP}"
+
+src_prepare() {
+ local SHARED_MINOR=$(get_version_component_range 2)
+ cp "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" "${S}/patch"
+ sed -i "s/\(^ SHARED_MINOR =\).*/\1 ${SHARED_MINOR}/" "${S}/patch"
+ epatch "${S}/patch"
+
+ # lacks execution bit
+ chmod +x "${S}"/build_detect_platform || die
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a libmemenv.SHARED
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}
diff --git a/dev-libs/leveldb/leveldb-1.18-r1.ebuild b/dev-libs/leveldb/leveldb-1.18-r1.ebuild
new file mode 100644
index 000000000000..6eed5f75a689
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.18-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator
+
+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"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 ~mips ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.18-mips.patch
+ epatch "${FILESDIR}"/${PN}-1.18-configure.patch #541186
+
+ local SHARED_MINOR=$(get_version_component_range 2)
+ sed \
+ -e "s/\(^ SHARED_MINOR =\).*/\1 ${SHARED_MINOR}/" \
+ "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" > memenv-so.patch
+ epatch memenv-so.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+
+ TARGET_OS="Linux" \
+ USE_SNAPPY=$(usex snappy) \
+ USE_TCMALLOC=no \
+ TMPDIR=${T} \
+ sh -x ./build_detect_platform build_config.mk ./
+}
+
+src_compile() {
+ emake $(usex static-libs 'libmemenv.a' 'LIBRARY=') all libmemenv.SHARED
+}
+
+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 libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}
diff --git a/dev-libs/leveldb/leveldb-1.18.ebuild b/dev-libs/leveldb/leveldb-1.18.ebuild
new file mode 100644
index 000000000000..65427878977e
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.18.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+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"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.18-mips.patch
+
+ local SHARED_MINOR=$(get_version_component_range 2)
+ sed \
+ -e "s/\(^ SHARED_MINOR =\).*/\1 ${SHARED_MINOR}/" \
+ "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" > memenv-so.patch
+ epatch memenv-so.patch
+
+ # lacks execution bit
+ chmod +x build_detect_platform || die
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs 'libmemenv.a' 'LIBRARY=') all libmemenv.SHARED
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}
diff --git a/dev-libs/leveldb/leveldb-1.9.0-r5.ebuild b/dev-libs/leveldb/leveldb-1.9.0-r5.ebuild
new file mode 100644
index 000000000000..7c76f69ffee1
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.9.0-r5.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86"
+IUSE="+snappy static-libs"
+
+DEPEND="
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-configure.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.9.0-r6.ebuild b/dev-libs/leveldb/leveldb-1.9.0-r6.ebuild
new file mode 100644
index 000000000000..b5ee4e054082
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.9.0-r6.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86"
+IUSE="+snappy static-libs"
+
+DEPEND="
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-configure.patch
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/metadata.xml b/dev-libs/leveldb/metadata.xml
new file mode 100644
index 000000000000..16d6745c22cf
--- /dev/null
+++ b/dev-libs/leveldb/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>bugs@bergstroem.nu</email>
+ <name>Johan Bergstroem</name>
+ </maintainer>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <use>
+ <flag name="snappy">support the snappy compression library</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">google/leveldb</remote-id>
+ </upstream>
+</pkgmetadata>