summaryrefslogtreecommitdiff
path: root/dev-libs/hiredis
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/hiredis
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/hiredis')
-rw-r--r--dev-libs/hiredis/Manifest6
-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, 130 insertions, 0 deletions
diff --git a/dev-libs/hiredis/Manifest b/dev-libs/hiredis/Manifest
new file mode 100644
index 000000000000..03b07e3434b4
--- /dev/null
+++ b/dev-libs/hiredis/Manifest
@@ -0,0 +1,6 @@
+AUX hiredis-0.13.3-disable-network-tests.patch 1297 SHA256 fa5cfdc403384a0b1e230f49748c64357d98a2af594edc990e18061edf49a7b2 SHA512 bfbf4ee0a6780cbdcac4c8578aacac241d2b00c94dedd4f298ff06d65cab100f446072573ea0b57a513d3f7146070776fa08e949374e43272c2b05e601f250fc WHIRLPOOL d882076d8d9264e3c7e5efffc4914d2946de54c1ef141d230e7e5d273b73631c8f2ff2c2b745b94c9c562f33410edcbb3670f62cfa7c2d44a3b519bf116b5e6d
+DIST hiredis-0.13.3.tar.gz 58291 SHA256 717e6fc8dc2819bef522deaca516de9e51b9dfa68fe393b7db5c3b6079196f78 SHA512 0d8b71d5ee4105e8aaeeee308795afc2c1f60a04b0bfe8ae873d800a0c157882ec307efa04a8d0e63b538fd3fc3f88eedf4d46cb87c8937e2403927aeb7e434c WHIRLPOOL 511f86f680a005bd1fa75494707bf5a16670c3f2b7ac0fd61684546368868a2545fa7aa74b63e3865be8ec7cb301417c5a945fe090de398066f098bef01d664b
+EBUILD hiredis-0.13.3.ebuild 1852 SHA256 4036021a3c70d2a58bfbad1d936770d0a6e98c15d3762e8d77736b9270e30d4a SHA512 b7036423b9c68e5e76b9c3dc8a8e131c9ed2beff3ccf79cfd352346e561fa98511b029cc3440c49025e92fae51c237c180ba8fbaa96ecc50ab8863d97413cfb1 WHIRLPOOL 931f6913fba63b6f3afbeaddefd494bc685aa21ce87557b37dcaaea9ebbc62e9e39175c295d2277edfd91cf52de752624e880037663e0426ae7069d1d0261e7a
+MISC ChangeLog 3663 SHA256 3f1a4552ea2b6600ec45a42e0fbc18c71b3206cf512e5be0bd1b0a4d60ec32bb SHA512 3274f031f4b684dc03b2fc0dc7984de5c7024e1eba9b01754c331eabc5b11e8707d853b7f54d9b4a2febd43414f1b399cc454ed6e01c0c696028cd1fa22f20a8 WHIRLPOOL ce152c7bf62b17407a6dbc9aee904d4d14de3bd6714840e7638ce11d4df5126ec6456d42225c199849751bdae2e2bc0626d6afbdfd2d715804301be3df7d3b51
+MISC ChangeLog-2015 3055 SHA256 d1875c093b00442aec43b0d899822f4ce0abb2a041c9632cb36e4e144649d234 SHA512 130d030e6b12e033f82898736a2b782d3fcfd3c741145613b6e9e80cfcaf04104df6c88ddab2347b41585847a1bebc7c6adc209677058a77535ec99baa9461a8 WHIRLPOOL d47799f9731eb0a398867f0bf4f7f5ec7f4fa4e879d4554378345dfb6c90cef5cc14d35dee32f4db7b6379024f0cc3ad9868174c758c05a4df09d006996171fe
+MISC metadata.xml 297 SHA256 c638f8e333458bb63e04b1e5a80af900577a4d6bf58380ff269ad008c4e5bf1f SHA512 066533b525b755fc03d453dbec7c7af33a1f550d493e12fd96d773cb9b1b754ff02f689019277840bc29e3b1f9efc8226729637ed3c50b4b4cba1a64d3afaee9 WHIRLPOOL bf69a8366bcc9cfb577949c199f3ced115d66c06a175d231a089d97a4c072528a4294503254a96da9b10c0c0934c6a2ec5bf3a84bbde09bd97069cc209504f65
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..5ba57f6d832b
--- /dev/null
+++ b/dev-libs/hiredis/hiredis-0.13.3.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 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 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>