Subject: [alpine-aports] [PATCH] testing/rocksdb: new aport

From: James Bowes <[email-masked]>
Date: Mon, 15 Feb 2016 16:40:24 -0400

http://rocksdb.org
A persistent key-value store for fast storage environments
---
 testing/rocksdb/10-support-busybox-install.patch   | 20 ++++++++
 .../rocksdb/20-skip-glibc-specific-features.patch  | 23 ++++++++++
 testing/rocksdb/APKBUILD                           | 53 ++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 testing/rocksdb/10-support-busybox-install.patch
 create mode 100644 testing/rocksdb/20-skip-glibc-specific-features.patch
 create mode 100644 testing/rocksdb/APKBUILD

diff --git a/testing/rocksdb/10-support-busybox-install.patch b/testing/rocksdb/10-support-busybox-install.patch
new file mode 100644
index 0000000..8974dfa
--- /dev/null
+++ b/testing/rocksdb/10-support-busybox-install.patch
@@ -0,0 +1,20 @@
+--- a/Makefile
++++ b/Makefile
+@@ -996,14 +996,14 @@ install-headers:
+ 		install -d $(INSTALL_PATH)/$$header_dir; \
+ 	done
+ 	for header in `find "include/rocksdb" -type f -name *.h`; do \
+-		install -C -m 644 $$header $(INSTALL_PATH)/$$header; \
++		install -c -m 644 $$header $(INSTALL_PATH)/$$header; \
+ 	done
+
+ install-static: install-headers $(LIBRARY)
+-	install -C -m 755 $(LIBRARY) $(INSTALL_PATH)/lib
++	install -c -m 755 $(LIBRARY) $(INSTALL_PATH)/lib
+
+ install-shared: install-headers $(SHARED4)
+-	install -C -m 755 $(SHARED4) $(INSTALL_PATH)/lib && \
++	install -c -m 755 $(SHARED4) $(INSTALL_PATH)/lib && \
+ 		ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED3) && \
+ 		ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED2) && \
+ 		ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED1)
diff --git a/testing/rocksdb/20-skip-glibc-specific-features.patch b/testing/rocksdb/20-skip-glibc-specific-features.patch
new file mode 100644
index 0000000..b331a42
--- /dev/null
+++ b/testing/rocksdb/20-skip-glibc-specific-features.patch
@@ -0,0 +1,23 @@
+--- a/port/port_posix.cc
++++ b/port/port_posix.cc
+@@ -32,7 +32,7 @@ static int PthreadCall(const char* label, int result) {
+ }
+
+ Mutex::Mutex(bool adaptive) {
+-#ifdef OS_LINUX
++#if 0
+   if (!adaptive) {
+     PthreadCall("init mutex", pthread_mutex_init(&mu_, nullptr));
+   } else {
+--- a/port/stack_trace.cc
++++ b/port/stack_trace.cc
+@@ -5,8 +5,7 @@
+ //
+ #include "port/stack_trace.h"
+
+-#if defined(ROCKSDB_LITE) || !(defined(OS_LINUX) || defined(OS_MACOSX)) || \
+-    defined(CYGWIN)
++#if 1
+
+ // noop
+
diff --git a/testing/rocksdb/APKBUILD b/testing/rocksdb/APKBUILD
new file mode 100644
index 0000000..e05e02a
--- /dev/null
+++ b/testing/rocksdb/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: James Bowes <[email-masked]>
+# Maintainer:
+pkgname=rocksdb
+pkgver=4.2
+pkgrel=0
+pkgdesc="A persistent key-value store for fast storage environments"
+url="http://rocksdb.org"
+arch="all"
+license="BSD"
+depends=""
+depends_dev=""
+makedepends="$depends_dev linux-headers snappy-dev zlib-dev bzip2-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="saveas-https://github.com/facebook/$pkgname/archive/v$pkgver.tar.gz/$pkgname-$pkgver.tar.gz
+	10-support-busybox-install.patch
+	20-skip-glibc-specific-features.patch"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	make shared_lib
+}
+
+package() {
+	cd "$_builddir"
+	INSTALL_PATH="$pkgdir"/usr make install-shared
+	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+	mkdir -p "$pkgdir"/usr/share/doc
+	cp -a doc "$pkgdir"/usr/share/doc/$pkgname
+	install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
+	install -Dm644 HISTORY.md "$pkgdir"/usr/share/doc/$pkgname/HISTORY.md
+}
+
+md5sums="503a821e3fcc1bda759a99f934c14875  rocksdb-4.2.tar.gz
+cfb497c3c250089632bd79d37f5ee686  10-support-busybox-install.patch
+b6f3ad1dac1df1378647236de310bd4f  20-skip-glibc-specific-features.patch"
+sha256sums="83d89ca5b7574328b2380132413ba1e1e6fe5688d1cf1c85f1d2910d93e68f4c  rocksdb-4.2.tar.gz
+f96e21398f1bbd2e508280f294bfe8cafd4e750aa32d56fa89da32e2014f2304  10-support-busybox-install.patch
+0036ae5fd12bc0941aee572b5f5f28a4ccc296d64e19bcc3309af6a26b0f4ab9  20-skip-glibc-specific-features.patch"
+sha512sums="ac95f2ad5f0d31f189308b4b664d45468d7cdb05330f2cc9fd013f9541c91e69f8766c34483b8154753c93693467592b2a04e80f852e67cb6a4cf20c1f754390  rocksdb-4.2.tar.gz
+ef35fec6d4c831b1ede297466bc9a06db8884e79c1b6fb0d2757e02aee933eb36269d067aaa665cbbd2b5b2854777ea56692a318f45a928c8d8161bf74576aef  10-support-busybox-install.patch
+6e6e93fa05cc7225cef381b020bd2a4e94bb8d38fa930d8117e8f2f1afd2abb1604c129892c891a8c9cc8f52bcdf2f6856d855bb717b7f71a2f0499f23b613d8  20-skip-glibc-specific-features.patch"
-- 
2.7.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---