commit:     d0a4cd046ad4bd19d294c9770ccc4eec47057683
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sat Jul 10 18:23:13 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jul 14 14:32:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0a4cd04

dev-cpp/yaml-cpp: version 0.7.0

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/21585
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-cpp/yaml-cpp/Manifest                         |  1 +
 dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch | 28 ++++++++++++++++
 dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild            | 40 +++++++++++++++++++++++
 3 files changed, 69 insertions(+)

diff --git a/dev-cpp/yaml-cpp/Manifest b/dev-cpp/yaml-cpp/Manifest
index 65c478502e0..88f602e7f4e 100644
--- a/dev-cpp/yaml-cpp/Manifest
+++ b/dev-cpp/yaml-cpp/Manifest
@@ -1 +1,2 @@
 DIST yaml-cpp-0.6.3.tar.gz 1398768 BLAKE2B 
07abe1c56740105a0af2335bb1cd48086cb614d9d04c61342e53788bfb043fd7eb2629e441a0a5be50898b288f3526f1707c5fdf1d734395b6450c3103773b14
 SHA512 
68b9ce987cabc1dec79382f922de20cc2c222cb9c090ecb93dc686b048da5c917facf4fce6d8f72feea44b61e5a6770ed3b0c199c4cd4e6bde5b6245c09f8e49
+DIST yaml-cpp-0.7.0.tar.gz 1033237 BLAKE2B 
69a11a8503ad607aa0d54912a5e53d305a643fe2d36dd86fa96832e3d4930b39a85318dc130e438210a9ca60357f3aa9aa6cd0f2b6bc45728b648c545a437368
 SHA512 
2de0f0ec8f003cd3c498d571cda7a796bf220517bad2dc02cba70c522dddde398f33cf1ad20da251adaacb2a07b77844111f297e99d45a7c46ebc01706bbafb5

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 00000000000..45eebb43ffe
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch
@@ -0,0 +1,28 @@
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 5ebc1a6..f02c2bb 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -1,13 +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")
+@@ -38,7 +35,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.7.0.ebuild 
b/dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild
new file mode 100644
index 00000000000..0140ff9a122
--- /dev/null
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild
@@ -0,0 +1,40 @@
+# 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.7"
+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}-gtest.patch"
+)
+
+src_prepare() {
+       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
+}

Reply via email to