dev-libs/libcdada: add 0.6.0

Closes: https://bugs.gentoo.org/929413
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
This commit is contained in:
Petr Vaněk
2024-07-25 21:59:48 +02:00
parent 8d2f5bad0d
commit ac8163603c
3 changed files with 85 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST libcdada-0.4.0.tar.gz 1777257 BLAKE2B 26e24fa513ab4a290a7632b4f56c102dc45cd9d34d4a7b7464f58aaee596b5ac3c8172080144d3f3c5cbcf5790f29e74b020f11cea943223e5933c2a7db66f8b SHA512 370a40a070df6783b5f44373bd09751660d51698095fa0ace38943a0331f90a55d131de50180b9ca9597361b7712dbcb350fde77a0e0489c47e4358fec61458b
DIST libcdada-0.6.0.tar.gz 1780008 BLAKE2B c4644663c5a86229b98d52c017a3204032bb6ca0f83ca8c41e498e20b3ba58eaf9777082ed57c9871be708a117e6e4a4e39eeaa6b6736eb98b3ded9d7511d3e3 SHA512 83e69fea60fc35845bf44bf443c0161ed90a233ac699e7f26a54578bd67016740f4cef42595087b05177f4e33e203352bb52abb4fd909979ec2f9c57e77dc0fa

View File

@@ -0,0 +1,30 @@
From b9b7c37980a2d4cdf85ecd764cf2f6987d54835c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
Date: Thu, 25 Jul 2024 14:21:15 +0200
Subject: [PATCH] str: use correct cdada comparison function for a regular C
string
The cdada_str_ncmp_c function must be used for comparison with regular C
string, otherwise str_test aborts.
Fixes: be47ae8cb148 ("str: add cdada_str_ncmp/cdada_str_ncmp_c")
Upstream-PR: https://github.com/msune/libcdada/pull/18
diff --git a/test/str_test.c b/test/str_test.c
index 5805a87..01d7b6c 100644
--- a/test/str_test.c
+++ b/test/str_test.c
@@ -408,9 +408,9 @@ int test_cmp(){
== strncmp(s1, s2, overlen_avoid_compiler_warn));
TEST_ASSERT(cdada_str_ncmp_c(c1, s2, 7) == strncmp(s1, s2, 7));
- TEST_ASSERT(cdada_str_ncmp(c1, s2, 10) == strncmp(s1, s2, 10));
- TEST_ASSERT(cdada_str_ncmp(c1, s2, 12) == strncmp(s1, s2, 12));
- TEST_ASSERT(cdada_str_ncmp(c1, s2, overlen_avoid_compiler_warn)
+ TEST_ASSERT(cdada_str_ncmp_c(c1, s2, 10) == strncmp(s1, s2, 10));
+ TEST_ASSERT(cdada_str_ncmp_c(c1, s2, 12) == strncmp(s1, s2, 12));
+ TEST_ASSERT(cdada_str_ncmp_c(c1, s2, overlen_avoid_compiler_warn)
== strncmp(s1, s2, overlen_avoid_compiler_warn));
rv = cdada_str_destroy(c1);

View File

@@ -0,0 +1,54 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
inherit autotools python-any-r1
DESCRIPTION="Basic data structures in C"
HOMEPAGE="https://github.com/msune/libcdada"
SRC_URI="https://github.com/msune/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="test? ( ${PYTHON_DEPS} )"
PATCHES=(
"${FILESDIR}"/${PN}-0.3.4-Werror.patch
"${FILESDIR}"/${PN}-0.3.5-respect-CFLAGS.patch
"${FILESDIR}"/${PN}-0.6.0-test-fixes.patch
)
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_with test tests)
# Needed for tests. We throw them away in src_install anyway.
--enable-static
--disable-valgrind
--without-examples
)
econf "${myeconfargs[@]}"
}
src_install() {
default
find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
}