testing/opencolorio: upgrade to 1.1.0

This commit is contained in:
Natanael Copa 2018-03-22 11:18:24 +00:00
parent 012b37621b
commit 92871bb018
3 changed files with 8 additions and 3940 deletions

View File

@ -1,8 +1,8 @@
# Contributor: Mark Riedesel <mark@klowner.com>
# Maintainer: Mark Riedesel <mark@klowner.com>
pkgname=opencolorio
pkgver=1.0.9
pkgrel=5
pkgver=1.1.0
pkgrel=0
pkgdesc="A color management framework for visual effects and animation"
url="http://opencolorio.org"
arch="all"
@ -12,8 +12,9 @@ makedepends="boost-dev cmake freeglut-dev glew-dev lcms2-dev python2-dev
python3-dev tinyxml-dev yaml-cpp-dev"
subpackages="py2-$pkgname:py2 py3-$pkgname:py3 $pkgname-dev $pkgname-tools"
source="$pkgname-$pkgver.tar.gz::http://github.com/imageworks/OpenColorIO/archive/v$pkgver.tar.gz
yaml-cpp-0.5-support.patch
temp-deref-with-yaml-0.5.0.patch"
OpenColorIO-gcc.patch
ocio-1.1.0-yamlcpp060.patch
"
builddir="$srcdir/OpenColorIO-$pkgver"
build() {
@ -79,12 +80,6 @@ py3() {
_python 3 "$(python3 -c 'import site; print(site.getsitepackages()[0])')"
}
md5sums="06d0efe9cc1b32d7b14134779c9d1251 opencolorio-1.0.9.tar.gz
11bb6b587b2e5242f75aca281bab158c yaml-cpp-0.5-support.patch
5f13bef26e14b2dd908e69a2bc8fb7a4 temp-deref-with-yaml-0.5.0.patch"
sha256sums="27c81e691c15753cd2b560c2ca4bd5679a60c2350eedd43c99d44ca25d65ea7f opencolorio-1.0.9.tar.gz
b381912a81342e242d1a6ef39cf1556f7b383407af9c1aefbde06e38186777ad yaml-cpp-0.5-support.patch
6df29f0d3de06ab0fbc2fa06f6fc7537d0628c4185d7a9f6228b2d0be07917d7 temp-deref-with-yaml-0.5.0.patch"
sha512sums="ac953ba9904aff44de37cc2ee60dbf524bd86d25f699c1eacaa61ca30fed8f077194d47d34a72c05b706da7e1a3974a988d67d60031d424d91b9240f8ab86ed3 opencolorio-1.0.9.tar.gz
8b909e1aa688ca38ce7938a4855611cf19781a3c2dc9cc9bca3df3b8d21a2a7772e35917ba9f636c89ea2da8eec2aa7b7118bfa77e0787614110e7441b038de5 yaml-cpp-0.5-support.patch
3793e39d74f3c585d7fc2fbcc7f131fba9f0fea130de80c31461101355954c3d3fa158028652f074fb129e7c0a7ee1e506dbfc187ca5fbfdce09303b371bf266 temp-deref-with-yaml-0.5.0.patch"
sha512sums="909874a9f91a8d229622810fc70233680c6e75203bd8555179322de2873da00bf302432e19f189b787ffcda3157ddec1e4601c97f75a36e16f644fe7d42f6998 opencolorio-1.1.0.tar.gz
befed734f240d26c7cbeb020b540ea91d84c9422fa61dcb0ab16f56389f7c5c90d10e015c6cdbed2033047b7e31ceb4fd1b2707c2bef1a8e0f33959601471d5f OpenColorIO-gcc.patch
ef4b0e880c587fcd004865fd938e7f1fb1bbb933abf1ccf352260ebe3a50145664e27b9f1119b72ced99afe4d19b49b0b6c249dd95faaec9c1332ffc44bc9811 ocio-1.1.0-yamlcpp060.patch"

View File

@ -1,112 +0,0 @@
commit 1384029df00525c479e2c7e52fdfa294413fceb6
Author: Mark Boorer <mkj@dneg.com>
Date: Wed Sep 3 22:41:28 2014 +0100
OCIOYaml: Fixed dereference of temporary when yaml-cpp 0.5.x was used.
CMakeLists.txt: Improved System yaml-cpp detection.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69eca4e..b539ea1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -202,15 +202,44 @@ if(USE_EXTERNAL_YAML)
# Set minimum yaml version for non-patched sources.
set(YAML_VERSION_MIN "0.3.0")
include(FindPkgConfig)
- pkg_check_modules(YAML_CPP yaml-cpp)
+ pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp)
+ find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h
+ HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} )
+ find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp
+ HINTS ${PC_YAML_CPP_LIBRARY_DIRS} )
+ set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY})
+ set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
+ set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION})
+
+ if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN})
+ message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.")
+ endif()
+
+ find_package_handle_standard_args(yaml-cpp
+ REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS )
+ set(YAML_CPP_FOUND ${YAML-CPP_FOUND})
+ mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND)
+
if(YAML_CPP_FOUND)
- if(YAML_CPP_VERSION VERSION_EQUAL ${YAML_VERSION_MIN} OR
- YAML_CPP_VERSION VERSION_GREATER ${YAML_VERSION_MIN})
- message(STATUS "System yaml-cpp library will be used.")
- include_directories(BEFORE ${YAML_CPP_INCLUDE_DIRS})
- else()
- message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.")
+ if(YAML_CPP_VERSION VERSION_GREATER "0.5.0")
+ # Need to also get the boost headers here, as yaml-cpp 0.5.0+ requires them.
+ # Don't bother doing this step if we are already including the boost headers for shared_ptr
+ if(NOT OCIO_USE_BOOST_PTR)
+ set(Boost_ADDITIONAL_VERSIONS "1.49" "1.45" "1.44" "1.43" "1.43.0" "1.42"
+ "1.42.0" "1.41" "1.41.0" "1.40"
+ "1.40.0" "1.39" "1.39.0" "1.38"
+ "1.38.0" "1.37" "1.37.0" "1.34.1"
+ "1_34_1")
+ set(Boost_USE_MULTITHREADED ON)
+ find_package(Boost 1.34)
+ if(NOT Boost_FOUND)
+ message(FATAL_ERROR "Error: Detected system yaml-cpp version ${YAML_CPP_VERSION} is greater than 0.5.0, and therefore requires boost, but a boost installation could not be found.")
+ endif()
+
+ set(EXTERNAL_INCLUDE_DIRS ${EXTERNAL_INCLUDE_DIRS} ${Boost_INCLUDE_DIR})
+ endif()
endif()
+ set(EXTERNAL_INCLUDE_DIRS ${EXTERNAL_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIRS})
else(YAML_CPP_FOUND)
message(FATAL_ERROR "ERROR: System yaml-cpp library was not found. Make sure the library is installed and the pkg-config file exists.")
endif(YAML_CPP_FOUND)
diff --git a/src/core/OCIOYaml.cpp b/src/core/OCIOYaml.cpp
index 5a95353..d9f1345 100644
--- a/src/core/OCIOYaml.cpp
+++ b/src/core/OCIOYaml.cpp
@@ -88,26 +88,36 @@ OCIO_NAMESPACE_ENTER
#else
typedef YAML::const_iterator Iterator;
#endif
-
+
// Iterator access
-
- inline const YAML::Node& get_first(const Iterator it)
- {
+ // Note: The ownership semantics have changed between yaml-cpp 0.3.x and 0.5.x .
+ // Returning a const reference to a yaml node screws with the internal yaml-cpp smart ptr
+ // implementation in the newer version. Luckily, the compiler does not care if we maintain
+ // const YAML::Node & = get_first(iter) syntax at the call site even when returning an actual object
+ // (instead of the reference as expected).
#ifdef OLDYAML
+ inline const YAML::Node& get_first(const Iterator &it)
+ {
return it.first();
+ }
#else
+ inline YAML::Node get_first(const Iterator &it)
+ {
return it->first;
-#endif
}
+#endif
- inline const YAML::Node& get_second(const Iterator it)
- {
#ifdef OLDYAML
+ inline const YAML::Node& get_second(const Iterator &it)
+ {
return it.second();
+ }
#else
+ inline YAML::Node get_second(const Iterator &it)
+ {
return it->second;
-#endif
}
+#endif
// Basic types

File diff suppressed because it is too large Load Diff