Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/, dev-cpp/yaml-cpp/files/
Date: Wed, 14 Jul 2021 14:32:58
Message-Id: 1626273163.d0a4cd046ad4bd19d294c9770ccc4eec47057683.juippis@gentoo
1 commit: d0a4cd046ad4bd19d294c9770ccc4eec47057683
2 Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
3 AuthorDate: Sat Jul 10 18:23:13 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 14 14:32:43 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0a4cd04
7
8 dev-cpp/yaml-cpp: version 0.7.0
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.2
11 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
12 Closes: https://github.com/gentoo/gentoo/pull/21585
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14
15 dev-cpp/yaml-cpp/Manifest | 1 +
16 dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch | 28 ++++++++++++++++
17 dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild | 40 +++++++++++++++++++++++
18 3 files changed, 69 insertions(+)
19
20 diff --git a/dev-cpp/yaml-cpp/Manifest b/dev-cpp/yaml-cpp/Manifest
21 index 65c478502e0..88f602e7f4e 100644
22 --- a/dev-cpp/yaml-cpp/Manifest
23 +++ b/dev-cpp/yaml-cpp/Manifest
24 @@ -1 +1,2 @@
25 DIST yaml-cpp-0.6.3.tar.gz 1398768 BLAKE2B 07abe1c56740105a0af2335bb1cd48086cb614d9d04c61342e53788bfb043fd7eb2629e441a0a5be50898b288f3526f1707c5fdf1d734395b6450c3103773b14 SHA512 68b9ce987cabc1dec79382f922de20cc2c222cb9c090ecb93dc686b048da5c917facf4fce6d8f72feea44b61e5a6770ed3b0c199c4cd4e6bde5b6245c09f8e49
26 +DIST yaml-cpp-0.7.0.tar.gz 1033237 BLAKE2B 69a11a8503ad607aa0d54912a5e53d305a643fe2d36dd86fa96832e3d4930b39a85318dc130e438210a9ca60357f3aa9aa6cd0f2b6bc45728b648c545a437368 SHA512 2de0f0ec8f003cd3c498d571cda7a796bf220517bad2dc02cba70c522dddde398f33cf1ad20da251adaacb2a07b77844111f297e99d45a7c46ebc01706bbafb5
27
28 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
29 new file mode 100644
30 index 00000000000..45eebb43ffe
31 --- /dev/null
32 +++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch
33 @@ -0,0 +1,28 @@
34 +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
35 +index 5ebc1a6..f02c2bb 100644
36 +--- a/test/CMakeLists.txt
37 ++++ b/test/CMakeLists.txt
38 +@@ -1,13 +1,10 @@
39 + find_package(Threads REQUIRED)
40 ++find_package(GTest REQUIRED CONFIG)
41 +
42 + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
43 + set(BUILD_MOCK ON CACHE BOOL "" FORCE)
44 + set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
45 +
46 +-add_subdirectory(
47 +- "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0"
48 +- "${CMAKE_CURRENT_BINARY_DIR}/prefix")
49 +-
50 + include_directories(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0/googletest/include")
51 +
52 + set(test-new-api-pattern "new-api/*.cpp")
53 +@@ -38,7 +35,7 @@ target_link_libraries(yaml-cpp-tests
54 + PRIVATE
55 + Threads::Threads
56 + yaml-cpp
57 +- gmock)
58 ++ GTest::gmock)
59 +
60 + set_property(TARGET yaml-cpp-tests PROPERTY CXX_STANDARD_REQUIRED ON)
61 + if (NOT DEFINED CMAKE_CXX_STANDARD)
62
63 diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild
64 new file mode 100644
65 index 00000000000..0140ff9a122
66 --- /dev/null
67 +++ b/dev-cpp/yaml-cpp/yaml-cpp-0.7.0.ebuild
68 @@ -0,0 +1,40 @@
69 +# Copyright 1999-2021 Gentoo Authors
70 +# Distributed under the terms of the GNU General Public License v2
71 +
72 +EAPI=7
73 +
74 +CMAKE_ECLASS="cmake"
75 +inherit cmake-multilib
76 +
77 +DESCRIPTION="YAML parser and emitter in C++"
78 +HOMEPAGE="https://github.com/jbeder/yaml-cpp"
79 +SRC_URI="https://github.com/jbeder/yaml-cpp/archive/${P}.tar.gz"
80 +S="${WORKDIR}/yaml-cpp-${P}"
81 +
82 +LICENSE="MIT"
83 +SLOT="0/0.7"
84 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
85 +IUSE="test"
86 +RESTRICT="!test? ( test )"
87 +
88 +DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
89 +
90 +PATCHES=(
91 + "${FILESDIR}/${P}-gtest.patch"
92 +)
93 +
94 +src_prepare() {
95 + rm -r test/gtest-* || die
96 +
97 + cmake_src_prepare
98 +}
99 +
100 +src_configure() {
101 + local mycmakeargs=(
102 + -DYAML_BUILD_SHARED_LIBS=ON
103 + -DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
104 + -DYAML_CPP_BUILD_TESTS=$(usex test)
105 + )
106 +
107 + cmake-multilib_src_configure
108 +}