On Sun, Jun 04, 2023 at 10:14:52PM -0400, Brad Smith wrote: > Here is an update to OpenColorIO 2.2.1. > > > New features: > > PR #1659, Build the new ACES CG and Studio configs into the library itself > PR #1696, Allow OCIO configs to be archived, introducing the .ocioz file > format > PR #1710, Convert to or from a known external color space > PR #1703, Add a method to query whether a color space is linear > PR #1637, Address circular build dependency between OCIO and OpenImageIO > > Noteworthy bug fixes and enhancements: > > PR #1711, Make the interchange roles required for config versions 2.2 or > higher > PR #1691, Add support for ICC Parametric curves type 1-4 > PR #1689, Add getProcessor calls that take a NamedTransform > PR #1604, Add preliminary support for ACES Metadata Files (AMF) > PR #1693, Add NamedTransform support for Baking and fix crosstalk issue > PR #1704, Add Built-in Transforms for ARRI LogC4 and Canon curves > PR #1706, Add Python 3.11 wheels > PR #1712, Fix atan2 issue with ACES viewing transforms in HLSL > PR #1656, Speed up config ID hashing (replace md5 with xxhash) > PR #1684, Allow ocioconvert, ociowrite, ocioperf to invert a > DisplayViewTransform > PR #1646, Provide scripts to facilitate building OCIO on Windows > PR #1630, Improve iridas_cube parsing speed > PR #1605, Add Python source distribution package for PyPI > PR #1598, Add DisplayViewTransform support to Baker > PR #1516, Default to C++ 14 and remove OIIO from ocioperf > PR #1532, Update default branch name to "main"
Here is a second try for OpenColorIO 2.2.1. I fixed the system copy of minizip detection and added support for the new minizip 4.0.0 API. Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/opencolorio/Makefile,v retrieving revision 1.29 diff -u -p -u -p -r1.29 Makefile --- Makefile 12 Jun 2023 21:29:25 -0000 1.29 +++ Makefile 17 Jun 2023 09:48:49 -0000 @@ -1,14 +1,13 @@ -ONLY_FOR_ARCHS = ${CLANG_ARCHS} - COMMENT = color management library EPOCH = 2 GH_ACCOUNT = AcademySoftwareFoundation GH_PROJECT = OpenColorIO -GH_TAGNAME = v2.1.1 +GH_TAGNAME = v2.2.1 PKGNAME = ${DISTNAME:L} +REVISION = 0 -SHARED_LIBS += OpenColorIO 3.0 # 1.1.1 +SHARED_LIBS += OpenColorIO 4.0 # 1.1.1 CATEGORIES = graphics @@ -19,9 +18,9 @@ MAINTAINER = Pascal Stumpf <pascal@stum # several BSD-like PERMIT_PACKAGE = Yes -WANTLIB += ${COMPILER_LIBCXX} Imath-3_1 expat m pystring yaml-cpp +WANTLIB += ${COMPILER_LIBCXX} Imath-3_1 expat m minizip pystring yaml-cpp z -COMPILER = base-clang +COMPILER = base-clang ports-gcc MODULES = devel/cmake \ lang/python @@ -30,14 +29,16 @@ BUILD_DEPENDS = devel/boost \ devel/py-pybind11${MODPY_FLAVOR} \ devel/py-setuptools${MODPY_FLAVOR} \ devel/py-wheel${MODPY_FLAVOR} -LIB_DEPENDS = devel/pystring \ - devel/yaml-cpp \ +LIB_DEPENDS = archivers/minizip>=4.0.0 \ + devel/pystring \ + devel/yaml-cpp>=0.7.0 \ math/imath CONFIGURE_ARGS += -DPYTHON="${MODPY_BIN}" \ -DOCIO_BUILD_STATIC=OFF \ -DOCIO_BUILD_APPS=OFF \ - -DOCIO_BUILD_GPU_TESTS=OFF + -DOCIO_BUILD_GPU_TESTS=OFF \ + -Dminizip-ng_INCLUDE_DIR="${LOCALBASE}/include/minizip" MODCMAKE_LDFLAGS = -L${LOCALBASE}/lib Index: distinfo =================================================================== RCS file: /cvs/ports/graphics/opencolorio/distinfo,v retrieving revision 1.9 diff -u -p -u -p -r1.9 distinfo --- distinfo 12 Jun 2023 21:29:25 -0000 1.9 +++ distinfo 17 Jun 2023 09:48:49 -0000 @@ -1,2 +1,2 @@ -SHA256 (OpenColorIO-2.1.1.tar.gz) = FuvD4PIfctvpD+YEN+uGT01N6cJV744hL4N4JPybjZw= -SIZE (OpenColorIO-2.1.1.tar.gz) = 11013141 +SHA256 (OpenColorIO-2.2.1.tar.gz) = NvJ8WIf8TlwkGAXCm4uOaHJaoFUgvKp8fshMBCK4WA4= +SIZE (OpenColorIO-2.2.1.tar.gz) = 11336775 Index: patches/patch-src_OpenColorIO_OCIOZArchive_cpp =================================================================== RCS file: patches/patch-src_OpenColorIO_OCIOZArchive_cpp diff -N patches/patch-src_OpenColorIO_OCIOZArchive_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_OpenColorIO_OCIOZArchive_cpp 17 Jun 2023 09:48:49 -0000 @@ -0,0 +1,57 @@ +Support minizip 4.0.0. + +Index: src/OpenColorIO/OCIOZArchive.cpp +--- src/OpenColorIO/OCIOZArchive.cpp.orig ++++ src/OpenColorIO/OCIOZArchive.cpp +@@ -225,7 +225,7 @@ void archiveConfig(std::ostream & ostream, const Confi + std::string configStr = ss.str(); + + // Write zip to memory stream. +- mz_stream_mem_create(&write_mem_stream); ++ write_mem_stream = mz_stream_mem_create(); + mz_stream_mem_set_grow_size(write_mem_stream, 128 * 1024); + mz_stream_open(write_mem_stream, NULL, MZ_OPEN_MODE_CREATE); + +@@ -237,7 +237,7 @@ void archiveConfig(std::ostream & ostream, const Confi + options.compress_level = ArchiveCompressionLevels::BEST; + + // Create the writer handle. +- mz_zip_writer_create(&archiver); ++ archiver = mz_zip_writer_create(); + + // Archive options. + // Compression method +@@ -332,7 +332,7 @@ void ExtractOCIOZArchive(const char * archivePath, con + std::string outputDestination = pystring::os::path::normpath(destination); + + // Create zip reader. +- mz_zip_reader_create(&extracter); ++ extracter = mz_zip_reader_create(); + + MinizipNgHandlerGuard extracterGuard(extracter, false, false); + +@@ -450,7 +450,7 @@ std::vector<uint8_t> getFileStringFromArchiveFile(cons + std::vector<uint8_t> buffer; + + // Create the reader object. +- mz_zip_reader_create(&reader); ++ reader = mz_zip_reader_create(); + + MinizipNgHandlerGuard extracterGuard(reader, false, true); + +@@ -510,7 +510,7 @@ void getEntriesMappingFromArchiveFile(const std::strin + void *reader = NULL; + + // Create the reader object. +- mz_zip_reader_create(&reader); ++ reader = mz_zip_reader_create(); + + MinizipNgHandlerGuard extracterGuard(reader, false, false); + +@@ -630,4 +630,4 @@ void CIOPOciozArchive::buildEntries() + getEntriesMappingFromArchiveFile(m_archiveAbsPath, m_entries); + } + +-} // namespace OCIO_NAMESPACE +\ No newline at end of file ++} // namespace OCIO_NAMESPACE Index: patches/patch-src_utils_NumberUtils_h =================================================================== RCS file: /cvs/ports/graphics/opencolorio/patches/patch-src_utils_NumberUtils_h,v retrieving revision 1.6 diff -u -p -u -p -r1.6 patch-src_utils_NumberUtils_h --- patches/patch-src_utils_NumberUtils_h 12 Jun 2023 21:29:25 -0000 1.6 +++ patches/patch-src_utils_NumberUtils_h 17 Jun 2023 09:48:49 -0000 @@ -1,14 +1,27 @@ -Fix build failure - Index: src/utils/NumberUtils.h --- src/utils/NumberUtils.h.orig +++ src/utils/NumberUtils.h -@@ -140,7 +140,7 @@ really_inline from_chars_result from_chars(const char +@@ -64,8 +64,10 @@ really_inline from_chars_result from_chars(const char + double #ifdef _WIN32 - tempval = _strtol_l(first, &endptr, 0, loc.local); - #else -- tempval = ::strtol_l(first, &endptr, 0, loc.local); -+ tempval = ::strtoll_l(first, &endptr, 0, loc.local); + tempval = _strtod_l(first, &endptr, loc.local); +-#else ++#elif defined(__GLIBC__) || defined(_LIBCPP_VERSION) + tempval = ::strtod_l(first, &endptr, loc.local); ++#else ++ tempval = ::strtod(first, &endptr); + #endif + + if (errno != 0 && errno != EINVAL) +@@ -108,8 +110,10 @@ really_inline from_chars_result from_chars(const char + #elif __APPLE__ + // On OSX, strtod_l is for some reason drastically faster than strtof_l. + tempval = static_cast<float>(::strtod_l(first, &endptr, loc.local)); +-#else ++#elif defined(__GLIBC__) || defined(_LIBCPP_VERSION) + tempval = ::strtof_l(first, &endptr, loc.local); ++#else ++ tempval = ::strtof(first, &endptr); #endif if (errno != 0)