summaryrefslogtreecommitdiff
blob: 392cecbc22096e35dac551b27de57dcaebe3d336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

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 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="static-libs test"
RESTRICT="!test? ( test )"

BDEPEND="test? ( sys-process/time )"

PATCHES=(
	"${FILESDIR}"/${PN}-0.13.1-tests-no-benchmark.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
}

src_install() {
	default

	find "${ED}" -type f -name "*.la" -delete || die
}