Diff libcgroup-3.1.0 with a libcgroup-3.2.0

/usr/portage/dev-libs/libcgroup/libcgroup-3.2.0.ebuild 2025-07-29 16:22:13.164450502 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2025 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
......
14 14
KEYWORDS="amd64 arm arm64 ~ppc ~ppc64 ~riscv x86"
15 15
IUSE="+daemon pam static-libs systemd test +tools"
16 16
REQUIRED_USE="daemon? ( tools )"
17

  
18
# Test failure needs investigation
19
RESTRICT="!test? ( test ) test"
17
RESTRICT="!test? ( test ) "
20 18

  
21 19
DEPEND="
22 20
	elibc_musl? ( sys-libs/fts-standalone )
......
27 25
BDEPEND="
28 26
	sys-devel/bison
29 27
	sys-devel/flex
28
	test? ( dev-cpp/gtest )
30 29
"
31 30

  
31
PATCHES=(
32
	"${FILESDIR}"/${PN}-3.2.0-use-system-gtest.patch
33
)
34

  
32 35
pkg_setup() {
33 36
	local CONFIG_CHECK="~CGROUPS"
34 37
	if use daemon; then
......
46 49
	sed -i 's:/etc/cg:/etc/cgroup/cg:' \
47 50
		doc/man/cg* samples/config/*.conf README* || die "sed failed"
48 51

  
49
	# Drop native libcgconfig init config
50
	sed -i '/^man_MANS/s:cgred.conf.5::' \
51
		doc/man/Makefile.am || die "sed failed"
52

  
53
	# If we're not running tests, don't bother building them.
54
	if ! use test; then
55
		sed -i '/^SUBDIRS/s:tests::' Makefile.am || die
56
	fi
57

  
58 52
	eautoreconf
59 53
}
60 54

  
......
63 57
		append-ldflags -lfts
64 58
	fi
65 59

  
60
	# gtest needs >=C++14, just pick gnu++17
61
	append-cxxflags -std=gnu++17
62

  
63
	# Test failures (bug #956346)
64
	filter-lto
65

  
66 66
	# Needs flex+bison
67 67
	unset LEX YACC
68 68

  
......
74 74
		$(use_enable systemd)
75 75
		$(use_enable tools)
76 76
		$(use_enable test tests)
77
		$(use_enable test unittests)
77 78
	)
78 79

  
79 80
	if use pam; then
......
84 85
}
85 86

  
86 87
src_test() {
88
	# Sandboxes confuse this as it expects specific cgroup layout
89
	local -x GTEST_FILTER="-CgroupProcessV1MntTest.AddV1NamedMount"
90

  
87 91
	# Run just the unit tests rather than the full lot as they
88 92
	# need fewer permissions, no containers, etc.
89 93
	emake -C tests/gunit check
Thank you!