diff --git a/media-libs/opencolorio/opencolorio2.3-2.3.2.recipe b/media-libs/opencolorio/opencolorio2.3-2.3.2.recipe new file mode 100644 index 000000000..bbee13fd6 --- /dev/null +++ b/media-libs/opencolorio/opencolorio2.3-2.3.2.recipe @@ -0,0 +1,134 @@ +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="1" +SOURCE_URI="https://github.com/imageworks/OpenColorIO/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="6bbf4e7fa4ea2f743a238cb22aff44890425771a2f57f62cece1574e46ceec2f" +SOURCE_FILENAME="opencolorio-$portVersion.tar.gz" +SOURCE_DIR="OpenColorIO-$portVersion" +PATCHES="opencolorio-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%.*}" + +PROVIDES=" + opencolorio2.3$secondaryArchSuffix = $portVersion +# cmd:ociobakelut$secondaryArchSuffix +# cmd:ociocheck$secondaryArchSuffix + lib:libOpenColorIO$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libexpat$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libGLu$secondaryArchSuffix + lib:libglew$secondaryArchSuffix + lib:libIex_3_2$secondaryArchSuffix + lib:libIlmThread_3_2$secondaryArchSuffix + lib:libImath_3_1$secondaryArchSuffix + lib:liblcms2$secondaryArchSuffix + lib:libminizip_ng$secondaryArchSuffix + lib:libOpenEXR_3_2$secondaryArchSuffix + lib:libOpenEXRUtil_3_2$secondaryArchSuffix + lib:libpystring$secondaryArchSuffix + lib:libtinyxml$secondaryArchSuffix + lib:libyaml_cpp$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + opencolorio2.3${secondaryArchSuffix}_devel = $portVersion + devel:libOpenColorIO$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + opencolorio2.3$secondaryArchSuffix == $portVersion base + " +CONFLICTS_devel=" + opencolorio${secondaryArchSuffix}_devel + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libboost_system$secondaryArchSuffix >= 1.83.0 + devel:libexpat$secondaryArchSuffix + devel:libGL$secondaryArchSuffix + devel:libGLU$secondaryArchSuffix + devel:libglew$secondaryArchSuffix >= 2.2 + devel:libIex_3_2$secondaryArchSuffix + devel:libIlmThread_3_2$secondaryArchSuffix + devel:libImath_3_1$secondaryArchSuffix + devel:liblcms2$secondaryArchSuffix + devel:libminizip_ng$secondaryArchSuffix + devel:libOpenEXR_3_2$secondaryArchSuffix + devel:libOpenEXRUtil_3_2$secondaryArchSuffix + devel:libpystring$secondaryArchSuffix + devel:libtinyxml$secondaryArchSuffix + devel:libyaml_cpp$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:git + cmd:ld$secondaryArchSuffix + cmd:make + cmd:patch + cmd:pkg_config$secondaryArchSuffix + cmd:python3 + " + +if [ "$targetArchitecture" != x86_gcc2 ]; then + USE_SSE=ON +else + USE_SSE=OFF +fi + +BUILD() +{ + # build doesn't respect $cmakeDirArgs (known issue) + cmake -B build -S . \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$prefix \ + -DCMAKE_INSTALL_BINDIR=$binDir \ + -DCMAKE_INSTALL_DATADIR=$dataDir \ + -DCMAKE_INSTALL_LIBDIR=$libDir \ + -DCMAKE_INSTALL_INCLUDEDIR=$includeDir \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_SKIP_INSTALL_RPATH=YES \ + -DOCIO_BUILD_APPS=OFF \ + -DOCIO_BUILD_GPU_TESTS=OFF \ + -DOCIO_BUILD_PYTHON=OFF \ + -DOCIO_BUILD_TESTS=OFF \ + -DOCIO_USE_SSE=$USE_SSE \ + -Dminizip-ng_LIBRARY=`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/libminizip-ng.so \ + -Dminizip-ng_INCLUDE_DIR=`finddir B_SYSTEM_DIRECTORY`/$relativeIncludeDir/minizip-ng \ + -Dminizip-ng_DIR=TRUE + make -C build $jobArgs +} + + +INSTALL() +{ + make -C build install + + prepareInstalledDevelLib \ + libOpenColorIO + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir \ + $libDir/cmake +} diff --git a/media-libs/opencolorio/patches/opencolorio-2.3.2.patchset b/media-libs/opencolorio/patches/opencolorio-2.3.2.patchset new file mode 100644 index 000000000..77e9c9189 --- /dev/null +++ b/media-libs/opencolorio/patches/opencolorio-2.3.2.patchset @@ -0,0 +1,31 @@ +From 51eba9a95b834d7fc45f60d34ad486df009cbd38 Mon Sep 17 00:00:00 2001 +From: Schrijvers Luc +Date: Wed, 19 Jun 2024 15:05:33 +0200 +Subject: Fix build (hackish) + + +diff --git a/src/utils/NumberUtils.h b/src/utils/NumberUtils.h +index 08a9ba0..157caed 100644 +--- a/src/utils/NumberUtils.h ++++ b/src/utils/NumberUtils.h +@@ -64,6 +64,8 @@ really_inline from_chars_result from_chars(const char *first, const char *last, + double + #ifdef _WIN32 + tempval = _strtod_l(first, &endptr, loc.local); ++#elif defined(__HAIKU__) ++ tempval = ::strtod(first, &endptr); + #else + tempval = ::strtod_l(first, &endptr, loc.local); + #endif +@@ -108,6 +110,8 @@ really_inline from_chars_result from_chars(const char *first, const char *last, + #elif __APPLE__ + // On OSX, strtod_l is for some reason drastically faster than strtof_l. + tempval = static_cast(::strtod_l(first, &endptr, loc.local)); ++#elif defined(__HAIKU__) ++ tempval = ::strtof(first, &endptr); + #else + tempval = ::strtof_l(first, &endptr, loc.local); + #endif +-- +2.45.1 +