public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/
@ 2017-07-30  9:10 David Seifert
  0 siblings, 0 replies; 8+ messages in thread
From: David Seifert @ 2017-07-30  9:10 UTC (permalink / raw
  To: gentoo-commits

commit:     7740aaf860fb686e087e174158dacf4f7c8051b2
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Mon Jul 24 06:25:27 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jul 30 09:09:56 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7740aaf8

dev-cpp/yaml-cpp: Fix test failure with GCC-6

Bug: https://bugs.gentoo.org/show_bug.cgi?id=609176
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/5191

 dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch | 44 ++++++++++++++++++++++++
 dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild           |  2 ++
 2 files changed, 46 insertions(+)

diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch
new file mode 100644
index 00000000000..88ee25fa0ac
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch
@@ -0,0 +1,44 @@
+Bug: https://bugs.gentoo.org/609176
+Upstream PR: https://github.com/jbeder/yaml-cpp/pull/514
+
+From a83a1b3a7bd0a5a4eb458d898b057f6a8d409b7e Mon Sep 17 00:00:00 2001
+From: Peter-Levine <plevine457@gmail.com>
+Date: Mon, 24 Jul 2017 02:00:24 -0400
+Subject: [PATCH] Fix segfault in gmock when running tests
+
+Taken from https://github.com/google/googletest/issues/705#issuecomment-235067917
+---
+ test/gmock-1.7.0/include/gmock/gmock-spec-builders.h | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h b/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h
+index 312fbe87..2dd733b6 100644
+--- a/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h
++++ b/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h
+@@ -1370,6 +1370,8 @@ class ActionResultHolder : public UntypedActionResultHolderBase {
+ template <>
+ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
+  public:
++  explicit ActionResultHolder() {}
++
+   void GetValueAndDelete() const { delete this; }
+ 
+   virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
+@@ -1381,7 +1383,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
+       const typename Function<F>::ArgumentTuple& args,
+       const string& call_description) {
+     func_mocker->PerformDefaultAction(args, call_description);
+-    return NULL;
++    return new ActionResultHolder();
+   }
+ 
+   // Performs the given action and returns NULL.
+@@ -1390,7 +1392,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
+       const Action<F>& action,
+       const typename Function<F>::ArgumentTuple& args) {
+     action.Perform(args);
+-    return NULL;
++    return new ActionResultHolder();
+   }
+ };
+ 

diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild
index a857f75d61b..503d7e2b9ff 100644
--- a/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild
@@ -19,6 +19,8 @@ RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${PN}-release-${PV}"
 
+PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
+
 src_prepare() {
 	sed -i \
 		-e 's:INCLUDE_INSTALL_ROOT_DIR:INCLUDE_INSTALL_DIR:g' \


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/
@ 2018-03-29 18:38 Johannes Huber
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Huber @ 2018-03-29 18:38 UTC (permalink / raw
  To: gentoo-commits

commit:     40eeb5defc05e61c4e03830e6f071e8c1d629f68
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Tue Feb 27 10:41:23 2018 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Thu Mar 29 18:38:21 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40eeb5de

dev-cpp/yaml-cpp: version bump to 0.6.2

Bug: https://bugs.gentoo.org/614850
Closes: https://bugs.gentoo.org/638326
Closes: https://github.com/gentoo/gentoo/pull/7294
Package-Manager: Portage-2.3.26, Repoman-2.3.7
Signed-off-by: Johannes Huber <johu <AT> gentoo.org>

 dev-cpp/yaml-cpp/Manifest                          |  1 +
 .../files/yaml-cpp-0.6.2-CVE-2017-5950.patch       | 45 ++++++++++++++
 .../files/yaml-cpp-0.6.2-unbundle-gtest.patch      | 70 ++++++++++++++++++++++
 dev-cpp/yaml-cpp/yaml-cpp-0.6.2.ebuild             | 41 +++++++++++++
 4 files changed, 157 insertions(+)

diff --git a/dev-cpp/yaml-cpp/Manifest b/dev-cpp/yaml-cpp/Manifest
index 90cc2aa7b6c..bac72aa90f8 100644
--- a/dev-cpp/yaml-cpp/Manifest
+++ b/dev-cpp/yaml-cpp/Manifest
@@ -1 +1,2 @@
 DIST yaml-cpp-0.5.3.tar.gz 2016737 BLAKE2B 6c10d44fe04fdd81cd61c909acdb576834f5358dd44353723b04d8a42bf8a1312cfa752e445c84f93c6ce76358b2d42dee5263f6fbd47a1f928d1cd28aedef07 SHA512 5ed15fee3c6455c08e6bd8f74256b230f274ef18f8e144491e940640e41626517c7eaaf4a1f380c4179066a2a757c8a0f61878df9dc3caa15e37c4954be47fe0
+DIST yaml-cpp-0.6.2.tar.gz 1396250 BLAKE2B be342c212c980cdb03349dbafbe1db0bb581123b4dd6909393d3cdc86145b997a9d2f9b57a5e9d7c8cc60cdfd03f1c37e9db610d8784f2d29fdeada5ab322894 SHA512 fea8ce0a20a00cbc75023d1db442edfcd32d0ac57a3c41b32ec8d56f87cc1d85d7dd7a923ce662f5d3a315f91a736d6be0d649997acd190915c1d68cc93795e4

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
new file mode 100644
index 00000000000..2892108bd25
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-CVE-2017-5950.patch
@@ -0,0 +1,45 @@
+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
new file mode 100644
index 00000000000..671bde36704
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.2-unbundle-gtest.patch
@@ -0,0 +1,70 @@
+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/yaml-cpp-0.6.2.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.6.2.ebuild
new file mode 100644
index 00000000000..608eab3ed61
--- /dev/null
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.6.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-multilib
+
+DESCRIPTION="YAML parser and emitter in C++"
+HOMEPAGE="https://github.com/jbeder/yaml-cpp"
+SRC_URI="https://github.com/jbeder/${PN}/archive/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/0.6"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+DEPEND="test? ( dev-cpp/gtest )"
+
+S="${WORKDIR}/${PN}-${P}"
+
+PATCHES=(
+	"${FILESDIR}/${P}-CVE-2017-5950.patch"
+	"${FILESDIR}/${P}-unbundle-gtest.patch"
+)
+
+src_prepare() {
+	sed -i \
+		-e 's:INCLUDE_INSTALL_ROOT_DIR:INCLUDE_INSTALL_DIR:g' \
+		yaml-cpp.pc.cmake || die
+
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_SHARED_LIBS=ON
+		-DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
+		-DYAML_CPP_BUILD_TESTS=$(usex test)
+	)
+	cmake-multilib_src_configure
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/
@ 2020-07-27  2:27 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2020-07-27  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     df25aa0798f692e44a99922e9a27d013fafc0bd7
Author:     John Helmert III <jchelmert3 <AT> posteo <DOT> net>
AuthorDate: Sun Jul 19 22:32:55 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 27 02:18:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df25aa07

dev-cpp/yaml-cpp: Cleanup <0.6.3-r2

Bug: https://bugs.gentoo.org/626662
Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: John Helmert III <jchelmert3 <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/16622
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/yaml-cpp/Manifest                          |  1 -
 .../files/yaml-cpp-0.6.2-CVE-2017-5950.patch       | 45 --------------
 .../files/yaml-cpp-0.6.2-unbundle-gtest.patch      | 70 ----------------------
 dev-cpp/yaml-cpp/yaml-cpp-0.6.2.ebuild             | 42 -------------
 dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r1.ebuild          | 45 --------------
 5 files changed, 203 deletions(-)

diff --git a/dev-cpp/yaml-cpp/Manifest b/dev-cpp/yaml-cpp/Manifest
index 9a5094e8b59..65c478502e0 100644
--- a/dev-cpp/yaml-cpp/Manifest
+++ b/dev-cpp/yaml-cpp/Manifest
@@ -1,2 +1 @@
-DIST yaml-cpp-0.6.2.tar.gz 1396250 BLAKE2B be342c212c980cdb03349dbafbe1db0bb581123b4dd6909393d3cdc86145b997a9d2f9b57a5e9d7c8cc60cdfd03f1c37e9db610d8784f2d29fdeada5ab322894 SHA512 fea8ce0a20a00cbc75023d1db442edfcd32d0ac57a3c41b32ec8d56f87cc1d85d7dd7a923ce662f5d3a315f91a736d6be0d649997acd190915c1d68cc93795e4
 DIST yaml-cpp-0.6.3.tar.gz 1398768 BLAKE2B 07abe1c56740105a0af2335bb1cd48086cb614d9d04c61342e53788bfb043fd7eb2629e441a0a5be50898b288f3526f1707c5fdf1d734395b6450c3103773b14 SHA512 68b9ce987cabc1dec79382f922de20cc2c222cb9c090ecb93dc686b048da5c917facf4fce6d8f72feea44b61e5a6770ed3b0c199c4cd4e6bde5b6245c09f8e49

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 2892108bd25..00000000000
--- 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 671bde36704..00000000000
--- 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/yaml-cpp-0.6.2.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.6.2.ebuild
deleted file mode 100644
index 925e955fe1d..00000000000
--- a/dev-cpp/yaml-cpp/yaml-cpp-0.6.2.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-multilib
-
-DESCRIPTION="YAML parser and emitter in C++"
-HOMEPAGE="https://github.com/jbeder/yaml-cpp"
-SRC_URI="https://github.com/jbeder/${PN}/archive/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0/0.6"
-KEYWORDS="amd64 ~arm arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="test? ( dev-cpp/gtest )"
-
-S="${WORKDIR}/${PN}-${P}"
-
-PATCHES=(
-	"${FILESDIR}/${P}-CVE-2017-5950.patch"
-	"${FILESDIR}/${P}-unbundle-gtest.patch"
-)
-
-src_prepare() {
-	sed -i \
-		-e 's:INCLUDE_INSTALL_ROOT_DIR:INCLUDE_INSTALL_DIR:g' \
-		yaml-cpp.pc.cmake || die
-
-	cmake-utils_src_prepare
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_SHARED_LIBS=ON
-		-DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
-		-DYAML_CPP_BUILD_TESTS=$(usex test)
-	)
-	cmake-multilib_src_configure
-}

diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r1.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r1.ebuild
deleted file mode 100644
index 8a579eada7c..00000000000
--- a/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS="cmake"
-inherit cmake-multilib
-
-DESCRIPTION="YAML parser and emitter in C++"
-HOMEPAGE="https://github.com/jbeder/yaml-cpp"
-SRC_URI="https://github.com/jbeder/${PN}/archive/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0/0.6"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="test"
-
-# test breaks build
-# RESTRICT="!test? ( test )"
-RESTRICT+="test"
-
-DEPEND="test? ( dev-cpp/gtest )"
-
-S="${WORKDIR}/${PN}-${P}"
-
-PATCHES=( "${FILESDIR}/${P}-abi-breakage.patch" )
-
-src_prepare() {
-	sed -i \
-		-e 's:INCLUDE_INSTALL_ROOT_DIR:INCLUDE_INSTALL_DIR:g' \
-		yaml-cpp.pc.cmake || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_SHARED_LIBS=ON
-		-DYAML_BUILD_SHARED_LIBS=ON
-		-DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
-		-DYAML_CPP_BUILD_TESTS=$(usex test)
-	)
-
-	cmake-multilib_src_configure
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/
@ 2020-07-27  2:27 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2020-07-27  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     9530f57129611ca33ca70dc96727466a082784e4
Author:     John Helmert III <jchelmert3 <AT> posteo <DOT> net>
AuthorDate: Tue Jul  7 01:19:02 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 27 02:18:13 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9530f571

dev-cpp/yaml-cpp: Revbump to add security patch

Bug: https://bugs.gentoo.org/719150
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: John Helmert III <jchelmert3 <AT> posteo.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/yaml-cpp-0.6.3-fix-overflows.patch       | 149 +++++++++++++++++++++
 dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r3.ebuild          |  49 +++++++
 2 files changed, 198 insertions(+)

diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.3-fix-overflows.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.3-fix-overflows.patch
new file mode 100644
index 00000000000..4c5418db22d
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.3-fix-overflows.patch
@@ -0,0 +1,149 @@
+This patch comes from the upstream commit here[1], slightly modified to
+apply to 0.6.3. The pull request[2] mentions fixing CVE-2017-5950,
+CVE-2018-{20573,20574}, and CVE-2019-6285. Note that CVE-2019-6292 appears to
+be a duplicate of CVE-2019-6285 [3].
+
+[1] https://github.com/jbeder/yaml-cpp/commit/4edff1fa5dbfca16fc72d89870841bee89f8ef89
+[2] https://github.com/jbeder/yaml-cpp/pull/807
+[3] https://github.com/jbeder/yaml-cpp/issues/660
+
+diff --git a/include/yaml-cpp/depthguard.h b/include/yaml-cpp/depthguard.h
+new file mode 100644
+index 00000000..8ca61ac6
+--- /dev/null
++++ b/include/yaml-cpp/depthguard.h
+@@ -0,0 +1,77 @@
++#ifndef DEPTH_GUARD_H_00000000000000000000000000000000000000000000000000000000
++#define DEPTH_GUARD_H_00000000000000000000000000000000000000000000000000000000
++
++#if defined(_MSC_VER) ||                                            \
++    (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
++     (__GNUC__ >= 4))  // GCC supports "pragma once" correctly since 3.4
++#pragma once
++#endif
++
++#include "exceptions.h"
++
++namespace YAML {
++
++/**
++ * @brief The DeepRecursion class
++ *  An exception class which is thrown by DepthGuard. Ideally it should be
++ * a member of DepthGuard. However, DepthGuard is a templated class which means
++ * that any catch points would then need to know the template parameters. It is
++ * simpler for clients to not have to know at the catch point what was the
++ * maximum depth.
++ */
++class DeepRecursion : public ParserException {
++public:
++  virtual ~DeepRecursion() = default;
++
++  DeepRecursion(int depth, const Mark& mark_, const std::string& msg_);
++
++  // Returns the recursion depth when the exception was thrown
++  int depth() const {
++    return m_depth;
++  }
++
++private:
++  int m_depth = 0;
++};
++
++/**
++ * @brief The DepthGuard class
++ *  DepthGuard takes a reference to an integer. It increments the integer upon
++ * construction of DepthGuard and decrements the integer upon destruction.
++ *
++ * If the integer would be incremented past max_depth, then an exception is
++ * thrown. This is ideally geared toward guarding against deep recursion.
++ *
++ * @param max_depth
++ *  compile-time configurable maximum depth.
++ */
++template <int max_depth = 2000>
++class DepthGuard final {
++public:
++  DepthGuard(int & depth_, const Mark& mark_, const std::string& msg_) : m_depth(depth_) {
++    ++m_depth;
++    if ( max_depth <= m_depth ) {
++        throw DeepRecursion{m_depth, mark_, msg_};
++    }
++  }
++
++  DepthGuard(const DepthGuard & copy_ctor) = delete;
++  DepthGuard(DepthGuard && move_ctor) = delete;
++  DepthGuard & operator=(const DepthGuard & copy_assign) = delete;
++  DepthGuard & operator=(DepthGuard && move_assign) = delete;
++
++  ~DepthGuard() {
++    --m_depth;
++  }
++
++  int current_depth() const {
++    return m_depth;
++  }
++
++private:
++    int & m_depth;
++};
++
++} // namespace YAML
++
++#endif // DEPTH_GUARD_H_00000000000000000000000000000000000000000000000000000000
+diff --git a/src/depthguard.cpp b/src/depthguard.cpp
+new file mode 100644
+index 00000000..b88cd340
+--- /dev/null
++++ b/src/depthguard.cpp
+@@ -0,0 +1,10 @@
++#include "yaml-cpp/depthguard.h"
++
++namespace YAML {
++
++DeepRecursion::DeepRecursion(int depth, const Mark& mark_, const std::string& msg_)
++    : ParserException(mark_, msg_),
++      m_depth(depth) {
++}
++
++} // namespace YAML
+diff --git a/src/singledocparser.cpp b/src/singledocparser.cpp
+index 47e9e047..3e5638be 100644
+--- a/src/singledocparser.cpp
++++ b/src/singledocparser.cpp
+@@ -7,6 +7,7 @@
+ #include "singledocparser.h"
+ #include "tag.h"
+ #include "token.h"
++#include "yaml-cpp/depthguard.h"
+ #include "yaml-cpp/emitterstyle.h"
+ #include "yaml-cpp/eventhandler.h"
+ #include "yaml-cpp/exceptions.h"  // IWYU pragma: keep
+@@ -47,6 +48,8 @@ void SingleDocParser::HandleDocument(EventHandler& eventHandler) {
+ }
+ 
+ void SingleDocParser::HandleNode(EventHandler& eventHandler) {
++  DepthGuard<2000> depthguard(depth, m_scanner.mark(), ErrorMsg::BAD_FILE);
++
+   // 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 c8cfca9d..f484eb1f 100644
+--- a/src/singledocparser.h
++++ b/src/singledocparser.h
+@@ -15,6 +15,7 @@
+ 
+ namespace YAML {
+ class CollectionStack;
++template <int> class DepthGuard; // depthguard.h
+ class EventHandler;
+ class Node;
+ class Scanner;
+@@ -55,6 +56,7 @@ class SingleDocParser {
+   anchor_t LookupAnchor(const Mark& mark, const std::string& name) const;
+ 
+  private:
++  int depth = 0;
+   Scanner& m_scanner;
+   const Directives& m_directives;
+   std::unique_ptr<CollectionStack> m_pCollectionStack;

diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r3.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r3.ebuild
new file mode 100644
index 00000000000..8db7bca2434
--- /dev/null
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS="cmake"
+inherit cmake-multilib
+
+DESCRIPTION="YAML parser and emitter in C++"
+HOMEPAGE="https://github.com/jbeder/yaml-cpp"
+SRC_URI="https://github.com/jbeder/${PN}/archive/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/0.6"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+# test breaks build
+#RESTRICT="!test? ( test )"
+RESTRICT+="test"
+
+DEPEND="test? ( dev-cpp/gtest )"
+
+S="${WORKDIR}/${PN}-${P}"
+
+PATCHES=(
+	"${FILESDIR}/${P}-abi-breakage.patch"
+	"${FILESDIR}/${P}-CVE-2017-11692.patch"
+	"${FILESDIR}/${P}-fix-overflows.patch"
+)
+
+src_prepare() {
+	sed -i \
+		-e 's:INCLUDE_INSTALL_ROOT_DIR:INCLUDE_INSTALL_DIR:g' \
+		yaml-cpp.pc.cmake || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_SHARED_LIBS=ON
+		-DYAML_BUILD_SHARED_LIBS=ON
+		-DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
+		-DYAML_CPP_BUILD_TESTS=$(usex test)
+	)
+
+	cmake-multilib_src_configure
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/
@ 2021-06-17 12:44 David Seifert
  0 siblings, 0 replies; 8+ messages in thread
From: David Seifert @ 2021-06-17 12:44 UTC (permalink / raw
  To: gentoo-commits

commit:     21325ae1b77011e74729382cedc4ab4e9ca63220
Author:     Alexey Sokolov <sokolov <AT> google <DOT> com>
AuthorDate: Thu Jun 17 12:44:29 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Jun 17 12:44:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21325ae1

dev-cpp/yaml-cpp: enable tests, take package

Closes: https://github.com/gentoo/gentoo/pull/21230
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-cpp/yaml-cpp/files/yaml-cpp-0.6.3-gtest.patch | 44 ++++++++++++++++++++++
 dev-cpp/yaml-cpp/metadata.xml                     |  9 ++++-
 dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r4.ebuild         | 46 +++++++++++++++++++++++
 3 files changed, 98 insertions(+), 1 deletion(-)

diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.3-gtest.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.3-gtest.patch
new file mode 100644
index 00000000000..51f2a7b563f
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.6.3-gtest.patch
@@ -0,0 +1,44 @@
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 0a669d5..bc8bbdd 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -7,22 +7,7 @@ if(MSVC)
+     set(CMAKE_STATIC_LIBRARY_PREFIX "")
+ endif()
+ 
+-ExternalProject_Add(
+-	googletest_project
+-	SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.8.0"
+-	INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/prefix"
+-	CMAKE_ARGS
+-		-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+-		-DBUILD_GMOCK=ON
+-		-Dgtest_force_shared_crt=ON
+-)
+-
+-add_library(gmock UNKNOWN IMPORTED)
+-set_target_properties(gmock PROPERTIES
+-    IMPORTED_LOCATION
+-    ${PROJECT_BINARY_DIR}/test/prefix/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}
+-)
+-
++find_package(GTest REQUIRED CONFIG)
+ find_package(Threads)
+ 
+ include_directories(SYSTEM "${PROJECT_BINARY_DIR}/test/prefix/include")
+@@ -56,14 +41,12 @@ set_target_properties(run-tests PROPERTIES
+     CXX_STANDARD_REQUIRED ON
+ )
+ 
+-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
++    GTest::gmock
+     ${CMAKE_THREAD_LIBS_INIT})
+ 
+ add_test(yaml-test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run-tests)

diff --git a/dev-cpp/yaml-cpp/metadata.xml b/dev-cpp/yaml-cpp/metadata.xml
index 60dee465819..66302b48567 100644
--- a/dev-cpp/yaml-cpp/metadata.xml
+++ b/dev-cpp/yaml-cpp/metadata.xml
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<!-- maintainer-needed -->
+	<maintainer type="person" proxied="yes">
+		<email>alexey+gentoo@asokolov.org</email>
+		<name>Alexey Sokolov</name>
+	</maintainer>
+	<maintainer type="project" proxied="proxy">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
 	<upstream>
 		<remote-id type="github">jbeder/yaml-cpp</remote-id>
 	</upstream>

diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r4.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r4.ebuild
new file mode 100644
index 00000000000..4992372c536
--- /dev/null
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r4.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS="cmake"
+inherit cmake-multilib
+
+DESCRIPTION="YAML parser and emitter in C++"
+HOMEPAGE="https://github.com/jbeder/yaml-cpp"
+SRC_URI="https://github.com/jbeder/yaml-cpp/archive/${P}.tar.gz"
+S="${WORKDIR}/yaml-cpp-${P}"
+
+LICENSE="MIT"
+SLOT="0/0.6"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
+
+PATCHES=(
+	"${FILESDIR}/${P}-abi-breakage.patch"
+	"${FILESDIR}/${P}-CVE-2017-11692.patch"
+	"${FILESDIR}/${P}-fix-overflows.patch"
+	"${FILESDIR}/${P}-gtest.patch"
+)
+
+src_prepare() {
+	sed -i \
+		-e 's:INCLUDE_INSTALL_ROOT_DIR:INCLUDE_INSTALL_DIR:g' \
+		yaml-cpp.pc.cmake || die
+	rm -r test/gtest-* || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DYAML_BUILD_SHARED_LIBS=ON
+		-DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
+		-DYAML_CPP_BUILD_TESTS=$(usex test)
+	)
+
+	cmake-multilib_src_configure
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/
@ 2021-08-16  6:58 Joonas Niilola
  0 siblings, 0 replies; 8+ messages in thread
From: Joonas Niilola @ 2021-08-16  6:58 UTC (permalink / raw
  To: gentoo-commits

commit:     c813626ffa5a15c38562bcb793e4a107a66fe95f
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Wed Aug 11 22:47:34 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Aug 16 06:58:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c813626f

dev-cpp/yaml-cpp: install cmake and .pc files to lib/

Closes: https://bugs.gentoo.org/807745
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Closes: https://github.com/gentoo/gentoo/pull/21953
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../yaml-cpp/files/yaml-cpp-0.7.0-pkg-config.patch  | 21 +++++++++++++++++++++
 ...ml-cpp-0.7.0.ebuild => yaml-cpp-0.7.0-r1.ebuild} |  1 +
 2 files changed, 22 insertions(+)

diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-pkg-config.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-pkg-config.patch
new file mode 100644
index 00000000000..3e7bc7bae93
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-pkg-config.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/807745
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -148,13 +148,13 @@ if (YAML_CPP_INSTALL)
+     DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ 		FILES_MATCHING PATTERN "*.h")
+   install(EXPORT yaml-cpp-targets
+-    DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp")
++    DESTINATION "${CMAKE_INSTALL_LIBDIR}/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 "${CMAKE_INSTALL_LIBDIR}/cmake/yaml-cpp")
+   install(FILES "${PROJECT_BINARY_DIR}/yaml-cpp.pc"
+-    DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig)
++    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
+ 
+ if(YAML_CPP_BUILD_TESTS)

diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.7.0-r1.ebuild
similarity index 95%
rename from dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild
rename to dev-cpp/yaml-cpp/yaml-cpp-0.7.0-r1.ebuild
index c35d82cd5f2..dec50f0fe46 100644
--- a/dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.7.0-r1.ebuild
@@ -21,6 +21,7 @@ DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
 
 PATCHES=(
 	"${FILESDIR}/${P}-gtest.patch"
+	"${FILESDIR}/${P}-pkg-config.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/
@ 2022-09-25  1:21 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-09-25  1:21 UTC (permalink / raw
  To: gentoo-commits

commit:     9614b28e55585a296741eeffd46952ec79223f13
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Sat Sep 17 09:31:33 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 25 01:18:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9614b28e

dev-cpp/yaml-cpp: update EAPI 7 -> 8, fix installed .pc & CMake files

Closes: https://bugs.gentoo.org/867955
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/27302
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/yaml-cpp-0.7.0-cmake-paths.patch         | 101 +++++++++++++++++++++
 dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch  |  17 ++--
 .../files/yaml-cpp-0.7.0-install-paths.patch       |  25 +++++
 dev-cpp/yaml-cpp/yaml-cpp-0.7.0-r2.ebuild          |  35 +++++++
 4 files changed, 172 insertions(+), 6 deletions(-)

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
index 45eebb43ffe2..bd05fccca373 100644
--- 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
@@ -1,8 +1,11 @@
-diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
-index 5ebc1a6..f02c2bb 100644
+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,13 +1,10 @@
+@@ -1,15 +1,10 @@
  find_package(Threads REQUIRED)
 +find_package(GTest REQUIRED CONFIG)
  
@@ -14,10 +17,12 @@ index 5ebc1a6..f02c2bb 100644
 -  "${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")
- 
+-include_directories(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0/googletest/include")
+-
  set(test-new-api-pattern "new-api/*.cpp")
-@@ -38,7 +35,7 @@ target_link_libraries(yaml-cpp-tests
+ 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

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/yaml-cpp-0.7.0-r2.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.7.0-r2.ebuild
new file mode 100644
index 000000000000..1ad533f2dae8
--- /dev/null
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.7.0-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+DESCRIPTION="YAML parser and emitter in C++"
+HOMEPAGE="https://github.com/jbeder/yaml-cpp"
+SRC_URI="https://github.com/jbeder/yaml-cpp/archive/${P}.tar.gz"
+S="${WORKDIR}/yaml-cpp-${P}"
+
+LICENSE="MIT"
+SLOT="0/0.7"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
+
+PATCHES=(
+	"${FILESDIR}/${P}-gtest.patch"
+	"${FILESDIR}/${P}-cmake-paths.patch"
+	"${FILESDIR}/${P}-install-paths.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DYAML_BUILD_SHARED_LIBS=ON
+		-DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
+		-DYAML_CPP_BUILD_TESTS=$(usex test)
+	)
+
+	cmake-multilib_src_configure
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/
@ 2023-09-25 16:46 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2023-09-25 16:46 UTC (permalink / raw
  To: gentoo-commits

commit:     4af59a28125a5a79949ca24e08430230e3eb38b8
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 25 16:45:56 2023 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Sep 25 16:45:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4af59a28

dev-cpp/yaml-cpp: add 0.8.0

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-cpp/yaml-cpp/Manifest                         |  1 +
 dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-gtest.patch | 30 ++++++++++++++++++++
 dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild            | 34 +++++++++++++++++++++++
 3 files changed, 65 insertions(+)

diff --git a/dev-cpp/yaml-cpp/Manifest b/dev-cpp/yaml-cpp/Manifest
index d18739367bdc..13de371c236a 100644
--- a/dev-cpp/yaml-cpp/Manifest
+++ b/dev-cpp/yaml-cpp/Manifest
@@ -1 +1,2 @@
 DIST yaml-cpp-0.7.0.tar.gz 1033237 BLAKE2B 69a11a8503ad607aa0d54912a5e53d305a643fe2d36dd86fa96832e3d4930b39a85318dc130e438210a9ca60357f3aa9aa6cd0f2b6bc45728b648c545a437368 SHA512 2de0f0ec8f003cd3c498d571cda7a796bf220517bad2dc02cba70c522dddde398f33cf1ad20da251adaacb2a07b77844111f297e99d45a7c46ebc01706bbafb5
+DIST yaml-cpp-0.8.0.gh.tar.gz 1017151 BLAKE2B 5fd3eaec06bc04215afd2aa14ae8cd35f829f700f104931a51dbd8bb22e4e87f5cd5f2f975d3a2f464226d7165d3d106aa17bc7eab8a812c2545d2212011cf11 SHA512 aae9d618f906117d620d63173e95572c738db518f4ff1901a06de2117d8deeb8045f554102ca0ba4735ac0c4d060153a938ef78da3e0da3406d27b8298e5f38e

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)

diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild
new file mode 100644
index 000000000000..70652dfe4b3a
--- /dev/null
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+DESCRIPTION="YAML parser and emitter in C++"
+HOMEPAGE="https://github.com/jbeder/yaml-cpp"
+SRC_URI="https://github.com/jbeder/yaml-cpp/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/0.8"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )
+"
+
+PATCHES=(
+	"${FILESDIR}/yaml-cpp-0.8.0-gtest.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DYAML_BUILD_SHARED_LIBS=ON
+		-DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
+		-DYAML_CPP_BUILD_TESTS=$(usex test)
+	)
+
+	cmake-multilib_src_configure
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-25 16:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 16:46 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/ Patrick McLean
  -- strict thread matches above, loose matches on Subject: below --
2022-09-25  1:21 Sam James
2021-08-16  6:58 Joonas Niilola
2021-06-17 12:44 David Seifert
2020-07-27  2:27 Sam James
2020-07-27  2:27 Sam James
2018-03-29 18:38 Johannes Huber
2017-07-30  9:10 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox