[opencolorio] Update to 2.1.2, fixes (#25805)

* Fix exported Imath dependency

* Drop unused deps from patches and config

* Handle DLL import in installed header

* Fix non-required find_package(OpenColorIO)

* Omit unrelocatable script

* Installation cleanup

* Update to 2.1.2

* Fix exported pc file

* Update versions

* Silence warning

* Update versions
This commit is contained in:
Kai Pastor 2022-07-18 22:36:48 +02:00 committed by GitHub
parent 687f4aab11
commit 28f7523ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 69 deletions

View File

@ -1,13 +0,0 @@
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
index b992bbc..804d3c5 100644
--- a/src/OpenColorIO/CMakeLists.txt
+++ b/src/OpenColorIO/CMakeLists.txt
@@ -248,7 +248,7 @@ if(NOT BUILD_SHARED_LIBS)
else()
# Only exports selected symbols.
target_compile_definitions(OpenColorIO
- PUBLIC
+ PRIVATE
OpenColorIO_EXPORTS
)
endif()

View File

@ -39,7 +39,7 @@ index 8787b87..f953ceb 100644
set(OCIO_HALF_LIB IlmBase::Half CACHE STRING "Half library target" FORCE)
set(OCIO_USE_IMATH_HALF "0" CACHE STRING "Whether 'half' type will be sourced from the Imath library (>=v3.0)" FORCE)
@@ -65,13 +65,13 @@ if(OCIO_BUILD_APPS)
@@ -65,7 +65,7 @@ if(OCIO_BUILD_APPS)
# lcms2
# https://github.com/mm2/Little-CMS
@ -48,21 +48,6 @@ index 8787b87..f953ceb 100644
endif()
if(OCIO_BUILD_OPENFX)
# openfx
# https://github.com/ofxa/openfx
- find_package(openfx 1.4 REQUIRED)
+ find_package(openfx CONFIG REQUIRED)
endif()
if (OCIO_PYTHON_VERSION AND NOT OCIO_BUILD_PYTHON)
@@ -100,6 +100,6 @@ if(OCIO_BUILD_PYTHON OR OCIO_BUILD_DOCS)
if(OCIO_BUILD_PYTHON)
# pybind11
# https://github.com/pybind/pybind11
- find_package(pybind11 2.6.1 REQUIRED)
+ find_package(pybind11 CONFIG REQUIRED)
endif()
endif()
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
index 034185d..b992bbc 100755
--- a/src/OpenColorIO/CMakeLists.txt
@ -80,38 +65,17 @@ index 034185d..b992bbc 100755
yaml-cpp
)
@@ -242,13 +242,13 @@ endif()
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(OpenColorIO
- PRIVATE
+ PUBLIC
OpenColorIO_SKIP_IMPORTS
)
else()
# Only exports selected symbols.
target_compile_definitions(OpenColorIO
- PRIVATE
+ PUBLIC
OpenColorIO_EXPORTS
)
endif()
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
index eebb2c1..7147dc3 100644
--- a/src/cmake/Config.cmake.in
+++ b/src/cmake/Config.cmake.in
@@ -2,4 +2,14 @@
@@ -2,4 +2,9 @@
include(CMakeFindDependencyMacro)
+find_dependency(expat CONFIG REQUIRED)
+find_dependency(imath CONFIG REQUIRED)
+find_dependency(pystring CONFIG REQUIRED)
+find_dependency(yaml-cpp CONFIG REQUIRED)
+
+if(@OCIO_BUILD_APPS@)
+ find_dependency(lcms2 CONFIG REQUIRED)
+ find_dependency(GLEW)
+endif()
+find_dependency(expat CONFIG)
+find_dependency(Imath CONFIG)
+find_dependency(pystring CONFIG)
+find_dependency(yaml-cpp CONFIG)
+
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)

View File

@ -0,0 +1,10 @@
diff --git a/src/OpenColorIO/res/OpenColorIO.pc.in b/src/OpenColorIO/res/OpenColorIO.pc.in
index f25c280..d9a450b 100644
--- a/src/OpenColorIO/res/OpenColorIO.pc.in
+++ b/src/OpenColorIO/res/OpenColorIO.pc.in
@@ -9,3 +9,5 @@ Description: @PROJECT_DESCRIPTION@
URL: @PROJECT_HOMEPAGE_URL@
Libs: -L${libdir} -l@PROJECT_NAME@
Cflags: -I${includedir}
+Libs.private: -lpystring
+Requires.private: expat Imath yaml-cpp

View File

@ -1,12 +1,12 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO AcademySoftwareFoundation/OpenColorIO
REF v2.1.1
SHA512 86585ec860d460b158f24efb82f202deced7ce96a6bfefd42f39cad9c112add68cca6935f383f5d718c07fe1c121d8ed8b0d2069321f1dafb8ce68b49bc75194
REF v2.1.2
SHA512 594e808fb1c175d5b14eb540be0dfb6f41cd37b5bf7df8c2d24d44dfe4986643ea68e52d0282eb3b25283489789001a57a201de1eecc1560fc9461780c7da353
HEAD_REF master
PATCHES
fix-dependency.patch
fix-buildTools.patch
fix-pkgconfig.patch
)
file(REMOVE "${SOURCE_PATH}/share/cmake/modules/Findexpat.cmake")
@ -34,20 +34,30 @@ vcpkg_cmake_configure(
-DOCIO_INSTALL_EXT_PACKAGES=NONE
-DCMAKE_DISABLE_FIND_PACKAGE_OpenImageIO=On
${FEATURE_OPTIONS}
MAYBE_UNUSED_VARIABLES
CMAKE_DISABLE_FIND_PACKAGE_OpenImageIO
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenColorIO CONFIG_PATH "lib/cmake/OpenColorIO")
set(dll_import 0)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(dll_import 1)
endif()
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/include/OpenColorIO/OpenColorABI.h"
"ifndef OpenColorIO_SKIP_IMPORTS"
"if ${dll_import}"
)
vcpkg_cmake_config_fixup(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"
"${CURRENT_PACKAGES_DIR}/share/ocio"
)
if(OCIO_BUILD_APPS)
vcpkg_copy_tools(
@ -57,8 +67,5 @@ if(OCIO_BUILD_APPS)
endif()
vcpkg_fixup_pkgconfig()
if(NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/ocio/setup_ocio.sh" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/../../")
endif()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +1,6 @@
{
"name": "opencolorio",
"version-semver": "2.1.1",
"port-version": 2,
"version-semver": "2.1.2",
"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/",
"license": "BSD-3-Clause",

View File

@ -5157,8 +5157,8 @@
"port-version": 8
},
"opencolorio": {
"baseline": "2.1.1",
"port-version": 2
"baseline": "2.1.2",
"port-version": 0
},
"opencolorio-tools": {
"baseline": "1.1.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d728bb2681e89ffbe9c6e1ec2811d5d194d9fd09",
"version-semver": "2.1.2",
"port-version": 0
},
{
"git-tree": "80e8a46f8c1c2cd748834cd225edbe127a489d5a",
"version-semver": "2.1.1",