1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 # Compatibility with Python 3 is declared by upstream, but it is broken in fact, check on bump
7 PYTHON_COMPAT=( python{2_7,3_6} )
9 inherit cmake-utils python-single-r1 vcs-snapshot
11 DESCRIPTION="A color management framework for visual effects and animation"
12 HOMEPAGE="http://opencolorio.org/"
14 SRC_URI="https://github.com/imageworks/OpenColorIO/archive/v${PV}.tar.gz -> ${P}.tar.gz"
19 IUSE="cpu_flags_x86_sse2 doc opengl python static-libs test"
22 python? ( ${PYTHON_REQUIRED_USE} )"
27 media-libs/openimageio
32 python? ( ${PYTHON_DEPS} )
33 >=dev-cpp/yaml-cpp-0.5
38 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
40 # Restricting tests, bugs #439790 and #447908
44 "${FILESDIR}/${P}-fix-compile-error-with-Lut1DOp.cpp.patch"
45 "${FILESDIR}/${P}-use-GNUInstallDirs-and-fix-cmake-install-location.patch"
46 "${FILESDIR}/${P}-remove-building-of-bundled-programs.patch"
47 "${FILESDIR}/${P}-yaml-cpp-0.6.patch"
48 "${FILESDIR}/${P}-remove-Werror.patch"
52 use python && python-single-r1_pkg_setup
56 cmake-utils_src_prepare
58 use python && python_fix_shebang .
63 # - Truelight and Nuke are not in portage for now, so their support are disabled
64 # - Java bindings was not tested, so disabled
66 # - OpenImageIO is required for building ociodisplay and ocioconvert (USE opengl)
67 # - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl)
69 -DOCIO_BUILD_JNIGLUE=OFF
71 -DOCIO_BUILD_SHARED=ON
72 -DOCIO_BUILD_STATIC=$(usex static-libs)
73 -DOCIO_STATIC_JNIGLUE=OFF
74 -DOCIO_BUILD_TRUELIGHT=OFF
75 -DUSE_EXTERNAL_LCMS=ON
76 -DUSE_EXTERNAL_TINYXML=ON
77 -DUSE_EXTERNAL_YAML=ON
78 -DOCIO_BUILD_DOCS=$(usex doc)
79 -DOCIO_BUILD_APPS=$(usex opengl)
80 -DOCIO_BUILD_PYGLUE=$(usex python)
81 -DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2)
82 -DOCIO_BUILD_TESTS=$(usex test)
83 -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
84 -DCMAKE_DISABLE_FIND_PACKAGE_LATEX=ON # They don't build
86 cmake-utils_src_configure