opencolorio: build with default cmd:python3 (3.9 ATM). (#8719)

* opencolorio: build with default cmd:python3 (3.9 ATM).

Also: integrated patches into a single .patchset file, this allows
to run "hp -G opencolorio" without it failing to apply
"opencolorio-openexr3.patch" (it worked without -G only).

* opencolorio1: retire old, disabled, unused recipe.
This commit is contained in:
OscarL
2023-05-24 03:17:37 -03:00
committed by GitHub
parent b05990a92f
commit c3dac508f0
5 changed files with 202 additions and 313 deletions

View File

@@ -10,16 +10,15 @@ LUT-format agnostic, supporting many popular formats."
HOMEPAGE="https://opencolorio.org/"
COPYRIGHT="2003-2010 Sony Pictures Imageworks Inc., et al."
LICENSE="BSD (3-clause)"
REVISION="3"
REVISION="4"
SOURCE_URI="https://github.com/imageworks/OpenColorIO/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="ff1397b4516fdecd75096d5b575d6a23771d0c876bbcfc7beb5a82af37adcdf9"
SOURCE_FILENAME="opencolorio-$portVersion.tar.gz"
SOURCE_DIR="OpenColorIO-$portVersion"
PATCHES="opencolorio-openexr3.patch
opencolorio-2.0.1.patchset"
PATCHES="opencolorio-2.0.1.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
@@ -80,7 +79,7 @@ BUILD_PREREQUIRES="
cmd:make
cmd:patch
cmd:pkg_config$secondaryArchSuffix
cmd:python3.7
cmd:python3
"
if [ "$targetArchitecture" != x86_gcc2 ]; then

View File

@@ -1,91 +0,0 @@
SUMMARY="A color management framework for visual effects and animation"
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/"
COPYRIGHT="2003-2010 Sony Pictures Imageworks Inc., et al."
LICENSE="BSD (3-clause)"
REVISION="4"
SOURCE_URI="https://github.com/imageworks/OpenColorIO/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8"
SOURCE_FILENAME="opencolorio-$portVersion.tar.gz"
SOURCE_DIR="OpenColorIO-$portVersion"
PATCHES="opencolorio1-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
opencolorio$secondaryArchSuffix = $portVersion compat >= 1
cmd:ociobakelut$secondaryArchSuffix
cmd:ociocheck$secondaryArchSuffix
lib:libopencolorio$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES="
haiku$secondaryArchSuffix
lib:liblcms2$secondaryArchSuffix
lib:libtinyxml$secondaryArchSuffix
"
PROVIDES_devel="
opencolorio${secondaryArchSuffix}_devel = $portVersion compat >= 1
devel:libopencolorio$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES_devel="
opencolorio$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libboost_system$secondaryArchSuffix >= 1.69.0
devel:liblcms2$secondaryArchSuffix
devel:libtinyxml$secondaryArchSuffix
devel:libyaml_cpp$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:patch
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake . -DCMAKE_BUILD_TYPE=Release \
-DOCIO_BUILD_NUKE=OFF \
-DOCIO_BUILD_STATIC=OFF \
-DOCIO_BUILD_SHARED=ON \
-DUSE_EXTERNAL_LCMS=ON \
-DUSE_EXTERNAL_TINYXML=ON \
-DUSE_EXTERNAL_YAML=ON \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix/build
make $jobArgs
}
INSTALL()
{
make install
mkdir -p $binDir $includeDir $libDir
mv $prefix/build/include/* $includeDir
mv $prefix/build/lib/* $libDir
mv $prefix/build/bin/* $binDir
rm -rf $prefix/build
sed -i "s|^\(prefix=\).*|\1$prefix|" $libDir/pkgconfig/OpenColorIO.pc
sed -i "s|^\(exec_prefix=\).*|\1$prefix|" $libDir/pkgconfig/OpenColorIO.pc
prepareInstalledDevelLibs libOpenColorIO
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}

View File

@@ -1,4 +1,196 @@
From af7225589b2d81874a047683ae2e02062b7de007 Mon Sep 17 00:00:00 2001
From 0ffc8a0a64486fc3576876e4eaf1c5225bd30dc5 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Wed, 24 May 2023 01:11:20 -0300
Subject: applying patch opencolorio-openexr3.patch
diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake
index c98e0af..5f68593 100644
--- a/share/cmake/modules/FindExtPackages.cmake
+++ b/share/cmake/modules/FindExtPackages.cmake
@@ -34,7 +34,7 @@ find_package(yaml-cpp 0.6.3 REQUIRED)
# Half (OpenEXR/IlmBase)
# https://github.com/openexr/openexr
-find_package(Half 2.4.0 REQUIRED)
+find_package(Imath 3.0 REQUIRED)
# pystring
# https://github.com/imageworks/pystring
diff --git a/src/OpenColorIO/BitDepthUtils.h b/src/OpenColorIO/BitDepthUtils.h
index a8b3cbd..97090ea 100644
--- a/src/OpenColorIO/BitDepthUtils.h
+++ b/src/OpenColorIO/BitDepthUtils.h
@@ -7,7 +7,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
namespace OCIO_NAMESPACE
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
index 2ce801e..824f8a9 100755
--- a/src/OpenColorIO/CMakeLists.txt
+++ b/src/OpenColorIO/CMakeLists.txt
@@ -207,7 +207,7 @@ target_link_libraries(OpenColorIO
public_api
PRIVATE
expat::expat
- IlmBase::Half
+ Imath::Imath
pystring::pystring
sampleicc::sampleicc
utils::strings
diff --git a/src/OpenColorIO/MathUtils.h b/src/OpenColorIO/MathUtils.h
index 309c624..0873d49 100644
--- a/src/OpenColorIO/MathUtils.h
+++ b/src/OpenColorIO/MathUtils.h
@@ -9,7 +9,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
namespace OCIO_NAMESPACE
{
diff --git a/src/OpenColorIO/ops/range/RangeOp.cpp b/src/OpenColorIO/ops/range/RangeOp.cpp
index 9ec863e..444dac7 100644
--- a/src/OpenColorIO/ops/range/RangeOp.cpp
+++ b/src/OpenColorIO/ops/range/RangeOp.cpp
@@ -7,7 +7,7 @@
#include <OpenColorIO/OpenColorIO.h>
#include "GpuShaderUtils.h"
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "HashUtils.h"
#include "MathUtils.h"
#include "ops/lut1d/Lut1DOpData.h"
diff --git a/src/OpenColorIO/transforms/builtins/ACES.cpp b/src/OpenColorIO/transforms/builtins/ACES.cpp
index 20968c0..9ee2ac2 100644
--- a/src/OpenColorIO/transforms/builtins/ACES.cpp
+++ b/src/OpenColorIO/transforms/builtins/ACES.cpp
@@ -6,7 +6,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "ops/fixedfunction/FixedFunctionOp.h"
#include "ops/gradingrgbcurve/GradingRGBCurveOp.h"
#include "ops/log/LogOp.h"
diff --git a/src/OpenColorIO/transforms/builtins/OpHelpers.cpp b/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
index 04b8fbd..288ca56 100644
--- a/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
+++ b/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
@@ -4,7 +4,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "ops/lut1d/Lut1DOp.h"
#include "transforms/builtins/OpHelpers.h"
diff --git a/src/apps/ocioconvert/CMakeLists.txt b/src/apps/ocioconvert/CMakeLists.txt
index 68a5db1..6fea394 100755
--- a/src/apps/ocioconvert/CMakeLists.txt
+++ b/src/apps/ocioconvert/CMakeLists.txt
@@ -27,7 +27,7 @@ set_target_properties(ocioconvert PROPERTIES
target_link_libraries(ocioconvert
PRIVATE
apputils
- IlmBase::Half
+ Imath::Imath
${OCIO_GL_LIB}
oiiohelpers
OpenColorIO
diff --git a/src/apps/ocioconvert/main.cpp b/src/apps/ocioconvert/main.cpp
index b56d499..7e8af7d 100644
--- a/src/apps/ocioconvert/main.cpp
+++ b/src/apps/ocioconvert/main.cpp
@@ -24,7 +24,7 @@ namespace OIIO = OIIO_NAMESPACE;
#endif // OCIO_GPU_ENABLED
#include "oiiohelpers.h"
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
// Array of non OpenColorIO arguments.
diff --git a/src/apps/ocioperf/CMakeLists.txt b/src/apps/ocioperf/CMakeLists.txt
index 69e9ba4..bcbe47b 100644
--- a/src/apps/ocioperf/CMakeLists.txt
+++ b/src/apps/ocioperf/CMakeLists.txt
@@ -20,7 +20,7 @@ set_target_properties(ocioperf PROPERTIES
target_link_libraries(ocioperf
PRIVATE
apputils
- IlmBase::Half
+ Imath::Imath
oiiohelpers
OpenColorIO
OpenImageIO::OpenImageIO
diff --git a/src/apps/ocioperf/main.cpp b/src/apps/ocioperf/main.cpp
index 6427860..f6e4a63 100644
--- a/src/apps/ocioperf/main.cpp
+++ b/src/apps/ocioperf/main.cpp
@@ -11,7 +11,7 @@ namespace OIIO = OIIO_NAMESPACE;
#endif
#include "apputils/argparse.h"
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "oiiohelpers.h"
#include "utils/StringUtils.h"
diff --git a/src/libutils/oiiohelpers/CMakeLists.txt b/src/libutils/oiiohelpers/CMakeLists.txt
index 6ef7c36..bcd262f 100644
--- a/src/libutils/oiiohelpers/CMakeLists.txt
+++ b/src/libutils/oiiohelpers/CMakeLists.txt
@@ -31,7 +31,7 @@ target_link_libraries(oiiohelpers
PRIVATE
OpenColorIO
- IlmBase::Half
+ Imath::Imath
utils::strings
)
diff --git a/src/libutils/oiiohelpers/oiiohelpers.cpp b/src/libutils/oiiohelpers/oiiohelpers.cpp
index be1a937..ca77b86 100644
--- a/src/libutils/oiiohelpers/oiiohelpers.cpp
+++ b/src/libutils/oiiohelpers/oiiohelpers.cpp
@@ -5,7 +5,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "oiiohelpers.h"
#include "utils/StringUtils.h"
diff --git a/tests/cpu/CMakeLists.txt b/tests/cpu/CMakeLists.txt
index 6738996..8e8dd90 100755
--- a/tests/cpu/CMakeLists.txt
+++ b/tests/cpu/CMakeLists.txt
@@ -18,7 +18,7 @@ function(add_ocio_test NAME SOURCES PRIVATE_INCLUDES)
public_api
PRIVATE
expat::expat
- IlmBase::Half
+ Imath::Imath
pystring::pystring
sampleicc::sampleicc
unittest_data
--
2.37.3
From 9e6338d65c8b8633c8289e198c3ee663136090d2 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 20 Jul 2021 13:29:41 +0000
Subject: Fix installation paths
@@ -29,7 +221,7 @@ index e4c8a79..b8b4dca 100644
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
old mode 100755
new mode 100644
index 2ce801e..70e5afa
index 824f8a9..aff6116
--- a/src/OpenColorIO/CMakeLists.txt
+++ b/src/OpenColorIO/CMakeLists.txt
@@ -279,7 +279,7 @@ if(MSVC AND BUILD_SHARED_LIBS)
@@ -44,17 +236,17 @@ index 2ce801e..70e5afa
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
--
2.30.2
2.37.3
From 2f59da565783253364483d634004104a51818581 Mon Sep 17 00:00:00 2001
From aa0cf214a0ba2b6cd83416d18d7561db36616d70 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 20 Jul 2021 13:31:09 +0000
Subject: Fix build for private expat::expat
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
index 70e5afa..f360881 100644
index aff6116..7c4d966 100644
--- a/src/OpenColorIO/CMakeLists.txt
+++ b/src/OpenColorIO/CMakeLists.txt
@@ -206,7 +206,7 @@ target_link_libraries(OpenColorIO
@@ -67,5 +259,5 @@ index 70e5afa..f360881 100644
pystring::pystring
sampleicc::sampleicc
--
2.30.2
2.37.3

View File

@@ -1,182 +0,0 @@
diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake
index c98e0af3..5f685935 100644
--- a/share/cmake/modules/FindExtPackages.cmake
+++ b/share/cmake/modules/FindExtPackages.cmake
@@ -34,7 +34,7 @@ find_package(yaml-cpp 0.6.3 REQUIRED)
# Half (OpenEXR/IlmBase)
# https://github.com/openexr/openexr
-find_package(Half 2.4.0 REQUIRED)
+find_package(Imath 3.0 REQUIRED)
# pystring
# https://github.com/imageworks/pystring
diff --git a/src/OpenColorIO/BitDepthUtils.h b/src/OpenColorIO/BitDepthUtils.h
index a8b3cbd9..bb0163bf 100644
--- a/src/OpenColorIO/BitDepthUtils.h
+++ b/src/OpenColorIO/BitDepthUtils.h
@@ -7,7 +7,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
namespace OCIO_NAMESPACE
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
index 2ce801e6..824f8a98 100755
--- a/src/OpenColorIO/CMakeLists.txt
+++ b/src/OpenColorIO/CMakeLists.txt
@@ -207,7 +207,7 @@ target_link_libraries(OpenColorIO
public_api
PRIVATE
expat::expat
- IlmBase::Half
+ Imath::Imath
pystring::pystring
sampleicc::sampleicc
utils::strings
diff --git a/src/OpenColorIO/MathUtils.h b/src/OpenColorIO/MathUtils.h
index 309c6244..0873d490 100644
--- a/src/OpenColorIO/MathUtils.h
+++ b/src/OpenColorIO/MathUtils.h
@@ -9,7 +9,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
namespace OCIO_NAMESPACE
{
diff --git a/src/OpenColorIO/ops/range/RangeOp.cpp b/src/OpenColorIO/ops/range/RangeOp.cpp
index 9ec863e2..444dac75 100644
--- a/src/OpenColorIO/ops/range/RangeOp.cpp
+++ b/src/OpenColorIO/ops/range/RangeOp.cpp
@@ -7,7 +7,7 @@
#include <OpenColorIO/OpenColorIO.h>
#include "GpuShaderUtils.h"
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "HashUtils.h"
#include "MathUtils.h"
#include "ops/lut1d/Lut1DOpData.h"
diff --git a/src/OpenColorIO/transforms/builtins/ACES.cpp b/src/OpenColorIO/transforms/builtins/ACES.cpp
index 20968c0d..9ee2ac27 100644
--- a/src/OpenColorIO/transforms/builtins/ACES.cpp
+++ b/src/OpenColorIO/transforms/builtins/ACES.cpp
@@ -6,7 +6,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "ops/fixedfunction/FixedFunctionOp.h"
#include "ops/gradingrgbcurve/GradingRGBCurveOp.h"
#include "ops/log/LogOp.h"
diff --git a/src/OpenColorIO/transforms/builtins/OpHelpers.cpp b/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
index 04b8fbd4..288ca566 100644
--- a/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
+++ b/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
@@ -4,7 +4,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "ops/lut1d/Lut1DOp.h"
#include "transforms/builtins/OpHelpers.h"
diff --git a/src/apps/ocioconvert/CMakeLists.txt b/src/apps/ocioconvert/CMakeLists.txt
index 68a5db17..6fea394a 100755
--- a/src/apps/ocioconvert/CMakeLists.txt
+++ b/src/apps/ocioconvert/CMakeLists.txt
@@ -27,7 +27,7 @@ set_target_properties(ocioconvert PROPERTIES
target_link_libraries(ocioconvert
PRIVATE
apputils
- IlmBase::Half
+ Imath::Imath
${OCIO_GL_LIB}
oiiohelpers
OpenColorIO
diff --git a/src/apps/ocioconvert/main.cpp b/src/apps/ocioconvert/main.cpp
index b56d4999..7e8af7d0 100644
--- a/src/apps/ocioconvert/main.cpp
+++ b/src/apps/ocioconvert/main.cpp
@@ -24,7 +24,7 @@ namespace OIIO = OIIO_NAMESPACE;
#endif // OCIO_GPU_ENABLED
#include "oiiohelpers.h"
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
// Array of non OpenColorIO arguments.
diff --git a/src/apps/ocioperf/CMakeLists.txt b/src/apps/ocioperf/CMakeLists.txt
index 69e9ba4c..bcbe47be 100644
--- a/src/apps/ocioperf/CMakeLists.txt
+++ b/src/apps/ocioperf/CMakeLists.txt
@@ -20,7 +20,7 @@ set_target_properties(ocioperf PROPERTIES
target_link_libraries(ocioperf
PRIVATE
apputils
- IlmBase::Half
+ Imath::Imath
oiiohelpers
OpenColorIO
OpenImageIO::OpenImageIO
diff --git a/src/apps/ocioperf/main.cpp b/src/apps/ocioperf/main.cpp
index 6427860d..f6e4a63c 100644
--- a/src/apps/ocioperf/main.cpp
+++ b/src/apps/ocioperf/main.cpp
@@ -11,7 +11,7 @@ namespace OIIO = OIIO_NAMESPACE;
#endif
#include "apputils/argparse.h"
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "oiiohelpers.h"
#include "utils/StringUtils.h"
diff --git a/src/libutils/oiiohelpers/CMakeLists.txt b/src/libutils/oiiohelpers/CMakeLists.txt
index 6ef7c368..5f4a5113 100644
--- a/src/libutils/oiiohelpers/CMakeLists.txt
+++ b/src/libutils/oiiohelpers/CMakeLists.txt
@@ -31,7 +31,7 @@ target_link_libraries(oiiohelpers
PRIVATE
OpenColorIO
- IlmBase::Half
+ Imath::Imath
utils::strings
)
diff --git a/src/libutils/oiiohelpers/oiiohelpers.cpp b/src/libutils/oiiohelpers/oiiohelpers.cpp
index be1a937d..e7db652c 100644
--- a/src/libutils/oiiohelpers/oiiohelpers.cpp
+++ b/src/libutils/oiiohelpers/oiiohelpers.cpp
@@ -5,7 +5,7 @@
#include <OpenColorIO/OpenColorIO.h>
-#include "OpenEXR/half.h"
+#include "Imath/half.h"
#include "oiiohelpers.h"
#include "utils/StringUtils.h"
diff --git a/tests/cpu/CMakeLists.txt b/tests/cpu/CMakeLists.txt
index 67389962..8e8dd900 100755
--- a/tests/cpu/CMakeLists.txt
+++ b/tests/cpu/CMakeLists.txt
@@ -18,7 +18,7 @@ function(add_ocio_test NAME SOURCES PRIVATE_INCLUDES)
public_api
PRIVATE
expat::expat
- IlmBase::Half
+ Imath::Imath
pystring::pystring
sampleicc::sampleicc
unittest_data

View File

@@ -1,29 +0,0 @@
From 0dcabeab3b3e108b9292b137f0fe93874f8cea1e Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 6 Nov 2019 22:24:49 +0100
Subject: not needed on Haiku
diff --git a/src/core/OCIOYaml.cpp b/src/core/OCIOYaml.cpp
index 68fcef6..c274a31 100644
--- a/src/core/OCIOYaml.cpp
+++ b/src/core/OCIOYaml.cpp
@@ -31,6 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <OpenColorIO/OpenColorIO.h>
#ifndef WIN32
+#ifndef __HAIKU__
// fwd declare yaml-cpp visibility
#pragma GCC visibility push(hidden)
@@ -65,6 +66,7 @@ namespace YAML {
}
#pragma GCC visibility pop
+#endif
#endif
#ifdef WIN32
--
2.23.0