mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-18 03:23:20 -04:00
dev-cpp/fkYAML: new package, add 0.4.2
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
From: Pavel Sobolev <contact@paveloom.dev>
|
||||
Subject: [PATCH] Remove the space between `operator""` and `_yaml`.
|
||||
|
||||
This makes it compile in C++23.
|
||||
|
||||
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
|
||||
|
||||
--- 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);
|
||||
}
|
||||
38
dev-cpp/fkYAML/files/fkYAML-0.4.2-Use-system-Catch2.patch
Normal file
38
dev-cpp/fkYAML/files/fkYAML-0.4.2-Use-system-Catch2.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
From: Pavel Sobolev <contact@paveloom.dev>
|
||||
Subject: [PATCH] Use system `Catch2`.
|
||||
|
||||
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
|
||||
|
||||
--- 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)
|
||||
Reference in New Issue
Block a user