mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
Redis
This commit is contained in:
82
dev-db/redis/patches/redis-2.2.11.diff
Normal file
82
dev-db/redis/patches/redis-2.2.11.diff
Normal file
@@ -0,0 +1,82 @@
|
||||
diff --git redis-2.2.11/deps/hiredis/Makefile redis-2.2.11/deps/hiredis/Makefile
|
||||
index b186e75..345a15d 100644
|
||||
diff --git redis-2.2.11/deps/hiredis/Makefile redis-2.2.11/deps/hiredis/Makefile
|
||||
index 2a84b9b..9d50572 100644
|
||||
--- redis-2.2.11/deps/hiredis/Makefile
|
||||
+++ redis-2.2.11/deps/hiredis/Makefile
|
||||
@@ -26,6 +26,15 @@ ifeq ($(uname_S),Darwin)
|
||||
STLIBNAME?=libhiredis.a
|
||||
STLIB_MAKE_CMD?=libtool -static -o ${STLIBNAME} - ${OBJ}
|
||||
else
|
||||
+ifeq ($(uname_S),Haiku)
|
||||
+ CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings $(ARCH) $(PROF)
|
||||
+ CCLINK?=-lroot -lnetwork
|
||||
+ LDFLAGS?=-L. -Wl,-rpath,.
|
||||
+ DYLIBNAME?=libhiredis.so
|
||||
+ DYLIB_MAKE_CMD?=gcc -shared -Wl,-soname,${DYLIBNAME} -o ${DYLIBNAME} ${OBJ}
|
||||
+ STLIBNAME?=libhiredis.a
|
||||
+ STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ}
|
||||
+else
|
||||
CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings $(ARCH) $(PROF)
|
||||
CCLINK?=-lm -pthread
|
||||
LDFLAGS?=-L. -Wl,-rpath,.
|
||||
diff --git redis-2.2.11/src/Makefile redis-2.2.11/src/Makefile
|
||||
index 292255c..51d2910 100644
|
||||
--- redis-2.2.11/src/Makefile
|
||||
+++ redis-2.2.11/src/Makefile
|
||||
@@ -15,7 +15,12 @@ endif
|
||||
ifeq ($(uname_S),SunOS)
|
||||
CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -Wall -W -D__EXTENSIONS__ -D_XPG6
|
||||
CCLINK?=-ldl -lnsl -lsocket -lm -lpthread
|
||||
- DEBUG?=-g -ggdb
|
||||
+ DEBUG?=-g -ggdb
|
||||
+else
|
||||
+ifeq ($(uname_S),Haiku)
|
||||
+ CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
|
||||
+ CCLINK?=-lroot -lnetwork
|
||||
+ DEBUG?=-g -ggdb
|
||||
else
|
||||
CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
|
||||
CCLINK?=-lm -pthread
|
||||
--
|
||||
|
||||
diff --git redis-2.2.11/src/aof.c redis-2.2.11/src/aof.c
|
||||
index e30c77f..2403e83 100644
|
||||
--- redis-2.2.11/src/aof.c
|
||||
+++ redis-2.2.11/src/aof.c
|
||||
@@ -23,7 +23,7 @@ void stopAppendOnly(void) {
|
||||
int statloc;
|
||||
|
||||
if (kill(server.bgsavechildpid,SIGKILL) != -1)
|
||||
- wait3(&statloc,0,NULL);
|
||||
+ waitpid(&statloc,0,NULL);
|
||||
/* reset the buffer accumulating changes while the child saves */
|
||||
sdsfree(server.bgrewritebuf);
|
||||
server.bgrewritebuf = sdsempty();
|
||||
diff --git redis-2.2.11/src/redis.c redis-2.2.11/src/redis.c
|
||||
index 45be893..b7d1b0b 100644
|
||||
--- redis-2.2.11/src/redis.c
|
||||
+++ redis-2.2.11/src/redis.c
|
||||
@@ -589,7 +589,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
|
||||
int statloc;
|
||||
pid_t pid;
|
||||
|
||||
- if ((pid = wait3(&statloc,WNOHANG,NULL)) != 0) {
|
||||
+ if ((pid = waitpid(&statloc,WNOHANG,NULL)) != 0) {
|
||||
if (pid == server.bgsavechildpid) {
|
||||
backgroundSaveDoneHandler(statloc);
|
||||
} else {
|
||||
diff --git redis-2.2.11/src/sha1.c redis-2.2.11/src/sha1.c
|
||||
index 2c50433..312c777 100644
|
||||
--- redis-2.2.11/src/sha1.c
|
||||
+++ redis-2.2.11/src/sha1.c
|
||||
@@ -27,6 +27,9 @@ A million repetitions of "a"
|
||||
#if defined(__sun)
|
||||
#include "solarisfixes.h"
|
||||
#endif
|
||||
+#ifdef __HAIKU__
|
||||
+#include <stdint.h>
|
||||
+#endif
|
||||
#include "sha1.h"
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
18
dev-db/redis/redis-2.2.11.bep
Normal file
18
dev-db/redis/redis-2.2.11.bep
Normal file
@@ -0,0 +1,18 @@
|
||||
HOMEPAGE= "http://redis.io/"
|
||||
SRC_URI= "http://redis.googlecode.com/files/redis-2.2.11.tar.gz"
|
||||
REVISION = "1"
|
||||
DEPEND=""
|
||||
CHECKSUM_MD5= "5501c90ca02ae7ea93c34f067b3e0619"
|
||||
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
|
||||
BUILD {
|
||||
cd redis-2.2.11
|
||||
make PREFIX=`finddir B_COMMON_DIRECTORY`
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd redis-2.2.11
|
||||
make install PREFIX=`finddir B_COMMON_DIRECTORY`
|
||||
}
|
||||
|
||||
LICENSE="BSD (3-clause)"
|
||||
COPYRIGHT="2006-2010 Salvatore Sanfilippo"
|
||||
Reference in New Issue
Block a user