summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-db/redis
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-db/redis')
-rw-r--r--dev-db/redis/Manifest9
-rw-r--r--dev-db/redis/files/configure.ac-2.258
-rw-r--r--dev-db/redis/files/redis-2.4.17-shared.patch22
-rw-r--r--dev-db/redis/files/redis-2.4.3-shared.patch22
-rw-r--r--dev-db/redis/files/redis-2.4.4-tcmalloc.patch21
-rw-r--r--dev-db/redis/files/redis-2.6.7-config.patch69
-rw-r--r--dev-db/redis/files/redis-2.6.7-shared.patch36
-rw-r--r--dev-db/redis/files/redis-2.6.9-tclsh86.patch57
-rw-r--r--dev-db/redis/files/redis-2.8.13-sharedlua.patch44
-rw-r--r--dev-db/redis/files/redis-2.8.17-config.patch46
-rw-r--r--dev-db/redis/files/redis-2.8.19-sharedlua.patch44
-rw-r--r--dev-db/redis/files/redis-2.8.3-config.patch59
-rw-r--r--dev-db/redis/files/redis-2.8.3-shared.patch36
-rw-r--r--dev-db/redis/files/redis-3.0.0-sharedlua.patch44
-rw-r--r--dev-db/redis/files/redis.confd20
-rw-r--r--dev-db/redis/files/redis.initd41
-rw-r--r--dev-db/redis/files/redis.initd-223
-rw-r--r--dev-db/redis/files/redis.initd-332
-rw-r--r--dev-db/redis/files/redis.initd-433
-rw-r--r--dev-db/redis/files/redis.service14
-rw-r--r--dev-db/redis/files/redis.service-214
-rw-r--r--dev-db/redis/files/redis.tmpfiles2
-rw-r--r--dev-db/redis/metadata.xml27
-rw-r--r--dev-db/redis/redis-2.6.15-r1.ebuild109
-rw-r--r--dev-db/redis/redis-2.6.16.ebuild109
-rw-r--r--dev-db/redis/redis-2.8.11.ebuild109
-rw-r--r--dev-db/redis/redis-2.8.13.ebuild111
-rw-r--r--dev-db/redis/redis-2.8.17-r1.ebuild112
-rw-r--r--dev-db/redis/redis-2.8.19-r1.ebuild120
-rw-r--r--dev-db/redis/redis-2.8.8.ebuild109
-rw-r--r--dev-db/redis/redis-2.8.9.ebuild109
-rw-r--r--dev-db/redis/redis-3.0.2-r1.ebuild116
32 files changed, 1777 insertions, 0 deletions
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
new file mode 100644
index 000000000000..632bcb40ebf3
--- /dev/null
+++ b/dev-db/redis/Manifest
@@ -0,0 +1,9 @@
+DIST redis-2.6.15.tar.gz 998865 SHA256 b0105c6ec526d40e90a0a0bc9d070a5602d839b930776b8ecaeb9fa32493e3bc SHA512 8614b5531049f99a19e3ba87c7d632ab43d02e1c62b6287534ebec35e4a484e3eefabd94d7ca52eb31eb56675451aef94265514be78fdaebd50db5230a525563 WHIRLPOOL c1eba6bccb17c6733d3b5f6e06933ff7ea8689d4cb16e0005f002fda75bda1d730b815546e5d3b50fcd6f85a05a35585244a7a69263795e7bda53bd1a588db03
+DIST redis-2.6.16.tar.gz 999579 SHA256 81490918dcf82d124b36e48b0a9911bfba3f13abba04d8c89820324eff7df03a SHA512 469a29e2a755543a3b2c3deb467a72ae62b81c54a60ed1baf6f9d5687ef4b87c22d9cec6a43cec43dd90d4b5561f5bbcd2448f6edf8a784041233b80d9403b0b WHIRLPOOL ed10212f6465083cc689d83cb0c4db63e15697a232a7e6621fb3b41e263cb8d16c7c3085317f0147e3cfe2d1620672b40049b764ebfb2f2710fd6737350f4804
+DIST redis-2.8.11.tar.gz 1101257 SHA256 60f0310afb29bc3533d57c5805fb6a693eb1dee454a3a2ef51b07317f803f6d6 SHA512 fd761f02a40cc8697d2d3e5718d4f985b30299099923ba386865fe43c8ee00052cae948fb47e19cffff84e8097b21238027144783986f22a6564ee6a1b1a88a3 WHIRLPOOL d3833555edc600da9cc7cbde90f9afd06a2dc84b4d2381cfbddc3a626c59c7979a0b2456e326b1c0cfcb529692e26bd607fabfcd863d6b6225288357ca19752b
+DIST redis-2.8.13.tar.gz 1227538 SHA256 b87bc83d13b9bf1f20d41a0efd06eda78b80002e013566d8b69c332e0cbccb08 SHA512 ca7face85f1d583feb7064eaf0d33cec080c7f0bb7b54734ba91d8ce1091bce263f4d5518bb86277a3ddeb2d0cb95492c5d52953922f1177f61510e1d10f30f7 WHIRLPOOL 264fd7f809f4e671ade206e1f239165c61f37669e782f50c9f12e7a431ed4ef83dff71efd6f88ebc28083b2d61d2637102a28b705a589f72c2a322c61af835a4
+DIST redis-2.8.17.tar.gz 1234543 SHA256 53c7cc639571729fa57d7baa7f81aec1d5886f86bac9c66f6ad06dbdaee236a7 SHA512 29515abd4437e03da20063a1831f0eb11ac65ba9d51cbfbb1987726102e3a55c76a3286b8c9a3bfbaf5290998fb5b662ef4aadbe0d131cd60824c8533e088441 WHIRLPOOL 22eb01f8100a07178352e397f4342d44f478aadda7a0a7bdfa9a08d8cfa1578ac6e98ba0cce0a9828cc226364d9a7995d86bc78adfc73476c04868639307be30
+DIST redis-2.8.19.tar.gz 1254857 SHA256 29bb08abfc3d392b2f0c3e7f48ec46dd09ab1023f9a5575fc2a93546f4ca5145 SHA512 34997b45815cfdec9fbb06cd6664ed6ddf71baf064fd9ac155b7b969fd5945f78927cd5dfde83b043dc8ff1d7e35b172b9403cdf6115b8ca7bdf80c581ee9cdd WHIRLPOOL df3408de1e53a8a13c0b645054ce944453f3a812c264b168b797519a6d8536e0a60095fbd314f591ba21f0532be5b6b37e1ec8b11e928cdd6447ab70dfb8be33
+DIST redis-2.8.8.tar.gz 1073450 SHA256 fd2be11b8d9300d35b6bbed6fcd6fa6d7ef1a72ccaeb0cc991ce44dc49908bc8 SHA512 99cf0c41feaf594c69c625dcc8a40d15d00ae5c3ec7947abdcbe969a18ff844f9d8c60ee047dfa878a23505963b972d7564a27315017cab74bc5925ecae67ab7 WHIRLPOOL be9aa6166f7dd3ef37f2451ac8a2bdaed1f7dfb1bd8b67df04addde1f0a1dd01ec12547dc290374b818bb644a2b05b88acac884f2613a92650bd312b142e7f1e
+DIST redis-2.8.9.tar.gz 1097369 SHA256 7834c37f2ff186c46aef8e4a066dfbf1d6772a285aa31c19c58162f264f1007f SHA512 f202c44e16d257e33f7fabaa3b46218bf45848158a4b8c7cc2fab119fdf42bb4e19764a2f5f82fc8c76a3e353754b6b25f2cacf20a253d28244acbf87fd6dd7a WHIRLPOOL 2d968afe427bffc69c67cf8ac7d89166b5946a701787b28587b7a1eb0007dbc5766fb8d8760eec420ff23fbbf8fbac2a2cc6fdf69145f1885b30ef341dd4cd40
+DIST redis-3.0.2.tar.gz 1360182 SHA256 93e422c0d584623601f89b956045be158889ebe594478a2c24e1bf218495633f SHA512 0f72ca45c2970d595a3c533946b77ea293c7588eb59dd48491921ef5e3f3f1463a96a8095b5782a424451007702fbcab243140cc2d885306b5cb821308d0607a WHIRLPOOL 2d47fb142a63233230a9416e7833f8cdc0f630c12f326c73ae0078c82866496459a90e53eb6d0d381284284cd3941f392882ba27d8751651f22550230683950b
diff --git a/dev-db/redis/files/configure.ac-2.2 b/dev-db/redis/files/configure.ac-2.2
new file mode 100644
index 000000000000..3ff6650407ca
--- /dev/null
+++ b/dev-db/redis/files/configure.ac-2.2
@@ -0,0 +1,58 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.63)
+AC_INIT(redis, 2.0.0, antirez@gmail.com)
+AM_CFLAGS="-std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6"
+if test x"$CFLAGS" = x""; then
+ AM_CFLAGS="$AM_CFLAGS -O2"
+else
+ AM_CFLAGS="$AM_CFLAGS $CFLAGS"
+fi
+
+# options
+AC_MSG_CHECKING([whether to build with debug information])
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [enable debug data generation (def=no)])],
+ [debugit="$enableval"],
+ [debugit=no])
+AC_MSG_RESULT([$debugit])
+
+if test x"$debugit" = x"yes"; then
+ AC_DEFINE([DEBUG],[],[Debug Mode])
+ AM_CFLAGS="$AM_CFLAGS -g -rdynamic -ggdb"
+else
+ AC_DEFINE([NDEBUG],[],[No-debug Mode])
+fi
+AC_SUBST([AM_CFLAGS])
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_STRCOLL
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strstr strtol])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/dev-db/redis/files/redis-2.4.17-shared.patch b/dev-db/redis/files/redis-2.4.17-shared.patch
new file mode 100644
index 000000000000..9c607145d38f
--- /dev/null
+++ b/dev-db/redis/files/redis-2.4.17-shared.patch
@@ -0,0 +1,22 @@
+See https://github.com/antirez/redis/pull/137
+
+--- src/Makefile 2011-10-17 10:46:00.000000000 +0200
++++ src/Makefile.2 2011-10-17 13:47:53.000000000 +0200
+@@ -49,7 +49,16 @@
+ ifeq ($(USE_JEMALLOC),yes)
+ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a
+ ALLOC_LINK=$(ALLOC_DEP) -ldl
+- ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include
++ ALLOC_FLAGS=-DUSE_JEMALLOC
++ ifdef JEMALLOC_SHARED
++ ALLOC_DEP=
++ ALLOC_LINK=-ljemalloc
++ ALLOC_FLAGS=-DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -I/usr/include
++ else
++ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a
++ ALLOC_LINK=$(ALLOC_DEP) -ldl
++ ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include
++ endif
+ endif
+
+ CCOPT= $(CFLAGS) $(ARCH) $(PROF) \ No newline at end of file
diff --git a/dev-db/redis/files/redis-2.4.3-shared.patch b/dev-db/redis/files/redis-2.4.3-shared.patch
new file mode 100644
index 000000000000..20cdebe41b47
--- /dev/null
+++ b/dev-db/redis/files/redis-2.4.3-shared.patch
@@ -0,0 +1,22 @@
+See https://github.com/antirez/redis/pull/137
+
+--- src/Makefile 2011-10-17 10:46:00.000000000 +0200
++++ src/Makefile.2 2011-10-17 13:47:53.000000000 +0200
+@@ -49,7 +49,16 @@
+ ifeq ($(USE_JEMALLOC),yes)
+ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a
+ ALLOC_LINK=$(ALLOC_DEP) -ldl
+- ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include
++ ALLOC_FLAGS=-DUSE_JEMALLOC
++ ifdef JEMALLOC_SHARED
++ ALLOC_DEP=
++ ALLOC_LINK=-ljemalloc
++ ALLOC_FLAGS=-DUSE_JEMALLOC -I/usr/include
++ else
++ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a
++ ALLOC_LINK=$(ALLOC_DEP) -ldl
++ ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include
++ endif
+ endif
+
+ CCOPT= $(CFLAGS) $(ARCH) $(PROF)
diff --git a/dev-db/redis/files/redis-2.4.4-tcmalloc.patch b/dev-db/redis/files/redis-2.4.4-tcmalloc.patch
new file mode 100644
index 000000000000..964ce71d5f78
--- /dev/null
+++ b/dev-db/redis/files/redis-2.4.4-tcmalloc.patch
@@ -0,0 +1,21 @@
+https://github.com/antirez/redis/pull/218
+
+diff --git a/src/Makefile b/src/Makefile
+index 72edcad..3e43990 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -35,12 +35,14 @@ else
+ endif
+
+ ifeq ($(USE_TCMALLOC),yes)
++ USE_JEMALLOC=no
+ ALLOC_DEP=
+ ALLOC_LINK=-ltcmalloc
+ ALLOC_FLAGS=-DUSE_TCMALLOC
+ endif
+
+ ifeq ($(USE_TCMALLOC_MINIMAL),yes)
++ USE_JEMALLOC=no
+ ALLOC_DEP=
+ ALLOC_LINK=-ltcmalloc_minimal
+ ALLOC_FLAGS=-DUSE_TCMALLOC \ No newline at end of file
diff --git a/dev-db/redis/files/redis-2.6.7-config.patch b/dev-db/redis/files/redis-2.6.7-config.patch
new file mode 100644
index 000000000000..0aea1c760ef2
--- /dev/null
+++ b/dev-db/redis/files/redis-2.6.7-config.patch
@@ -0,0 +1,69 @@
+commit 7f05e59a052941fd070be1825d0623a054c66e2d
+Author: jbergstroem <bugs@bergstroem.nu>
+Date: Tue Oct 30 13:11:23 2012 +1100
+
+ Adapt config based on Gentoo defaults
+
+diff --git a/redis.conf b/redis.conf
+index 751a3eb..1a36b12 100644
+--- a/redis.conf
++++ b/redis.conf
+@@ -14,11 +14,11 @@
+
+ # By default Redis does not run as a daemon. Use 'yes' if you need it.
+ # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+-daemonize no
++daemonize yes
+
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+ # default. You can specify a custom pid file location here.
+-pidfile /var/run/redis.pid
++pidfile /var/run/redis/redis.pid
+
+ # Accept connections on the specified port, default is 6379.
+ # If port 0 is specified Redis will not listen on a TCP socket.
+@@ -27,7 +27,7 @@ port 6379
+ # If you want you can bind a single interface, if the bind option is not
+ # specified all the interfaces will listen for incoming connections.
+ #
+-# bind 127.0.0.1
++bind 127.0.0.1
+
+ # Specify the path for the unix socket that will be used to listen for
+ # incoming connections. There is no default, so Redis will not listen
+@@ -50,7 +50,7 @@ loglevel notice
+ # Specify the log file name. Also 'stdout' can be used to force
+ # Redis to log on the standard output. Note that if you use standard
+ # output for logging but daemonize, logs will be sent to /dev/null
+-logfile stdout
++logfile /var/log/redis/redis.log
+
+ # To enable logging to the system logger, just set 'syslog-enabled' to yes,
+ # and optionally update the other syslog parameters to suit your needs.
+@@ -124,7 +124,7 @@ rdbcompression yes
+ rdbchecksum yes
+
+ # The filename where to dump the DB
+-dbfilename dump.rdb
++dbfilename /var/lib/redis/dump.rdb
+
+ # The working directory.
+ #
+@@ -134,7 +134,7 @@ dbfilename dump.rdb
+ # Also the Append Only File will be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/redis/
+
+ ################################# REPLICATION #################################
+
+@@ -278,7 +278,7 @@ slave-priority 100
+ # limit for maxmemory so that there is some free RAM on the system for slave
+ # output buffers (but this is not needed if the policy is 'noeviction').
+ #
+-# maxmemory <bytes>
++maxmemory 67108864
+
+ # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+ # is reached? You can select among five behavior: \ No newline at end of file
diff --git a/dev-db/redis/files/redis-2.6.7-shared.patch b/dev-db/redis/files/redis-2.6.7-shared.patch
new file mode 100644
index 000000000000..992af6c490b6
--- /dev/null
+++ b/dev-db/redis/files/redis-2.6.7-shared.patch
@@ -0,0 +1,36 @@
+commit 6931bf1d81de597b3abc2a36adf081a24c114567
+Author: jbergstroem <bugs@bergstroem.nu>
+Date: Tue Oct 23 12:26:04 2012 +1100
+
+ Build against shared jemalloc
+
+diff --git a/src/Makefile b/src/Makefile
+index 358b4cb..41390f4 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -22,12 +22,7 @@ STD= -std=c99 -pedantic
+ WARN= -Wall
+ OPT= $(OPTIMIZATION)
+
+-# Default allocator
+-ifeq ($(uname_S),Linux)
+- MALLOC=jemalloc
+-else
+- MALLOC=libc
+-endif
++MALLOC?=jemalloc
+
+ # Backwards compatibility for selecting an allocator
+ ifeq ($(USE_TCMALLOC),yes)
+@@ -71,9 +66,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
+ endif
+
+ ifeq ($(MALLOC),jemalloc)
+- DEPENDENCY_TARGETS+= jemalloc
+- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
+- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
++ FINAL_LIBS+= -ljemalloc -ldl
+ endif
+
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) \ No newline at end of file
diff --git a/dev-db/redis/files/redis-2.6.9-tclsh86.patch b/dev-db/redis/files/redis-2.6.9-tclsh86.patch
new file mode 100644
index 000000000000..00d81dfafcc7
--- /dev/null
+++ b/dev-db/redis/files/redis-2.6.9-tclsh86.patch
@@ -0,0 +1,57 @@
+diff --git a/runtest b/runtest
+index 0eb384c..fadc283 100755
+--- a/runtest
++++ b/runtest
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-TCL=tclsh8.5
++TCL=tclsh
+ which $TCL
+ if [ "$?" != "0" ]
+ then
+diff --git a/tests/integration/replication-4.tcl b/tests/integration/replication-4.tcl
+index 69fcab3..58a70fa 100644
+--- a/tests/integration/replication-4.tcl
++++ b/tests/integration/replication-4.tcl
+@@ -1,5 +1,5 @@
+ proc start_bg_complex_data {host port db ops} {
+- exec tclsh8.5 tests/helpers/bg_complex_data.tcl $host $port $db $ops &
++ exec tclsh tests/helpers/bg_complex_data.tcl $host $port $db $ops &
+ }
+
+ proc stop_bg_complex_data {handle} {
+diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
+index da94b08..30baf6a 100644
+--- a/tests/integration/replication.tcl
++++ b/tests/integration/replication.tcl
+@@ -78,7 +78,7 @@ start_server {tags {"repl"}} {
+ }
+
+ proc start_write_load {host port seconds} {
+- exec tclsh8.5 tests/helpers/gen_write_load.tcl $host $port $seconds &
++ exec tclsh tests/helpers/gen_write_load.tcl $host $port $seconds &
+ }
+
+ proc stop_write_load {handle} {
+diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl
+index b2e58b4..253e955 100644
+--- a/tests/test_helper.tcl
++++ b/tests/test_helper.tcl
+@@ -2,6 +2,8 @@
+ # This softare is released under the BSD License. See the COPYING file for
+ # more information.
+
++package require Tcl 8.5
++
+ set tcl_precision 17
+ source tests/support/redis.tcl
+ source tests/support/server.tcl
+@@ -189,7 +191,7 @@ proc test_server_main {} {
+ set start_port [expr {$::port+100}]
+ for {set j 0} {$j < $::numclients} {incr j} {
+ set start_port [find_available_port $start_port]
+- set p [exec tclsh8.5 [info script] {*}$::argv \
++ set p [exec tclsh [info script] {*}$::argv \
+ --client $port --port $start_port &]
+ lappend ::clients_pids $p
+ incr start_port 10 \ No newline at end of file
diff --git a/dev-db/redis/files/redis-2.8.13-sharedlua.patch b/dev-db/redis/files/redis-2.8.13-sharedlua.patch
new file mode 100644
index 000000000000..e13c62f07a11
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.13-sharedlua.patch
@@ -0,0 +1,44 @@
+commit de0d4973ddb629dcc80f0724769a0e997fe644ba
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Wed Jul 16 09:47:44 2014 +1000
+
+ Use a shared lua
+
+diff --git src/Makefile src/Makefile
+index 134694c..a09832e 100644
+--- src/Makefile
++++ src/Makefile
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -52,6 +52,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=$(shell pkg-config --libs lua)
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -108,6 +109,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +164,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis-2.8.17-config.patch b/dev-db/redis/files/redis-2.8.17-config.patch
new file mode 100644
index 000000000000..c9f6b2af172b
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.17-config.patch
@@ -0,0 +1,46 @@
+--- a/redis.conf 2014-12-02 16:22:38.722433643 +0100
++++ b/redis.conf 2014-12-02 16:22:16.252249350 +0100
+@@ -38,7 +38,7 @@
+
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+ # default. You can specify a custom pid file location here.
+-pidfile /var/run/redis.pid
++pidfile /run/redis/redis.pid
+
+ # Accept connections on the specified port, default is 6379.
+ # If port 0 is specified Redis will not listen on a TCP socket.
+@@ -61,7 +61,7 @@
+ # Examples:
+ #
+ # bind 192.168.1.100 10.0.0.1
+-# bind 127.0.0.1
++bind 127.0.0.1
+
+ # Specify the path for the Unix socket that will be used to listen for
+ # incoming connections. There is no default, so Redis will not listen
+@@ -100,7 +100,7 @@
+ # Specify the log file name. Also the empty string can be used to force
+ # Redis to log on the standard output. Note that if you use standard
+ # output for logging but daemonize, logs will be sent to /dev/null
+-logfile ""
++logfile /var/log/redis/redis.log
+
+ # To enable logging to the system logger, just set 'syslog-enabled' to yes,
+ # and optionally update the other syslog parameters to suit your needs.
+@@ -184,7 +184,7 @@
+ # The Append Only File will also be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/redis/
+
+ ################################# REPLICATION #################################
+
+@@ -403,6 +403,7 @@
+ # output buffers (but this is not needed if the policy is 'noeviction').
+ #
+ # maxmemory <bytes>
++maxmemory 67108864
+
+ # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+ # is reached. You can select among five behaviors:
diff --git a/dev-db/redis/files/redis-2.8.19-sharedlua.patch b/dev-db/redis/files/redis-2.8.19-sharedlua.patch
new file mode 100644
index 000000000000..2e45cf2b31fa
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.19-sharedlua.patch
@@ -0,0 +1,44 @@
+commit de0d4973ddb629dcc80f0724769a0e997fe644ba
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Wed Jul 16 09:47:44 2014 +1000
+
+ Use a shared lua
+
+diff --git src/Makefile src/Makefile
+index 134694c..a09832e 100644
+--- src/Makefile
++++ src/Makefile
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -52,6 +52,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=$(shell pkg-config --libs lua)
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -108,6 +109,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +164,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis-2.8.3-config.patch b/dev-db/redis/files/redis-2.8.3-config.patch
new file mode 100644
index 000000000000..3f5d95b847ad
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.3-config.patch
@@ -0,0 +1,59 @@
+commit 66f26c12faaeb8ed85a715d2dfd6a41c978a4bd1
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Mon Nov 25 09:23:10 2013 +1100
+
+ Modify config to gentoo defaults
+
+diff --git redis.conf redis.conf
+index 2e3239c..6c7ef4a 100644
+--- redis.conf
++++ redis.conf
+@@ -14,11 +14,11 @@
+
+ # By default Redis does not run as a daemon. Use 'yes' if you need it.
+ # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+-daemonize no
++daemonize yes
+
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+ # default. You can specify a custom pid file location here.
+-pidfile /var/run/redis.pid
++pidfile /run/redis/redis.pid
+
+ # Accept connections on the specified port, default is 6379.
+ # If port 0 is specified Redis will not listen on a TCP socket.
+@@ -32,7 +32,7 @@ port 6379
+ # Examples:
+ #
+ # bind 192.168.1.100 10.0.0.1
+-# bind 127.0.0.1
++bind 127.0.0.1
+
+ # Specify the path for the unix socket that will be used to listen for
+ # incoming connections. There is no default, so Redis will not listen
+@@ -71,7 +71,7 @@ loglevel notice
+ # Specify the log file name. Also the emptry string can be used to force
+ # Redis to log on the standard output. Note that if you use standard
+ # output for logging but daemonize, logs will be sent to /dev/null
+-logfile ""
++logfile /var/log/redis/redis.log
+
+ # To enable logging to the system logger, just set 'syslog-enabled' to yes,
+ # and optionally update the other syslog parameters to suit your needs.
+@@ -155,7 +155,7 @@ dbfilename dump.rdb
+ # The Append Only File will also be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/redis/
+
+ ################################# REPLICATION #################################
+
+@@ -365,6 +365,7 @@ slave-priority 100
+ # output buffers (but this is not needed if the policy is 'noeviction').
+ #
+ # maxmemory <bytes>
++maxmemory 67108864
+
+ # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+ # is reached. You can select among five behaviors:
diff --git a/dev-db/redis/files/redis-2.8.3-shared.patch b/dev-db/redis/files/redis-2.8.3-shared.patch
new file mode 100644
index 000000000000..d32484f0cd18
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.3-shared.patch
@@ -0,0 +1,36 @@
+commit 388a76f24c96767c831ee7682234fd9f2bc5b9ac
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Mon Nov 25 09:17:14 2013 +1100
+
+ Use shared jemalloc
+
+diff --git src/Makefile src/Makefile
+index c37549d..77e6255 100644
+--- src/Makefile
++++ src/Makefile
+@@ -26,12 +26,7 @@ PREFIX?=/usr/local
+ INSTALL_BIN=$(PREFIX)/bin
+ INSTALL=install
+
+-# Default allocator
+-ifeq ($(uname_S),Linux)
+- MALLOC=jemalloc
+-else
+- MALLOC=libc
+-endif
++MALLOC?=jemalloc
+
+ # Backwards compatibility for selecting an allocator
+ ifeq ($(USE_TCMALLOC),yes)
+@@ -79,9 +74,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
+ endif
+
+ ifeq ($(MALLOC),jemalloc)
+- DEPENDENCY_TARGETS+= jemalloc
+- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
+- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
++ FINAL_LIBS+= -ljemalloc -ldl
+ endif
+
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
diff --git a/dev-db/redis/files/redis-3.0.0-sharedlua.patch b/dev-db/redis/files/redis-3.0.0-sharedlua.patch
new file mode 100644
index 000000000000..ba983efafc7c
--- /dev/null
+++ b/dev-db/redis/files/redis-3.0.0-sharedlua.patch
@@ -0,0 +1,44 @@
+commit fd0fc43f6e0ea45bce0e1a68c1f736e481fc4429
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Thu Apr 2 14:33:51 2015 +1100
+
+ Use shared LUA
+
+diff --git src/Makefile src/Makefile
+index a88f1d2..f71e7b5 100644
+--- src/Makefile
++++ src/Makefile
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -47,6 +47,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=$(shell pkg-config --libs lua)
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -108,6 +109,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +164,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis.confd b/dev-db/redis/files/redis.confd
new file mode 100644
index 000000000000..07585fa7a116
--- /dev/null
+++ b/dev-db/redis/files/redis.confd
@@ -0,0 +1,20 @@
+# Redis user.
+REDIS_USER="redis"
+
+# Redis group.
+REDIS_GROUP="redis"
+
+# Redis configuration file.
+REDIS_CONF="/etc/redis.conf"
+
+# Redis dump directory.
+REDIS_DIR="/var/lib/redis"
+
+# Redis pid file.
+# (Be sure to change the main redis configuration file as well if you change
+# this from the default.)
+REDIS_PID="/var/run/redis/redis.pid"
+
+# Redis options.
+# (Redis expects the first argument to be the configuration file.)
+REDIS_OPTS="${REDIS_CONF}"
diff --git a/dev-db/redis/files/redis.initd b/dev-db/redis/files/redis.initd
new file mode 100644
index 000000000000..eca645edff94
--- /dev/null
+++ b/dev-db/redis/files/redis.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# $Id$
+
+REDIS_EXEC=/usr/sbin/redis-server
+REDIS_PID=${REDIS_PID:-/var/run/redis/redis.pid}
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start() {
+
+ local PID_DIR=$(dirname ${REDIS_PID})
+ mkdir -p ${PID_DIR}
+ chown ${REDIS_USER}:${REDIS_GROUP} ${PID_DIR}
+
+ ebegin "Starting Redis server"
+ start-stop-daemon --start \
+ --chdir "${REDIS_DIR}" \
+ --user ${REDIS_USER}:${REDIS_GROUP} \
+ --pidfile "${REDIS_PID}" \
+ --exec "${REDIS_EXEC}" \
+ -- ${REDIS_OPTS}
+ ret=$?
+ eend ${ret}
+
+}
+
+stop() {
+ ebegin "Stopping Redis server"
+ start-stop-daemon --stop --quiet --pidfile "${REDIS_PID}"
+ ret=$?
+ rm -f "${REDIS_PID}"
+ eend ${ret}
+}
diff --git a/dev-db/redis/files/redis.initd-2 b/dev-db/redis/files/redis.initd-2
new file mode 100644
index 000000000000..c910f53ed1a9
--- /dev/null
+++ b/dev-db/redis/files/redis.initd-2
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# $Id$
+
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+
+command=/usr/sbin/redis-server
+start_stop_daemon_args="--chdir \"${REDIS_DIR}\"
+ --user ${REDIS_USER} --group ${REDIS_GROUP}"
+command_args="${REDIS_OPTS}"
+pidfile=${REDIS_PID:-/var/run/redis/redis.pid}
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID})
+}
diff --git a/dev-db/redis/files/redis.initd-3 b/dev-db/redis/files/redis.initd-3
new file mode 100644
index 000000000000..56bb59376f78
--- /dev/null
+++ b/dev-db/redis/files/redis.initd-3
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# $Id$
+
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+
+command=/usr/sbin/redis-server
+start_stop_daemon_args="--chdir \"${REDIS_DIR}\"
+ --user ${REDIS_USER} --group ${REDIS_GROUP}"
+command_args="${REDIS_OPTS}"
+pidfile=${REDIS_PID:-/run/redis/redis.pid}
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID})
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop \
+ --exec ${retries} \
+ --retry 30 \
+ --pidfile ${pidfile}
+ eend
+}
diff --git a/dev-db/redis/files/redis.initd-4 b/dev-db/redis/files/redis.initd-4
new file mode 100644
index 000000000000..4a765d038b82
--- /dev/null
+++ b/dev-db/redis/files/redis.initd-4
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# $Id$
+
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+REDIS_TIMEOUT=${REDIS_TIMEOUT:-30}
+
+command=/usr/sbin/redis-server
+pidfile=${REDIS_PID:-/run/redis/redis.pid}
+start_stop_daemon_args="--background --make-pidfile --pidfile ${pidfile}
+ --chdir \"${REDIS_DIR}\" --user ${REDIS_USER} --group ${REDIS_GROUP}"
+command_args="${REDIS_OPTS}"
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID})
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop \
+ --exec ${command} \
+ --retry ${REDIS_TIMEOUT} \
+ --pidfile ${pidfile}
+ eend
+}
diff --git a/dev-db/redis/files/redis.service b/dev-db/redis/files/redis.service
new file mode 100644
index 000000000000..f1322f69f11e
--- /dev/null
+++ b/dev-db/redis/files/redis.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=A persistent key-value database
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/redis/redis.pid
+ExecStart=/usr/sbin/redis-server /etc/redis.conf
+User=redis
+Group=redis
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/dev-db/redis/files/redis.service-2 b/dev-db/redis/files/redis.service-2
new file mode 100644
index 000000000000..c36d7960ef71
--- /dev/null
+++ b/dev-db/redis/files/redis.service-2
@@ -0,0 +1,14 @@
+[Unit]
+Description=A persistent key-value database
+After=syslog.target network.target
+
+[Service]
+Type=simple
+PIDFile=/var/run/redis/redis.pid
+ExecStart=/usr/sbin/redis-server /etc/redis.conf
+User=redis
+Group=redis
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/dev-db/redis/files/redis.tmpfiles b/dev-db/redis/files/redis.tmpfiles
new file mode 100644
index 000000000000..657d8a551d4b
--- /dev/null
+++ b/dev-db/redis/files/redis.tmpfiles
@@ -0,0 +1,2 @@
+# redis runtime directory
+d /var/run/redis 0755 redis root -
diff --git a/dev-db/redis/metadata.xml b/dev-db/redis/metadata.xml
new file mode 100644
index 000000000000..cdd2dabaed7d
--- /dev/null
+++ b/dev-db/redis/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>ultrabug@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>lu_zero@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>bugs@bergstroem.nu</email>
+ <name>Johan Bergström</name>
+ <description>Proxy-Maintainer, assign bugs</description>
+ </maintainer>
+ <use>
+ <flag name="jemalloc">
+ Use <pkg>dev-libs/jemalloc</pkg> for allocations.
+ </flag>
+ <flag name="tcmalloc">
+ Use tcmalloc from <pkg>dev-util/google-perftools</pkg> for allocations.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/redis/redis-2.6.15-r1.ebuild b/dev-db/redis/redis-2.6.15-r1.ebuild
new file mode 100644
index 000000000000..0a14dfe37d6e
--- /dev/null
+++ b/dev-db/redis/redis-2.6.15-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 x86 ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND="tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND=">=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="tcmalloc? ( !jemalloc )
+ jemalloc? ( !tcmalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.6.7"-{shared,config}.patch
+
+ # bug 467172, 467174
+ sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-3" redis
+
+ systemd_dounit "${FILESDIR}/redis.service"
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-2.6.16.ebuild b/dev-db/redis/redis-2.6.16.ebuild
new file mode 100644
index 000000000000..dca1a5783aca
--- /dev/null
+++ b/dev-db/redis/redis-2.6.16.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86 ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND="tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND=">=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="tcmalloc? ( !jemalloc )
+ jemalloc? ( !tcmalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.6.7"-{shared,config}.patch
+
+ # bug 467172, 467174
+ sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-3" redis
+
+ systemd_dounit "${FILESDIR}/redis.service"
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-2.8.11.ebuild b/dev-db/redis/redis-2.8.11.ebuild
new file mode 100644
index 000000000000..1b5a6939b7a3
--- /dev/null
+++ b/dev-db/redis/redis-2.8.11.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~hppa ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND="tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND=">=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="tcmalloc? ( !jemalloc )
+ jemalloc? ( !tcmalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-{shared,config}.patch
+
+ # bug 467172, 467174
+ sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-3" redis
+
+ systemd_dounit "${FILESDIR}/redis.service"
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-2.8.13.ebuild b/dev-db/redis/redis-2.8.13.ebuild
new file mode 100644
index 000000000000..10a16cfa4588
--- /dev/null
+++ b/dev-db/redis/redis-2.8.13.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~amd64-linux ~hppa ~x86 ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND=">=dev-lang/lua-5.1:0
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-{shared,config}.patch
+ epatch "${FILESDIR}"/${P}-sharedlua.patch
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-3" redis
+
+ systemd_dounit "${FILESDIR}/redis.service"
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-2.8.17-r1.ebuild b/dev-db/redis/redis-2.8.17-r1.ebuild
new file mode 100644
index 000000000000..0a6166091e7a
--- /dev/null
+++ b/dev-db/redis/redis-2.8.17-r1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 ~hppa x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND=">=dev-lang/lua-5.1:0
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch
+ epatch "${FILESDIR}"/${PN}-2.8.17-config.patch
+ epatch "${FILESDIR}"/${PN}-2.8.13-sharedlua.patch
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_dounit "${FILESDIR}/redis.service"
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-2.8.19-r1.ebuild b/dev-db/redis/redis-2.8.19-r1.ebuild
new file mode 100644
index 000000000000..e5b8ccad0f66
--- /dev/null
+++ b/dev-db/redis/redis-2.8.19-r1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~amd64-linux ~hppa ~x86 ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND=">=dev-lang/lua-5.1:*
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch
+ epatch "${FILESDIR}"/${PN}-2.8.17-config.patch
+ epatch "${FILESDIR}"/${P}-sharedlua.patch
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # Avoid glibc noise
+ # https://github.com/antirez/redis/pull/2189
+ [[ ${CHOST} == *linux* ]] && append-cflags "-D_DEFAULT_SOURCE"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_dounit "${FILESDIR}/redis.service"
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-2.8.8.ebuild b/dev-db/redis/redis-2.8.8.ebuild
new file mode 100644
index 000000000000..40441f784647
--- /dev/null
+++ b/dev-db/redis/redis-2.8.8.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86 ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND="tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND=">=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="tcmalloc? ( !jemalloc )
+ jemalloc? ( !tcmalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-{shared,config}.patch
+
+ # bug 467172, 467174
+ sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-3" redis
+
+ systemd_dounit "${FILESDIR}/redis.service"
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-2.8.9.ebuild b/dev-db/redis/redis-2.8.9.ebuild
new file mode 100644
index 000000000000..e57c970c60d2
--- /dev/null
+++ b/dev-db/redis/redis-2.8.9.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~hppa ~x86 ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND="tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND=">=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="tcmalloc? ( !jemalloc )
+ jemalloc? ( !tcmalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-{shared,config}.patch
+
+ # bug 467172, 467174
+ sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-3" redis
+
+ systemd_dounit "${FILESDIR}/redis.service"
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-3.0.2-r1.ebuild b/dev-db/redis/redis-3.0.2-r1.ebuild
new file mode 100644
index 000000000000..0498056bd5f3
--- /dev/null
+++ b/dev-db/redis/redis-3.0.2-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~hppa ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND=">=dev-lang/lua-5.1:*
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch
+ epatch "${FILESDIR}"/${PN}-2.8.17-config.patch
+ epatch "${FILESDIR}"/${PN}-3.0.0-sharedlua.patch
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}