From c57c5d0d1eadb1ddf9bf9875391686e2fe47eb24 Mon Sep 17 00:00:00 2001 From: tibequadorian Date: Sat, 26 Mar 2022 14:23:59 +0100 Subject: [PATCH 1/4] opencolorio: update to 2.1.1. --- common/shlibs | 2 +- .../opencolorio/patches/disable_werror.patch | 30 ------ .../patches/fix-cmake-files-location.patch | 99 ------------------- srcpkgs/opencolorio/patches/musl.patch | 43 ++++++++ srcpkgs/opencolorio/template | 17 ++-- 5 files changed, 52 insertions(+), 139 deletions(-) delete mode 100644 srcpkgs/opencolorio/patches/disable_werror.patch delete mode 100644 srcpkgs/opencolorio/patches/fix-cmake-files-location.patch create mode 100644 srcpkgs/opencolorio/patches/musl.patch diff --git a/common/shlibs b/common/shlibs index 7d323593a120..27cf4faf3380 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2227,7 +2227,7 @@ libxmp.so.4 libxmp-4.3.7_1 libKF5ThreadWeaver.so.5 threadweaver-5.26.0_1 libOpenImageIO_Util.so.2.2 openimageio-2.2.13.1_1 libOpenImageIO.so.2.2 openimageio-2.2.13.1_1 -libOpenColorIO.so.1 opencolorio-1.0.8_1 +libOpenColorIO.so.2.1 opencolorio-2.1.1_1 libyaml-cpp.so.0.6 yaml-cpp-0.6.2_1 libpaper.so.1 libpaper-1.1.24_1 libhtsjava.so.2 httrack-3.49.2_7 diff --git a/srcpkgs/opencolorio/patches/disable_werror.patch b/srcpkgs/opencolorio/patches/disable_werror.patch deleted file mode 100644 index 4d1111452d2c..000000000000 --- a/srcpkgs/opencolorio/patches/disable_werror.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git src/core/CMakeLists.txt src/core/CMakeLists.txt -index 1eb691b..cff9bd8 100644 ---- a/src/core/CMakeLists.txt -+++ b/src/core/CMakeLists.txt -@@ -23,8 +23,6 @@ if(WIN32) - if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") - set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX") - endif() --else() -- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror") - endif() - - # SHARED -diff --git src/pyglue/CMakeLists.txt src/pyglue/CMakeLists.txt -index a90ca1c..b1f0361 100644 ---- a/src/pyglue/CMakeLists.txt -+++ b/src/pyglue/CMakeLists.txt -@@ -20,12 +20,6 @@ if(WIN32) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4275") - endif() - --# Process all warnings as errors --# Unfortunately Windows still has a warning --if(UNIX) -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") --endif() -- - find_package(PythonLibs) - if(NOT PYTHONLIBS_FOUND) - message(FATAL "Python libraries were not found, exiting.") diff --git a/srcpkgs/opencolorio/patches/fix-cmake-files-location.patch b/srcpkgs/opencolorio/patches/fix-cmake-files-location.patch deleted file mode 100644 index 6a2e118f0acd..000000000000 --- a/srcpkgs/opencolorio/patches/fix-cmake-files-location.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 8d48ee8da42de2d878db7b42586db8b3c67f83e1 Mon Sep 17 00:00:00 2001 -From: Jonathan Scruggs -Date: Fri, 19 Jan 2018 10:17:18 +0000 -Subject: [PATCH] Use GNUInstallDirs and fix install location for cmake files - (#501) - -GNUInstallDirs is supported on all platforms and variables are set -to the standard GNU locations. - -Fix the location where the .cmake files are installed. - -Signed-off by: Jonathan Scruggs ---- - CMakeLists.txt | 9 +++++---- - docs/CMakeLists.txt | 4 ++-- - export/pkgconfig/OpenColorIO.pc.in | 6 ++---- - 3 files changed, 9 insertions(+), 10 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a399d57a..473f1b79 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -60,6 +60,7 @@ endif() - include(ParseArguments) - include(OCIOMacros) - include(ExternalProject) -+include(GNUInstallDirs) - - enable_language(CXX) - -@@ -558,7 +559,7 @@ endif() - configure_file(${CMAKE_SOURCE_DIR}/share/ocio/setup_ocio.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/setup_ocio.sh @ONLY) - --INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/setup_ocio.sh DESTINATION share/ocio/) -+INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/setup_ocio.sh DESTINATION ${CMAKE_INSTALL_DATADIR}/ocio/) - - ############################################################################### - ### CPACK ### -@@ -623,7 +624,7 @@ if(TARGET OpenColorIO_STATIC) - set(OCIO_STATIC_COMPILE_DEFINITIONS ) - endif() - endif() --install(EXPORT OpenColorIO DESTINATION cmake) -+install(EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenColorIO) - file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" - " - get_filename_component(OpenColorIO_DIR \"\${CMAKE_CURRENT_LIST_FILE}\" PATH) -@@ -635,7 +636,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" - - ## targets libraries + associated definitions - if(NOT TARGET OpenColorIO) -- include(\"\${OpenColorIO_DIR}/cmake/OpenColorIO.cmake\") ## thanks to imported target -+ include(\"\${OpenColorIO_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/OpenColorIO/OpenColorIO.cmake\") ## thanks to imported target - if(TARGET OpenColorIO AND NOT OpenColorIO_USE_STATIC) - message(STATUS \"shared target OpenColorIO : see OpenColorIO_LIBRARY\") - set(OpenColorIO_LIBRARY OpenColorIO) -@@ -673,4 +674,4 @@ file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" - message(STATUS OPENCOLORIO_FOUND=\${OPENCOLORIO_FOUND}) - " - ) --install(FILES "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" DESTINATION .) -+install(FILES "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenColorIO) -diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt -index 5970db64..4d97f72c 100644 ---- a/docs/CMakeLists.txt -+++ b/docs/CMakeLists.txt -@@ -138,7 +138,7 @@ add_custom_target(doc ALL - add_dependencies(doc Sphinx) - - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build-html/ -- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/OpenColorIO/html -+ DESTINATION ${CMAKE_INSTALL_DOCDIR}/html - PATTERN .* EXCLUDE - ) - -@@ -173,6 +173,6 @@ if(PDFLATEX_COMPILER) - add_dependencies(pdf latex) - - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/build-latex/OpenColorIO.pdf -- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/OpenColorIO/) -+ DESTINATION ${CMAKE_INSTALL_DOCDIR}) - - endif() -diff --git a/export/pkgconfig/OpenColorIO.pc.in b/export/pkgconfig/OpenColorIO.pc.in -index 81ab4ce3..c4553a4f 100644 ---- a/export/pkgconfig/OpenColorIO.pc.in -+++ b/export/pkgconfig/OpenColorIO.pc.in -@@ -1,7 +1,5 @@ --prefix=@CMAKE_INSTALL_PREFIX@ --exec_prefix=@CMAKE_INSTALL_EXEC_PREFIX@ --includedir=${prefix}/include --libdir=${exec_prefix}/lib@LIB_SUFFIX@ -+libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - - Name: OpenColorIO - Description: A color management framework for visual effects and animation - diff --git a/srcpkgs/opencolorio/patches/musl.patch b/srcpkgs/opencolorio/patches/musl.patch new file mode 100644 index 000000000000..28af207b75b9 --- /dev/null +++ b/srcpkgs/opencolorio/patches/musl.patch @@ -0,0 +1,43 @@ +From 57b786ca00a617b8f530eeecc951da9156b18c03 Mon Sep 17 00:00:00 2001 +From: tibequadorian +Date: Sat, 26 Mar 2022 17:03:31 +0100 +Subject: [PATCH] Fix musl build + +In the 'from_chars' function, it's first checked if errno is 0 and immediately +returns with an std::errc::result_out_of_range aka [ERANGE]. +According to strtod(3p), if no conversion could be performed, errno may be set +to [EINVAL]. musl libc does this so we exclude EINVAL from the first check. + +musl does not contain the 'strtol_l' function so we use 'strtol' instead. +--- + src/utils/NumberUtils.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/utils/NumberUtils.h b/src/utils/NumberUtils.h +index d0a7471f..f600b876 100644 +--- a/src/utils/NumberUtils.h ++++ b/src/utils/NumberUtils.h +@@ -68,7 +68,7 @@ really_inline from_chars_result from_chars(const char *first, const char *last, + tempval = ::strtod_l(first, &endptr, loc.local); + #endif + +- if (errno != 0) ++ if (errno != 0 && errno != EINVAL) + { + return {first + (endptr - first), std::errc::result_out_of_range}; + } +@@ -139,8 +139,10 @@ really_inline from_chars_result from_chars(const char *first, const char *last, + long int + #ifdef _WIN32 + tempval = _strtol_l(first, &endptr, 0, loc.local); +-#else ++#elif __GLIBC__ + tempval = ::strtol_l(first, &endptr, 0, loc.local); ++#else ++ tempval = ::strtol(first, &endptr, 0); + #endif + + if (errno != 0) +-- +2.35.1 + diff --git a/srcpkgs/opencolorio/template b/srcpkgs/opencolorio/template index 179736598588..77d185efc87e 100644 --- a/srcpkgs/opencolorio/template +++ b/srcpkgs/opencolorio/template @@ -1,28 +1,27 @@ # Template file for 'opencolorio' pkgname=opencolorio -version=1.1.1 +version=2.1.1 revision=1 wrksrc="OpenColorIO-${version}" build_style=cmake -configure_args="-DUSE_EXTERNAL_TINYXML=ON -DUSE_EXTERNAL_LCMS=ON" +configure_args="-DCMAKE_BUILD_TYPE=Release -DOCIO_BUILD_PYTHON=OFF + -DOCIO_USE_OPENEXR_HALF=ON" case "$XBPS_TARGET_MACHINE" in i686*|x86_64*) ;; *) configure_args+=" -DOCIO_USE_SSE=OFF" ;; esac -make_cmd=make hostmakedepends="pkg-config git" -makedepends="tinyxml-devel lcms2-devel" -short_desc="A complete color management solution" +makedepends="lcms2-devel expat-devel ilmbase-devel yaml-cpp-devel" +short_desc="Complete color management solution" maintainer="lemmi " -license="openimageio" +license="BSD-3-Clause" homepage="http://opencolorio.org" changelog="https://raw.githubusercontent.com/imageworks/OpenColorIO/master/ChangeLog" distfiles="https://github.com/imageworks/OpenColorIO/archive/v${version}.tar.gz" -checksum=c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8 - -export CMAKE_GENERATOR="Unix Makefiles" +checksum=16ebc3e0f21f72dbe90fe60437eb864f4d4de9c255ef8e212f837824fc9b8d9c post_install() { + rm -rf ${DESTDIR}/builddir vlicense LICENSE } From 1c4079c647c82d12ce07981c5cb3d3750e52cdc2 Mon Sep 17 00:00:00 2001 From: tibequadorian Date: Sat, 26 Mar 2022 14:29:36 +0100 Subject: [PATCH 2/4] krita: rebuild against opencolorio-2.1.1 --- srcpkgs/krita/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template index b05abcbaf97c..326d49590256 100644 --- a/srcpkgs/krita/template +++ b/srcpkgs/krita/template @@ -1,7 +1,7 @@ # Template file for 'krita' pkgname=krita version=5.0.2 -revision=1 +revision=2 build_style=cmake configure_args="-Wno-dev -DBUILD_TESTING=OFF" hostmakedepends="extra-cmake-modules gettext pkg-config python3 From f10c56c679b55f83e8989d6eee45dd6e11ecce71 Mon Sep 17 00:00:00 2001 From: tibequadorian Date: Sat, 26 Mar 2022 14:27:33 +0100 Subject: [PATCH 3/4] openimageio: update to 2.3.13.0. --- common/shlibs | 4 ++-- srcpkgs/openimageio/template | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/common/shlibs b/common/shlibs index 27cf4faf3380..5340034f2eaf 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2225,8 +2225,8 @@ libgom-1.0.so.0 gom-0.3.0_1 libetpan.so.20 libetpan-1.9.3_4 libxmp.so.4 libxmp-4.3.7_1 libKF5ThreadWeaver.so.5 threadweaver-5.26.0_1 -libOpenImageIO_Util.so.2.2 openimageio-2.2.13.1_1 -libOpenImageIO.so.2.2 openimageio-2.2.13.1_1 +libOpenImageIO_Util.so.2.3 openimageio-2.3.13.1_1 +libOpenImageIO.so.2.3 openimageio-2.3.13.1_1 libOpenColorIO.so.2.1 opencolorio-2.1.1_1 libyaml-cpp.so.0.6 yaml-cpp-0.6.2_1 libpaper.so.1 libpaper-1.1.24_1 diff --git a/srcpkgs/openimageio/template b/srcpkgs/openimageio/template index b63eca2ae31c..07c2d05f8b65 100644 --- a/srcpkgs/openimageio/template +++ b/srcpkgs/openimageio/template @@ -1,12 +1,15 @@ # Template file for 'openimageio' pkgname=openimageio -version=2.2.15.1 -revision=3 -wrksrc="oiio-Release-${version}" +version=2.3.13.0 +revision=1 +_robinmap_version=0.6.2 +_fmt_version=8.0.0 +create_wrksrc=yes +build_wrksrc="oiio-${version}" build_style=cmake configure_args="-DUSE_OPENGL=0 -DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=1 -DSTOP_ON_WARNING=0 -DUSE_STD_REGEX_EXITCODE=0" -hostmakedepends="pkg-config git" +hostmakedepends="pkg-config" makedepends="boost-devel giflib-devel libraw-devel libopenjpeg-devel libwebp-devel libjpeg-turbo-devel tiff-devel libpng-devel libopenexr-devel freetype-devel ffmpeg-devel opencolorio-devel ptex-devel libheif-devel openvdb-devel @@ -16,8 +19,12 @@ maintainer="lemmi " license="BSD-3-Clause" homepage="https://sites.google.com/site/openimageio/home" changelog="https://raw.githubusercontent.com/OpenImageIO/oiio/release/CHANGES.md" -distfiles="https://github.com/OpenImageIO/oiio/archive/Release-${version}.tar.gz" -checksum=f222c6b51a40aabbc80ddf4055535be9af1ffa907452fa6d1ffa7674854aab17 +distfiles="https://github.com/OpenImageIO/oiio/archive/refs/tags/v${version}.tar.gz + https://github.com/Tessil/robin-map/archive/refs/tags/v${_robinmap_version}.tar.gz + https://github.com/fmtlib/fmt/archive/refs/tags/${_fmt_version}.tar.gz" +checksum="78f5754f1a9eb8215d66ca62a2963b87fc2b91465cb181dfc4ef73ca3ed76adb + c08ec4b1bf1c85eb0d6432244a6a89862229da1cb834f3f90fba8dc35d8c8ef1 + 7bce0e9e022e586b178b150002e7c2339994e3c2bbe44027e9abb0d60f9cce83" # Runs checks even for features we disabled. make_check=no @@ -34,6 +41,12 @@ if [ "$CROSS_BUILD" ]; then configure_args+=" -DUSE_STD_REGEX_EXITCODE=0 -DUSE_STD_REGEX_EXITCODE__TRYRUN_OUTPUT=0" fi +post_extract() { + mkdir ${build_wrksrc}/ext + mv robin-map-${_robinmap_version} ${build_wrksrc}/ext/robin-map + mv fmt-${_fmt_version} ${build_wrksrc}/ext/fmt +} + pre_build() { local f # Replace -isystem with -I to avoid "#include_next " file not found @@ -61,7 +74,6 @@ openimageio-devel_package() { vmove usr/include vmove usr/lib/cmake vmove usr/lib/pkgconfig - vmove usr/share/cmake vmove "usr/lib/*.so" } } From 62dd53c2304f006bb1db2d0cf4d885d806295396 Mon Sep 17 00:00:00 2001 From: tibequadorian Date: Sat, 26 Mar 2022 14:29:51 +0100 Subject: [PATCH 4/4] blender: rebuild against openimageio-2.3.13.0 --- srcpkgs/blender/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template index 91799f04fba5..28befed1faf8 100644 --- a/srcpkgs/blender/template +++ b/srcpkgs/blender/template @@ -1,7 +1,7 @@ # Template file for 'blender' pkgname=blender version=3.0.0 -revision=4 +revision=5 archs="x86_64* ppc64*" build_style="cmake" pycompile_dirs="/usr/share/blender/${version%.*}/scripts"