Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
graphics/opencoloriov1: the port had been resurrected^Wreadded.
- Loading branch information
Alexey Dokuchaev
authored and
Alexey Dokuchaev
committed
Nov 29, 2023
1 parent
0e1d39c
commit 7ac962e
Showing
14 changed files
with
265 additions
and
1 deletion.
There are no files selected for viewing
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
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
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,57 @@ | ||
PORTNAME= opencolorio | ||
DISTVERSIONPREFIX= v | ||
DISTVERSION= 1.1.1 | ||
CATEGORIES= graphics multimedia | ||
PKGNAMESUFFIX= v1 | ||
|
||
MAINTAINER= danfe@FreeBSD.org | ||
COMMENT= Complete color management solution v1 | ||
WWW= https://opencolorio.org/ | ||
|
||
LICENSE= BSD3CLAUSE | ||
|
||
LIB_DEPENDS= libtinyxml.so:textproc/tinyxml \ | ||
libyaml-cpp.so:devel/yaml-cpp | ||
|
||
USES= alias cmake compiler:c++11-lang localbase:ldflags pkgconfig \ | ||
python:build shebangfix | ||
|
||
USE_GITHUB= yes | ||
GH_ACCOUNT= AcademySoftwareFoundation | ||
GH_PROJECT= OpenColorIO | ||
|
||
CMAKE_ON= USE_EXTERNAL_TINYXML USE_EXTERNAL_YAML OCIO_BUILD_SHARED | ||
CMAKE_OFF= OCIO_BUILD_APPS OCIO_BUILD_JNIGLUE OCIO_BUILD_NUKE \ | ||
OCIO_BUILD_PYGLUE OCIO_BUILD_STATIC OCIO_BUILD_DOCS | ||
CMAKE_ARGS+= -DPYTHON:FILEPATH=${PYTHON_CMD} | ||
|
||
CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}} | ||
CXXFLAGS_gcc= -Wno-unused-function -Wno-error | ||
CXXFLAGS_clang= -Wno-deprecated-register | ||
USE_LDCONFIG= yes | ||
|
||
SHEBANG_FILES= share/sphinx/ExtractRstFromSourceCPP.py \ | ||
share/sphinx/ExtractRstFromSourceSimple.py \ | ||
src/pyglue/createPyDocH.py | ||
|
||
PLIST_SUB= SHL3=${PORTVERSION} SHL1=${PORTVERSION:R:R} | ||
|
||
.if (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse2}) | ||
CMAKE_ON+= OCIO_USE_SSE | ||
.else | ||
CMAKE_OFF+= OCIO_USE_SSE | ||
.endif | ||
|
||
post-install: | ||
${RM} -R ${STAGEDIR}/${PREFIX}/share/ocio | ||
# add v1 suffix | ||
${REINPLACE_CMD} -e 's|<OpenColorIO/|<OpenColorIOv1/|g' \ | ||
${STAGEDIR}/${PREFIX}/include/OpenColorIOv1/* | ||
${FIND} ${STAGEDIR}${PREFIX}/include/OpenColorIOv1 -name '*.bak' -delete | ||
@(cd ${STAGEDIR}/${PREFIX} && ${MKDIR} lib/cmake/Modules && \ | ||
${MV} OpenColorIOv1Config.cmake lib/cmake/Modules/ && \ | ||
${MV} cmake/OpenColorIO-release.cmake lib/cmake/Modules/OpenColorIOv1-release.cmake && \ | ||
${MV} cmake/OpenColorIO.cmake lib/cmake/Modules/OpenColorIOv1.cmake && \ | ||
${RMDIR} cmake) | ||
|
||
.include <bsd.port.mk> |
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,3 @@ | ||
TIMESTAMP = 1553749977 | ||
SHA256 (AcademySoftwareFoundation-OpenColorIO-v1.1.1_GH0.tar.gz) = c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8 | ||
SIZE (AcademySoftwareFoundation-OpenColorIO-v1.1.1_GH0.tar.gz) = 13828483 |
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,55 @@ | ||
--- CMakeLists.txt.orig 2019-03-28 05:12:57 UTC | ||
+++ CMakeLists.txt | ||
@@ -271,7 +271,7 @@ if(USE_EXTERNAL_YAML) | ||
mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND) | ||
|
||
if(YAML_CPP_FOUND) | ||
- if(YAML_CPP_VERSION VERSION_GREATER "0.5.0") | ||
+ if(FALSE AND YAML_CPP_VERSION VERSION_GREATER "0.5.0") | ||
# Need to also get the boost headers here, as yaml-cpp 0.5.0+ requires them. | ||
# Don't bother doing this step if we are already including the boost headers for shared_ptr | ||
if(NOT OCIO_USE_BOOST_PTR) | ||
@@ -531,8 +531,6 @@ 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/) | ||
- | ||
############################################################################### | ||
### CPACK ### | ||
|
||
@@ -597,7 +595,7 @@ if(TARGET OpenColorIO_STATIC) | ||
endif() | ||
endif() | ||
install(EXPORT OpenColorIO DESTINATION cmake) | ||
-file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" | ||
+file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOv1Config.cmake" | ||
" | ||
get_filename_component(OpenColorIO_DIR \"\${CMAKE_CURRENT_LIST_FILE}\" PATH) | ||
|
||
@@ -607,14 +605,14 @@ file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmak | ||
message(STATUS OpenColorIO_INCLUDE_DIRS=\${OpenColorIO_INCLUDE_DIRS}) | ||
|
||
## targets libraries + associated definitions | ||
- if(NOT TARGET OpenColorIO) | ||
- include(\"\${OpenColorIO_DIR}/cmake/OpenColorIO.cmake\") ## thanks to imported target | ||
- if(TARGET OpenColorIO AND NOT OpenColorIO_USE_STATIC) | ||
+ if(NOT TARGET OpenColorIOv1) | ||
+ include(\"\${OpenColorIO_DIR}/cmake/OpenColorIOv1.cmake\") ## thanks to imported target | ||
+ if(TARGET OpenColorIOv1 AND NOT OpenColorIO_USE_STATIC) | ||
message(STATUS \"shared target OpenColorIO : see OpenColorIO_LIBRARY\") | ||
- set(OpenColorIO_LIBRARY OpenColorIO) | ||
+ set(OpenColorIO_LIBRARY OpenColorIOv1) | ||
set(OCIO_COMPILE_DEFINITIONS ${OCIO_SHARED_COMPILE_DEFINITIONS}) | ||
endif() | ||
- if(NOT TARGET OpenColorIO AND TARGET OpenColorIO_STATIC) | ||
+ if(NOT TARGET OpenColorIOv1 AND TARGET OpenColorIO_STATIC) | ||
message(STATUS \"static target OpenColorIO_STATIC : see OpenColorIO_LIBRARY\") | ||
set(OpenColorIO_LIBRARY OpenColorIO_STATIC) | ||
set(OCIO_COMPILE_DEFINITIONS ${OCIO_STATIC_COMPILE_DEFINITIONS}) | ||
@@ -646,4 +644,4 @@ file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmak | ||
message(STATUS OPENCOLORIO_FOUND=\${OPENCOLORIO_FOUND}) | ||
" | ||
) | ||
-install(FILES "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" DESTINATION .) | ||
+install(FILES "${CMAKE_BINARY_DIR}/OpenColorIOv1Config.cmake" DESTINATION .) |
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,17 @@ | ||
--- docs/CMakeLists.txt.orig 2014-09-11 19:08:18 UTC | ||
+++ docs/CMakeLists.txt | ||
@@ -110,12 +115,11 @@ 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_PREFIX}/share/doc/opencoloriov1 | ||
PATTERN .* EXCLUDE | ||
) | ||
|
||
-find_package(LATEX) | ||
-if(PDFLATEX_COMPILER) | ||
+if(0) | ||
|
||
add_custom_target(latex | ||
COMMAND PYTHONPATH=${PYTHONPATH} ${EXTDIST_BINPATH}/sphinx-build -b latex . ${CMAKE_CURRENT_BINARY_DIR}/build-latex |
8 changes: 8 additions & 0 deletions
8
graphics/opencoloriov1/files/patch-export_pkgconfig_OpenColorIO.pc.in
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,8 @@ | ||
--- export/pkgconfig/OpenColorIO.pc.in.orig 2021-12-06 23:53:07 UTC | ||
+++ export/pkgconfig/OpenColorIO.pc.in | ||
@@ -7,4 +7,4 @@ Name: OpenColorIO | ||
Description: A color management framework for visual effects and animation | ||
Version: @OCIO_VERSION@ | ||
Cflags: -I${includedir} | ||
-Libs: -L${libdir} -lOpenColorIO | ||
+Libs: -L${libdir} -lOpenColorIOv1 |
39 changes: 39 additions & 0 deletions
39
graphics/opencoloriov1/files/patch-share_cmake_OCIOMacros.cmake
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,39 @@ | ||
--- share/cmake/OCIOMacros.cmake.orig 2019-03-28 05:12:57 UTC | ||
+++ share/cmake/OCIOMacros.cmake | ||
@@ -96,27 +96,6 @@ MACRO(OCIOFindOpenImageIO) | ||
set(OIIO_FOUND TRUE) | ||
message(STATUS "Found OIIO library ${OIIO_LIBRARIES}") | ||
message(STATUS "Found OIIO includes ${OIIO_INCLUDES}") | ||
- | ||
- # Unfortunately, OIIO hides a dependency to Ilmbase includes | ||
- | ||
- if(ILMBASE_PATH) | ||
- message(STATUS "Ilmbase path explicitly specified: ${ILMBASE_PATH}") | ||
- endif() | ||
- | ||
- FIND_PATH( ILMBASE_INCLUDES OpenEXR/half.h | ||
- ${ILMBASE_PATH}/include/ | ||
- /usr/include | ||
- /usr/local/include | ||
- /sw/include | ||
- /opt/local/include | ||
- DOC "The directory where OpenEXR/half.h resides") | ||
- | ||
- if(ILMBASE_INCLUDES) | ||
- message(STATUS "Found Ilmbase includes ${ILMBASE_INCLUDES}") | ||
- else() | ||
- set(OIIO_FOUND FALSE) | ||
- message(STATUS "Ilmbase not found. Specify ILMBASE_PATH to locate it") | ||
- endif() | ||
else() | ||
set(OIIO_FOUND FALSE) | ||
message(STATUS "OIIO not found. Specify OIIO_PATH to locate it") | ||
@@ -222,7 +201,7 @@ MACRO(OCIOFindPython) | ||
file(TO_CMAKE_PATH "${PYTHON_LIBRARY_DIRS_RAW}" PYTHON_LIBRARY_DIRS) | ||
|
||
FIND_LIBRARY(PYTHON_LIBRARY | ||
- NAMES "python${PYTHON_VERSION}" | ||
+ NAMES "${PYTHON_VERSION}${PYTHON_ABIVER}" | ||
PATHS ${PYTHON_LIBRARY_DIRS} | ||
NO_DEFAULT_PATH # Don't be "helpful" and randomly grab library from /usr/lib etc | ||
) |
11 changes: 11 additions & 0 deletions
11
graphics/opencoloriov1/files/patch-src_apps_ociodisplay_CMakeLists.txt
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,11 @@ | ||
--- src/apps/ociodisplay/CMakeLists.txt.orig 2019-03-28 05:12:57 UTC | ||
+++ src/apps/ociodisplay/CMakeLists.txt | ||
@@ -13,7 +13,7 @@ if (OIIO_FOUND) | ||
|
||
# set_target_properties(ociodisplay PROPERTIES INSTALL_RPATH ${OIIO_LIBRARIES} ) | ||
set_target_properties(ociodisplay PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) | ||
- target_link_libraries(ociodisplay ${GLEW_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${OIIO_LIBRARIES}) | ||
+ target_link_libraries(ociodisplay ${GLEW_LIBRARIES} ${GLUT_LIBRARY} ${GLUT_LIBRARIES} ${OPENGL_LIBRARY} ${OIIO_LIBRARIES}) | ||
target_link_OCIO(ociodisplay) | ||
|
||
install(TARGETS ociodisplay EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin) |
27 changes: 27 additions & 0 deletions
27
graphics/opencoloriov1/files/patch-src_core_CMakeLists.txt
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,27 @@ | ||
--- src/core/CMakeLists.txt.orig 2021-12-07 20:11:03 UTC | ||
+++ src/core/CMakeLists.txt | ||
@@ -56,7 +56,7 @@ if(OCIO_BUILD_SHARED) | ||
endif() | ||
|
||
set_target_properties(OpenColorIO PROPERTIES | ||
- OUTPUT_NAME OpenColorIO | ||
+ OUTPUT_NAME OpenColorIOv1 | ||
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}" | ||
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}") | ||
|
||
@@ -109,11 +109,11 @@ endmacro() | ||
|
||
# public interface | ||
install(FILES ${core_export_headers} | ||
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/OpenColorIO/) | ||
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/OpenColorIOv1/) | ||
|
||
# pkg-config | ||
-message(STATUS "Create OpenColorIO.pc from OpenColorIO.pc.in") | ||
+message(STATUS "Create OpenColorIOv1.pc from OpenColorIO.pc.in") | ||
configure_file(${CMAKE_SOURCE_DIR}/export/pkgconfig/OpenColorIO.pc.in | ||
- ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc @ONLY) | ||
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc | ||
+ ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIOv1.pc @ONLY) | ||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIOv1.pc | ||
DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/) |
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,11 @@ | ||
--- src/core/Config.cpp.orig 2018-09-04 18:15:21 UTC | ||
+++ src/core/Config.cpp | ||
@@ -324,7 +324,7 @@ OCIO_NAMESPACE_ENTER | ||
sanitytext_ = rhs.sanitytext_; | ||
|
||
cacheids_ = rhs.cacheids_; | ||
- cacheidnocontext_ = cacheidnocontext_; | ||
+ cacheidnocontext_ = rhs.cacheidnocontext_; | ||
} | ||
return *this; | ||
} |
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,20 @@ | ||
--- src/core/OCIOYaml.cpp.orig 2019-03-28 05:12:57 UTC | ||
+++ src/core/OCIOYaml.cpp | ||
@@ -30,7 +30,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | ||
|
||
#include <OpenColorIO/OpenColorIO.h> | ||
|
||
-#ifndef WIN32 | ||
+#ifdef OLDYAML | ||
|
||
// fwd declare yaml-cpp visibility | ||
#pragma GCC visibility push(hidden) | ||
@@ -1442,7 +1442,7 @@ OCIO_NAMESPACE_ENTER | ||
#ifdef OLDYAML | ||
if(node.FindValue("ocio_profile_version") == NULL) | ||
#else | ||
- if(node["ocio_profile_version"] == NULL) | ||
+ if(!node["ocio_profile_version"].IsDefined()) | ||
#endif | ||
{ | ||
std::ostringstream os; |
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,5 @@ | ||
OpenColorIO (OCIO) is a complete color management solution geared | ||
towards motion picture production with an emphasis on visual effects | ||
and computer animation. | ||
|
||
This port provides v1 for ports that don't support v2 yet. |
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,11 @@ | ||
include/OpenColorIOv1/OpenColorABI.h | ||
include/OpenColorIOv1/OpenColorIO.h | ||
include/OpenColorIOv1/OpenColorTransforms.h | ||
include/OpenColorIOv1/OpenColorTypes.h | ||
lib/libOpenColorIOv1.so | ||
lib/libOpenColorIOv1.so.%%SHL1%% | ||
lib/libOpenColorIOv1.so.%%SHL3%% | ||
libdata/pkgconfig/OpenColorIOv1.pc | ||
lib/cmake/Modules/OpenColorIOv1Config.cmake | ||
lib/cmake/Modules/OpenColorIOv1-%%CMAKE_BUILD_TYPE%%.cmake | ||
lib/cmake/Modules/OpenColorIOv1.cmake |