pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/hiredis Add hiredis-0.11.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/931f27518300
branches:  trunk
changeset: 632637:931f27518300
user:      wiedi <wiedi%pkgsrc.org@localhost>
date:      Wed Apr 02 17:25:44 2014 +0000

description:
Add hiredis-0.11.0

Hiredis is a minimalistic C client library for the Redis database.

It is minimalistic because it just adds minimal support for the
protocol, but at the same time it uses an high level printf-alike
API in order to make it much higher level than otherwise suggested
by its minimal code base and the lack of explicit bindings for
every Redis command.

Apart from supporting sending commands and receiving replies, it
comes with a reply parser that is decoupled from the I/O layer. It
is a stream parser designed for easy reusability, which can for
instance be used in higher level language bindings for efficient
reply parsing.

Hiredis only supports the binary-safe Redis protocol, so you can
use it with any Redis version >= 1.2.0.

The library comes with multiple APIs. There is the synchronous API,
the asynchronous API and the reply parsing API.

diffstat:

 databases/hiredis/DESCR                   |  19 ++++++++
 databases/hiredis/Makefile                |  19 ++++++++
 databases/hiredis/PLIST                   |   7 +++
 databases/hiredis/buildlink3.mk           |  12 +++++
 databases/hiredis/distinfo                |   7 +++
 databases/hiredis/patches/patch-Makefile  |  69 +++++++++++++++++++++++++++++++
 databases/hiredis/patches/patch-fmacros.h |  14 ++++++
 7 files changed, 147 insertions(+), 0 deletions(-)

diffs (175 lines):

diff -r 46c2c527636a -r 931f27518300 databases/hiredis/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/hiredis/DESCR   Wed Apr 02 17:25:44 2014 +0000
@@ -0,0 +1,19 @@
+Hiredis is a minimalistic C client library for the Redis database.
+
+It is minimalistic because it just adds minimal support for the
+protocol, but at the same time it uses an high level printf-alike
+API in order to make it much higher level than otherwise suggested
+by its minimal code base and the lack of explicit bindings for
+every Redis command.
+
+Apart from supporting sending commands and receiving replies, it
+comes with a reply parser that is decoupled from the I/O layer. It
+is a stream parser designed for easy reusability, which can for
+instance be used in higher level language bindings for efficient
+reply parsing.
+
+Hiredis only supports the binary-safe Redis protocol, so you can
+use it with any Redis version >= 1.2.0.
+
+The library comes with multiple APIs. There is the synchronous API,
+the asynchronous API and the reply parsing API.
diff -r 46c2c527636a -r 931f27518300 databases/hiredis/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/hiredis/Makefile        Wed Apr 02 17:25:44 2014 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2014/04/02 17:25:44 wiedi Exp $
+
+VERSION=       0.11.0
+DISTNAME=      v${VERSION}
+PKGNAME=       hiredis-${VERSION}
+CATEGORIES=    databases
+MASTER_SITES=  https://github.com/redis/hiredis/archive/
+
+MAINTAINER=    wiedi%frubar.net@localhost
+HOMEPAGE=      https://github.com/redis/hiredis/
+COMMENT=       Minimalistic C client library for the Redis database
+LICENSE=       modified-bsd
+
+USE_TOOLS+=    gmake
+USE_LIBTOOL=   yes
+WRKSRC=                ${WRKDIR}/hiredis-${VERSION}
+MAKE_ENV+=     DESTDIR=${DESTDIR}
+
+.include "../../mk/bsd.pkg.mk"
diff -r 46c2c527636a -r 931f27518300 databases/hiredis/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/hiredis/PLIST   Wed Apr 02 17:25:44 2014 +0000
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2014/04/02 17:25:44 wiedi Exp $
+include/hiredis/adapters/ae.h
+include/hiredis/adapters/libev.h
+include/hiredis/adapters/libevent.h
+include/hiredis/async.h
+include/hiredis/hiredis.h
+lib/libhiredis.la
diff -r 46c2c527636a -r 931f27518300 databases/hiredis/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/hiredis/buildlink3.mk   Wed Apr 02 17:25:44 2014 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2014/04/02 17:25:44 wiedi Exp $
+
+BUILDLINK_TREE+=       hiredis
+
+.if !defined(HIREDIS_BUILDLINK3_MK)
+HIREDIS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.hiredis+=        hiredis>=0.11.0
+BUILDLINK_PKGSRCDIR.hiredis?=  ../../databases/hiredis
+.endif # HIREDIS_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -hiredis
diff -r 46c2c527636a -r 931f27518300 databases/hiredis/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/hiredis/distinfo        Wed Apr 02 17:25:44 2014 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2014/04/02 17:25:44 wiedi Exp $
+
+SHA1 (v0.11.0.tar.gz) = 694b6d7a6e4ea7fb20902619e9a2423c014b37c1
+RMD160 (v0.11.0.tar.gz) = a22c38518d32b8badd77c486ab041e3e54f3ff71
+Size (v0.11.0.tar.gz) = 42137 bytes
+SHA1 (patch-Makefile) = fac6faa11c2dd80acaf7a378cc4146d7a03a937c
+SHA1 (patch-fmacros.h) = 77e49207baeccae657a8d2c85429d6e76c2438b3
diff -r 46c2c527636a -r 931f27518300 databases/hiredis/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/hiredis/patches/patch-Makefile  Wed Apr 02 17:25:44 2014 +0000
@@ -0,0 +1,69 @@
+$NetBSD: patch-Makefile,v 1.1 2014/04/02 17:25:44 wiedi Exp $
+add DESTDIR and use libtool
+
+--- Makefile.orig      2012-08-28 06:55:52.000000000 +0000
++++ Makefile
+@@ -27,6 +27,8 @@ DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname
+ STLIBNAME=$(LIBNAME).$(STLIBSUFFIX)
+ STLIB_MAKE_CMD=ar rcs $(STLIBNAME)
+ 
++LANAME=$(LIBNAME).la
++
+ # Platform-specific overrides
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ ifeq ($(uname_S),SunOS)
+@@ -41,7 +43,7 @@ ifeq ($(uname_S),Darwin)
+   DYLIB_MAKE_CMD=$(CC) -shared -Wl,-install_name,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
+ endif
+ 
+-all: $(DYLIBNAME) $(BINS)
++all: $(LANAME)
+ 
+ # Deps (use make dep to generate this)
+ net.o: net.c fmacros.h net.h hiredis.h
+@@ -60,6 +62,13 @@ $(STLIBNAME): $(OBJ)
+ dynamic: $(DYLIBNAME)
+ static: $(STLIBNAME)
+ 
++$(LANAME): $(OBJ)
++      $(LIBTOOL) --mode=link \
++              $(CC) -o $(LANAME) \
++              $(OBJ:.o=.lo) \
++              -rpath $(PREFIX)/lib \
++              -version-number $(HIREDIS_MAJOR):$(HIREDIS_MINOR)
++
+ # Binaries:
+ hiredis-example-libevent: example-libevent.c adapters/libevent.h $(STLIBNAME)
+       $(CC) -o $@ $(REAL_CFLAGS) $(REAL_LDFLAGS) -levent example-libevent.c $(STLIBNAME)
+@@ -95,7 +104,7 @@ check: hiredis-test
+       kill `cat /tmp/hiredis-test-redis.pid`
+ 
+ .c.o:
+-      $(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $<
++      $(LIBTOOL) --mode=compile $(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $<
+ 
+ clean:
+       rm -rf $(DYLIBNAME) $(STLIBNAME) $(BINS) hiredis-example* *.o *.gcda *.gcno *.gcov
+@@ -107,8 +116,8 @@ dep:
+ PREFIX?=/usr/local
+ INCLUDE_PATH?=include/hiredis
+ LIBRARY_PATH?=lib
+-INSTALL_INCLUDE_PATH= $(PREFIX)/$(INCLUDE_PATH)
+-INSTALL_LIBRARY_PATH= $(PREFIX)/$(LIBRARY_PATH)
++INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH)
++INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
+ 
+ ifeq ($(uname_S),SunOS)
+   INSTALL?= cp -r
+@@ -119,10 +128,7 @@ INSTALL?= cp -a
+ install: $(DYLIBNAME) $(STLIBNAME)
+       mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
+       $(INSTALL) hiredis.h async.h adapters $(INSTALL_INCLUDE_PATH)
+-      $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
+-      cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
+-      cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MAJOR_NAME) $(DYLIBNAME)
+-      $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
++      $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(LANAME) $(DESTDIR)$(PREFIX)/lib
+ 
+ 32bit:
+       @echo ""
diff -r 46c2c527636a -r 931f27518300 databases/hiredis/patches/patch-fmacros.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/hiredis/patches/patch-fmacros.h Wed Apr 02 17:25:44 2014 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-fmacros.h,v 1.1 2014/04/02 17:25:45 wiedi Exp $
+getaddrinfo visibility on NetBSD
+
+--- fmacros.h.orig     2012-08-28 06:55:52.000000000 +0000
++++ fmacros.h
+@@ -7,7 +7,7 @@
+ 
+ #if defined(__sun__)
+ #define _POSIX_C_SOURCE 200112L
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__NetBSD__)
+ #define _XOPEN_SOURCE 600
+ #else
+ #define _XOPEN_SOURCE



Home | Main Index | Thread Index | Old Index