From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 93B25138331 for ; Fri, 19 Jan 2018 11:58:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B6DD1E084E; Fri, 19 Jan 2018 11:58:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8479EE084E for ; Fri, 19 Jan 2018 11:58:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 59257335C3A for ; Fri, 19 Jan 2018 11:58:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 20EDC192 for ; Fri, 19 Jan 2018 11:57:59 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1516363061.e1190425c7265517e4e90e67ef82abcca66006db.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencolorio/files/, media-libs/opencolorio/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/opencolorio/files/opencolorio-1.1.0-fix-compile-error-with-Lut1DOp.cpp.patch media-libs/opencolorio/files/opencolorio-1.1.0-remove-building-of-bundled-programs.patch media-libs/opencolorio/files/opencolorio-1.1.0-use-GNUInstallDirs-and-fix-cmake-install-location.patch media-libs/opencolorio/metadata.xml media-libs/opencolorio/opencolorio-1.1.0-r1.ebuild X-VCS-Directories: media-libs/opencolorio/ media-libs/opencolorio/files/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: e1190425c7265517e4e90e67ef82abcca66006db X-VCS-Branch: master Date: Fri, 19 Jan 2018 11:57:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: cf69ef43-4fec-4841-bb99-871327cf126c X-Archives-Hash: 0c8997372f5ff63609efbb7fc675ade3 commit: e1190425c7265517e4e90e67ef82abcca66006db Author: Jonathan Scruggs gmail com> AuthorDate: Mon Jan 15 15:02:16 2018 +0000 Commit: David Seifert gentoo org> CommitDate: Fri Jan 19 11:57:41 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1190425 media-libs/opencolorio: Revision bump to fix Lut1DOp error Fix the compile error in the Lut1DOp.cpp file Fix install location of the CMake files Split the patches to make it easier to maintain Closes: https://bugs.gentoo.org/644466 Closes: https://github.com/gentoo/gentoo/pull/6870 ...-1.1.0-fix-compile-error-with-Lut1DOp.cpp.patch | 92 ++++++++++++ ...1.1.0-remove-building-of-bundled-programs.patch | 154 +++++++++++++++++++++ ...nstallDirs-and-fix-cmake-install-location.patch | 102 ++++++++++++++ media-libs/opencolorio/metadata.xml | 3 +- media-libs/opencolorio/opencolorio-1.1.0-r1.ebuild | 85 ++++++++++++ 5 files changed, 435 insertions(+), 1 deletion(-) diff --git a/media-libs/opencolorio/files/opencolorio-1.1.0-fix-compile-error-with-Lut1DOp.cpp.patch b/media-libs/opencolorio/files/opencolorio-1.1.0-fix-compile-error-with-Lut1DOp.cpp.patch new file mode 100644 index 00000000000..b5455d010b4 --- /dev/null +++ b/media-libs/opencolorio/files/opencolorio-1.1.0-fix-compile-error-with-Lut1DOp.cpp.patch @@ -0,0 +1,92 @@ +From 8d38317f68d0e4663abbccdceca0bcd41f3dcf4a Mon Sep 17 00:00:00 2001 +From: Patrick Hodoul +Date: Mon, 27 Nov 2017 17:29:57 -0500 +Subject: [PATCH 1/3] Fix compile error with Lut1DOp.cpp + +Fix Linux compilation +Fix gcc 5.4.0 build breaks +Fix the temp filename for Linux +--- + src/core/Lut1DOp.cpp | 4 +++- + src/core/MathUtils.cpp | 23 ++++++++++++----------- + src/pyglue/PyAllocationTransform.cpp | 1 - + 3 files changed, 15 insertions(+), 13 deletions(-) + +diff --git a/src/core/Lut1DOp.cpp b/src/core/Lut1DOp.cpp +index 404ee0b..180e30f 100644 +--- a/src/core/Lut1DOp.cpp ++++ b/src/core/Lut1DOp.cpp +@@ -188,7 +188,8 @@ OCIO_NAMESPACE_ENTER + { + return simple_lut[clamp(index, 0.0f, maxIndex)]; + } +- ++ ++#if defined(OCIO_UNIT_TEST) || !defined(USE_SSE) + void Lut1D_Nearest(float* rgbaBuffer, long numPixels, const Lut1D & lut) + { + float maxIndex[3]; +@@ -218,6 +219,7 @@ OCIO_NAMESPACE_ENTER + rgbaBuffer += 4; + } + } ++#endif + #ifdef USE_SSE + void Lut1D_Nearest_SSE(float* rgbaBuffer, long numPixels, const Lut1D & lut) + { +diff --git a/src/core/MathUtils.cpp b/src/core/MathUtils.cpp +index e1a26c0..3881eb3 100644 +--- a/src/core/MathUtils.cpp ++++ b/src/core/MathUtils.cpp +@@ -327,17 +327,6 @@ OCIO_NAMESPACE_ENTER + GetV4Sum(vout, vout, v2); + } + +- namespace +- { +- +- void GetMxbResult(float* vout, float* m, float* x, float* v) +- { +- GetM44V4Product(vout, m, x); +- GetV4Sum(vout, vout, v); +- } +- +- } // anon namespace +- + bool GetMxbInverse(float* mout, float* vout, + const float* m_, const float* v_) + { +@@ -372,6 +361,18 @@ OCIO_NAMESPACE_USING + + #include "UnitTest.h" + ++namespace ++{ ++ ++ void GetMxbResult(float* vout, float* m, float* x, float* v) ++ { ++ GetM44V4Product(vout, m, x); ++ GetV4Sum(vout, vout, v); ++ } ++ ++} ++ ++ + OIIO_ADD_TEST(MathUtils, M44_is_diagonal) + { + { +diff --git a/src/pyglue/PyAllocationTransform.cpp b/src/pyglue/PyAllocationTransform.cpp +index 20bb50e..06b418a 100644 +--- a/src/pyglue/PyAllocationTransform.cpp ++++ b/src/pyglue/PyAllocationTransform.cpp +@@ -53,7 +53,6 @@ OCIO_NAMESPACE_ENTER + /// + + int PyOCIO_AllocationTransform_init(PyOCIO_Transform * self, PyObject * args, PyObject * kwds); +- PyObject * PyOCIO_AllocationTransform_equals(PyObject * self, PyObject * args); + PyObject * PyOCIO_AllocationTransform_getAllocation(PyObject * self); + PyObject * PyOCIO_AllocationTransform_setAllocation(PyObject * self, PyObject * args); + PyObject * PyOCIO_AllocationTransform_getNumVars(PyObject * self); +-- +2.15.1 + diff --git a/media-libs/opencolorio/files/opencolorio-1.1.0-remove-building-of-bundled-programs.patch b/media-libs/opencolorio/files/opencolorio-1.1.0-remove-building-of-bundled-programs.patch new file mode 100644 index 00000000000..9041677c9ce --- /dev/null +++ b/media-libs/opencolorio/files/opencolorio-1.1.0-remove-building-of-bundled-programs.patch @@ -0,0 +1,154 @@ +From 967369b36c9684d7ffb73a926c442d8991a3afef Mon Sep 17 00:00:00 2001 +From: Jonathan Scruggs +Date: Mon, 15 Jan 2018 13:09:31 +0000 +Subject: [PATCH 3/3] Remove building of bundled programs + +--- + docs/CMakeLists.txt | 98 ++--------------------------------------------------- + 1 file changed, 3 insertions(+), 95 deletions(-) + +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index a822a19..d588139 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -1,90 +1,4 @@ + +-############################################################################### +-### External Doc Apps ### +- +-if (WIN32) +- # Workaround to mimic *nix '> PYTHONPATH=XXX CMD' +- # on windows, it becomes '> set PYTHONPATH=XXX \n call CMD' +- # '\n' is here because '\\&' does not work. +- set(PYT_PRE_CMD set PYTHONPATH=${PYTHONPATH} "\n" call ) +- # Unfortunately some windows tools require to have +- # the paths with the '\' (not working with '//'). +- set(PYT_LIB_OUTPUT ${EXTDIST_ROOT}) +- string(REGEX REPLACE "/" "\\\\" PYT_LIB_OUTPUT ${PYT_LIB_OUTPUT}) +- set(PYT_EXTDIST_BINPATH ${EXTDIST_BINPATH}) +- string(REGEX REPLACE "/" "\\\\" PYT_EXTDIST_BINPATH ${PYT_EXTDIST_BINPATH}) +-else() +- set(PYT_PRE_CMD PYTHONPATH=${PYTHONPATH}) +- set(PYT_LIB_OUTPUT ${EXTDIST_ROOT}) +- set(PYT_EXTDIST_BINPATH ${EXTDIST_BINPATH}) +-endif() +- +-# setuptools +-# https://pypi.python.org/pypi/setuptools +-set(SETUPTOOLS_VERSION 1.1.6) +- +-ExternalProject_Add(setuptools +- URL ${CMAKE_SOURCE_DIR}/ext/setuptools-${SETUPTOOLS_VERSION}.tar.gz +- BUILD_IN_SOURCE 1 +- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH} +- BUILD_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py build +- INSTALL_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py install --prefix=${PYT_LIB_OUTPUT} +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/setuptools-prefix/src/setuptools +-) +- +-# docutils +-# https://pypi.python.org/pypi/docutils +-set(DOCUTILS_VERSION 0.11) +-ExternalProject_Add(docutils +- DEPENDS setuptools +- URL ${CMAKE_SOURCE_DIR}/ext/docutils-${DOCUTILS_VERSION}.tar.gz +- BUILD_IN_SOURCE 1 +- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH} +- BUILD_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py build +- INSTALL_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py install --prefix=${PYT_LIB_OUTPUT} +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docutils-prefix/src/docutils +-) +- +-# jinja2 +-# https://pypi.python.org/pypi/Jinja2 +-set(JINJA2_VERSION 2.7.1) +-ExternalProject_Add(Jinja2 +- DEPENDS setuptools +- URL ${CMAKE_SOURCE_DIR}/ext/Jinja2-${JINJA2_VERSION}.tar.gz +- BUILD_IN_SOURCE 1 +- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH} +- BUILD_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py build +- INSTALL_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py install --prefix=${PYT_LIB_OUTPUT} +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Jinja2-prefix/src/Jinja2 +-) +- +-# Pygments +-# https://pypi.python.org/pypi/Pygments +-set(PYGMENTS_VERSION 1.6) +-ExternalProject_Add(Pygments +- DEPENDS setuptools +- URL ${CMAKE_SOURCE_DIR}/ext/Pygments-${PYGMENTS_VERSION}.tar.gz +- BUILD_IN_SOURCE 1 +- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH} +- BUILD_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py build +- INSTALL_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py install --prefix=${PYT_LIB_OUTPUT} +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Pygments-prefix/src/Pygments +-) +- +-# sphinx +-# https://pypi.python.org/pypi/Sphinx +-set(SPHINX_VERSION 1.2b3) +-ExternalProject_Add(Sphinx +- DEPENDS setuptools docutils Jinja2 Pygments +- URL ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.tar.gz +- PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.patch +- BUILD_IN_SOURCE 1 +- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH} +- BUILD_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py build +- INSTALL_COMMAND ${PYT_PRE_CMD} ${PYTHON} setup.py install --prefix=${PYT_LIB_OUTPUT} --install-scripts=${PYT_EXTDIST_BINPATH} +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Sphinx-prefix/src/Sphinx +-) +- + ############################################################################### + ### Create Doc Targets ### + +@@ -122,7 +36,7 @@ else() + endif() + + add_custom_target(doc ALL +- COMMAND ${PYT_PRE_CMD} ${EXTDIST_BINPATH}/sphinx-build -b html . ${CMAKE_CURRENT_BINARY_DIR}/build-html ++ COMMAND sphinx-build -b html . ${CMAKE_CURRENT_BINARY_DIR}/build-html + DEPENDS + ${DEPLIBS} + ${CMAKE_BINARY_DIR}/docs/conf.py +@@ -131,11 +45,7 @@ add_custom_target(doc ALL + developers/api/OpenColorTypes.rst + ${RSTDOC_OUTPUT} + COMMENT "Building html docs" + SOURCES ${DOCFILES}) +- +-# note: ExternalProject will not build when added to a add_custom_target this +-# works around this problem. This seems to be fixed in the cmake ^HEAD +-add_dependencies(doc Sphinx) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build-html/ + DESTINATION ${CMAKE_INSTALL_DOCDIR}/html +@@ -146,8 +56,8 @@ find_package(LATEX) + find_package(LATEX) + if(PDFLATEX_COMPILER) + +- add_custom_target(latex +- COMMAND ${PYT_PRE_CMD} ${EXTDIST_BINPATH}/sphinx-build -b latex . ${CMAKE_CURRENT_BINARY_DIR}/build-latex ++ add_custom_target(latex ALL ++ COMMAND sphinx-build -b latex . ${CMAKE_CURRENT_BINARY_DIR}/build-latex + DEPENDS + OpenColorIO + ${CMAKE_BINARY_DIR}/docs/conf.py +@@ -156,14 +66,12 @@ if(PDFLATEX_COMPILER) + ${RSTDOC_OUTPUT} + COMMENT "Building latex doc" + SOURCES ${DOCFILES}) +- add_dependencies(latex Sphinx) + + add_custom_target(pdf ALL + COMMAND ${PDFLATEX_COMPILER} OpenColorIO.tex + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build-latex + COMMENT "Building pdf doc" + SOURCES ${DOCFILES}) +- add_dependencies(pdf latex) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/build-latex/OpenColorIO.pdf + DESTINATION ${CMAKE_INSTALL_DOCDIR}) +-- +2.15.1 + diff --git a/media-libs/opencolorio/files/opencolorio-1.1.0-use-GNUInstallDirs-and-fix-cmake-install-location.patch b/media-libs/opencolorio/files/opencolorio-1.1.0-use-GNUInstallDirs-and-fix-cmake-install-location.patch new file mode 100644 index 00000000000..e4c6296f1d7 --- /dev/null +++ b/media-libs/opencolorio/files/opencolorio-1.1.0-use-GNUInstallDirs-and-fix-cmake-install-location.patch @@ -0,0 +1,102 @@ +From c43cc918c3e79e324f11ca47e95bfe36e9e0dd15 Mon Sep 17 00:00:00 2001 +From: Jonathan Scruggs +Date: Sun, 14 Jan 2018 19:59:31 +0000 +Subject: [PATCH] Add GNUInstallDirs variables and fix install location for + cmake files + +GNUInstallDirs is supported on all platforms and variables are set +to the standard GNU locations. + +This patch corrects 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 b05c7e4..452fa1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,6 +59,7 @@ endif() + include(ParseArguments) + include(OCIOMacros) + include(ExternalProject) ++include(GNUInstallDirs) + + enable_language(CXX) + +@@ -531,7 +532,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 ### +@@ -596,7 +597,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) +@@ -608,7 +609,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) +@@ -646,4 +647,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 3fd0299..a822a19 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 + ) + +@@ -166,6 +166,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 +-- +2.15.1 + diff --git a/media-libs/opencolorio/metadata.xml b/media-libs/opencolorio/metadata.xml index 10fb0496f9c..8622e02f2f8 100644 --- a/media-libs/opencolorio/metadata.xml +++ b/media-libs/opencolorio/metadata.xml @@ -7,7 +7,8 @@ OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. - Install extra documentation in PDF format + + Install extra documentation in PDF format imageworks/OpenColorIO diff --git a/media-libs/opencolorio/opencolorio-1.1.0-r1.ebuild b/media-libs/opencolorio/opencolorio-1.1.0-r1.ebuild new file mode 100644 index 00000000000..82a5b17acd9 --- /dev/null +++ b/media-libs/opencolorio/opencolorio-1.1.0-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# Compatibility with Python 3 is declared by upstream, but it is broken in fact, check on bump +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit cmake-utils python-single-r1 vcs-snapshot + +DESCRIPTION="A color management framework for visual effects and animation" +HOMEPAGE="http://opencolorio.org/" + +SRC_URI="https://github.com/imageworks/OpenColorIO/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cpu_flags_x86_sse2 doc opengl python static-libs test" +REQUIRED_USE=" + doc? ( python ) + python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + opengl? ( + media-libs/lcms:2 + media-libs/openimageio + media-libs/glew:= + media-libs/freeglut + virtual/opengl + ) + python? ( ${PYTHON_DEPS} ) + >=dev-cpp/yaml-cpp-0.5 + dev-libs/tinyxml" + +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" + +# Restricting tests, bugs #439790 and #447908 +RESTRICT="test" + +PATCHES=( + "${FILESDIR}/${P}-fix-compile-error-with-Lut1DOp.cpp.patch" + "${FILESDIR}/${P}-use-GNUInstallDirs-and-fix-cmake-install-location.patch" + "${FILESDIR}/${P}-remove-building-of-bundled-programs.patch" +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + cmake-utils_src_prepare + + use python && python_fix_shebang . +} + +src_configure() { + # Missing features: + # - Truelight and Nuke are not in portage for now, so their support are disabled + # - Java bindings was not tested, so disabled + # Notes: + # - OpenImageIO is required for building ociodisplay and ocioconvert (USE opengl) + # - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl) + local mycmakeargs=( + -DOCIO_BUILD_JNIGLUE=OFF + -DOCIO_BUILD_NUKE=OFF + -DOCIO_BUILD_SHARED=ON + -DOCIO_BUILD_STATIC=$(usex static-libs) + -DOCIO_STATIC_JNIGLUE=OFF + -DOCIO_BUILD_TRUELIGHT=OFF + -DUSE_EXTERNAL_LCMS=ON + -DUSE_EXTERNAL_TINYXML=ON + -DUSE_EXTERNAL_YAML=ON + -DOCIO_BUILD_DOCS=$(usex doc) + -DOCIO_BUILD_APPS=$(usex opengl) + -DOCIO_BUILD_PYGLUE=$(usex python) + -DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2) + -DOCIO_BUILD_TESTS=$(usex test) + -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}" + -DCMAKE_DISABLE_FIND_PACKAGE_LATEX=ON # They don't build + ) + cmake-utils_src_configure +}