Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jul 2014 17:42:24 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r362558 - in head/databases: . rocksdb rocksdb/files
Message-ID:  <201407221742.s6MHgOIS007993@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Tue Jul 22 17:42:24 2014
New Revision: 362558
URL: http://svnweb.freebsd.org/changeset/ports/362558
QAT: https://qat.redports.org/buildarchive/r362558/

Log:
  - 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/

Added:
  head/databases/rocksdb/
  head/databases/rocksdb/Makefile   (contents, props changed)
  head/databases/rocksdb/distinfo   (contents, props changed)
  head/databases/rocksdb/files/
  head/databases/rocksdb/files/patch-Makefile   (contents, props changed)
  head/databases/rocksdb/files/patch-port-port_posix.h   (contents, props changed)
  head/databases/rocksdb/files/patch-util-env_posix.cc   (contents, props changed)
  head/databases/rocksdb/files/patch-util-log_buffer.h   (contents, props changed)
  head/databases/rocksdb/pkg-descr   (contents, props changed)
  head/databases/rocksdb/pkg-plist   (contents, props changed)
Modified:
  head/databases/Makefile

Modified: head/databases/Makefile
==============================================================================
--- head/databases/Makefile	Tue Jul 22 17:42:01 2014	(r362557)
+++ head/databases/Makefile	Tue Jul 22 17:42:24 2014	(r362558)
@@ -801,6 +801,7 @@
     SUBDIR += redis
     SUBDIR += redis-devel
     SUBDIR += riak
+    SUBDIR += rocksdb
     SUBDIR += rrdman
     SUBDIR += rrdmerge
     SUBDIR += rrdtool

Added: head/databases/rocksdb/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/rocksdb/Makefile	Tue Jul 22 17:42:24 2014	(r362558)
@@ -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>

Added: head/databases/rocksdb/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/rocksdb/distinfo	Tue Jul 22 17:42:24 2014	(r362558)
@@ -0,0 +1,2 @@
+SHA256 (rocksdb-3.2.tar.gz) = 818dc7ac70253c684c0ec6f8402950f33bd3e3dd1a3b2fbfd4fb390fba8d8939
+SIZE (rocksdb-3.2.tar.gz) = 991848

Added: head/databases/rocksdb/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/rocksdb/files/patch-Makefile	Tue Jul 22 17:42:24 2014	(r362558)
@@ -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)
+ 

Added: head/databases/rocksdb/files/patch-port-port_posix.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/rocksdb/files/patch-port-port_posix.h	Tue Jul 22 17:42:24 2014	(r362558)
@@ -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

Added: head/databases/rocksdb/files/patch-util-env_posix.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/rocksdb/files/patch-util-env_posix.cc	Tue Jul 22 17:42:24 2014	(r362558)
@@ -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;

Added: head/databases/rocksdb/files/patch-util-log_buffer.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/rocksdb/files/patch-util-log_buffer.h	Tue Jul 22 17:42:24 2014	(r362558)
@@ -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"

Added: head/databases/rocksdb/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/rocksdb/pkg-descr	Tue Jul 22 17:42:24 2014	(r362558)
@@ -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/

Added: head/databases/rocksdb/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/rocksdb/pkg-plist	Tue Jul 22 17:42:24 2014	(r362558)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407221742.s6MHgOIS007993>