forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: gentoo#6870
- Loading branch information
1 parent
fd7165a
commit e119042
Showing
5 changed files
with
435 additions
and
1 deletion.
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
media-libs/opencolorio/files/opencolorio-1.1.0-fix-compile-error-with-Lut1DOp.cpp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
From 8d38317f68d0e4663abbccdceca0bcd41f3dcf4a Mon Sep 17 00:00:00 2001 | ||
From: Patrick Hodoul <[email protected]> | ||
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 | ||
|
154 changes: 154 additions & 0 deletions
154
media-libs/opencolorio/files/opencolorio-1.1.0-remove-building-of-bundled-programs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
From 967369b36c9684d7ffb73a926c442d8991a3afef Mon Sep 17 00:00:00 2001 | ||
From: Jonathan Scruggs <[email protected]> | ||
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 | ||
|
102 changes: 102 additions & 0 deletions
102
...encolorio/files/opencolorio-1.1.0-use-GNUInstallDirs-and-fix-cmake-install-location.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
From c43cc918c3e79e324f11ca47e95bfe36e9e0dd15 Mon Sep 17 00:00:00 2001 | ||
From: Jonathan Scruggs <[email protected]> | ||
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 <[email protected]> | ||
--- | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.