commit: 71880e7c3b41535e73a8e0b6131c0221732e376b Author: Pavel Sobolev <contact <AT> paveloom <DOT> dev> AuthorDate: Sun Jul 13 07:01:57 2025 +0000 Commit: Lucio Sauer <watermanpaint <AT> posteo <DOT> net> CommitDate: Sun Jul 13 08:24:20 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=71880e7c
dev-cpp/fkYAML: new package, add 0.4.2 Signed-off-by: Pavel Sobolev <contact <AT> paveloom.dev> dev-cpp/fkYAML/Manifest | 1 + ...move-the-space-between-operator-and-_yaml.patch | 44 ++++++++++++++++++++++ .../files/fkYAML-0.4.2-Use-system-Catch2.patch | 38 +++++++++++++++++++ dev-cpp/fkYAML/fkYAML-0.4.2.ebuild | 39 +++++++++++++++++++ dev-cpp/fkYAML/metadata.xml | 12 ++++++ 5 files changed, 134 insertions(+) diff --git a/dev-cpp/fkYAML/Manifest b/dev-cpp/fkYAML/Manifest new file mode 100644 index 0000000000..2830808597 --- /dev/null +++ b/dev-cpp/fkYAML/Manifest @@ -0,0 +1 @@ +DIST fkYAML-0.4.2.tar.gz 437972 BLAKE2B 24afade617172a5af8b0be3c91b069ed1782140101a67b86bb3afad230656d22e4e55f24883499ca1764a095c87a64370fdba9b0aa617c51815b25d4bdd2f374 SHA512 20a7e2a236f77e27a676348585cbf6c36d8c46f1ad0964b879eb61925e3d6545d6dda46379b897712890faa2b8d5e837b7f9cc312448a3d762f0017c618cbcd1 diff --git a/dev-cpp/fkYAML/files/fkYAML-0.4.2-Remove-the-space-between-operator-and-_yaml.patch b/dev-cpp/fkYAML/files/fkYAML-0.4.2-Remove-the-space-between-operator-and-_yaml.patch new file mode 100644 index 0000000000..52bd5e91b5 --- /dev/null +++ b/dev-cpp/fkYAML/files/fkYAML-0.4.2-Remove-the-space-between-operator-and-_yaml.patch @@ -0,0 +1,44 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Remove the space between `operator""` and `_yaml`. + +This makes it compile in C++23. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/include/fkYAML/node.hpp ++++ b/include/fkYAML/node.hpp +@@ -1823,7 +1823,7 @@ inline namespace yaml_literals { + /// @param n The size of `s`. + /// @return The resulting `node` object deserialized from `s`. + /// @sa https://fktn-k.github.io/fkYAML/api/operator_literal_yaml/ +-inline fkyaml::node operator"" _yaml(const char* s, std::size_t n) { ++inline fkyaml::node operator""_yaml(const char* s, std::size_t n) { + return fkyaml::node::deserialize(s, s + n); + } + +@@ -1832,7 +1832,7 @@ inline fkyaml::node operator"" _yaml(const char* s, std::size_t n) { + /// @param n The size of `s`. + /// @return The resulting `node` object deserialized from `s`. + /// @sa https://fktn-k.github.io/fkYAML/api/operator_literal_yaml/ +-inline fkyaml::node operator"" _yaml(const char16_t* s, std::size_t n) { ++inline fkyaml::node operator""_yaml(const char16_t* s, std::size_t n) { + return fkyaml::node::deserialize(s, s + n); + } + +@@ -1841,7 +1841,7 @@ inline fkyaml::node operator"" _yaml(const char16_t* s, std::size_t n) { + /// @param n The size of `s`. + /// @return The resulting `node` object deserialized from `s`. + /// @sa https://fktn-k.github.io/fkYAML/api/operator_literal_yaml/ +-inline fkyaml::node operator"" _yaml(const char32_t* s, std::size_t n) { ++inline fkyaml::node operator""_yaml(const char32_t* s, std::size_t n) { + return fkyaml::node::deserialize(s, s + n); + } + +@@ -1850,7 +1850,7 @@ inline fkyaml::node operator"" _yaml(const char32_t* s, std::size_t n) { + /// @param s An input `char8_t` array. + /// @param n The size of `s`. + /// @return The resulting `node` object deserialized from `s`. +-inline fkyaml::node operator"" _yaml(const char8_t* s, std::size_t n) { ++inline fkyaml::node operator""_yaml(const char8_t* s, std::size_t n) { + return fkyaml::node::deserialize((const char8_t*)s, (const char8_t*)s + n); + } diff --git a/dev-cpp/fkYAML/files/fkYAML-0.4.2-Use-system-Catch2.patch b/dev-cpp/fkYAML/files/fkYAML-0.4.2-Use-system-Catch2.patch new file mode 100644 index 0000000000..e736a28dcb --- /dev/null +++ b/dev-cpp/fkYAML/files/fkYAML-0.4.2-Use-system-Catch2.patch @@ -0,0 +1,38 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Use system `Catch2`. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,21 +32,7 @@ if(FK_YAML_CODE_COVERAGE OR FK_YAML_RUN_VALGRIND OR FK_YAML_RUN_CLANG_SANITIZERS + endif() + + if(FK_YAML_BUILD_TEST OR FK_YAML_BUILD_ALL_TEST) +- set(CATCH2_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/catch2") +- +- if(NOT EXISTS ${CATCH2_ROOT_DIR}/CMakeLists.txt) +- find_package(Git REQUIRED) +- message(STATUS "Fetching git submodule: Catch2") +- execute_process( +- COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- ${CATCH2_ROOT_DIR} +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +- RESULT_VARIABLE GIT_SUBMOD_RET) +- if(NOT GIT_SUBMOD_RET EQUAL "0") +- message(FATAL_ERROR "Failed to fetch Catch2 as a git submodule.") +- endif() +- endif() +- +- list(APPEND CMAKE_MODULE_PATH "${CATCH2_ROOT_DIR}/contrib") ++ find_package(Catch2 REQUIRED) + endif() + + ########################################### +@@ -140,7 +126,6 @@ endif() + ########################### + + if(FK_YAML_BUILD_TEST OR FK_YAML_BUILD_ALL_TEST) +- add_subdirectory(${CATCH2_ROOT_DIR}) + include(CTest) + enable_testing() + add_subdirectory(tests) diff --git a/dev-cpp/fkYAML/fkYAML-0.4.2.ebuild b/dev-cpp/fkYAML/fkYAML-0.4.2.ebuild new file mode 100644 index 0000000000..6cd107e75f --- /dev/null +++ b/dev-cpp/fkYAML/fkYAML-0.4.2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="A C++ header-only YAML library" +HOMEPAGE="https://fktn-k.github.io/fkYAML/" +SRC_URI="https://github.com/fktn-k/fkYAML/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + test? ( =dev-cpp/catch-2* ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.4.2-Remove-the-space-between-operator-and-_yaml.patch" + "${FILESDIR}/${PN}-0.4.2-Use-system-Catch2.patch" +) + +src_prepare() { + find thirdparty -mindepth 1 -not -name imapdl -delete + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DFK_YAML_BUILD_TEST=$(usex test) + ) + + cmake_src_configure +} diff --git a/dev-cpp/fkYAML/metadata.xml b/dev-cpp/fkYAML/metadata.xml new file mode 100644 index 0000000000..6bd5732747 --- /dev/null +++ b/dev-cpp/fkYAML/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + <name>Pavel Sobolev</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/fktn-k/fkYAML</bugs-to> + <remote-id type="github">fktn-k/fkYAML</remote-id> + </upstream> +</pkgmetadata>
