mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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 <sam@gentoo.org>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST magic_enum-0.9.5.tar.gz 198269 BLAKE2B c3c6bbf6c5d366813dac7df5fbfc48f414cf4235d842ef3a5a2fd8f2c2857e55243b7fbf7000d598e778fc8d2d54c7d6e34f8a97fa2eaf510572bf53f17500a6 SHA512 f1b412d15e0ef624b4588adba00a18ed12eeb1f0dabc021d53a7c047b8976ecb07701b76040f47c77c75e00151619dbce1f9a75f471db04340156a39044768f3
|
||||
DIST magic_enum-0.9.6.tar.gz 199883 BLAKE2B 32909c5ea0cff32b14fb4fd5507f1f99cd45f572d56fd14f76aea3ca3c1fa16d08573568a7c7f9a3efbc9396450b2e897aa64de414b34a4c19b6c49f63aed506 SHA512 6154c816446e115f3b164df79ab8d8088eb76b632ee3fdc82ea17cc7ae8d04652c83e5cc587c2c4b334889904b101ba08a04c5837103af260768e93df17cc263
|
||||
DIST magic_enum-0.9.7.tar.gz 202916 BLAKE2B c084df420d66b4920ef028c74056a64e6221d787bbdc958407426442bc14f9a62ec32c56aa7e914a79f4e10a231312fc03230a6d4cbed992f6eae51e14372283 SHA512 8b61c621ff2a6981b4ff89f7df577091ffc9382d443c061db612fb61822dbf6ef8aba69ea35d1c435dcffbd7434cb4ccc5d12bbe2deba1cf0a5316c979ee6a4b
|
||||
|
||||
22
dev-cpp/magic_enum/files/magic_enum-0.9.7-werror.patch
Normal file
22
dev-cpp/magic_enum/files/magic_enum-0.9.7-werror.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/example/CMakeLists.txt
|
||||
+++ b/example/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ include(CheckCXXCompilerFlag)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||
- set(OPTIONS -Wall -Wextra -Wshadow -pedantic-errors -Werror)
|
||||
+ set(OPTIONS -Wall -Wextra)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
set(OPTIONS /W4 /WX)
|
||||
if(HAS_PERMISSIVE_FLAG)
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -56,7 +56,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
check_cxx_compiler_flag(/std:c++latest HAS_CPPLATEST_FLAG)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
- set(OPTIONS -Wall -Wextra -Wshadow -pedantic-errors -Werror)
|
||||
+ set(OPTIONS -Wall -Wextra -Wshadow)
|
||||
|
||||
check_cxx_compiler_flag(-std=c++20 HAS_CPP20_FLAG)
|
||||
check_cxx_compiler_flag(-std=c++23 HAS_CPP23_FLAG)
|
||||
33
dev-cpp/magic_enum/magic_enum-0.9.7.ebuild
Normal file
33
dev-cpp/magic_enum/magic_enum-0.9.7.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user