From 52f20ba41d0ca005f751aa415ecab94b8fb68a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Thu, 14 Sep 2023 17:55:49 +0200 Subject: [PATCH] opencolorio: fix yaml-cpp find module --- .../0004-fix-findyaml-cpp.patch | 22 +++++++++++++++++++ mingw-w64-opencolorio/PKGBUILD | 9 ++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 mingw-w64-opencolorio/0004-fix-findyaml-cpp.patch diff --git a/mingw-w64-opencolorio/0004-fix-findyaml-cpp.patch b/mingw-w64-opencolorio/0004-fix-findyaml-cpp.patch new file mode 100644 index 0000000000..178c2ac328 --- /dev/null +++ b/mingw-w64-opencolorio/0004-fix-findyaml-cpp.patch @@ -0,0 +1,22 @@ +diff --git a/share/cmake/modules/Findyaml-cpp.cmake b/share/cmake/modules/Findyaml-cpp.cmake +index 59558ce..cfeefe9 100644 +--- a/share/cmake/modules/Findyaml-cpp.cmake ++++ b/share/cmake/modules/Findyaml-cpp.cmake +@@ -43,7 +43,7 @@ if(NOT OCIO_INSTALL_EXT_PACKAGES STREQUAL ALL) + endif() + + if(yaml-cpp_FOUND) +- get_target_property(yaml-cpp_LIBRARY yaml-cpp LOCATION) ++ get_target_property(yaml-cpp_LIBRARY yaml-cpp::yaml-cpp LOCATION) + else() + + # As yaml-cpp-config.cmake search fails, search an installed library +@@ -130,7 +130,7 @@ endif() + ############################################################################### + ### Create target (if previous 'find_package' call hasn't) ### + +-if(NOT TARGET yaml-cpp) ++if(NOT TARGET yaml-cpp::yaml-cpp) + add_library(yaml-cpp UNKNOWN IMPORTED GLOBAL) + set(_yaml-cpp_TARGET_CREATE TRUE) + endif() diff --git a/mingw-w64-opencolorio/PKGBUILD b/mingw-w64-opencolorio/PKGBUILD index 0b23855ed4..f6c2d9fb39 100644 --- a/mingw-w64-opencolorio/PKGBUILD +++ b/mingw-w64-opencolorio/PKGBUILD @@ -34,10 +34,12 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" optdepends=("${MINGW_PACKAGE_PREFIX}-python: Python bindings") source=(${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/OpenColorIO/archive/v${pkgver}.tar.gz 0001-fix-build-against-minizip-ng-4.patch - 0003-fix-python-sitearch.patch) + 0003-fix-python-sitearch.patch + 0004-fix-findyaml-cpp.patch) sha256sums=('36f27c5887fc4e5c241805c29b8b8e68725aa05520bcaa7c7ec84c0422b8580e' '2f63b50e09d493b0e29d98ce579722a53a296834bf244819823764b41f5bedbd' - '73660c114f5adfd6c089d0e91ae776601734e8b1ad4f6e773867d7eee4a1a5fb') + '73660c114f5adfd6c089d0e91ae776601734e8b1ad4f6e773867d7eee4a1a5fb' + 'deb5f8b1be50d248817c281c06738bb76aeba9e53d516a7501f4769029bfb41f') apply_patch_with_msg() { for _patch in "$@" @@ -54,6 +56,9 @@ prepare() { 0001-fix-build-against-minizip-ng-4.patch apply_patch_with_msg \ 0003-fix-python-sitearch.patch + # https://github.com/jbeder/yaml-cpp/pull/1212/files#r1310028784 + apply_patch_with_msg \ + 0004-fix-findyaml-cpp.patch } build() {