diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-06-15 06:58:52 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-06-15 06:58:52 +0000 |
commit | a12682087f6888da59d5dd6a6ee0e9f062ad8eb3 (patch) | |
tree | dffa51316ef9bdba33c6f81d1002a68a08053226 /dev-libs | |
parent | Version bump. Add ruby22. (diff) | |
download | gentoo-2-a12682087f6888da59d5dd6a6ee0e9f062ad8eb3.tar.gz gentoo-2-a12682087f6888da59d5dd6a6ee0e9f062ad8eb3.tar.bz2 gentoo-2-a12682087f6888da59d5dd6a6ee0e9f062ad8eb3.zip |
Version bump with some fixes. Install a pkg-config file. Run tests against a isolated redis instance.
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/hiredis/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/hiredis/files/hiredis-0.13.1-disable-network-tests.patch | 36 | ||||
-rw-r--r-- | dev-libs/hiredis/hiredis-0.13.1.ebuild | 77 |
3 files changed, 121 insertions, 1 deletions
diff --git a/dev-libs/hiredis/ChangeLog b/dev-libs/hiredis/ChangeLog index 6fa27fc678b7..bc7ebff02664 100644 --- a/dev-libs/hiredis/ChangeLog +++ b/dev-libs/hiredis/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-libs/hiredis # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/hiredis/ChangeLog,v 1.21 2015/06/06 18:59:32 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/hiredis/ChangeLog,v 1.22 2015/06/15 06:58:52 mgorny Exp $ + +*hiredis-0.13.1 (15 Jun 2015) + + 15 Jun 2015; Michał Górny <mgorny@gentoo.org> + +files/hiredis-0.13.1-disable-network-tests.patch, +hiredis-0.13.1.ebuild: + Version bump with some fixes. Install a pkg-config file. Run tests against a + isolated redis instance. 06 Jun 2015; Justin Lecher <jlec@gentoo.org> metadata.xml: Add github to remote-id in metadata.xml 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.13.1.ebuild b/dev-libs/hiredis/hiredis-0.13.1.ebuild new file mode 100644 index 000000000000..d6b25d3fc9d4 --- /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 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/hiredis/hiredis-0.13.1.ebuild,v 1.1 2015/06/15 06:58:52 mgorny Exp $ + +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 +} |