summaryrefslogtreecommitdiff
path: root/dev-cpp/magic_enum/magic_enum-0.9.7.ebuild
blob: 43c19ba39849b80ef2128dff5e99b3f8772b7a05 (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
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# As of 0.8.2, it has meson, but only for subproject use(?)
# Doesn't install anything. In 0.9.7, the situation looks better, but
# need to test with reverse dependencies.
inherit cmake

DESCRIPTION="Static reflection for enums in header-only C++"
HOMEPAGE="https://github.com/Neargye/magic_enum"
SRC_URI="https://github.com/Neargye/magic_enum/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

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

PATCHES=(
	"${FILESDIR}"/${PN}-0.9.7-werror.patch
)

src_configure() {
	local mycmakeargs=(
		-DMAGIC_ENUM_OPT_BUILD_EXAMPLES=$(usex examples)
		-DMAGIC_ENUM_OPT_BUILD_TESTS=$(usex test)
		-DMAGIC_ENUM_OPT_INSTALL=ON
	)

	cmake_src_configure
}