Skip to contentSkip to conversation

new package: redis

PATCH New Daniel Price 2 participants 2 messages Mar 12, 2013 – Mar 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 new package: redis

---
 package/Config.in                    |    1 +
 package/redis/Config.in              |   14 ++++++++++
 package/redis/redis-001-uclibc.patch |   45 ++++++++++++++++++++++++++++++++++
 package/redis/redis-002-lua-AR.patch |   32 ++++++++++++++++++++++++
 package/redis/redis.mk               |   28 +++++++++++++++++++++
 5 files changed, 120 insertions(+), 0 deletions(-)
 create mode 100644 package/redis/Config.in
 create mode 100644 package/redis/redis-001-uclibc.patch
 create mode 100644 package/redis/redis-002-lua-AR.patch
 create mode 100644 package/redis/redis.mk
package/Config.in +1 -0
index e46d7a8..0974b4e 100644
@@ -396,6 +396,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
package/redis/Config.in new file +14 -0
new file mode 100644
index 0000000..3128c3f
@@ -0,0 +1,14 @@
+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
+
+comment "redis needs a toolchain with LARGEFILE and thread support"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
package/redis/redis-001-uclibc.patch new file +45 -0

45 lines not on this page · raw message

package/redis/redis-002-lua-AR.patch new file +32 -0
new file mode 100644
index 0000000..68ee70c
@@ -0,0 +1,32 @@
+
+redis-002-lua-AR.patch: Improve redis Makefiles to handle Lua's unusual
+definition of AR.  Patch originates from:
+
+  Define AR to help with lua cross-compilation
+  https://github.com/antirez/redis/pull/997
+  Daniel Price, daniel.price at gmail.com
+
+Signed-off-by: Daniel Price <[email protected]>
+
+=========================================================================
+diff --git a/deps/Makefile b/deps/Makefile
+index d58ee56..c9d7116 100644
+--- a/deps/Makefile
++++ b/deps/Makefile
+@@ -60,10 +60,15 @@ endif
+ 
+ LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI $(CFLAGS)
+ LUA_LDFLAGS+= $(LDFLAGS)
++# lua's Makefile defines AR="ar rcu", which is unusual, and makes it more
++# challenging to cross-compile lua (and redis).  These defines make it easier
++# to fit redis into cross-compilation environments, which typically set AR.
++AR = ar
++ARFLAGS = rcu
+ 
+ lua: .make-prerequisites
+ 	@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
+-	cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)"
++	cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)"
+ 
+ .PHONY: lua
+ 
package/redis/redis.mk new file +28 -0
new file mode 100644
index 0000000..1fb16bc
@@ -0,0 +1,28 @@
+#############################################################
+#
+# redis
+#
+#############################################################
+
+REDIS_VERSION = 2.6.11
+REDIS_SOURCE = redis-$(REDIS_VERSION).tar.gz
+REDIS_SITE = http://redis.googlecode.com/files
+REDIS_LICENSE = BSD-3c (core); MIT and BSD family licenses (Bundled components)
+REDIS_LICENSE_FILES = COPYING
+
+# Redis doesn't support DESTDIR (yet, see
+# https://github.com/antirez/redis/pull/609).  We set PREFIX
+# instead.
+REDIS_BUILDOPTS = $(TARGET_CONFIGURE_OPTS) \
+    PREFIX=$(TARGET_DIR)/usr MALLOC=libc \
+
+define REDIS_BUILD_CMDS
+        $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D)
+endef
+
+define REDIS_INSTALL_TARGET_CMDS
+        $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) \
+	    LDCONFIG=true install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.6.5
#1 lore raw

PATCH v2 1/1 new package: redis

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Daniel" == Daniel Price <[email protected]> writes:

Daniel> Signed-off-by: Daniel Price <[email protected]> Daniel> ---

 Daniel>  package/Config.in                    |    1 +
 Daniel>  package/redis/Config.in              |   14 ++++++++++
 Daniel>  package/redis/redis-001-uclibc.patch |   45 ++++++++++++++++++++++++++++++++++
 Daniel>  package/redis/redis-002-lua-AR.patch |   32 ++++++++++++++++++++++++
 Daniel>  package/redis/redis.mk               |   28 +++++++++++++++++++++

Daniel> +config BR2_PACKAGE_REDIS
Daniel> + bool "redis"
Daniel> + depends on BR2_USE_MMU # fork()
Daniel> + depends on BR2_TOOLCHAIN_HAS_THREADS
Daniel> + depends on BR2_LARGEFILE
Daniel> + help

 Daniel> +	  Redis is an open source, advanced key-value store. It is often referred
 Daniel> +	  to as a data structure server since keys can contain strings, hashes,
 Daniel> +	  lists, sets and sorted sets.

Daniel> +

The help text is a bit too long, so I've word wrapped it.

Daniel> +++ b/package/redis/redis.mk
Daniel> @@ -0,0 +1,28 @@
Daniel> +############################################################# Daniel> +#
Daniel> +# redis
Daniel> +#
Daniel> +############################################################# Daniel> +
Daniel> +REDIS_VERSION = 2.6.11
Daniel> +REDIS_SOURCE = redis-$(REDIS_VERSION).tar.gz

That's the default value for _SOURCE, so I've dropped this.

Committed with those fixes, thanks.

Signature · 1 line
Bye, Peter Korsgaard