summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Scruggs <j.scruggs@gmail.com>2017-09-21 10:06:26 +0100
committerDavid Seifert <soap@gentoo.org>2017-09-23 10:32:51 +0200
commit39ce22e9f25c24885397381878d64d03cdf69bfb (patch)
tree918c7cc9f6b2c4ffd70ac95c96d203557a3403d8 /media-libs
parentmedia-libs/Field3D: New package (diff)
downloadgentoo-39ce22e9f25c24885397381878d64d03cdf69bfb.tar.gz
gentoo-39ce22e9f25c24885397381878d64d03cdf69bfb.tar.bz2
gentoo-39ce22e9f25c24885397381878d64d03cdf69bfb.zip
media-libs/opencolorio: Update to v20170719
Upstream doesn't appear to be making new releases, so use stable snapshots. There was another round of yaml fixes and other fixes for security. Build fixes for GCC 7. General bug fixes. The current version in portage has lots of bugs that have since been fixed. Closes: https://github.com/gentoo/gentoo/pull/5750
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/opencolorio/Manifest1
-rw-r--r--media-libs/opencolorio/files/opencolorio-1.0.9-cmake-fixes-v1.patch150
-rw-r--r--media-libs/opencolorio/opencolorio-1.0.9_p20170719.ebuild86
3 files changed, 237 insertions, 0 deletions
diff --git a/media-libs/opencolorio/Manifest b/media-libs/opencolorio/Manifest
index 33eb023b1864..9cd0dcd2309c 100644
--- a/media-libs/opencolorio/Manifest
+++ b/media-libs/opencolorio/Manifest
@@ -1,2 +1,3 @@
DIST opencolorio-1.0.9-yaml-0.5-compat-v2.patch.bz2 15418 SHA256 13fa49b03a792122aa416e07a69c52d6bde71b91882d77784ade4d14bac952b8 SHA512 8383bc84e209b67aa34c6420348634d0d2a34f1dafda6a10b0c4a15776c2094057a38b00d078b59b648131178f2d65f695890204dbee411602689a0bb7419ecc WHIRLPOOL 0a0bbc1a787793ee7275a3c6f31ecc9b65581ae6cd07a5a93c12e02fc26e33b98521366e26efa92879474b833cbe2f5c4148d2ec88ad80afb63260b8a67dfed9
DIST opencolorio-1.0.9.tar.gz 12473406 SHA256 0f3b458f69715a942047a7b76545c6a098b632e9e5e71d5caaa756d5f7356aa6 SHA512 f5310cd6d3048d5f307adb41ac1ac807f087a6344c96324cb0f13d0eae1fa3fe5f8005f17adf77664044daf762902223b650b5d8c1636c7801183cd3b4e03ac8 WHIRLPOOL e622d71d40cfdba664178df38d66ecd990515afe4fff0260952bca29e6d46beba47446b6bd36c9965a8169c966a0bddf9bcb5b41f7857ed355ac1a6299c9de6c
+DIST opencolorio-1.0.9_p20170719.tar.gz 13752773 SHA256 0314b75df6b57bb9de1204bdb9fd5274c84f1415abcf26d80968b4b8d110bf1a SHA512 fe80f4b1244a64cdf7e8ad53713b634455f038f8e461c351f9e681e2a8cc171e4429e2e469f13bf2c58d3eeb5612d90dd6ff756d2f71fa2f63f79b3943ac4646 WHIRLPOOL c77c39dd494157c6f17faf695fb07d1de3b26dc8fe1c2ae726e0310ae6f6cc9ad535c0bbad44065311cb1b6cf8b27bea9a33676587e973f1c1f7945125f01cb1
diff --git a/media-libs/opencolorio/files/opencolorio-1.0.9-cmake-fixes-v1.patch b/media-libs/opencolorio/files/opencolorio-1.0.9-cmake-fixes-v1.patch
new file mode 100644
index 000000000000..23f67cae55c5
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-1.0.9-cmake-fixes-v1.patch
@@ -0,0 +1,150 @@
+diff -purN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2017-07-19 21:38:48.000000000 +0100
++++ b/CMakeLists.txt 2017-08-15 14:14:02.223744929 +0100
+@@ -59,6 +59,7 @@ endif()
+ include(ParseArguments)
+ include(OCIOMacros)
+ include(ExternalProject)
++include(GNUInstallDirs)
+
+ enable_language(CXX)
+
+@@ -519,7 +520,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 ###
+@@ -634,4 +635,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-07-19 21:38:48.000000000 +0100
++++ b/docs/CMakeLists.txt 2017-08-15 14:10:29.645282585 +0100
+@@ -1,68 +1,5 @@
+
+ ###############################################################################
+-### External Doc Apps ###
+-
+-# 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 PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# 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 PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# 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 PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# 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 PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# 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 PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT} --install-scripts=${EXTDIST_ROOT}/bin
+-)
+-
+-###############################################################################
+ ### Create Doc Targets ###
+
+ message(STATUS "Create sphinx conf.py from conf.py.in")
+@@ -99,7 +36,7 @@ else()
+ endif()
+
+ add_custom_target(doc ALL
+- COMMAND PYTHONPATH=${PYTHONPATH} ${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
+@@ -110,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 PYTHONPATH=${PYTHONPATH} ${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
+@@ -133,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
+@@ -143,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.0.9_p20170719.ebuild b/media-libs/opencolorio/opencolorio-1.0.9_p20170719.ebuild
new file mode 100644
index 000000000000..cfcbd93bf47f
--- /dev/null
+++ b/media-libs/opencolorio/opencolorio-1.0.9_p20170719.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2017 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/"
+
+MY_GIT_COMMIT="7e7f10afce97254cdc1295a3594ddd5e6fb555d6"
+SRC_URI="https://github.com/imageworks/OpenColorIO/archive/${MY_GIT_COMMIT}.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}/${PN}-1.0.9-cmake-fixes-v1.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
+}