aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2014-07-23 01:42:24 +0800
committersunpoet <sunpoet@FreeBSD.org>2014-07-23 01:42:24 +0800
commitab0a69a07fce799264c9bc6f92578c177674612a (patch)
treef773c03d39ff99ea1664a8efbab54fae9eb76f7a
parent96b25119a8511155360e0b2e804c3e1988608a89 (diff)
downloadfreebsd-ports-gnome-ab0a69a07fce799264c9bc6f92578c177674612a.tar.gz
freebsd-ports-gnome-ab0a69a07fce799264c9bc6f92578c177674612a.tar.zst
freebsd-ports-gnome-ab0a69a07fce799264c9bc6f92578c177674612a.zip
- Add rocksdb 3.2
RocksDB is an embeddable persistent key-value store for fast storage. RocksDB can also be the foundation for a client-server database but our current focus is on embedded workloads. RocksDB builds on LevelDB to be scalable to run on servers with many CPU cores, to efficiently use fast storage, to support IO-bound, in-memory and write-once workloads, and to be flexible to allow for innovation. GitHub repository at https://github.com/facebook/rocksdb WWW: http://rocksdb.org/
-rw-r--r--databases/Makefile1
-rw-r--r--databases/rocksdb/Makefile49
-rw-r--r--databases/rocksdb/distinfo2
-rw-r--r--databases/rocksdb/files/patch-Makefile11
-rw-r--r--databases/rocksdb/files/patch-port-port_posix.h27
-rw-r--r--databases/rocksdb/files/patch-util-env_posix.cc11
-rw-r--r--databases/rocksdb/files/patch-util-log_buffer.h10
-rw-r--r--databases/rocksdb/pkg-descr11
-rw-r--r--databases/rocksdb/pkg-plist41
9 files changed, 163 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 6bcead3aa287..8ac2d4ed8266 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -801,6 +801,7 @@
SUBDIR += redis
SUBDIR += redis-devel
SUBDIR += riak
+ SUBDIR += rocksdb
SUBDIR += rrdman
SUBDIR += rrdmerge
SUBDIR += rrdtool
diff --git a/databases/rocksdb/Makefile b/databases/rocksdb/Makefile
new file mode 100644
index 000000000000..ecaf0bbba1f8
--- /dev/null
+++ b/databases/rocksdb/Makefile
@@ -0,0 +1,49 @@
+# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= rocksdb
+PORTVERSION= 3.2
+CATEGORIES= databases
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Persistent key-value store for fast storage environments
+
+LICENSE= BSD3CLAUSE
+
+LIB_DEPENDS= libgflags.so:${PORTSDIR}/devel/gflags \
+ libsnappy.so:${PORTSDIR}/archivers/snappy
+
+ALL_TARGET= shared_lib all
+CFLAGS+= -I${LOCALBASE}/include
+CPPFLAGS+= -DOS_FREEBSD
+LDFLAGS+= -L${LOCALBASE}/lib
+#MAKE_JOBS_UNSAFE= yes
+USE_LDCONFIG= yes
+USES= compiler:c++11-lang gmake
+
+GH_ACCOUNT= facebook
+GH_COMMIT= 7a9dd5f
+GH_PROJECT= ${PORTNAME}
+GH_TAGNAME= ${PORTNAME}-${PORTVERSION}
+USE_GITHUB= yes
+
+PROGRAMS= blob_store_bench db_bench db_repl_stress db_sanity_test \
+ db_stress ldb log_and_apply_bench signal_test sst_dump \
+ table_reader_bench
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|-lpthread|-pthread|; s| -fno-builtin-memcmp||; s| -ltcmalloc||' ${WRKSRC}/build_tools/build_detect_platform
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/include/rocksdb/ ${STAGEDIR}${DATADIR}/
+ cd ${WRKSRC}/ && ${INSTALL_PROGRAM} ${PROGRAMS} ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKSRC}/include/rocksdb/* ${STAGEDIR}${PREFIX}/include/rocksdb/
+ ${INSTALL_LIB} ${WRKSRC}/librocksdb.a ${STAGEDIR}${PREFIX}/lib/
+ ${INSTALL_LIB} ${WRKSRC}/librocksdb.so ${STAGEDIR}${PREFIX}/lib/librocksdb.so.0
+ ${LN} -fs librocksdb.so.0 ${STAGEDIR}${PREFIX}/lib/librocksdb.so
+ ${INSTALL_DATA} ${WRKSRC}/build_config.mk ${STAGEDIR}${DATADIR}/
+
+regression-test test: build
+ cd ${WRKSRC}/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} check
+
+.include <bsd.port.mk>
diff --git a/databases/rocksdb/distinfo b/databases/rocksdb/distinfo
new file mode 100644
index 000000000000..c4446cd1cfce
--- /dev/null
+++ b/databases/rocksdb/distinfo
@@ -0,0 +1,2 @@
+SHA256 (rocksdb-3.2.tar.gz) = 818dc7ac70253c684c0ec6f8402950f33bd3e3dd1a3b2fbfd4fb390fba8d8939
+SIZE (rocksdb-3.2.tar.gz) = 991848
diff --git a/databases/rocksdb/files/patch-Makefile b/databases/rocksdb/files/patch-Makefile
new file mode 100644
index 000000000000..a350a1f8b62f
--- /dev/null
+++ b/databases/rocksdb/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig 2014-06-20 07:40:32.000000000 +0800
++++ Makefile 2014-07-22 23:24:39.702518883 +0800
+@@ -166,7 +166,7 @@
+ release tags valgrind_check whitebox_crash_test format static_lib shared_lib all \
+ dbg
+
+-all: $(LIBRARY) $(PROGRAMS) $(TESTS)
++all: $(LIBRARY) $(PROGRAMS)
+
+ static_lib: $(LIBRARY)
+
diff --git a/databases/rocksdb/files/patch-port-port_posix.h b/databases/rocksdb/files/patch-port-port_posix.h
new file mode 100644
index 000000000000..480e0e49c7d6
--- /dev/null
+++ b/databases/rocksdb/files/patch-port-port_posix.h
@@ -0,0 +1,27 @@
+--- port/port_posix.h.orig 2014-06-20 07:40:32.000000000 +0800
++++ port/port_posix.h 2014-07-22 22:10:43.906820844 +0800
+@@ -26,10 +26,22 @@
+ #else
+ #define PLATFORM_IS_LITTLE_ENDIAN false
+ #endif
+-#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) ||\
+- defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID)
++#elif defined(OS_FREEBSD)
+ #include <sys/types.h>
+ #include <sys/endian.h>
++ #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
++#elif defined(OS_OPENBSD) || defined(OS_NETBSD) ||\
++ defined(OS_DRAGONFLYBSD)
++ #include <sys/types.h>
++ #include <sys/endian.h>
++#elif defined(OS_HPUX)
++ #define PLATFORM_IS_LITTLE_ENDIAN false
++#elif defined(OS_ANDROID)
++ // Due to a bug in the NDK x86 <sys/endian.h> definition,
++ // _BYTE_ORDER must be used instead of __BYTE_ORDER on Android.
++ // See http://code.google.com/p/android/issues/detail?id=39824
++ #include <endian.h>
++ #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
+ #else
+ #include <endian.h>
+ #endif
diff --git a/databases/rocksdb/files/patch-util-env_posix.cc b/databases/rocksdb/files/patch-util-env_posix.cc
new file mode 100644
index 000000000000..0b6f85be128c
--- /dev/null
+++ b/databases/rocksdb/files/patch-util-env_posix.cc
@@ -0,0 +1,11 @@
+--- util/env_posix.cc.orig 2014-06-20 07:40:32.000000000 +0800
++++ util/env_posix.cc 2014-07-22 22:10:43.909825684 +0800
+@@ -1315,7 +1315,7 @@
+ }
+
+ virtual uint64_t NowNanos() {
+-#ifdef OS_LINUX
++#ifdef OS_FREEBSD
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec;
diff --git a/databases/rocksdb/files/patch-util-log_buffer.h b/databases/rocksdb/files/patch-util-log_buffer.h
new file mode 100644
index 000000000000..7046f34d3720
--- /dev/null
+++ b/databases/rocksdb/files/patch-util-log_buffer.h
@@ -0,0 +1,10 @@
+--- util/log_buffer.h.orig 2014-06-20 07:40:32.000000000 +0800
++++ util/log_buffer.h 2014-07-22 22:10:43.912828365 +0800
+@@ -5,6 +5,7 @@
+
+ #pragma once
+
++#include <sys/time.h>
+ #include "rocksdb/env.h"
+ #include "util/arena.h"
+ #include "util/autovector.h"
diff --git a/databases/rocksdb/pkg-descr b/databases/rocksdb/pkg-descr
new file mode 100644
index 000000000000..4e2f6c5459fc
--- /dev/null
+++ b/databases/rocksdb/pkg-descr
@@ -0,0 +1,11 @@
+RocksDB is an embeddable persistent key-value store for fast storage. RocksDB
+can also be the foundation for a client-server database but our current focus is
+on embedded workloads.
+
+RocksDB builds on LevelDB to be scalable to run on servers with many CPU cores,
+to efficiently use fast storage, to support IO-bound, in-memory and write-once
+workloads, and to be flexible to allow for innovation.
+
+GitHub repository at https://github.com/facebook/rocksdb
+
+WWW: http://rocksdb.org/
diff --git a/databases/rocksdb/pkg-plist b/databases/rocksdb/pkg-plist
new file mode 100644
index 000000000000..161e367e1cc5
--- /dev/null
+++ b/databases/rocksdb/pkg-plist
@@ -0,0 +1,41 @@
+bin/blob_store_bench
+bin/db_bench
+bin/db_repl_stress
+bin/db_sanity_test
+bin/db_stress
+bin/ldb
+bin/log_and_apply_bench
+bin/signal_test
+bin/sst_dump
+bin/table_reader_bench
+include/rocksdb/c.h
+include/rocksdb/cache.h
+include/rocksdb/compaction_filter.h
+include/rocksdb/comparator.h
+include/rocksdb/db.h
+include/rocksdb/env.h
+include/rocksdb/filter_policy.h
+include/rocksdb/flush_block_policy.h
+include/rocksdb/iterator.h
+include/rocksdb/ldb_tool.h
+include/rocksdb/memtablerep.h
+include/rocksdb/merge_operator.h
+include/rocksdb/options.h
+include/rocksdb/perf_context.h
+include/rocksdb/slice.h
+include/rocksdb/slice_transform.h
+include/rocksdb/statistics.h
+include/rocksdb/status.h
+include/rocksdb/table.h
+include/rocksdb/table_properties.h
+include/rocksdb/transaction_log.h
+include/rocksdb/types.h
+include/rocksdb/universal_compaction.h
+include/rocksdb/version.h
+include/rocksdb/write_batch.h
+lib/librocksdb.a
+lib/librocksdb.so
+lib/librocksdb.so.0
+%%DATADIR%%/build_config.mk
+@dirrm %%DATADIR%%
+@dirrm include/rocksdb