summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/hiredis')
-rw-r--r--dev-libs/hiredis/Manifest2
-rw-r--r--dev-libs/hiredis/files/hiredis-0.11.0-disable-network-tests.patch33
-rw-r--r--dev-libs/hiredis/files/hiredis-0.13.1-disable-network-tests.patch36
-rw-r--r--dev-libs/hiredis/hiredis-0.11.0-r1.ebuild50
-rw-r--r--dev-libs/hiredis/hiredis-0.11.0.ebuild46
-rw-r--r--dev-libs/hiredis/hiredis-0.13.1.ebuild77
-rw-r--r--dev-libs/hiredis/metadata.xml11
7 files changed, 255 insertions, 0 deletions
diff --git a/dev-libs/hiredis/Manifest b/dev-libs/hiredis/Manifest
new file mode 100644
index 000000000000..97b6add58d60
--- /dev/null
+++ b/dev-libs/hiredis/Manifest
@@ -0,0 +1,2 @@
+DIST hiredis-0.11.0.tar.gz 42137 SHA256 ff7b2849e55bf3589eecced7125934feb9645c36a4d490d001dc08c93553eafd SHA512 a506c3e09267bd431dea87fdb7f9a44fb1d4795cbecb31323fe2fb9d66c10351fbf6d931fdaf2731fc2d0a985234e5d6ba0c9e694374d2f414294d27b6f060b8 WHIRLPOOL 0d4d4385452b4fe3aabc7cbdbef95914fea685a65f44a6b2addaec8f0f7779ed7f72c50cfbb976e1838553746ae90f2ce8685c208727e450738ff2bb29cca144
+DIST hiredis-0.13.1.tar.gz 54912 SHA256 8865105e15331156a74b64aafbfd3f8c784a8375e003a55512dcca3d82168487 SHA512 70b533a6cfbc3ce2b64018978e4f4460ca9a204ede92b571638ed4f04960199be0704cff16fcaf368e5c997a01e3b2da98e3c556c2f05c8316381f989684fcf1 WHIRLPOOL 6b2884217544a78153b33d4bc758f8d5bfe2cf29a16c768df7ffefbe7def43c7ae1477f1826790fdc64999b272bd33f72e10a968e606324366cb2b5539a0df71
diff --git a/dev-libs/hiredis/files/hiredis-0.11.0-disable-network-tests.patch b/dev-libs/hiredis/files/hiredis-0.11.0-disable-network-tests.patch
new file mode 100644
index 000000000000..a67503861c24
--- /dev/null
+++ b/dev-libs/hiredis/files/hiredis-0.11.0-disable-network-tests.patch
@@ -0,0 +1,33 @@
+--- test.c.orig 2013-02-05 10:45:22.000000000 -0500
++++ test.c 2013-02-05 10:43:19.000000000 -0500
+@@ -282,12 +282,14 @@
+ static void test_blocking_connection_errors(void) {
+ redisContext *c;
+
++ /*
+ test("Returns error when host cannot be resolved: ");
+ c = redisConnect((char*)"idontexist.local", 6379);
+ test_cond(c->err == REDIS_ERR_OTHER &&
+ (strcmp(c->errstr,"Name or service not known") == 0 ||
+ strcmp(c->errstr,"Can't resolve: idontexist.local") == 0));
+ redisFree(c);
++ */
+
+ test("Returns error when the port is not open: ");
+ c = redisConnect((char*)"localhost", 1);
+@@ -634,6 +636,7 @@
+ test_reply_reader();
+ test_blocking_connection_errors();
+
++/*
+ printf("\nTesting against TCP connection (%s:%d):\n", cfg.tcp.host, cfg.tcp.port);
+ cfg.type = CONN_TCP;
+ test_blocking_connection(cfg);
+@@ -645,6 +648,7 @@
+ test_blocking_connection(cfg);
+ test_blocking_io_errors(cfg);
+ if (throughput) test_throughput(cfg);
++*/
+
+ if (fails) {
+ printf("*** %d TESTS FAILED ***\n", fails);
diff --git a/dev-libs/hiredis/files/hiredis-0.13.1-disable-network-tests.patch b/dev-libs/hiredis/files/hiredis-0.13.1-disable-network-tests.patch
new file mode 100644
index 000000000000..2fcbb076d5df
--- /dev/null
+++ b/dev-libs/hiredis/files/hiredis-0.13.1-disable-network-tests.patch
@@ -0,0 +1,36 @@
+diff --git test.c test.c
+index 8fde554..89ed6a0 100644
+--- test.c
++++ test.c
+@@ -343,6 +343,7 @@ static void test_free_null(void) {
+ static void test_blocking_connection_errors(void) {
+ redisContext *c;
+
++#if 0
+ test("Returns error when host cannot be resolved: ");
+ c = redisConnect((char*)"idontexist.test", 6379);
+ test_cond(c->err == REDIS_ERR_OTHER &&
+@@ -353,6 +354,7 @@ static void test_blocking_connection_errors(void) {
+ strcmp(c->errstr,"Temporary failure in name resolution") == 0 ||
+ strcmp(c->errstr,"no address associated with name") == 0));
+ redisFree(c);
++#endif
+
+ test("Returns error when the port is not open: ");
+ c = redisConnect((char*)"localhost", 1);
+@@ -773,6 +775,7 @@ int main(int argc, char **argv) {
+ test_blocking_connection_errors();
+ test_free_null();
+
++#if 0
+ printf("\nTesting against TCP connection (%s:%d):\n", cfg.tcp.host, cfg.tcp.port);
+ cfg.type = CONN_TCP;
+ test_blocking_connection(cfg);
+@@ -781,6 +784,7 @@ int main(int argc, char **argv) {
+ test_invalid_timeout_errors(cfg);
+ test_append_formatted_commands(cfg);
+ if (throughput) test_throughput(cfg);
++#endif
+
+ printf("\nTesting against Unix socket connection (%s):\n", cfg.unix.path);
+ cfg.type = CONN_UNIX;
diff --git a/dev-libs/hiredis/hiredis-0.11.0-r1.ebuild b/dev-libs/hiredis/hiredis-0.11.0-r1.ebuild
new file mode 100644
index 000000000000..4758a370ccb6
--- /dev/null
+++ b/dev-libs/hiredis/hiredis-0.11.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+DESCRIPTION="Minimalistic C client library for the Redis database"
+HOMEPAGE="http://github.com/redis/hiredis"
+SRC_URI="http://github.com/redis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x64-solaris"
+IUSE="static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-disable-network-tests.patch"
+
+ # use GNU ld syntax on Solaris
+ sed -i -e '/DYLIB_MAKE_CMD=.* -G/d' Makefile || die
+}
+
+_emake() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ ARCH= \
+ DEBUG= \
+ OPTIMIZATION="${CPPFLAGS}" \
+ "$@"
+}
+
+src_compile() {
+ # The static lib re-uses the same objects as the shared lib, so
+ # overhead is low w/creating it all the time. It's also needed
+ # by the tests.
+ _emake dynamic static
+}
+
+src_test() {
+ _emake test
+}
+
+src_install() {
+ _emake PREFIX="${ED}/usr" LIBRARY_PATH="$(get_libdir)" install
+ use static-libs || rm "${ED}/usr/$(get_libdir)/libhiredis.a"
+ dodoc CHANGELOG.md README.md
+}
diff --git a/dev-libs/hiredis/hiredis-0.11.0.ebuild b/dev-libs/hiredis/hiredis-0.11.0.ebuild
new file mode 100644
index 000000000000..2bef3b77858a
--- /dev/null
+++ b/dev-libs/hiredis/hiredis-0.11.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+DESCRIPTION="Minimalistic C client library for the Redis database"
+HOMEPAGE="http://github.com/redis/hiredis"
+SRC_URI="http://github.com/redis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~x86 ~x86-fbsd ~x64-solaris"
+IUSE="debug"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+DOCS="CHANGELOG.md README.md"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-disable-network-tests.patch"
+
+ # use GNU ld syntax on Solaris
+ sed -i -e '/DYLIB_MAKE_CMD=.* -G/d' Makefile || die
+}
+
+src_compile() {
+
+ if ! use debug; then
+ emake CC="$(tc-getCC)" ARCH= DEBUG=
+ else
+ emake CC="$(tc-getCC)" ARCH=
+ fi
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ emake PREFIX="${ED}/usr" LIBRARY_PATH="$(get_libdir)" install
+ dodoc ${DOCS}
+}
diff --git a/dev-libs/hiredis/hiredis-0.13.1.ebuild b/dev-libs/hiredis/hiredis-0.13.1.ebuild
new file mode 100644
index 000000000000..608d42fa01c4
--- /dev/null
+++ b/dev-libs/hiredis/hiredis-0.13.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="Minimalistic C client library for the Redis database"
+HOMEPAGE="http://github.com/redis/hiredis"
+SRC_URI="http://github.com/redis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc64 ~x86 ~x86-fbsd ~x64-solaris"
+IUSE="examples static-libs test"
+
+DEPEND="test? ( dev-db/redis )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-disable-network-tests.patch"
+
+ # use GNU ld syntax on Solaris
+ sed -i -e '/DYLIB_MAKE_CMD=.* -G/d' Makefile || die
+}
+
+_build() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ PREFIX="${EPREFIX%/}/usr" \
+ LIBRARY_PATH="$(get_libdir)" \
+ ARCH= \
+ DEBUG= \
+ OPTIMIZATION="${CPPFLAGS}" \
+ "$@"
+}
+
+src_compile() {
+ # The static lib re-uses the same objects as the shared lib, so
+ # overhead is low w/creating it all the time. It's also needed
+ # by the tests.
+ _build dynamic static hiredis.pc
+}
+
+src_test() {
+ local REDIS_PID="${T}"/hiredis.pid
+ local REDIS_SOCK="${T}"/hiredis.sock
+ local REDIS_PORT=56379
+ local REDIS_TEST_CONFIG="daemonize yes
+ pidfile ${REDIS_PID}
+ port ${REDIS_PORT}
+ bind 127.0.0.1
+ unixsocket //${REDIS_SOCK}"
+
+ _build hiredis-test
+
+ /usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die
+ ./hiredis-test -h 127.0.0.1 -p ${REDIS_PID} -s ${REDIS_SOCK}
+ local ret=$?
+
+ kill "$(<"${REDIS_PID}")" || die
+ [ ${ret} != "0" ] && die "tests failed"
+}
+
+src_install() {
+ _build PREFIX="${ED%/}/usr" install
+ if use static-libs; then
+ rm "${ED%/}/usr/$(get_libdir)/libhiredis.a" || die
+ fi
+ use examples && dodoc -r examples
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ dodoc CHANGELOG.md README.md
+}
diff --git a/dev-libs/hiredis/metadata.xml b/dev-libs/hiredis/metadata.xml
new file mode 100644
index 000000000000..036e0b2a9f83
--- /dev/null
+++ b/dev-libs/hiredis/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>neurogeek@gentoo.org</email>
+ <name>Jesus Rivero</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">redis/hiredis</remote-id>
+ </upstream>
+</pkgmetadata>