diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
commit | d934827bf44b7cfcf6711964418148fa60877668 (patch) | |
tree | 0625f358789b5e015e49db139cc1dbc9be00428f /dev-libs/hiredis | |
parent | 2e34d110f164bf74d55fced27fe0000201b3eec5 (diff) |
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-libs/hiredis')
-rw-r--r-- | dev-libs/hiredis/Manifest | 5 | ||||
-rw-r--r-- | dev-libs/hiredis/files/hiredis-1.0.0-disable-network-tests.patch | 53 | ||||
-rw-r--r-- | dev-libs/hiredis/hiredis-0.14.1.ebuild | 2 | ||||
-rw-r--r-- | dev-libs/hiredis/hiredis-1.0.0.ebuild | 83 |
4 files changed, 141 insertions, 2 deletions
diff --git a/dev-libs/hiredis/Manifest b/dev-libs/hiredis/Manifest index f1d8ad847b6a..9d637d7f200b 100644 --- a/dev-libs/hiredis/Manifest +++ b/dev-libs/hiredis/Manifest @@ -1,5 +1,8 @@ AUX hiredis-0.13.3-disable-network-tests.patch 1297 BLAKE2B 49b87fc28763d551c51524941dd8254765569546997dea69d427473799fe4921b96013cff79a9c09af3341bee848274a5b2281c16785fd44592ebbec866c6978 SHA512 bfbf4ee0a6780cbdcac4c8578aacac241d2b00c94dedd4f298ff06d65cab100f446072573ea0b57a513d3f7146070776fa08e949374e43272c2b05e601f250fc AUX hiredis-0.14.1-honor-AR.patch 441 BLAKE2B efbb4c544b6418f689789c2c4147bf45e6b7385718898c4091b2bdf79f409fb34b1499b3af6ad903f524d6dbe96dcb90e404f6b2c33d03e4a2cd829bea18adb8 SHA512 ac6ddda51071918234cf3b79c4df094ec14c5eeecc35f4cabb2c5b6549089db704f7a69585a9bb21c95b72b203010f75c23252e80663381502663d76538f3820 +AUX hiredis-1.0.0-disable-network-tests.patch 1760 BLAKE2B 9e2837834e0e7b0411ad4349a16c89d060c6b77552c98c11c03048f3f9ebbc16c47de3d9428ea3fa83da8878d1404eea8d9cd62b6e561104ec81c155507fd75b SHA512 d7d24991d29712e697ee22716933ea0c78e743d1689a452dab13d0d7e1a865ba479c08b17d4a743d05880e22d652c97f7b5fb4250841f14040696fdbd1e86390 DIST hiredis-0.14.1.tar.gz 64372 BLAKE2B 9846b05e21bfadb876e26ab45bf5c29a3283b602ef725dfbd877815be690bb5579551f0c452e1d8abf9ae985f6b71408a3b86b343ca5d6dce58dd4897640996a SHA512 a7310f2d65075df0c17636a0220e16487759471a3442b1de2595ab747565f6b6262e37131613b13e396b31050bcbe5529c35d420cd43fd7d500d9d563d469c4f -EBUILD hiredis-0.14.1.ebuild 1899 BLAKE2B 36cf0eae92dc3cfed0979be6ce3b46d2d582fd944fcb40fa0e34cb855e9dd63acccd0cdb7b5af33147a8984a8d168e821283054ef07babbebaac7973d2040960 SHA512 1db9c4fd111f6763728fd0594e042e9e074c4f28294c0c3b724052b701dab642469c9e6a0480bee2ff56faacb6b5cb0cc0f1d91681842f4ff51937893f1f03a8 +DIST hiredis-1.0.0.tar.gz 97507 BLAKE2B 247852d53be96e36dbdd7d4d8cfbda4406aa66281f26c28c3f80ab4593679122fd59430b2d5f04d20126b4459fc75af0a1fd67f1ee1db691d8db575debad2b61 SHA512 eb56201121eecdbfc8d42e8c2c141ae77bea248eeb36687ac6835c9b2404f5475beb351c4d8539d552db4d88e933bb2bd5b73f165e62b130bb11aeff39928e69 +EBUILD hiredis-0.14.1.ebuild 1890 BLAKE2B 109667eb491520623a1a19d320344c1fd56f3b54b695ad8540e0862fb161b0f43bd7a98248478d1cbd7c28b4efa29ce846fadd7099758b72356d00fd32b7257f SHA512 a36938d6d27ca67b19971e1b3b12b36420d4ea1521eec70857f878a988f7ee5e60335f69f06a234d5c1ebd34ba7acc45b77885edb19c4c2ea03cffbd50ef50ea +EBUILD hiredis-1.0.0.ebuild 1908 BLAKE2B 48ab82962c5436da52c3e3ae8a372286e17a566d7410b7723215b6ee07fcbd2d642a336c971d7aea1f62ad5a71f5126e54b397baef10035bc1ef48ded1af67cb SHA512 4bfe36d12afef468b089e43f5a463a928faae849622dab6ba654ce47bee993fc0c8a5597ba48270621d1d4e3b49cbd8ad0b9b5eb9a85d72ffba8bd179e5080f6 MISC metadata.xml 324 BLAKE2B 4b317777c17533d9f574064a410d1431dde5ac68fe50b25140f63cd21829b30cede1a4e3d38996eb50de1cc38257a9e5eabb2c2871c1d5727132a698048de93e SHA512 5c81a7e5c915ae46f6d2849806534ee520d413f8ca2f640c7441a61a478652bdc6f0a2501504843b1f07b557c06c0045e92ee87a949e018f7d95884e38faf78c diff --git a/dev-libs/hiredis/files/hiredis-1.0.0-disable-network-tests.patch b/dev-libs/hiredis/files/hiredis-1.0.0-disable-network-tests.patch new file mode 100644 index 000000000000..c8a5822c8ef0 --- /dev/null +++ b/dev-libs/hiredis/files/hiredis-1.0.0-disable-network-tests.patch @@ -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) { diff --git a/dev-libs/hiredis/hiredis-0.14.1.ebuild b/dev-libs/hiredis/hiredis-0.14.1.ebuild index b0bf2fbfaedb..c930d36b3258 100644 --- a/dev-libs/hiredis/hiredis-0.14.1.ebuild +++ b/dev-libs/hiredis/hiredis-0.14.1.ebuild @@ -69,7 +69,7 @@ src_test() { src_install() { _build PREFIX="${ED}/usr" install if ! use static-libs; then - rm "${ED}/usr/$(get_libdir)/libhiredis.a" || die + find "${ED}" -name '*.a' -delete || die fi insinto /usr/$(get_libdir)/pkgconfig diff --git a/dev-libs/hiredis/hiredis-1.0.0.ebuild b/dev-libs/hiredis/hiredis-1.0.0.ebuild new file mode 100644 index 000000000000..5ca5e35b261c --- /dev/null +++ b/dev-libs/hiredis/hiredis-1.0.0.ebuild @@ -0,0 +1,83 @@ +# 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 ssl static-libs test" +RESTRICT="!test? ( test )" + +DEPEND=" + ssl? ( dev-libs/openssl ) + 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)" \ + USE_SSL=$(usex ssl 1 0) \ + 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 + find "${ED}" -name '*.a' -delete || die + fi + + insinto /usr/$(get_libdir)/pkgconfig + doins ${PN}.pc + + local DOCS=( CHANGELOG.md README.md ) + use examples && DOCS+=( examples ) + einstalldocs +} |