diff options
Diffstat (limited to 'dev-cpp/yaml-cpp')
-rw-r--r-- | dev-cpp/yaml-cpp/Manifest | 5 | ||||
-rw-r--r-- | dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-cmake-paths.patch | 101 | ||||
-rw-r--r-- | dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-gtest.patch | 17 | ||||
-rw-r--r-- | dev-cpp/yaml-cpp/files/yaml-cpp-0.7.0-install-paths.patch | 25 | ||||
-rw-r--r-- | dev-cpp/yaml-cpp/yaml-cpp-0.7.0-r2.ebuild | 35 |
5 files changed, 176 insertions, 7 deletions
diff --git a/dev-cpp/yaml-cpp/Manifest b/dev-cpp/yaml-cpp/Manifest index 22f65ffc1537..d78790109710 100644 --- a/dev-cpp/yaml-cpp/Manifest +++ b/dev-cpp/yaml-cpp/Manifest @@ -1,5 +1,8 @@ -AUX yaml-cpp-0.7.0-gtest.patch 846 BLAKE2B b9fe25d42402cb019a705c74ff87cfbb018ffd1c8bd6815f39683842f3c7bbdae6f08713dbc298880a5f2787ca24badd1e56a4fedd74340d87a2811f89332c7f SHA512 d7a89218fad73c9de6a5a9cfb5203089f63346c1df7abe5a21670c7a20c348dee55176113db6a2c494b04bab9687820b7ebd9c93f11cd82b9d8b6cde58b9f91c +AUX yaml-cpp-0.7.0-cmake-paths.patch 4037 BLAKE2B d8582bd324d159114545619de88fd4fa469cb6aac6fd0047309366760b33a216841e2103e8023d1167bb648b32fcd2905d7be21a9b703e3edda0b4eba8f512b1 SHA512 c9059db39ab4faa3864c3b58c60e1c8b840aaef48c10bee30677f8e5feed97c24b19070ca4907df89332c317af82190f552db64b91406ebe169392561ae14488 +AUX yaml-cpp-0.7.0-gtest.patch 1081 BLAKE2B 7fe415662ce9eb205f6f1c42df9885ae5817bf0a7aa7e8e7abd296338b0fb0fe6c31733ad57fdc6d97b566fd82f494b604ad250860bf9d06cf6cbc9901ad9bf6 SHA512 1c97aaae36205e810b76c610bb334888d044391eed96b653c186b64822bf38e4ab4aef29acad418c9063d4752c665a0dddcdbef87fdd855c0a416950c52ac443 +AUX yaml-cpp-0.7.0-install-paths.patch 1062 BLAKE2B c76f9f34e7f20954a2f2f0582f5d124ec22af2c91dccc19b4c7891b19d14bc2aff7d61f93b20a606c58397c70f9db2f35f10c6645869253a5bedd50d9e65eaa1 SHA512 9d14416fdb8111027324ffeae3856590348f9497444ecae7a2091d3211e17fe61fdd66932b98c119cf54551c551aa8f6a698a2c5a97cb559cf6e3a54f25e07cb AUX yaml-cpp-0.7.0-pkg-config.patch 786 BLAKE2B e15882c2980e3c5697985c097ff8775d8750a4cf6712d4afb370875763646d2355cbeb14e17c21c1ee3cc98335f5edd42b8f7ac71a2e4de6dfb5364188e38669 SHA512 33d7ddedd8414559b5a20a03ebcc5b58ea3e706e1c757a93576fff619e4fab3d9fadda0f2db38ff5dc675620a28d97cef623205d2c568371ad93c597ab735284 DIST yaml-cpp-0.7.0.tar.gz 1033237 BLAKE2B 69a11a8503ad607aa0d54912a5e53d305a643fe2d36dd86fa96832e3d4930b39a85318dc130e438210a9ca60357f3aa9aa6cd0f2b6bc45728b648c545a437368 SHA512 2de0f0ec8f003cd3c498d571cda7a796bf220517bad2dc02cba70c522dddde398f33cf1ad20da251adaacb2a07b77844111f297e99d45a7c46ebc01706bbafb5 EBUILD yaml-cpp-0.7.0-r1.ebuild 875 BLAKE2B 9fce3fa4514b87547ec49bdc6ca6a7bb18d8122b63212a8823d9e8cc212a79dee6a93a440936d9e6e6786aa54936a19753722371ba9d1586faba5aadf185e667 SHA512 78dfdedd17147f93c89910eb1864b9f2ba93070750bd6ed0e072d775617c7379cd2141f990f1d2783309b989592c4d403b94897b389aaf91bb60f1fb25d7e9bc +EBUILD yaml-cpp-0.7.0-r2.ebuild 856 BLAKE2B c46e56fe68e35fbf478951f55c40121b72d543eb5493fbe0b015f8d20069f2a88b4d56aca9dadccaec0e2acbac8424b0ae8d48b415edbb4b3c94255a452ff5b9 SHA512 f7189262967c2ec6dff5f4ab52e5d87b01cfcb8e8d7db640d8464d7f6a12cc37e5bdd1f1fd96ca5c826aa888b719005be25e9e55ead9efc4fd0b39f6f7d0400a MISC metadata.xml 484 BLAKE2B e973aef681bed7de47725bab49d2acfe809ad73c97eea709bec9d5bb9d720f89bc222ff77f09b90780b2a14d6a094f9ddd24a4f15d6ad88b94060d240c5836d8 SHA512 612604d3b0c2edd157c4a55ae22d92e174cdcbc17532de7f2888b9579b4b028da2214e6d756864dfffdeca129f32e5db2241308d326c6ff21044f48bf2d87d73 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 +} |