summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/yaml-cpp/files')
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-CVE-2017-5950.patch45
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-unbundle-gtest.patch70
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-cmake-paths.patch101
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch33
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-install-paths.patch25
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gcc13.patch32
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gtest.patch30
7 files changed, 221 insertions, 115 deletions
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-CVE-2017-5950.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-CVE-2017-5950.patch
deleted file mode 100644
index 2892108bd250..000000000000
--- a/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-CVE-2017-5950.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From d540476e31b080aa1f903ad20ec0426dd3838be7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anarcat@debian.org>
-Date: Tue, 25 Apr 2017 20:10:20 -0400
-Subject: [PATCH] fix stack overflow in HandleNode() (CVE-2017-5950)
-
-simply set a hardcoded recursion limit to 2000 (inspired by Python's)
-to avoid infinitely recursing into arbitrary data structures
-
-assert() the depth. unsure if this is the right approach, but given
-that HandleNode() is "void", I am not sure how else to return an
-error. the problem with this approach of course is that it will still
-crash the caller, unless they have proper exception handling in place.
-
-Closes: #459
----
- src/singledocparser.cpp | 2 ++
- src/singledocparser.h | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/src/singledocparser.cpp b/src/singledocparser.cpp
-index a27c1c3b..1b4262ee 100644
---- a/src/singledocparser.cpp
-+++ b/src/singledocparser.cpp
-@@ -46,6 +46,8 @@ void SingleDocParser::HandleDocument(EventHandler& eventHandler) {
- }
-
- void SingleDocParser::HandleNode(EventHandler& eventHandler) {
-+ assert(depth < depth_limit);
-+ depth++;
- // an empty node *is* a possibility
- if (m_scanner.empty()) {
- eventHandler.OnNull(m_scanner.mark(), NullAnchor);
-diff --git a/src/singledocparser.h b/src/singledocparser.h
-index 2b92067c..7046f1e2 100644
---- a/src/singledocparser.h
-+++ b/src/singledocparser.h
-@@ -51,6 +51,8 @@ class SingleDocParser : private noncopyable {
- anchor_t LookupAnchor(const Mark& mark, const std::string& name) const;
-
- private:
-+ int depth = 0;
-+ int depth_limit = 2000;
- Scanner& m_scanner;
- const Directives& m_directives;
- std::unique_ptr<CollectionStack> m_pCollectionStack;
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-unbundle-gtest.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-unbundle-gtest.patch
deleted file mode 100644
index 671bde36704a..000000000000
--- a/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-unbundle-gtest.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 259f944bc3e45420f5891737101260f07ab3030a Mon Sep 17 00:00:00 2001
-From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
-Date: Tue, 27 Feb 2018 14:17:49 +0500
-Subject: [PATCH] Externalize googletest project
-
-Externalize gtest to avoid installation, fixes #539.
----
- test/CMakeLists.txt | 35 ++++++++++++++++++++++++++---------
- 1 file changed, 26 insertions(+), 9 deletions(-)
-
-diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
-index 3633da5..7b39dd4 100644
---- a/test/CMakeLists.txt
-+++ b/test/CMakeLists.txt
-@@ -1,16 +1,27 @@
-+include(ExternalProject)
-+
-+ExternalProject_Add(
-+ googletest_project
-+ SOURCE_DIR "${CMAKE_SOURCE_DIR}/test/gtest-1.8.0"
-+ INSTALL_DIR "${CMAKE_BINARY_DIR}/prefix"
-+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DBUILD_GMOCK=ON
-+)
-+
-+add_library(gmock UNKNOWN IMPORTED)
-+set_target_properties(gmock PROPERTIES
-+ IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/prefix/lib/libgmock.a
-+)
-+
-+find_package(Threads)
-+
-+include_directories(SYSTEM "${PROJECT_BINARY_DIR}/prefix/include")
-+
- set(gtest_force_shared_crt ${MSVC_SHARED_RT} CACHE BOOL
- "Use shared (DLL) run-time lib even when Google Test built as a static lib.")
--add_subdirectory(gtest-1.8.0)
--include_directories(SYSTEM gtest-1.8.0/googlemock/include)
--include_directories(SYSTEM gtest-1.8.0/googletest/include)
--
--if(WIN32 AND BUILD_SHARED_LIBS)
-- add_definitions("-DGTEST_LINKED_AS_SHARED_LIBRARY")
--endif()
-
- if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR
- CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-- set(yaml_test_flags "-Wno-variadic-macros -Wno-sign-compare")
-+ set(yaml_test_flags "-Wno-variadic-macros -Wno-sign-compare")
-
- if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set(yaml_test_flags "${yaml_test_flags} -Wno-c99-extensions")
-@@ -36,9 +47,15 @@ add_executable(run-tests
- ${test_sources}
- ${test_headers}
- )
-+
-+add_dependencies(run-tests googletest_project)
-+
- set_target_properties(run-tests PROPERTIES
- COMPILE_FLAGS "${yaml_c_flags} ${yaml_cxx_flags} ${yaml_test_flags}"
- )
--target_link_libraries(run-tests yaml-cpp gmock)
-+target_link_libraries(run-tests
-+ yaml-cpp
-+ gmock
-+ ${CMAKE_THREAD_LIBS_INIT})
-
- add_test(yaml-test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run-tests)
---
-2.16.1
-
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-cmake-paths.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-cmake-paths.patch
new file mode 100644
index 000000000000..5ad9e46dbcb2
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-cmake-paths.patch
@@ -0,0 +1,101 @@
+From d5d68286cdd983f99f88b6141a3c34d3bf633d98 Mon Sep 17 00:00:00 2001
+From: Felix Schwitzer <flx107809@gmail.com>
+Date: Fri, 1 Apr 2022 05:26:47 +0200
+Subject: [PATCH] Fix CMake export files (#1077)
+
+After configuring the file `yaml-cpp-config.cmake.in`, the result ends up with
+empty variables. (see also the discussion in #774).
+
+Rework this file and the call to `configure_package_config_file` according the
+cmake documentation
+(https://cmake.org/cmake/help/v3.22/module/CMakePackageConfigHelpers.html?highlight=configure_package_config#command:configure_package_config_file)
+to overcome this issue and allow a simple `find_package` after install.
+
+As there was some discussion about the place where to install the
+`yaml-cpp-config.cmake` file, e.g. #1055, factor out the install location into
+an extra variable to make it easier changing this location in the future.
+
+Also untabify CMakeLists.txt in some places to align with the other code parts in this file.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -127,10 +127,16 @@ set_target_properties(yaml-cpp PROPERTIES
+ PROJECT_LABEL "yaml-cpp ${yaml-cpp-label-postfix}"
+ DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
+
++# FIXME(felix2012): A more common place for the cmake export would be
++# `CMAKE_INSTALL_LIBDIR`, as e.g. done in ubuntu or in this project for GTest
++set(CONFIG_EXPORT_DIR "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp")
++set(EXPORT_TARGETS yaml-cpp)
+ configure_package_config_file(
+ "${PROJECT_SOURCE_DIR}/yaml-cpp-config.cmake.in"
+ "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake"
+- INSTALL_DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp")
++ INSTALL_DESTINATION "${CONFIG_EXPORT_DIR}"
++ PATH_VARS CMAKE_INSTALL_INCLUDEDIR CONFIG_EXPORT_DIR)
++unset(EXPORT_TARGETS)
+
+ write_basic_package_version_file(
+ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
+@@ -139,30 +145,31 @@ write_basic_package_version_file(
+ configure_file(yaml-cpp.pc.in yaml-cpp.pc @ONLY)
+
+ if (YAML_CPP_INSTALL)
+- install(TARGETS yaml-cpp
++ install(TARGETS yaml-cpp
+ EXPORT yaml-cpp-targets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+- install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
++ install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+- FILES_MATCHING PATTERN "*.h")
++ FILES_MATCHING PATTERN "*.h")
+ install(EXPORT yaml-cpp-targets
+- DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp")
+- install(FILES
+- "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake"
+- "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
+- DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp")
++ DESTINATION "${CONFIG_EXPORT_DIR}")
++ install(FILES
++ "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake"
++ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
++ DESTINATION "${CONFIG_EXPORT_DIR}")
+ install(FILES "${PROJECT_BINARY_DIR}/yaml-cpp.pc"
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig)
+ endif()
++unset(CONFIG_EXPORT_DIR)
+
+ if(YAML_CPP_BUILD_TESTS)
+- add_subdirectory(test)
++ add_subdirectory(test)
+ endif()
+
+ if(YAML_CPP_BUILD_TOOLS)
+- add_subdirectory(util)
++ add_subdirectory(util)
+ endif()
+
+ if (YAML_CPP_CLANG_FORMAT_EXE)
+--- a/yaml-cpp-config.cmake.in
++++ b/yaml-cpp-config.cmake.in
+@@ -3,12 +3,14 @@
+ # YAML_CPP_INCLUDE_DIR - include directory
+ # YAML_CPP_LIBRARIES - libraries to link against
+
+-# Compute paths
+-get_filename_component(YAML_CPP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+-set(YAML_CPP_INCLUDE_DIR "@CONFIG_INCLUDE_DIRS@")
++@PACKAGE_INIT@
++
++set_and_check(YAML_CPP_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
+
+ # Our library dependencies (contains definitions for IMPORTED targets)
+-include("${YAML_CPP_CMAKE_DIR}/yaml-cpp-targets.cmake")
++include(@PACKAGE_CONFIG_EXPORT_DIR@/yaml-cpp-targets.cmake)
+
+ # These are IMPORTED targets created by yaml-cpp-targets.cmake
+ set(YAML_CPP_LIBRARIES "@EXPORT_TARGETS@")
++
++check_required_components(@EXPORT_TARGETS@)
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch
new file mode 100644
index 000000000000..bd05fccca373
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch
@@ -0,0 +1,33 @@
+From 30fbefe6102da12e8d4d132aa4af2e24bfda9bfb Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Sat, 17 Sep 2022 12:25:24 +0300
+Subject: [PATCH] Use external gtest dependency
+
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -1,15 +1,10 @@
+ find_package(Threads REQUIRED)
++find_package(GTest REQUIRED CONFIG)
+
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+ set(BUILD_MOCK ON CACHE BOOL "" FORCE)
+ set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
+
+-add_subdirectory(
+- "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0"
+- "${CMAKE_CURRENT_BINARY_DIR}/prefix")
+-
+-include_directories(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0/googletest/include")
+-
+ set(test-new-api-pattern "new-api/*.cpp")
+ set(test-source-pattern "*.cpp" "integration/*.cpp" "node/*.cpp")
+ if (CMAKE_VERSION VERSION_GREATER 3.11)
+@@ -38,7 +33,7 @@ target_link_libraries(yaml-cpp-tests
+ PRIVATE
+ Threads::Threads
+ yaml-cpp
+- gmock)
++ GTest::gmock)
+
+ set_property(TARGET yaml-cpp-tests PROPERTY CXX_STANDARD_REQUIRED ON)
+ if (NOT DEFINED CMAKE_CXX_STANDARD)
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-install-paths.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-install-paths.patch
new file mode 100644
index 000000000000..622c0d7f148f
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-install-paths.patch
@@ -0,0 +1,25 @@
+From 4f5b5ba19ece906252cfc90b7cd51035e21c7118 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Sat, 17 Sep 2022 12:07:46 +0300
+Subject: [PATCH] Fix pkg-config file install destination
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -129,7 +129,7 @@ set_target_properties(yaml-cpp PROPERTIES
+
+ # FIXME(felix2012): A more common place for the cmake export would be
+ # `CMAKE_INSTALL_LIBDIR`, as e.g. done in ubuntu or in this project for GTest
+-set(CONFIG_EXPORT_DIR "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp")
++set(CONFIG_EXPORT_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/yaml-cpp")
+ set(EXPORT_TARGETS yaml-cpp)
+ configure_package_config_file(
+ "${PROJECT_SOURCE_DIR}/yaml-cpp-config.cmake.in"
+@@ -160,7 +160,7 @@ if (YAML_CPP_INSTALL)
+ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
+ DESTINATION "${CONFIG_EXPORT_DIR}")
+ install(FILES "${PROJECT_BINARY_DIR}/yaml-cpp.pc"
+- DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig)
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
+ unset(CONFIG_EXPORT_DIR)
+
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gcc13.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gcc13.patch
new file mode 100644
index 000000000000..f024b797eb47
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gcc13.patch
@@ -0,0 +1,32 @@
+Fix test https://bugs.gentoo.org/917243
+
+From fcbb8193b94921e058be7b563aea053531e5b2d9 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Sat, 19 Aug 2023 21:36:16 +0200
+Subject: [PATCH] Fix testsuite with gcc-13 (#1216)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+cd /<<PKGBUILDDIR>>/build-static/test && /usr/bin/c++ -DYAML_CPP_STATIC_DEFINE -I/<<PKGBUILDDIR>>/test/integration -I/<<PKGBUILDDIR>>/test -I/<<PKGBUILDDIR>>/src -I/<<PKGBUILDDIR>>/include -isystem /usr/src/googletest/googlemock/include -isystem /usr/src/googletest/googlemock -isystem /usr/src/googletest/googletest/include -isystem /usr/src/googletest/googletest -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/yaml-cpp-0.8.0+dfsg-1~build1 -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++14 -Wno-variadic-macros -Wno-sign-compare -DGTEST_HAS_PTHREAD=1 -MD -MT test/CMakeFiles/yaml-cpp-tests.dir/binary_test.cpp.o -MF CMakeFiles/yaml-cpp-tests.dir/binary_test.cpp.o.d -o CMakeFiles/yaml-cpp-tests.dir/binary_test.cpp.o -c /<<PKGBUILDDIR>>/test/binary_test.cpp
+/<<PKGBUILDDIR>>/test/binary_test.cpp: In member function ‘virtual void BinaryTest_DecodingNoCrashOnNegative_Test::TestBody()’:
+/<<PKGBUILDDIR>>/test/binary_test.cpp:11:38: error: narrowing conversion of ‘-58’ from ‘int’ to ‘char’ [-Wnarrowing]
+ 11 | std::string input{-58, -1, -99, 109};
+ | ^
+---
+ test/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 351b03f81..c9e7f041b 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -33,7 +33,7 @@ target_include_directories(yaml-cpp-tests
+ target_compile_options(yaml-cpp-tests
+ PRIVATE
+ $<$<CXX_COMPILER_ID:Clang>:-Wno-c99-extensions -Wno-variadic-macros -Wno-sign-compare>
+- $<$<CXX_COMPILER_ID:GNU>:-Wno-variadic-macros -Wno-sign-compare>)
++ $<$<CXX_COMPILER_ID:GNU>:-Wno-variadic-macros -Wno-sign-compare -Wno-narrowing>)
+ target_link_libraries(yaml-cpp-tests
+ PRIVATE
+ Threads::Threads
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gtest.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gtest.patch
new file mode 100644
index 000000000000..5386f8ec7c2f
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gtest.patch
@@ -0,0 +1,30 @@
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index c9e7f04..58973ea 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -1,15 +1,10 @@
+ find_package(Threads REQUIRED)
++find_package(GTest REQUIRED CONFIG)
+
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+ set(BUILD_MOCK ON CACHE BOOL "" FORCE)
+ set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
+
+-add_subdirectory(
+- "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.11.0"
+- "${CMAKE_CURRENT_BINARY_DIR}/prefix")
+-
+-include_directories(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.11.0/googletest/include")
+-
+ set(test-new-api-pattern "new-api/*.cpp")
+ set(test-source-pattern "*.cpp" "integration/*.cpp" "node/*.cpp")
+ if (CMAKE_VERSION VERSION_GREATER 3.11)
+@@ -38,7 +33,7 @@ target_link_libraries(yaml-cpp-tests
+ PRIVATE
+ Threads::Threads
+ yaml-cpp
+- gmock)
++ GTest::gmock)
+
+ set_property(TARGET yaml-cpp-tests PROPERTY CXX_STANDARD_REQUIRED ON)
+ if (NOT DEFINED CMAKE_CXX_STANDARD)