From e3f21c8aff8a76afe3423721c437a088e9232840 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 23 Apr 2024 23:59:27 +0100 Subject: gentoo auto-resync : 23:04:2024 - 23:59:26 --- dev-libs/hiredict/Manifest | 4 + .../hiredict-1.3.1-disable-network-tests.patch | 16 ++++ dev-libs/hiredict/hiredict-1.3.1.ebuild | 96 ++++++++++++++++++++++ dev-libs/hiredict/metadata.xml | 23 ++++++ 4 files changed, 139 insertions(+) create mode 100644 dev-libs/hiredict/Manifest create mode 100644 dev-libs/hiredict/files/hiredict-1.3.1-disable-network-tests.patch create mode 100644 dev-libs/hiredict/hiredict-1.3.1.ebuild create mode 100644 dev-libs/hiredict/metadata.xml (limited to 'dev-libs/hiredict') diff --git a/dev-libs/hiredict/Manifest b/dev-libs/hiredict/Manifest new file mode 100644 index 000000000000..fc41802327ea --- /dev/null +++ b/dev-libs/hiredict/Manifest @@ -0,0 +1,4 @@ +AUX hiredict-1.3.1-disable-network-tests.patch 526 BLAKE2B f50a6cf2c18cd9999026b5f87a5f73f874ae4b9ef80e0de04968c9df5399e2e5f4aafd5870ce4c5d905dc71b70f3bc95bc360f610fac6c6ccf8b39b84bad9862 SHA512 aa48b6adf85fa367a4157da097227518165d0063aed1403423a19f770291ee4e3abaa423c43d334b77644f6cd8339a0f330c1fc0222e09502da04ac6bcd45ce6 +DIST hiredict-1.3.1.tar.gz 118800 BLAKE2B 8d051ff9aa0f3f50acca96fa85c40369665769f4ddc2d5275eb19a279196a5ec571f6099f32b820447cdf89c95f88a0350ca70ed58acedfce82bd4d3cd41ded4 SHA512 208672d4dbdcc8bf21cff494ea2191b97b9d67b2c4b5a4f94e2c165613315b28b09e9e03de0495a069320df671e3f9d22a43209f175c2aae71550b0d832c0112 +EBUILD hiredict-1.3.1.ebuild 2063 BLAKE2B d026295bdac30b6c470db6c6fe45cc28bd26be0ebf41457674cec7d35bf727024dc58c97fcc3721bfe9511b01a7946b6aff176d41686f8bce44cd7ad2ed0f882 SHA512 4e21b511bc0f77c7eae913dd01ad091745eaa8c7dc8a08f6143a1b8156115b4daee637322e9130238955a792b09b9800b540f6e7d6549aff7c93159b75d6e305 +MISC metadata.xml 651 BLAKE2B 6df244daf5d5f2c7be7abf413fb8e6444b183448501498b644de9ab58b8777ddb045331a07991b1a5cad531edd8f8fdfb854ad2575c64633c1b47b0040e4df02 SHA512 e187ff35a863dd5d1ccb53a3275b44174d66ddef249ecb8ac76a684e3d1ee44f8a44d4f9086935e9980b267efc170b4316d1cf9335e71c5aa375fc8a5c64d871 diff --git a/dev-libs/hiredict/files/hiredict-1.3.1-disable-network-tests.patch b/dev-libs/hiredict/files/hiredict-1.3.1-disable-network-tests.patch new file mode 100644 index 000000000000..94562b57e3ad --- /dev/null +++ b/dev-libs/hiredict/files/hiredict-1.3.1-disable-network-tests.patch @@ -0,0 +1,16 @@ +diff --git a/test.c b/test.c +index 48d53e9..91bc794 100644 +--- a/test.c ++++ b/test.c +@@ -2459,9 +2467,11 @@ int main(int argc, char **argv) { + } + #endif /* HIREDICT_TEST_ASYNC */ + ++#if 0 + cfg.type = CONN_TCP; + printf("\nTesting asynchronous API using polling_adapter TCP (%s:%d):\n", cfg.tcp.host, cfg.tcp.port); + test_async_polling(cfg); ++#endif + if (test_unix_socket) { + cfg.type = CONN_UNIX; + printf("\nTesting asynchronous API using polling_adapter UNIX (%s):\n", cfg.unix_sock.path); diff --git a/dev-libs/hiredict/hiredict-1.3.1.ebuild b/dev-libs/hiredict/hiredict-1.3.1.ebuild new file mode 100644 index 000000000000..bd7927c958a2 --- /dev/null +++ b/dev-libs/hiredict/hiredict-1.3.1.ebuild @@ -0,0 +1,96 @@ +# 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 Redict database" +HOMEPAGE="https://codeberg.org/redict/hiredict" +SRC_URI="https://codeberg.org/redict/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +S=${WORKDIR}/${PN} + +LICENSE="BSD LGPL-3" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" +IUSE="shim ssl static-libs test" +RESTRICT="!test? ( test )" + +DEPEND=" + ssl? ( dev-libs/openssl:= ) + shim? ( !dev-libs/hiredis ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + test? ( + dev-db/redict + dev-libs/libevent + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.1-disable-network-tests.patch +) + +_build() { + tc-export AR CC + local myconf=( + AR="${AR}" + CC="${CC}" + CFLAGS="${CFLAGS}" + LDFLAGS="${LDFLAGS}" + DESTDIR="${ED}" + PREFIX="/usr" + LIBRARY_PATH="$(get_libdir)" + USE_SSL=$(usex ssl 1 0) + TEST_ASYNC=$(usex test 1 0) + DEBUG_FLAGS= + OPTIMIZATION= + USE_WERROR=0 + ) + emake "${myconf[@]}" "$@" +} + +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 hiredict{,_ssl}.pc +} + +src_test() { + # Compare with https://codeberg.org/redict/hiredict/src/tag/1.3.1/Makefile#L37 + local REDICT_PID="${T}"/hiredict.pid + local REDICT_SOCK="${T}"/hiredict.sock + local REDICT_PORT=56379 + local REDICT_TEST_CONFIG=" + daemonize yes + pidfile ${REDICT_PID} + port ${REDICT_PORT} + bind 127.0.0.1 + unixsocket //${REDICT_SOCK} + " + + _build hiredict-test + + "${EPREFIX}"/usr/bin/redict-server - <<< "${REDICT_TEST_CONFIG}" || die + ./hiredict-test -h 127.0.0.1 -p ${REDICT_PORT} -s ${REDICT_SOCK} + local ret=$? + + kill "$(<"${REDICT_PID}")" || die + [[ ${ret} != "0" ]] && die "tests failed" +} + +src_install() { + _build install + + if ! use static-libs ; then + find "${ED}" -name '*.a' -delete || die + fi + + if ! use shim; then + find "${ED}" -type d -name 'hiredis' -exec rm -r {} + || die + find "${ED}" -name 'hiredis*.pc' -delete || die + fi +} diff --git a/dev-libs/hiredict/metadata.xml b/dev-libs/hiredict/metadata.xml new file mode 100644 index 000000000000..8184c9d384cc --- /dev/null +++ b/dev-libs/hiredict/metadata.xml @@ -0,0 +1,23 @@ + + + + + navi@vlhl.dev + Anna (navi) Figueiredo Gomes + + + proxy-maint@gentoo.org + Proxy Maintainers + + + Reflect ABI of libhiredict.so. + + + redict/hiredict + + + + Install header shims for the hiredis api. + + + -- cgit v1.2.3