diff options
Diffstat (limited to 'dev-libs/leveldb/files')
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.18-configure.patch | 52 | ||||
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.18-mips.patch | 48 | ||||
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.20-memenv-so.patch | 33 | ||||
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.9.0-configure.patch | 35 | ||||
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch | 81 | ||||
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch | 60 |
6 files changed, 0 insertions, 309 deletions
diff --git a/dev-libs/leveldb/files/leveldb-1.18-configure.patch b/dev-libs/leveldb/files/leveldb-1.18-configure.patch deleted file mode 100644 index ba30fc731ad5..000000000000 --- a/dev-libs/leveldb/files/leveldb-1.18-configure.patch +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index 379223d210b6..000000000000 --- a/dev-libs/leveldb/files/leveldb-1.18-mips.patch +++ /dev/null @@ -1,48 +0,0 @@ -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.20-memenv-so.patch b/dev-libs/leveldb/files/leveldb-1.20-memenv-so.patch deleted file mode 100644 index d443ef0ad262..000000000000 --- a/dev-libs/leveldb/files/leveldb-1.20-memenv-so.patch +++ /dev/null @@ -1,33 +0,0 @@ -# Create libmemenv.so and don't compile programs by default -# Add a static_programs target to compile test programs ---- a/Makefile 2018-06-03 16:52:28.839614213 +0200 -+++ b/Makefile 2018-06-03 16:52:18.209544310 +0200 -@@ -128,15 +128,27 @@ - ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB1) - $(SHARED_OUTDIR)/$(SHARED_LIB2): $(SHARED_OUTDIR)/$(SHARED_LIB3) - ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB2) -+SHARED_MEMENV_LIB1 = libmemenv.$(PLATFORM_SHARED_EXT) -+SHARED_MEMENV_LIB2 = $(SHARED_MEMENV_LIB1).$(SHARED_VERSION_MAJOR) -+SHARED_MEMENV_LIB3 = $(SHARED_MEMENV_LIB1).$(SHARED_VERSION_MAJOR).$(SHARED_VERSION_MINOR) -+SHARED_MEMENV_LIBS = $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB1) $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB2) $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3) -+$(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB1): $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3) -+ ln -fs $(SHARED_MEMENV_LIB3) $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB1) -+$(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB2): $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3) -+ ln -fs $(SHARED_MEMENV_LIB3) $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB2) - SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.a - endif - - $(SHARED_OUTDIR)/$(SHARED_LIB3): $(SHARED_LIBOBJECTS) - $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED_LIB2) $(SHARED_LIBOBJECTS) -o $(SHARED_OUTDIR)/$(SHARED_LIB3) $(LIBS) -+$(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3): $(SHARED_MEMENVOBJECTS) -+ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED_MEMENV_LIB2) $(SHARED_MEMENVOBJECTS) -o $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3) $(LIBS) - - endif # PLATFORM_SHARED_EXT - --all: $(SHARED_LIBS) $(SHARED_PROGRAMS) $(STATIC_OUTDIR)/libleveldb.a $(STATIC_OUTDIR)/libmemenv.a $(STATIC_PROGRAMS) -+all: $(SHARED_LIBS) $(SHARED_MEMENV_LIBS) -+ -+static_programs: $(STATIC_PROGRAMS) - - check: $(STATIC_PROGRAMS) - for t in $(notdir $(TESTS)); do echo "***** Running $$t"; $(STATIC_OUTDIR)/$$t || exit 1; done diff --git a/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch b/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch deleted file mode 100644 index d25fe01f6835..000000000000 --- a/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 1c21dbe09ff5..000000000000 --- a/dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch +++ /dev/null @@ -1,81 +0,0 @@ -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 deleted file mode 100644 index 0df587a3f9c9..000000000000 --- a/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- 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) |