From 17818aa503e5af0045beafae3a9265fe60c458bd Mon Sep 17 00:00:00 2001 From: Xing Ji <33065325+jixingcn@users.noreply.github.com> Date: Fri, 27 Aug 2021 01:10:12 +0800 Subject: [PATCH] [OpenColorIO] Fix OpenColorIO v2.0.1 can't be find_package (#19725) * fix that opencolorio v2.0.1 can't be `find_package`, reference the master branch of opencolorio to generate `OpenColorIOTargets` * run `vcpkg x-add-version --all` * fix the `OpenColorIO` for linux * vcpkg x-add-version --all * patch for `OpenColorIOConfig.cmake` by https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1397 * vcpkg x-add-version --all --- ports/opencolorio/portfile.cmake | 13 ++++++++++++- ...se-find-openxer.patch => use-find-openexr.patch} | 0 ports/opencolorio/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/o-/opencolorio.json | 5 +++++ 5 files changed, 19 insertions(+), 2 deletions(-) rename ports/opencolorio/{use-find-openxer.patch => use-find-openexr.patch} (100%) diff --git a/ports/opencolorio/portfile.cmake b/ports/opencolorio/portfile.cmake index 27f21fda434960..5967543b01bf71 100644 --- a/ports/opencolorio/portfile.cmake +++ b/ports/opencolorio/portfile.cmake @@ -1,4 +1,10 @@ +vcpkg_download_distfile(config_patch_path + URLS https://patch-diff.githubusercontent.com/raw/AcademySoftwareFoundation/OpenColorIO/pull/1397.diff + FILENAME AcademySoftwareFoundation-OpenColorIO-b8e18214b.diff + SHA512 34a1afb79521e43138b8a695817a9eaf6c0de8cc1d85b4640967d0ad531287a4beb41660d461067cb67103fb3ee90e11bc50e1426a0d1ae6050f3ca434dd2f3d +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO AcademySoftwareFoundation/OpenColorIO @@ -6,8 +12,9 @@ vcpkg_from_github( SHA512 51568e21eaf863747f67fbcffa7f42ba32f5892e8295dac6c9deb0f6205f57c231ea34ce028d84915e4be2f2773e362b74eaf057c2e4cf3ad4b60bf13a0b73db HEAD_REF master PATCHES + ${config_patch_path} fix-pystring-name.patch - use-find-openxer.patch + use-find-openexr.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -31,12 +38,16 @@ vcpkg_cmake_configure( vcpkg_cmake_install() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/OpenColorIO") + vcpkg_copy_pdbs() # Clean redundant files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/OpenColorIOConfig.cmake + ${CURRENT_PACKAGES_DIR}/OpenColorIOConfig.cmake ) if (OCIO_BUILD_APPS) vcpkg_copy_tools( diff --git a/ports/opencolorio/use-find-openxer.patch b/ports/opencolorio/use-find-openexr.patch similarity index 100% rename from ports/opencolorio/use-find-openxer.patch rename to ports/opencolorio/use-find-openexr.patch diff --git a/ports/opencolorio/vcpkg.json b/ports/opencolorio/vcpkg.json index 13d79cd8601323..f7be1eae537d04 100644 --- a/ports/opencolorio/vcpkg.json +++ b/ports/opencolorio/vcpkg.json @@ -1,6 +1,7 @@ { "name": "opencolorio", "version-semver": "2.0.1", + "port-version": 1, "description": "OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. OCIO provides a straightforward and consistent user experience across all supporting applications while allowing for sophisticated back-end configuration options suitable for high-end production usage. OCIO is compatible with the Academy Color Encoding Specification (ACES) and is LUT-format agnostic, supporting many popular formats.", "homepage": "https://opencolorio.org/", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 6dea4286ca9f41..123b7a95074fe6 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4614,7 +4614,7 @@ }, "opencolorio": { "baseline": "2.0.1", - "port-version": 0 + "port-version": 1 }, "opencolorio-tools": { "baseline": "1.1.1", diff --git a/versions/o-/opencolorio.json b/versions/o-/opencolorio.json index 2326e6b1b2e5f2..af8a543682291c 100644 --- a/versions/o-/opencolorio.json +++ b/versions/o-/opencolorio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1cb605cb4249c89ebab09079982d8f2b4b249716", + "version-semver": "2.0.1", + "port-version": 1 + }, { "git-tree": "3f0f60f376d80012eb0c3bd17ce51e3788070fe4", "version-semver": "2.0.1",