From 791e12917d943a6fd9e434b08027b720d7d4af01 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 21 Aug 2022 21:46:41 +0200 Subject: [PATCH] opencolorio: update to 2.1.2. --- common/shlibs | 2 +- .../opencolorio/patches/disable_werror.patch | 30 ------ .../patches/fix-cmake-files-location.patch | 99 ------------------- srcpkgs/opencolorio/patches/musl.patch | 13 +++ srcpkgs/opencolorio/patches/strlen.patch | 13 +++ srcpkgs/opencolorio/template | 25 ++--- 6 files changed, 41 insertions(+), 141 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 create mode 100644 srcpkgs/opencolorio/patches/strlen.patch diff --git a/common/shlibs b/common/shlibs index 3a7a0fd043b..f5ed53fc343 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2234,7 +2234,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.2_1 libpystring.so.1 pystring-1.1.3_1 libyaml-cpp.so.0.7 yaml-cpp-0.7.0_1 libpaper.so.1 libpaper-1.1.24_1 diff --git a/srcpkgs/opencolorio/patches/disable_werror.patch b/srcpkgs/opencolorio/patches/disable_werror.patch deleted file mode 100644 index 4d1111452d2..00000000000 --- 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 6a2e118f0ac..00000000000 --- 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 00000000000..db9df159f62 --- /dev/null +++ b/srcpkgs/opencolorio/patches/musl.patch @@ -0,0 +1,13 @@ +--- a/src/utils/NumberUtils.h 2022-06-02 02:35:53.000000000 +0200 ++++ - 2022-08-21 21:37:36.557414889 +0200 +@@ -10,6 +10,10 @@ + #define really_inline inline __attribute__((always_inline)) + #endif + ++#if !defined(__GLIBC__) ++#define strtol_l(ptr, end, base, l) strtol(ptr, end, base) ++#endif ++ + #include + #include + #include diff --git a/srcpkgs/opencolorio/patches/strlen.patch b/srcpkgs/opencolorio/patches/strlen.patch new file mode 100644 index 00000000000..0bdacd1890e --- /dev/null +++ b/srcpkgs/opencolorio/patches/strlen.patch @@ -0,0 +1,13 @@ +Index: OpenColorIO-2.1.1/src/OpenColorIO/FileRules.cpp +=================================================================== +--- OpenColorIO-2.1.1.orig/src/OpenColorIO/FileRules.cpp ++++ OpenColorIO-2.1.1/src/OpenColorIO/FileRules.cpp +@@ -3,6 +3,7 @@ + + #include + #include ++#include + #include + #include + #include + diff --git a/srcpkgs/opencolorio/template b/srcpkgs/opencolorio/template index cfa9b33698f..8b9505ca9ae 100644 --- a/srcpkgs/opencolorio/template +++ b/srcpkgs/opencolorio/template @@ -1,25 +1,28 @@ # Template file for 'opencolorio' pkgname=opencolorio -version=1.1.1 +version=2.1.2 revision=1 build_style=cmake -configure_args="-DUSE_EXTERNAL_TINYXML=ON -DUSE_EXTERNAL_LCMS=ON" +configure_args="-DUSE_EXTERNAL_TINYXML=ON -DUSE_EXTERNAL_LCMS=ON + -DCMAKE_CONFIGURATION_TYPES=None -DOCIO_INSTALL_EXT_PACKAGES=NONE + -Dpystring_ROOT=${XBPS_CROSS_BASE}/usr + -Dpybind11_ROOT=${XBPS_CROSS_BASE}/${py3_sitelib}/pybind11" case "$XBPS_TARGET_MACHINE" in - i686*|x86_64*) ;; + 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" +hostmakedepends="pkg-config git python3" +makedepends="tinyxml-devel lcms2-devel pystring-devel glew-devel + libfreeglut-devel expat-devel yaml-cpp-devel imath-devel + python3-pybind11" +short_desc="Complete color management solution" maintainer="lemmi " -license="openimageio" +license="custom:openimageio" 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=6c6d153470a7dbe56136073e7abea42fa34d06edc519ffc0a159daf9f9962b0b +make_check=no #(GPU tests): failed to open display '' post_install() { vlicense LICENSE