From da7ae1dd1fccb6b3c0e4763ab983ad96d57bf463 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 20 Apr 2024 12:05:24 +0100 Subject: gentoo auto-resync : 20:04:2024 - 12:05:23 --- dev-libs/hiredis/Manifest | 7 +- .../hiredis-1.1.0-disable-network-tests.patch | 19 +++++ dev-libs/hiredis/hiredis-1.0.2-r3.ebuild | 4 +- dev-libs/hiredis/hiredis-1.1.0-r1.ebuild | 8 +- dev-libs/hiredis/hiredis-1.2.0.ebuild | 89 ++++++++++++++++++++++ 5 files changed, 119 insertions(+), 8 deletions(-) create mode 100644 dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch create mode 100644 dev-libs/hiredis/hiredis-1.2.0.ebuild (limited to 'dev-libs/hiredis') diff --git a/dev-libs/hiredis/Manifest b/dev-libs/hiredis/Manifest index a629146fc321..86b34d585a39 100644 --- a/dev-libs/hiredis/Manifest +++ b/dev-libs/hiredis/Manifest @@ -1,6 +1,9 @@ AUX hiredis-1.0.0-disable-network-tests.patch 1760 BLAKE2B 9e2837834e0e7b0411ad4349a16c89d060c6b77552c98c11c03048f3f9ebbc16c47de3d9428ea3fa83da8878d1404eea8d9cd62b6e561104ec81c155507fd75b SHA512 d7d24991d29712e697ee22716933ea0c78e743d1689a452dab13d0d7e1a865ba479c08b17d4a743d05880e22d652c97f7b5fb4250841f14040696fdbd1e86390 +AUX hiredis-1.1.0-disable-network-tests.patch 623 BLAKE2B 78b8f5f09c3b80c25b559c1da9ac30a125743a1caef3c4f4b03c84c362d27ba80a8423665506ca332b48213eb831b1bb69e30ad656a5b7fd59282cddd071cbb4 SHA512 4612ef5dab7968aca125de85de4d460abcd7d3ba4bb420d363120009547803770af30a19767dec9e6579540e7155f4e03a3e162c57f7ed6898b03c93299c8046 DIST hiredis-1.0.2.tar.gz 98139 BLAKE2B 86d872cfec3d4e925d5d68e4f4faf1301aa6d706bd0406a8080471e14afc2c25db13b9a0937d29baccd457611af8e46922b5379183c7470c9ae1860aac3af096 SHA512 86497a1c21869bbe535378885eee6dbd594ef96325966511a3513f81e501af0f5ac7fed864f3230372f3ac7a23c05bad477fa5aa90b9747c9fb1408028174f9b DIST hiredis-1.1.0.tar.gz 122002 BLAKE2B 74c23816e59ea241c68640f99970ae68536a1cd605ac1a7146bf52e355f5f74b3d39fb81be02741cf776c06b47b9d5acc7ec66bfdcf802dec3ed68fb28a82b1b SHA512 9dad012c144ed24de6aa413a3a10d19a9d0d9ece18dbc388406cd86c5b98cb66c76c586cb559c601ed13a75051d8921dc2882534cc3605513fde47d57276c3bb -EBUILD hiredis-1.0.2-r3.ebuild 2099 BLAKE2B 1816fd4ea97c7bba46a1b68102224117cf802854c68fe86a4c44a9488f1b3b929b41896a62453fb9a843f2aea1ec227c8420d5abc7894c9083d7176c4afbf722 SHA512 fbb8a2c72c56048b252fc3a0f7c1a837d1bd296e6435b3c796fa252a29eb34f4ae188ad3da5aac25099018eca57273273f5fee81ff5813091fd360344cf327fe -EBUILD hiredis-1.1.0-r1.ebuild 2254 BLAKE2B 79ea18be9db3a370cf504ae43dd62b335f416c12ec423dfc2bd6be91b2ee1369eca9d36249b8fa03683c3637dc87158d48bb0cebe20bb989a26a6351c81a245e SHA512 d140b8c44f27b10b4a239f97f921bdecad4cf6ba670b3888b364d78a21357c8cca8287bfd4b1f54a770eba493bdf7c3ff8d6616fe02c6e48fa55c8bcb6e5476b +DIST hiredis-1.2.0.tar.gz 126216 BLAKE2B 3f0b74205fb4ceb42fb4c1700a9bf95cf2ad2d9880ee1f2da9cbed6096cde5e918b01465ce9d6ec1b29b5934cfa6ab41000ed344a9983cebe6bd1bf64ac0ede1 SHA512 f8984abb29c09e7e6b56e656616c5155f36c53da4161a2d4c85688486411cadcdf20aa1adb9bda208c500b401c750871be1c8d58ba9df5328634d00e9d1b6589 +EBUILD hiredis-1.0.2-r3.ebuild 2100 BLAKE2B b1e1c2b0bdd70f768955069d8e67580df16af9e6b73095a7595067925fd37d21fe7f7a596810e68463f550780fc0b6c2fb7e05efa942b1e54e92edbd87a5e433 SHA512 2f538e9663ffcc6340458518ae7cec37447d40d807ad02dbefe988c6bfbbab696602b3ac4cceb56a201ef3e663887a173107a8d92e0779bdee6490ae229b9a96 +EBUILD hiredis-1.1.0-r1.ebuild 2253 BLAKE2B 1987ad1fb7f7e36b98139e33a299523e4e617f6650653409d72798c139cc6aa51aa2a0528564368379e44aa47aefcfcc5765c120bd1dc75d7d87a625fdbcc6b9 SHA512 2e0de21042066a3b49be32eaebaf8197e27e2eda2d478cdcd05feae5463c255b1cc420bba7ed1ffe5c67070ad2dc89ced3bec742e8c3041bbed9f72a66f87a46 +EBUILD hiredis-1.2.0.ebuild 2142 BLAKE2B 3782188e89fde381540b2d4dad27cb53f57941653e4c2c2fb64018fa878480d5708c65a0e3f37284fb5bcb05b4406c15463ffb7f111a30f1c81ed91a024f98b9 SHA512 9205477c493a3338adb6451fef76c77a9e1c785b47d4c8bdb6c052020e5849342c46317cd14ce1ea9e0cdbb770cf591dc45c2d24f329b90aea86b5ff110a9fdb MISC metadata.xml 404 BLAKE2B 3872a9946b2a134a1c55c2b0aa6a77d83df6b3e48a6bfd017e716ec0eb8400bc95476088d8b79de5e23d6638397b5a0d41bff556c076e607a6f1d0dcd668c7e5 SHA512 ea90d8e7a04ab8929bbefce3c78adb610c7e22d2c9ed44483e16dd4530f04baf160d372999a5de9ea52850336b4d9ca13fd70fb719c2db18f938360262761a29 diff --git a/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch b/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch new file mode 100644 index 000000000000..0bfc281757f8 --- /dev/null +++ b/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch @@ -0,0 +1,19 @@ +Gentoo specific patch which disables test requiring non-localhost IP +address. + +diff --git a/test.c b/test.c +index c1065ff..ca21c30 100644 +--- a/test.c ++++ b/test.c +@@ -2151,7 +2151,7 @@ static void test_async_polling(struct config config) { + assert(astest.ac == NULL); + test_cond(astest.disconnect_status == REDIS_OK); + +- if (config.type == CONN_TCP || config.type == CONN_SSL) { ++ if (0) { /* disabled because of blackhole ip */ + /* timeout can only be simulated with network */ + test("Async connect timeout: "); + config.tcp.host = "192.168.254.254"; /* blackhole ip */ +-- +2.43.2 + diff --git a/dev-libs/hiredis/hiredis-1.0.2-r3.ebuild b/dev-libs/hiredis/hiredis-1.0.2-r3.ebuild index b990a555460f..178cf593343d 100644 --- a/dev-libs/hiredis/hiredis-1.0.2-r3.ebuild +++ b/dev-libs/hiredis/hiredis-1.0.2-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -66,7 +66,7 @@ src_test() { _build hiredis-test "${EPREFIX}"/usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die - ./hiredis-test -h 127.0.0.1 -p ${REDIS_PID} -s ${REDIS_SOCK} + ./hiredis-test -h 127.0.0.1 -p ${REDIS_PORT} -s ${REDIS_SOCK} local ret=$? kill "$(<"${REDIS_PID}")" || die diff --git a/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild b/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild index 193ec8133864..085db7b29585 100644 --- a/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild +++ b/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,7 @@ LICENSE="BSD" # Always check "Upgrading from ..." in README # e.g. https://github.com/redis/hiredis#upgrading-to-110 SLOT="0/$(ver_cut 1-2)" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~x64-solaris" +KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~loong ~ppc ppc64 ~riscv ~s390 sparc ~x86 ~x64-solaris" IUSE="examples ssl static-libs test" RESTRICT="!test? ( test )" @@ -27,7 +27,7 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}"/${PN}-1.0.0-disable-network-tests.patch + "${FILESDIR}"/${PN}-1.1.0-disable-network-tests.patch ) src_prepare() { @@ -73,7 +73,7 @@ src_test() { _build hiredis-test "${EPREFIX}"/usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die - ./hiredis-test -h 127.0.0.1 -p ${REDIS_PID} -s ${REDIS_SOCK} + ./hiredis-test -h 127.0.0.1 -p ${REDIS_PORT} -s ${REDIS_SOCK} local ret=$? kill "$(<"${REDIS_PID}")" || die diff --git a/dev-libs/hiredis/hiredis-1.2.0.ebuild b/dev-libs/hiredis/hiredis-1.2.0.ebuild new file mode 100644 index 000000000000..6c1b7be7b083 --- /dev/null +++ b/dev-libs/hiredis/hiredis-1.2.0.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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" +# Always check "Upgrading from ..." in README +# e.g. https://github.com/redis/hiredis#upgrading-to-110 +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-solaris" +IUSE="examples ssl static-libs test" +RESTRICT="!test? ( test )" + +DEPEND="ssl? ( dev-libs/openssl:= )" +RDEPEND="${DEPEND}" +BDEPEND=" + test? ( + dev-db/redis + dev-libs/libevent + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.0-disable-network-tests.patch +) + +_build() { + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + PREFIX="${EPREFIX}/usr" \ + LIBRARY_PATH="$(get_libdir)" \ + USE_SSL=$(usex ssl 1 0) \ + TEST_ASYNC=$(usex test 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{,_ssl}.pc +} + +src_test() { + # Compare with https://github.com/redis/hiredis/blob/648763c36e9f6493b13a77da35eb33ef0652b4e2/Makefile#L32 + 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 + + "${EPREFIX}"/usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die + ./hiredis-test -h 127.0.0.1 -p ${REDIS_PORT} -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 +} -- cgit v1.2.3