media-libs/opencolorio: bring back deleted patch to fix bug #600022
authorChristophe Lermytte <gentoo@lermytte.be>
Wed, 16 Nov 2016 17:28:50 +0000 (18:28 +0100)
committerMichael Palimaka <kensington@gentoo.org>
Thu, 17 Nov 2016 12:14:08 +0000 (23:14 +1100)
media-libs/opencolorio/files/opencolorio-1.0.8-documentation-gen.patch [new file with mode: 0644]

diff --git a/media-libs/opencolorio/files/opencolorio-1.0.8-documentation-gen.patch b/media-libs/opencolorio/files/opencolorio-1.0.8-documentation-gen.patch
new file mode 100644 (file)
index 0000000..7a396b3
--- /dev/null
@@ -0,0 +1,54 @@
+--- a/docs/CMakeLists.txt      2013-01-08 03:19:23.649162615 +0400
++++ b/docs/CMakeLists.txt      2013-01-08 03:22:29.647329174 +0400
+@@ -81,7 +81,7 @@
+ ExtractRstCPP(${CMAKE_SOURCE_DIR}/export/OpenColorIO/OpenColorTypes.h developers/api/OpenColorTypes.rst)
+ 
+ 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
+         OpenColorIO
+         PyOpenColorIO
+@@ -93,20 +93,18 @@
+     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_PREFIX}/share/doc/$ENV{P}/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
+@@ -116,7 +114,6 @@
+             ${RSTDOC_OUTPUT}
+         COMMENT "Building latex doc"
+         SOURCES ${DOCFILES})
+-    add_dependencies(latex Sphinx)
+     
+     add_custom_target(pdf ALL
+         COMMAND ${PDFLATEX_COMPILER} OpenColorIO.tex
+@@ -126,6 +123,8 @@
+     add_dependencies(pdf latex)
+     
+     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/build-latex/OpenColorIO.pdf
+-            DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/OpenColorIO/)
++            DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/$ENV{P}/)
+     
+ endif()
++
++endif()