From cd674fe9d30ccb0ccabf012868adaf603eb2fc0a Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 21 Jun 2025 06:13:45 +0100 Subject: dev-cpp/magic_enum: add 0.9.7 Thanks to Arniiiii for pursuing this upstream wrt bug #933479. I've also taken the opportunity to make examples conditional on USE as it's a header-only library otherwise and nothing needs to be built (ofc excluding tests). Closes: https://bugs.gentoo.org/933479 Signed-off-by: Sam James --- dev-cpp/magic_enum/magic_enum-0.9.7.ebuild | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 dev-cpp/magic_enum/magic_enum-0.9.7.ebuild (limited to 'dev-cpp/magic_enum/magic_enum-0.9.7.ebuild') diff --git a/dev-cpp/magic_enum/magic_enum-0.9.7.ebuild b/dev-cpp/magic_enum/magic_enum-0.9.7.ebuild new file mode 100644 index 000000000000..a63522454784 --- /dev/null +++ b/dev-cpp/magic_enum/magic_enum-0.9.7.ebuild @@ -0,0 +1,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 +} -- cgit v1.2.3