summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2016-08-24 02:33:44 +0200
committerThomas Deutschmann <whissi@gentoo.org>2016-08-24 02:57:20 +0200
commit10beaf0d821c58e1779a2f001add50f25a9c6676 (patch)
treefc9f4275022ed3f4623c4d9843933a70e57aef37 /dev-libs/hiredis
parentdev-libs/liblognorm: Bumped to v2.0.1 (diff)
downloadgentoo-10beaf0d821c58e1779a2f001add50f25a9c6676.tar.gz
gentoo-10beaf0d821c58e1779a2f001add50f25a9c6676.tar.bz2
gentoo-10beaf0d821c58e1779a2f001add50f25a9c6676.zip
dev-libs/hiredis: Bump to v0.13.3
Gentoo-Bug: https://bugs.gentoo.org/585648 Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-libs/hiredis')
-rw-r--r--dev-libs/hiredis/Manifest1
-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.ebuild79
-rw-r--r--dev-libs/hiredis/metadata.xml3
4 files changed, 119 insertions, 0 deletions
diff --git a/dev-libs/hiredis/Manifest b/dev-libs/hiredis/Manifest
index 97b6add58d60..030a7ccdb699 100644
--- a/dev-libs/hiredis/Manifest
+++ b/dev-libs/hiredis/Manifest
@@ -1,2 +1,3 @@
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
+DIST hiredis-0.13.3.tar.gz 58291 SHA256 717e6fc8dc2819bef522deaca516de9e51b9dfa68fe393b7db5c3b6079196f78 SHA512 0d8b71d5ee4105e8aaeeee308795afc2c1f60a04b0bfe8ae873d800a0c157882ec307efa04a8d0e63b538fd3fc3f88eedf4d46cb87c8937e2403927aeb7e434c WHIRLPOOL 511f86f680a005bd1fa75494707bf5a16670c3f2b7ac0fd61684546368868a2545fa7aa74b63e3865be8ec7cb301417c5a945fe090de398066f098bef01d664b
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..b54ef83efa3f
--- /dev/null
+++ b/dev-libs/hiredis/hiredis-0.13.3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="~amd64 ~hppa ~ppc64 ~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
index 8320586c3a39..23f7b8b8f5bc 100644
--- a/dev-libs/hiredis/metadata.xml
+++ b/dev-libs/hiredis/metadata.xml
@@ -1,6 +1,9 @@
<?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>