commit:     95fef56ce3e655745b52a9bd19da12f63b004b77
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 26 07:26:54 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Sep 26 08:06:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95fef56c

dev-qt/qt-creator: fix build with yaml-cpp-0.8

Closes: https://bugs.gentoo.org/914732
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/qt-creator-11.0.2-yaml-cpp-0.8.patch     | 29 ++++++++++++++++++++++
 dev-qt/qt-creator/qt-creator-11.0.2.ebuild         |  1 +
 2 files changed, 30 insertions(+)

diff --git a/dev-qt/qt-creator/files/qt-creator-11.0.2-yaml-cpp-0.8.patch 
b/dev-qt/qt-creator/files/qt-creator-11.0.2-yaml-cpp-0.8.patch
new file mode 100644
index 000000000000..c06a2733b484
--- /dev/null
+++ b/dev-qt/qt-creator/files/qt-creator-11.0.2-yaml-cpp-0.8.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/914732
+https://bugreports.qt.io/browse/QTCREATORBUG-29537
+
+https://github.com/qt-creator/qt-creator/commit/170f9acfb41704b68e2ba98690fd6d5e98addd85
+From: Eike Ziller <eike.zil...@qt.io>
+Date: Thu, 24 Aug 2023 13:41:33 +0200
+Subject: [PATCH] ClangTools: Add support for yaml-cpp 0.8
+
+They renamed their target from `yaml-cpp`
+to `yaml-cpp::yaml-cpp`
+
+Still support < 0.8 though.
+--- a/cmake/Findyaml-cpp.cmake
++++ b/cmake/Findyaml-cpp.cmake
+@@ -16,5 +16,13 @@
+     find_path(yaml_cpp_include_dir yaml-cpp/yaml.h)
+   endif()
+-  set_target_properties(yaml-cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES 
"${yaml_cpp_include_dir}")
++  if(TARGET yaml-cpp::yaml-cpp)
++    # yaml-cpp >= 0.8
++    set_property(TARGET yaml-cpp::yaml-cpp PROPERTY IMPORTED_GLOBAL TRUE)
++    add_library(yaml-cpp ALIAS yaml-cpp::yaml-cpp)
++    set(yaml-cpp_TARGET yaml-cpp::yaml-cpp)
++  else()
++    set(yaml-cpp_TARGET yaml-cpp)
++  endif()
++  set_target_properties(${yaml-cpp_TARGET} PROPERTIES 
INTERFACE_INCLUDE_DIRECTORIES "${yaml_cpp_include_dir}")
+ else()
+   if(TARGET yaml-cpp)

diff --git a/dev-qt/qt-creator/qt-creator-11.0.2.ebuild 
b/dev-qt/qt-creator/qt-creator-11.0.2.ebuild
index 2d43880f115f..20bd6be0b986 100644
--- a/dev-qt/qt-creator/qt-creator-11.0.2.ebuild
+++ b/dev-qt/qt-creator/qt-creator-11.0.2.ebuild
@@ -84,6 +84,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-11.0.2-musl-no-execinfo.patch
        "${FILESDIR}"/${PN}-11.0.2-musl-no-malloc-trim.patch
        "${FILESDIR}"/${PN}-11.0.2-qt653.patch
+       "${FILESDIR}"/${P}-yaml-cpp-0.8.patch
 )
 
 pkg_setup() {

Reply via email to