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/files
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/files')
-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
5 files changed, 276 insertions, 0 deletions
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)