dev-libs/hiredis: bump to 1.0.0

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2020-10-08 19:02:35 +00:00
parent 82bcf76e9d
commit c1badd3b7c
3 changed files with 134 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
DIST hiredis-0.14.1.tar.gz 64372 BLAKE2B 9846b05e21bfadb876e26ab45bf5c29a3283b602ef725dfbd877815be690bb5579551f0c452e1d8abf9ae985f6b71408a3b86b343ca5d6dce58dd4897640996a SHA512 a7310f2d65075df0c17636a0220e16487759471a3442b1de2595ab747565f6b6262e37131613b13e396b31050bcbe5529c35d420cd43fd7d500d9d563d469c4f
DIST hiredis-1.0.0.tar.gz 97507 BLAKE2B 247852d53be96e36dbdd7d4d8cfbda4406aa66281f26c28c3f80ab4593679122fd59430b2d5f04d20126b4459fc75af0a1fd67f1ee1db691d8db575debad2b61 SHA512 eb56201121eecdbfc8d42e8c2c141ae77bea248eeb36687ac6835c9b2404f5475beb351c4d8539d552db4d88e933bb2bd5b73f165e62b130bb11aeff39928e69
@@ -0,0 +1,53 @@
diff --git a/test.c b/test.c
index c0eeca7..5d70471 100644
--- a/test.c
+++ b/test.c
@@ -641,6 +641,7 @@ static void test_blocking_connection_errors(void) {
struct addrinfo *ai_tmp = NULL;
int rv = getaddrinfo(HIREDIS_BAD_DOMAIN, "6379", &hints, &ai_tmp);
+ #if 0
if (rv != 0) {
// Address does *not* exist
test("Returns error when host cannot be resolved: ");
@@ -662,6 +663,7 @@ static void test_blocking_connection_errors(void) {
printf("Skipping NXDOMAIN test. Found evil ISP!\n");
freeaddrinfo(ai_tmp);
}
+ #endif
#ifndef _WIN32
test("Returns error when the port is not open: ");
@@ -670,10 +672,12 @@ static void test_blocking_connection_errors(void) {
strcmp(c->errstr,"Connection refused") == 0);
redisFree(c);
+ #if 0
test("Returns error when the unix_sock socket path doesn't accept connections: ");
c = redisConnectUnix((char*)"/tmp/idontexist.sock");
test_cond(c->err == REDIS_ERR_IO); /* Don't care about the message... */
redisFree(c);
+ #endif
#endif
}
diff --git a/test.c b/test.c
index 1e8fce1..91625ca 100644
--- a/test.c
+++ b/test.c
@@ -1324,6 +1324,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);
@@ -1332,6 +1333,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): ", cfg.unix_sock.path);
if (test_unix_socket) {
+80
View File
@@ -0,0 +1,80 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
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/1.0.0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-solaris"
IUSE="examples static-libs test"
RESTRICT="!test? ( test )"
DEPEND="test? ( dev-db/redis )"
src_prepare() {
local PATCHES=(
"${FILESDIR}/${PN}-1.0.0-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)" \
DEBUG_FLAGS= \
OPTIMIZATION= \
"$@"
}
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
}