level this port to the ground; while upstream moved forward this one

never leveled up and stuck behind.

ok fcambus@ jmatthew@
This commit is contained in:
jasper 2017-08-22 06:03:10 +00:00
parent ee601892a3
commit 3276fb6282
9 changed files with 1 additions and 211 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.337 2017/07/07 19:58:35 landry Exp $
# $OpenBSD: Makefile,v 1.338 2017/08/22 06:03:10 jasper Exp $
SUBDIR =
SUBDIR += apache-couchdb
@ -24,7 +24,6 @@
SUBDIR += ksql
SUBDIR += kyotocabinet
SUBDIR += lbdb
SUBDIR += leveldb
SUBDIR += libdbi
SUBDIR += libdbi-drivers
SUBDIR += libhiredis

View File

@ -1,39 +0,0 @@
# $OpenBSD: Makefile,v 1.17 2017/07/26 22:45:16 sthen Exp $
#'atomic_pointer.h: error Please implement AtomicPointer for this platform' on other archs
ONLY_FOR_ARCHS= i386 amd64
COMMENT= fast and lightweight key/value database library
DISTNAME= leveldb-1.5.0
SHARED_LIBS= leveldb 1.0
CATEGORIES= databases
REVISION= 4
HOMEPAGE= https://github.com/google/leveldb
# BSD3
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += c m pthread ${COMPILER_LIBCXX}
MASTER_SITES= ${MASTER_SITE_GOOGLECODE:=leveldb/}
USE_GMAKE= Yes
MAKE_ENV+= CXX=${CXX} OPT="${CXXFLAGS}" \
SHARED_MAJOR=${LIBleveldb_VERSION:R} \
SHARED_MINOR=${LIBleveldb_VERSION:E}
TEST_TARGET= check
DOC= ${PREFIX}/share/doc/leveldb/
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/libleveldb.{a,so.${LIBleveldb_VERSION}} \
${PREFIX}/lib/
${INSTALL_DATA_DIR} ${DOC}
cd ${WRKSRC}/doc/ && tar cf - . | tar xf - -C ${DOC}
${INSTALL_DATA_DIR} ${PREFIX}/include/leveldb/
cd ${WRKSRC}/include/ && tar cf - . | tar xf - -C ${PREFIX}/include/
.include <bsd.port.mk>

View File

@ -1,2 +0,0 @@
SHA256 (leveldb-1.5.0.tar.gz) = y3NImvhNnZfT59I0ovXjoMif+ttlfn3Z6QRyJ3eOV7o=
SIZE (leveldb-1.5.0.tar.gz) = 199231

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-Makefile,v 1.3 2013/03/21 21:30:30 pascal Exp $
Allow SHARED_MAJOR and SHARED_MINOR to be overridden.
This doesn't affect kMajorVersion and kMinorVersion in db.h,
but nothing uses them anyway.
Do not use SONAME.
--- Makefile.orig Wed May 30 18:56:59 2012
+++ Makefile Tue Mar 19 14:06:40 2013
@@ -69,8 +69,8 @@ SHARED3 = $(SHARED1)
SHARED = $(SHARED1)
else
# Update db.h if you change these.
-SHARED_MAJOR = 1
-SHARED_MINOR = 5
+SHARED_MAJOR ?= 1
+SHARED_MINOR ?= 5
SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
SHARED2 = $(SHARED1).$(SHARED_MAJOR)
SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
@@ -82,7 +82,7 @@ $(SHARED2): $(SHARED3)
endif
$(SHARED3):
- $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SOURCES) -o $(SHARED3)
+ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SOURCES) -o $(SHARED3)
endif # PLATFORM_SHARED_EXT

View File

@ -1,58 +0,0 @@
$OpenBSD: patch-build_detect_platform,v 1.5 2013/03/21 21:30:30 pascal Exp $
Skip checks for <cstdatomic>, snappy and tcmalloc. We don't
have any of these, and with our current binutils, c++ -o /dev/null
deletes /dev/null, which is kind of bad.
Do not use SONAME.
--- build_detect_platform.orig Wed May 30 18:56:59 2012
+++ build_detect_platform Tue Mar 19 14:05:59 2013
@@ -51,7 +51,7 @@ PLATFORM_CCFLAGS=
PLATFORM_CXXFLAGS=
PLATFORM_LDFLAGS=
PLATFORM_SHARED_EXT="so"
-PLATFORM_SHARED_LDFLAGS="-shared -Wl,-soname -Wl,"
+PLATFORM_SHARED_LDFLAGS="-shared"
PLATFORM_SHARED_CFLAGS="-fPIC"
PLATFORM_SHARED_VERSIONED=true
@@ -132,36 +132,8 @@ if [ "$CROSS_COMPILE" = "true" ]; then
# Cross-compiling; do not try any compilation tests.
true
else
- # If -std=c++0x works, use <cstdatomic>. Otherwise use port_posix.h.
- $CXX $CFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null <<EOF
- #include <cstdatomic>
- int main() {}
-EOF
- if [ "$?" = 0 ]; then
- COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX -DLEVELDB_CSTDATOMIC_PRESENT"
- PLATFORM_CXXFLAGS="-std=c++0x"
- else
- COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX"
- fi
-
- # Test whether Snappy library is installed
- # http://code.google.com/p/snappy/
- $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
- #include <snappy.h>
- int main() {}
-EOF
- if [ "$?" = 0 ]; then
- COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY"
- PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lsnappy"
- fi
-
- # Test whether tcmalloc is available
- $CXX $CFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null <<EOF
- int main() {}
-EOF
- if [ "$?" = 0 ]; then
- PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -ltcmalloc"
- fi
+ # skip checks for <cstdatomic>, snappy and tcmalloc
+ COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX"
fi
PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS"

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-port_port_posix_h,v 1.2 2012/08/21 00:28:34 jmatthew Exp $
#define PLATFORM_IS_LITTLE_ENDIAN appropriately.
See http://code.google.com/p/leveldb/issues/detail?id=98
--- port/port_posix.h.orig Thu May 31 02:56:59 2012
+++ port/port_posix.h Thu Aug 16 12:00:33 2012
@@ -25,6 +25,7 @@
defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID)
#include <sys/types.h>
#include <sys/endian.h>
+ #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
#else
#include <endian.h>
#endif

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-util_coding_cc,v 1.1 2012/08/21 00:28:34 jmatthew Exp $
Use the endianness #define from port_posix.h
See http://code.google.com/p/leveldb/issues/detail?id=110
--- util/coding.cc.orig Thu Aug 16 12:00:57 2012
+++ util/coding.cc Thu Aug 16 12:01:16 2012
@@ -7,7 +7,7 @@
namespace leveldb {
void EncodeFixed32(char* buf, uint32_t value) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if PLATFORM_IS_LITTLE_ENDIAN
memcpy(buf, &value, sizeof(value));
#else
buf[0] = value & 0xff;
@@ -18,7 +18,7 @@ void EncodeFixed32(char* buf, uint32_t value) {
}
void EncodeFixed64(char* buf, uint64_t value) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if PLATFORM_IS_LITTLE_ENDIAN
memcpy(buf, &value, sizeof(value));
#else
buf[0] = value & 0xff;

View File

@ -1,13 +0,0 @@
LevelDB is a fast key-value storage library written at Google that
provides an ordered mapping from string keys to string values.
Features:
- Keys and values are arbitrary byte arrays.
- Data is stored sorted by key.
- Callers can provide a custom comparison function to override
the sort order.
- The basic operations are Put(key,value), Get(key), Delete(key).
- Multiple changes can be made in one atomic batch.
- Users can create a transient snapshot to get a consistent view
of data.
- Forward and backward iteration is supported over the data.

View File

@ -1,27 +0,0 @@
@comment $OpenBSD: PLIST,v 1.5 2013/03/21 21:36:02 pascal Exp $
include/leveldb/
include/leveldb/c.h
include/leveldb/cache.h
include/leveldb/comparator.h
include/leveldb/db.h
include/leveldb/env.h
include/leveldb/filter_policy.h
include/leveldb/iterator.h
include/leveldb/options.h
include/leveldb/slice.h
include/leveldb/status.h
include/leveldb/table.h
include/leveldb/table_builder.h
include/leveldb/write_batch.h
lib/libleveldb.a
@lib lib/libleveldb.so.${LIBleveldb_VERSION}
share/doc/leveldb/
share/doc/leveldb/bench/
share/doc/leveldb/bench/db_bench_sqlite3.cc
share/doc/leveldb/bench/db_bench_tree_db.cc
share/doc/leveldb/benchmark.html
share/doc/leveldb/doc.css
share/doc/leveldb/impl.html
share/doc/leveldb/index.html
share/doc/leveldb/log_format.txt
share/doc/leveldb/table_format.txt