Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Price <daniel.price@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH V2] new package: redis
Date: Fri,  1 Mar 2013 15:03:19 -0800	[thread overview]
Message-ID: <1362178999-16577-1-git-send-email-daniel.price@gmail.com> (raw)
In-Reply-To: <1362178612-16168-1-git-send-email-daniel.price@gmail.com>

Signed-off-by: Daniel Price <daniel.price@gmail.com>
---
 package/Config.in                           |    1 +
 package/redis/Config.in                     |   11 +++++++
 package/redis/redis-2.6.10-001-uclibc.patch |   43 +++++++++++++++++++++++++++
 package/redis/redis.mk                      |   28 +++++++++++++++++
 4 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 package/redis/Config.in
 create mode 100644 package/redis/redis-2.6.10-001-uclibc.patch
 create mode 100644 package/redis/redis.mk

diff --git a/package/Config.in b/package/Config.in
index a169505..cc08713 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -394,6 +394,7 @@ menu "Database"
 source "package/berkeleydb/Config.in"
 source "package/gdbm/Config.in"
 source "package/mysql_client/Config.in"
+source "package/redis/Config.in"
 source "package/sqlcipher/Config.in"
 source "package/sqlite/Config.in"
 endmenu
diff --git a/package/redis/Config.in b/package/redis/Config.in
new file mode 100644
index 0000000..05dacc7
--- /dev/null
+++ b/package/redis/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_REDIS
+	bool "redis"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LARGEFILE
+	help
+	  Redis is an open source, advanced key-value store. It is often referred
+	  to as a data structure server since keys can contain strings, hashes,
+	  lists, sets and sorted sets.
+
+	  http://www.redis.io
diff --git a/package/redis/redis-2.6.10-001-uclibc.patch b/package/redis/redis-2.6.10-001-uclibc.patch
new file mode 100644
index 0000000..22206eb
--- /dev/null
+++ b/package/redis/redis-2.6.10-001-uclibc.patch
@@ -0,0 +1,43 @@
+redis-2.6.2-uclibc.patch: This patch fixes redis so that it can be
+compiled against uclibc.  Patch originates from:
+
+  https://github.com/antirez/redis/pull/537
+  Mike Steinert, mike.steinert at gmail.com
+
+Signed-off-by: Daniel Price <daniel.price@gmail.com>
+
+diff -ur old/src/config.h new/src/config.h
+--- old/src/config.h	2012-10-26 07:20:24.000000000 -0700
++++ new/src/config.h	2012-10-31 13:41:51.206309564 -0700
+@@ -1,6 +1,10 @@
+ #ifndef __CONFIG_H
+ #define __CONFIG_H
+ 
++#ifdef __unix
++#include <features.h>
++#endif
++
+ #ifdef __APPLE__
+ #include <AvailabilityMacros.h>
+ #endif
+@@ -25,7 +29,7 @@
+ #endif
+ 
+ /* Test for backtrace() */
+-#if defined(__APPLE__) || defined(__linux__)
++#if (defined(__APPLE__) || defined(__linux__) && !defined(__UCLIBC__))
+ #define HAVE_BACKTRACE 1
+ #endif
+ 
+diff -ur old/src/Makefile new/src/Makefile
+--- old/src/Makefile	2012-10-26 07:20:24.000000000 -0700
++++ new/src/Makefile	2012-10-31 13:40:39.224728830 -0700
+@@ -135,7 +135,7 @@
+ 	echo REDIS_LDFLAGS=$(REDIS_LDFLAGS) >> .make-settings
+ 	echo PREV_FINAL_CFLAGS=$(FINAL_CFLAGS) >> .make-settings
+ 	echo PREV_FINAL_LDFLAGS=$(FINAL_LDFLAGS) >> .make-settings
+-	-(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS))
++	-(cd ../deps && $(MAKE) CC=$(CC) $(DEPENDENCY_TARGETS))
+ 
+ .PHONY: persist-settings
+ 
diff --git a/package/redis/redis.mk b/package/redis/redis.mk
new file mode 100644
index 0000000..04738ec
--- /dev/null
+++ b/package/redis/redis.mk
@@ -0,0 +1,28 @@
+#############################################################
+#
+# redis
+#
+#############################################################
+
+REDIS_VERSION = 2.6.10
+REDIS_SOURCE = redis-$(REDIS_VERSION).tar.gz
+REDIS_SITE = http://redis.googlecode.com/files
+REDIS_LICENSE = BSD-3c
+REDIS_LICENSE_FILES = COPYING
+
+# Redis doesn't support DESTDIR (yet, see
+# https://github.com/antirez/redis/pull/609).  We set PREFIX
+# instead.
+REDIS_BUILDOPTS = MALLOC=libc CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+    PREFIX=$(TARGET_DIR)/usr
+
+define REDIS_BUILD_CMDS
+        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(REDIS_BUILDOPTS)
+endef
+
+define REDIS_INSTALL_TARGET_CMDS
+        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(REDIS_BUILDOPTS) \
+	    LDCONFIG=true install
+endef
+
+$(eval $(generic-package))
-- 
1.7.6.5

  reply	other threads:[~2013-03-01 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 22:56 [Buildroot] [PATCH] new package: redis Daniel Price
2013-03-01 23:03 ` Daniel Price [this message]
2013-03-02 17:32   ` [Buildroot] [PATCH V2] " Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2013-03-12  1:47 [Buildroot] [PATCH v2] " Daniel Price
2013-03-18 21:44 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362178999-16577-1-git-send-email-daniel.price@gmail.com \
    --to=daniel.price@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox