# Contributor: Mark Riedesel # Maintainer: Mark Riedesel pkgname=opencolorio pkgver=1.1.0 pkgrel=2 pkgdesc="A color management framework for visual effects and animation" url="https://opencolorio.org" arch="all" license="BSD-3-Clause AND GPL-2.0-or-later" makedepends="boost-dev cmake freeglut-dev glew-dev lcms2-dev python3-dev tinyxml-dev yaml-cpp-dev" subpackages="py3-$pkgname:py3 $pkgname-dev $pkgname-tools" source="$pkgname-$pkgver.tar.gz::https://github.com/imageworks/OpenColorIO/archive/v$pkgver.tar.gz OpenColorIO-gcc.patch ocio-1.1.0-yamlcpp060.patch " builddir="$srcdir/OpenColorIO-$pkgver" build() { local use_ss2 # Just to be sure we're using Alpine packages. rm -f ext/lcms* ext/tinyxml* ext/yaml* case "$CARCH" in x86_64) use_sse2=TRUE ;; *) use_sse2=FALSE ;; esac mkdir build cd build cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ -DOCIO_BUILD_TRUELIGHT=OFF \ -DOCIO_BUILD_NUKE=OFF \ -DOCIO_BUILD_SHARED=ON \ -DOCIO_BUILD_STATIC=OFF \ -DOCIO_USE_SSE="$use_sse2" \ -DPYTHON=/usr/bin/python3 \ -DUSE_EXTERNAL_YAML=TRUE \ -DUSE_EXTERNAL_TINYXML=TRUE \ -DUSE_EXTERNAL_LCMS=TRUE \ -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-error=cast-function-type" make } package() { cd "$builddir"/build make DESTDIR="$pkgdir" install } tools() { pkgdesc="OpenColorIO color management framework tools" mkdir -p "$subpkgdir"/usr/ mv "$pkgdir"/usr/bin "$subpkgdir"/usr } py3() { pkgdesc="Python3 bindings for OpenColorIO color management framework" depends="python3" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib } sha512sums="909874a9f91a8d229622810fc70233680c6e75203bd8555179322de2873da00bf302432e19f189b787ffcda3157ddec1e4601c97f75a36e16f644fe7d42f6998 opencolorio-1.1.0.tar.gz befed734f240d26c7cbeb020b540ea91d84c9422fa61dcb0ab16f56389f7c5c90d10e015c6cdbed2033047b7e31ceb4fd1b2707c2bef1a8e0f33959601471d5f OpenColorIO-gcc.patch ef4b0e880c587fcd004865fd938e7f1fb1bbb933abf1ccf352260ebe3a50145664e27b9f1119b72ced99afe4d19b49b0b6c249dd95faaec9c1332ffc44bc9811 ocio-1.1.0-yamlcpp060.patch"