summaryrefslogtreecommitdiff
path: root/dev-libs/yoga/yoga-3.2.1-r1.ebuild
blob: 975f9399a05a005309a69e53552a2ee87cda88ff (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
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake dot-a

DESCRIPTION="Cross-platform layout engine"
HOMEPAGE="https://github.com/facebook/yoga"
SRC_URI="https://github.com/facebook/yoga/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 arm64 ~ppc ppc64 ~riscv x86"
IUSE="test"
RESTRICT="!test? ( test )"

BDEPEND="
	test? ( dev-cpp/gtest )
"

PATCHES=(
	"${FILESDIR}"/"${P}-add-tests-option.patch"
	"${FILESDIR}"/"${P}-fix-tests.patch"
)

src_configure() {
	lto-guarantee-fat
	local mycmakeargs=(
		-DBUILD_TESTS=$(usex test)
		-DBUILD_FUZZ_TESTS=OFF #Requires the compiler to be Clang
	)
	cmake_src_configure
}

src_test() {
	"${BUILD_DIR}"/tests/yogatests || die
}

src_install() {
	cmake_src_install
	strip-lto-bytecode
}