From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1F4C31382C5 for ; Thu, 17 Jun 2021 12:44:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 620CBE0822; Thu, 17 Jun 2021 12:44:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF3D3E0822 for ; Thu, 17 Jun 2021 12:44:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 731B3335D3F for ; Thu, 17 Jun 2021 12:44:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C69BB78A for ; Thu, 17 Jun 2021 12:44:49 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1623933869.21325ae1b77011e74729382cedc4ab4e9ca63220.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/yaml-cpp/files/, dev-cpp/yaml-cpp/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-cpp/yaml-cpp/files/yaml-cpp-0.6.3-gtest.patch dev-cpp/yaml-cpp/metadata.xml dev-cpp/yaml-cpp/yaml-cpp-0.6.3-r4.ebuild X-VCS-Directories: dev-cpp/yaml-cpp/files/ dev-cpp/yaml-cpp/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 21325ae1b77011e74729382cedc4ab4e9ca63220 X-VCS-Branch: master Date: Thu, 17 Jun 2021 12:44:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cac26464-018a-43c2-9ac1-dd12f51342af X-Archives-Hash: 276ec81576ae87c6686929fde6f17245 commit: 21325ae1b77011e74729382cedc4ab4e9ca63220 Author: Alexey Sokolov google com> AuthorDate: Thu Jun 17 12:44:29 2021 +0000 Commit: David Seifert gentoo 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 asokolov.org> Signed-off-by: David Seifert 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= +- -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 @@ - + + alexey+gentoo@asokolov.org + Alexey Sokolov + + + proxy-maint@gentoo.org + Proxy Maintainers + jbeder/yaml-cpp 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 +}