diff --git a/community/opencolorio/0001-remove-duplicate-ProcessorCache-declaration.patch b/community/opencolorio/0001-remove-duplicate-ProcessorCache-declaration.patch new file mode 100644 index 000000000..142b5a6c2 --- /dev/null +++ b/community/opencolorio/0001-remove-duplicate-ProcessorCache-declaration.patch @@ -0,0 +1,30 @@ +From 7e8ed9c0f426bf5aac758a59a31e0d3ebcaef6c2 Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Mon, 1 Feb 2021 09:40:42 -0700 +Subject: [PATCH] remove duplicate ProcessorCache declaration + +Fixes multiple declaration error on ARM: +/usr/bin/ld: src/OpenColorIO/CMakeFiles/OpenColorIO.dir/Processor.cpp.o:(.rodata+0x0): multiple definition of `typeinfo name for OpenColorIO_v2_0::ProcessorCache >'; src/OpenColorIO/CMakeFiles/OpenColorIO.dir/Config.cpp.o:(.rodata+0x1d4): first defined here +/usr/bin/ld: src/OpenColorIO/CMakeFiles/OpenColorIO.dir/Processor.cpp.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for OpenColorIO_v2_0::ProcessorCache >'; src/OpenColorIO/CMakeFiles/OpenColorIO.dir/Config.cpp.o:(.data.rel.ro+0x0): first defined here +--- + src/OpenColorIO/Config.cpp | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/OpenColorIO/Config.cpp b/src/OpenColorIO/Config.cpp +index a207e439..07b2c9f2 100644 +--- a/src/OpenColorIO/Config.cpp ++++ b/src/OpenColorIO/Config.cpp +@@ -1140,10 +1140,6 @@ public: + + + +-// Instantiate the cache with the right types. +-template class ProcessorCache; +- +- + /////////////////////////////////////////////////////////////////////////// + + ConfigRcPtr Config::Create() +-- +2.28.0 + diff --git a/community/opencolorio/8d48ee8da42de2d878db7b42586db8b3c67f83e1.patch b/community/opencolorio/8d48ee8da42de2d878db7b42586db8b3c67f83e1.patch new file mode 100644 index 000000000..dfc08bf22 --- /dev/null +++ b/community/opencolorio/8d48ee8da42de2d878db7b42586db8b3c67f83e1.patch @@ -0,0 +1,98 @@ +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/community/opencolorio/PKGBUILD b/community/opencolorio/PKGBUILD new file mode 100644 index 000000000..d02fa129f --- /dev/null +++ b/community/opencolorio/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Sven-Hendrik Haase +# Contributor: Dumitru Ursu + +# ALARM: Kevin Mihelich +# - patch to fix 32-bit ARM FTBFS + +pkgname=opencolorio +pkgver=2.0.0 +pkgrel=1 +pkgdesc="A color management framework for visual effects and animation" +arch=('x86_64') +url="https://opencolorio.org" +license=('BSD') +depends=('freeglut' 'glew' 'lcms2' 'tinyxml' 'yaml-cpp' 'openexr' 'pystring') +makedepends=('boost' 'cmake' 'python' 'pybind11' 'ninja') +optdepends=('python: python bindings') +source=($pkgname-$pkgver.tar.gz::https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v$pkgver.tar.gz + 0001-remove-duplicate-ProcessorCache-declaration.patch) +sha512sums=('7110a1a30a5fa64b81d7fc5e33234673aaddbad5e19ce7f21436c590edd7d2ce767650c9a934011a96e53132c030bd0b654fcf93ad79c1bfc8c050762c57f6d0' + '204c51ebf446e5fe83a9fa094b6037f1a5c0bb5240395176bed52f6b9f3082c3df13a4dc2589a924e1084ceea0692af9dd95a01d9461cd7d3bff511c66aba648') + +prepare() { + cd OpenColorIO-$pkgver + patch -p1 -i ../0001-remove-duplicate-ProcessorCache-declaration.patch +} + +build() { + cd OpenColorIO-$pkgver + + cmake \ + -GNinja \ + -Bbuild \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib + ninja -C build +} + +package() { + cd OpenColorIO-$pkgver + + DESTDIR="$pkgdir" ninja -C build install + install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} + +# vim:set ts=2 sw=2 et: