dev-libs/userspace-rcu: Sync with Gentoo

It's from Gentoo commit a63a3aa8a38cd288875b6763d17230c54741df4a.
This commit is contained in:
Flatcar Buildbot 2025-06-16 07:08:31 +00:00 committed by Krzesimir Nowak
parent e85dc99396
commit 6d2f853019
7 changed files with 88 additions and 3 deletions

View File

@ -3,3 +3,4 @@ DIST userspace-rcu-0.14.1.tar.bz2 669999 BLAKE2B 6ae6a98020f731b5dc3bef5e7cf1a0b
DIST userspace-rcu-0.15.0.tar.bz2 683414 BLAKE2B 3502cd0acd6e8e1370a2fd369207a305b3138b0db3186a37a9511bcf2f9ba362787274b030b0138111fe1d4805acd95bbae00c4d2332f1a0761f02bdc7f89e38 SHA512 a0b543dcc6d1ace34c4f159074a439926bcec6708fde66db14022cfa6e8082d5d0430ad02dc036cc3902304357439bbacd89b3fc5f4ed9911716f2f0480af3e4
DIST userspace-rcu-0.15.1.tar.bz2 682998 BLAKE2B c2b20099a4a9284f44031bb2d5f87ab03292896739115fdc741493d7f7c714b306a1981c1ff8164fb39ddf200634ddefdb757582b4891aa04cadd9dd8b51260a SHA512 164d369cc1375b6b71eaa26812aff8a294bfbdffde65c2668e5c559d215d74c1973681f8083bfde39e280ca6fe8e92aadc7c867f966a5769548b754c92389616
DIST userspace-rcu-0.15.2.tar.bz2 684018 BLAKE2B 40b21b482acf26b4478b02ef1d6e7612504c0ab869c1ae8c5b1974decf5512a6240fe2f3817b29830eea0b94836b5ba6324fb0246b3355241d5a215c11de0060 SHA512 ded62f0cb4d6c78adf06235ca4dee36a213efcbfd9cc4e24525d8d29b1d746075f0fbe22d5cee1e38bca9920e0641f94507b640569a84c937e4bae99f53be7c1
DIST userspace-rcu-0.15.3.tar.bz2 684175 BLAKE2B e636b04fe3bac7bb8f4afff0a7b2153e38d396a9c08e8ca19e705fcda81adda5256817db87305382c7adc3630ef5b1d25ff81af818a6b8c70232df11c9bee862 SHA512 9461f5f1ebfcfdb28bc9548738a030d0a29e754ae5340581d057c405c0fa5c17560a251fa15a20cf14d35f1fcc9aceac80841b37a5f348698da52a71ee4d4fe5

View File

@ -0,0 +1,25 @@
From bbff88f8091752ee19dca672bec197e49cc2ef5d Mon Sep 17 00:00:00 2001
From: "Z. Liu" <zhixu.liu@gmail.com>
Date: Mon, 9 Jun 2025 10:39:54 +0800
Subject: [PATCH] src/urcu-bp.c: assert => urcu_posix_assert
otherwise build failed if has -DNDEBUG
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
diff --git a/src/urcu-bp.c b/src/urcu-bp.c
index 8e9afd8..e23ca95 100644
--- a/src/urcu-bp.c
+++ b/src/urcu-bp.c
@@ -409,7 +409,7 @@ void expand_arena(struct registry_arena *arena)
new_chunk_size_bytes, 0);
if (new_chunk != MAP_FAILED) {
/* Should not have moved. */
- assert(new_chunk == last_chunk);
+ urcu_posix_assert(new_chunk == last_chunk);
memset((char *) last_chunk + old_chunk_size_bytes, 0,
new_chunk_size_bytes - old_chunk_size_bytes);
last_chunk->capacity = new_capacity;
--
2.45.2

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -19,6 +19,7 @@ BDEPEND="test? ( sys-process/time )"
PATCHES=(
"${FILESDIR}"/${PN}-0.13.1-tests-no-benchmark.patch
"${FILESDIR}"/${PN}-0.14.1-replace-assert-by-urcu_posix_assert.patch
)
src_prepare() {

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -19,6 +19,7 @@ BDEPEND="test? ( sys-process/time )"
PATCHES=(
"${FILESDIR}"/${PN}-0.13.1-tests-no-benchmark.patch
"${FILESDIR}"/${PN}-0.14.1-replace-assert-by-urcu_posix_assert.patch
)
src_prepare() {

View File

@ -19,6 +19,7 @@ BDEPEND="test? ( sys-process/time )"
PATCHES=(
"${FILESDIR}"/${PN}-0.13.1-tests-no-benchmark.patch
"${FILESDIR}"/${PN}-0.14.1-replace-assert-by-urcu_posix_assert.patch
)
src_prepare() {

View File

@ -11,7 +11,7 @@ SRC_URI="https://lttng.org/files/urcu/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0/8" # subslot = soname version
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="static-libs test"
RESTRICT="!test? ( test )"
@ -19,6 +19,7 @@ BDEPEND="test? ( sys-process/time )"
PATCHES=(
"${FILESDIR}"/${PN}-0.13.1-tests-no-benchmark.patch
"${FILESDIR}"/${PN}-0.14.1-replace-assert-by-urcu_posix_assert.patch
)
src_prepare() {

View File

@ -0,0 +1,55 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
DESCRIPTION="Userspace RCU (read-copy-update) library"
HOMEPAGE="https://liburcu.org/"
SRC_URI="https://lttng.org/files/urcu/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0/8" # subslot = soname version
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="static-libs test"
RESTRICT="!test? ( test )"
BDEPEND="test? ( sys-process/time )"
PATCHES=(
"${FILESDIR}"/${PN}-0.13.1-tests-no-benchmark.patch
"${FILESDIR}"/${PN}-0.14.1-replace-assert-by-urcu_posix_assert.patch
)
src_prepare() {
default
# Needed for tests patch
# ... and refresh libtool (see https://github.com/gentoo/gentoo/pull/23973)
eautoreconf
}
src_configure() {
local myeconfargs=(
--enable-shared
$(use_enable static-libs static)
)
econf "${myeconfargs[@]}"
}
src_test() {
default
emake -C tests/regression regtest
# We don't run the benchmark tests.
rm tests/benchmark/test-suite.log || die
}
src_install() {
default
find "${ED}" -type f -name "*.la" -delete || die
}