summaryrefslogtreecommitdiff
path: root/dev-libs/hiredis
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/hiredis
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/hiredis')
-rw-r--r--dev-libs/hiredis/Manifest4
-rw-r--r--dev-libs/hiredis/files/hiredis-0.13.3-disable-network-tests.patch36
-rw-r--r--dev-libs/hiredis/hiredis-0.13.3.ebuild78
-rw-r--r--dev-libs/hiredis/metadata.xml10
4 files changed, 128 insertions, 0 deletions
diff --git a/dev-libs/hiredis/Manifest b/dev-libs/hiredis/Manifest
new file mode 100644
index 000000000000..d56c2dbda1be
--- /dev/null
+++ b/dev-libs/hiredis/Manifest
@@ -0,0 +1,4 @@
+AUX hiredis-0.13.3-disable-network-tests.patch 1297 BLAKE2B 49b87fc28763d551c51524941dd8254765569546997dea69d427473799fe4921b96013cff79a9c09af3341bee848274a5b2281c16785fd44592ebbec866c6978 SHA512 bfbf4ee0a6780cbdcac4c8578aacac241d2b00c94dedd4f298ff06d65cab100f446072573ea0b57a513d3f7146070776fa08e949374e43272c2b05e601f250fc
+DIST hiredis-0.13.3.tar.gz 58291 BLAKE2B 2af5853475a48b1f05c17100197633af61663a23a1259c702545938367b6a5b9fc09b886e12f57d27f23db3f5c636bb42d7e58887cc1481b7016cea405345ddb SHA512 0d8b71d5ee4105e8aaeeee308795afc2c1f60a04b0bfe8ae873d800a0c157882ec307efa04a8d0e63b538fd3fc3f88eedf4d46cb87c8937e2403927aeb7e434c
+EBUILD hiredis-0.13.3.ebuild 1857 BLAKE2B 9217947c72f5744bf2d01ba12e647672417d8ee16379320cc9c1edbf3a8840478ef09bb14f132b4d42a381271c3a2a5b39bd4ba047b44cf3cd0335d65c5e9f7c SHA512 9bfb698ebfe74a1b9400b7ac25c0b9ec4b04efa2751f4a1f7b646a1d536cc15cfb57e9017a86e5661f74da66ec7521834a9fca7a00474363429a29877756a881
+MISC metadata.xml 297 BLAKE2B ba20b03da98e6f0ffb782592b6985c7ee18af0b4415302304e23af4886f32fc6c0228086dca3a5162d68da95ea617d919f3d838a2c27b1f396d1c60b1e1e1c62 SHA512 066533b525b755fc03d453dbec7c7af33a1f550d493e12fd96d773cb9b1b754ff02f689019277840bc29e3b1f9efc8226729637ed3c50b4b4cba1a64d3afaee9
diff --git a/dev-libs/hiredis/files/hiredis-0.13.3-disable-network-tests.patch b/dev-libs/hiredis/files/hiredis-0.13.3-disable-network-tests.patch
new file mode 100644
index 000000000000..000e2537b5a0
--- /dev/null
+++ b/dev-libs/hiredis/files/hiredis-0.13.3-disable-network-tests.patch
@@ -0,0 +1,36 @@
+diff --git test.c test.c
+index 8fde554..89ed6a0 100644
+--- a/test.c
++++ b/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.13.3.ebuild b/dev-libs/hiredis/hiredis-0.13.3.ebuild
new file mode 100644
index 000000000000..f9c5caf202ac
--- /dev/null
+++ b/dev-libs/hiredis/hiredis-0.13.3.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Minimalistic C client library for the Redis database"
+HOMEPAGE="https://github.com/redis/hiredis"
+SRC_URI="https://github.com/redis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/0.13"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 s390 sparc x86 ~x86-fbsd ~x64-solaris"
+IUSE="examples static-libs test"
+
+DEPEND="test? ( dev-db/redis )"
+
+src_prepare() {
+ local PATCHES=( "${FILESDIR}/${PN}-0.13.3-disable-network-tests.patch" )
+ default
+
+ # 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
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ local DOCS=( CHANGELOG.md README.md )
+ use examples && DOCS+=( examples )
+ einstalldocs
+}
diff --git a/dev-libs/hiredis/metadata.xml b/dev-libs/hiredis/metadata.xml
new file mode 100644
index 000000000000..23f7b8b8f5bc
--- /dev/null
+++ b/dev-libs/hiredis/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <slots>
+ <subslots>Reflect ABI of libhiredis.so.</subslots>
+ </slots>
+ <upstream>
+ <remote-id type="github">redis/hiredis</remote-id>
+ </upstream>
+</pkgmetadata>