summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Scruggs <j.scruggs@gmail.com>2018-01-12 22:19:10 +0000
committerDavid Seifert <soap@gentoo.org>2018-01-13 14:30:07 +0100
commit489c3c78999d7f5c20d86aa2b5e2493821ee5fd0 (patch)
treeeaf5c58cdfe338f445046819dbb5bafede13928f /media-libs/opencolorio
parentprofiles/f/prefix/s/kernel-2.6.16+/make.defaults: fix PYTHON_TARGETS (diff)
downloadgentoo-489c3c78999d7f5c20d86aa2b5e2493821ee5fd0.tar.gz
gentoo-489c3c78999d7f5c20d86aa2b5e2493821ee5fd0.tar.bz2
gentoo-489c3c78999d7f5c20d86aa2b5e2493821ee5fd0.zip
media-libs/opencolorio: version bump to 1.1.0
Closes: https://github.com/gentoo/gentoo/pull/6842
Diffstat (limited to 'media-libs/opencolorio')
-rw-r--r--media-libs/opencolorio/Manifest1
-rw-r--r--media-libs/opencolorio/files/opencolorio-1.1.0-cmake-fixes.patch173
-rw-r--r--media-libs/opencolorio/opencolorio-1.1.0.ebuild85
3 files changed, 259 insertions, 0 deletions
diff --git a/media-libs/opencolorio/Manifest b/media-libs/opencolorio/Manifest
index 63d78b138006..78f98ec83063 100644
--- a/media-libs/opencolorio/Manifest
+++ b/media-libs/opencolorio/Manifest
@@ -1,3 +1,4 @@
DIST opencolorio-1.0.9-yaml-0.5-compat-v2.patch.bz2 15418 BLAKE2B 6eaabec7780cb4be9ec4b0b16f79b7114b187b13e3027b6cae3662c6a2b6dacb6566e36fbdf7b2edc77855be505e4cd2c84e16b58d49ccdc59341359419b7cc4 SHA512 8383bc84e209b67aa34c6420348634d0d2a34f1dafda6a10b0c4a15776c2094057a38b00d078b59b648131178f2d65f695890204dbee411602689a0bb7419ecc
DIST opencolorio-1.0.9.tar.gz 12473406 BLAKE2B 54c867521b66d7479c175f65046ffd50ce41fb665c640cf5097b7178cc11dbf17cd324e7d861e4a56c990a109d7f80041d5e83a2438bbfb550e2d8affab7c2da SHA512 f5310cd6d3048d5f307adb41ac1ac807f087a6344c96324cb0f13d0eae1fa3fe5f8005f17adf77664044daf762902223b650b5d8c1636c7801183cd3b4e03ac8
DIST opencolorio-1.0.9_p20170719.tar.gz 13752783 BLAKE2B 2f6a0e095bb3fd56a49b6d43f5c4f3690a2c735c1cc84c337bcb19abf391bedd600bcb6fc512fd8e1c56fe1e337ee57358329490f2dc2c92362b8c939a579917 SHA512 1ee86cae951afed963bc62e251975a6c721553fc1bb7650faccb6160fcd6b3e030c509667cb7b2543a3ca32ed6777259d98bf25e2bb8150fee8054310b9d2590
+DIST opencolorio-1.1.0.tar.gz 13826812 BLAKE2B 555a5ac393170503c944c3471ea482b1a22be7c98ee7b81af37f52db185c8b61c5318102c139a8711f4828d306b6c4322f5d839c4df08ce41ebbb9dcb2bda152 SHA512 909874a9f91a8d229622810fc70233680c6e75203bd8555179322de2873da00bf302432e19f189b787ffcda3157ddec1e4601c97f75a36e16f644fe7d42f6998
diff --git a/media-libs/opencolorio/files/opencolorio-1.1.0-cmake-fixes.patch b/media-libs/opencolorio/files/opencolorio-1.1.0-cmake-fixes.patch
new file mode 100644
index 000000000000..9cb3500d9dab
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-1.1.0-cmake-fixes.patch
@@ -0,0 +1,173 @@
+diff -purN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2017-11-29 22:51:15.000000000 +0000
++++ b/CMakeLists.txt 2017-12-27 16:49:51.461300828 +0000
+@@ -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_DATAROOTDIR}/ocio/)
+
+ ###############################################################################
+ ### CPACK ###
+@@ -646,4 +647,4 @@ file(WRITE "${CMAKE_BINARY_DIR}/OpenColo
+ 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)
+diff -purN a/docs/CMakeLists.txt b/docs/CMakeLists.txt
+--- a/docs/CMakeLists.txt 2017-11-29 22:51:15.000000000 +0000
++++ b/docs/CMakeLists.txt 2017-12-27 16:53:28.976491353 +0000
+@@ -1,91 +1,5 @@
+
+ ###############################################################################
+-### 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 ###
+
+ message(STATUS "Create sphinx conf.py from conf.py.in")
+@@ -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
+@@ -133,20 +47,18 @@ add_custom_target(doc ALL
+ 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_PREFIX}/share/doc/OpenColorIO/html
++ DESTINATION ${CMAKE_INSTALL_DOCDIR}/html
+ PATTERN .* EXCLUDE
+ )
+
++if(OCIO_BUILD_PDF_DOCS)
++
+ 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
++ COMMAND sphinx-build -b latex . ${CMAKE_CURRENT_BINARY_DIR}/build-latex
+ DEPENDS
+ OpenColorIO
+ ${CMAKE_BINARY_DIR}/docs/conf.py
+@@ -156,7 +68,6 @@ 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
+@@ -166,6 +77,8 @@ 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()
++
++endif()
diff --git a/media-libs/opencolorio/opencolorio-1.1.0.ebuild b/media-libs/opencolorio/opencolorio-1.1.0.ebuild
new file mode 100644
index 000000000000..c1504ae4a464
--- /dev/null
+++ b/media-libs/opencolorio/opencolorio-1.1.0.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="doc opengl pdf python cpu_flags_x86_sse2 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? (
+ pdf? ( dev-python/sphinx[latex,${PYTHON_USEDEP}] )
+ !pdf? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ )"
+
+# Restricting tests, bugs #439790 and #447908
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}/${P}-cmake-fixes.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=OFF
+ -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_PDF_DOCS="$(usex pdf)"
+ -DOCIO_BUILD_PYGLUE="$(usex python)"
+ -DOCIO_USE_SSE="$(usex cpu_flags_x86_sse2)"
+ -DOCIO_BUILD_TESTS="$(usex test)"
+ -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
+ )
+ cmake-utils_src_configure
+}