logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

opencolorio-1.1.0-r1.ebuild (2453B)


  1. # Copyright 1999-2018 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. # Compatibility with Python 3 is declared by upstream, but it is broken in fact, check on bump
  5. PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
  6. inherit cmake-utils python-single-r1 vcs-snapshot
  7. DESCRIPTION="A color management framework for visual effects and animation"
  8. HOMEPAGE="https://opencolorio.org/"
  9. SRC_URI="https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  10. LICENSE="BSD"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="cpu_flags_x86_sse2 doc opengl python static-libs test"
  14. REQUIRED_USE="
  15. doc? ( python )
  16. python? ( ${PYTHON_REQUIRED_USE} )"
  17. RDEPEND="
  18. opengl? (
  19. media-libs/lcms:2
  20. media-libs/openimageio
  21. media-libs/glew:=
  22. media-libs/freeglut
  23. virtual/opengl
  24. )
  25. python? ( ${PYTHON_DEPS} )
  26. >=dev-cpp/yaml-cpp-0.5
  27. dev-libs/tinyxml"
  28. DEPEND="${RDEPEND}
  29. virtual/pkgconfig
  30. doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
  31. # Restricting tests, bugs #439790 and #447908
  32. RESTRICT="test"
  33. PATCHES=(
  34. "${FILESDIR}/${P}-fix-compile-error-with-Lut1DOp.cpp.patch"
  35. "${FILESDIR}/${P}-use-GNUInstallDirs-and-fix-cmake-install-location.patch"
  36. "${FILESDIR}/${P}-remove-building-of-bundled-programs.patch"
  37. "${FILESDIR}/${P}-yaml-cpp-0.6.patch"
  38. )
  39. pkg_setup() {
  40. use python && python-single-r1_pkg_setup
  41. }
  42. src_prepare() {
  43. cmake-utils_src_prepare
  44. use python && python_fix_shebang .
  45. sed -i 's/.*-Werror.*//' \
  46. src/pyglue/CMakeLists.txt \
  47. src/core/CMakeLists.txt
  48. }
  49. src_configure() {
  50. # Missing features:
  51. # - Truelight and Nuke are not in portage for now, so their support are disabled
  52. # - Java bindings was not tested, so disabled
  53. # Notes:
  54. # - OpenImageIO is required for building ociodisplay and ocioconvert (USE opengl)
  55. # - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl)
  56. local mycmakeargs=(
  57. -DOCIO_BUILD_JNIGLUE=OFF
  58. -DOCIO_BUILD_NUKE=OFF
  59. -DOCIO_BUILD_SHARED=ON
  60. -DOCIO_BUILD_STATIC=$(usex static-libs)
  61. -DOCIO_STATIC_JNIGLUE=OFF
  62. -DOCIO_BUILD_TRUELIGHT=OFF
  63. -DUSE_EXTERNAL_LCMS=ON
  64. -DUSE_EXTERNAL_TINYXML=ON
  65. -DUSE_EXTERNAL_YAML=ON
  66. -DOCIO_BUILD_DOCS=$(usex doc)
  67. -DOCIO_BUILD_APPS=$(usex opengl)
  68. -DOCIO_BUILD_PYGLUE=$(usex python)
  69. -DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2)
  70. -DOCIO_BUILD_TESTS=$(usex test)
  71. -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
  72. -DCMAKE_DISABLE_FIND_PACKAGE_LATEX=ON # They don't build
  73. )
  74. cmake-utils_src_configure
  75. }