mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
graphics/opencoloriov1: copy from graphics/opencolorio (+)
Prepare to import OCIOv2. Adjust to install all as non-conflicting with main library. Updating opencolorio port to 2.1.0 breaks several ports. this provides a temporary fix while ports can be updated. PR: 260309 Sponsored by: Netzkommune GmbH.
This commit is contained in:
parent
61f52b38d0
commit
8c660685f7
59
graphics/opencoloriov1/Makefile
Normal file
59
graphics/opencoloriov1/Makefile
Normal file
@ -0,0 +1,59 @@
|
||||
PORTNAME= opencolorio
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 1.1.1
|
||||
CATEGORIES= graphics multimedia
|
||||
PKGNAMESUFFIX= v1
|
||||
|
||||
MAINTAINER?= FreeBSD@Shaneware.biz
|
||||
COMMENT?= Complete color management solution v1
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
|
||||
LIB_DEPENDS= libtinyxml.so:textproc/tinyxml \
|
||||
libyaml-cpp03.so:devel/yaml-cpp03
|
||||
|
||||
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-patch:
|
||||
${REINPLACE_CMD} -e 's|yaml-cpp|&03|' ${WRKSRC}/src/core/OCIOYaml.cpp
|
||||
|
||||
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>
|
3
graphics/opencoloriov1/distinfo
Normal file
3
graphics/opencoloriov1/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1627452433
|
||||
SHA256 (AcademySoftwareFoundation-OpenColorIO-v1.1.1_GH0.tar.gz) = c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8
|
||||
SIZE (AcademySoftwareFoundation-OpenColorIO-v1.1.1_GH0.tar.gz) = 13828483
|
60
graphics/opencoloriov1/files/patch-CMakeLists.txt
Normal file
60
graphics/opencoloriov1/files/patch-CMakeLists.txt
Normal file
@ -0,0 +1,60 @@
|
||||
--- CMakeLists.txt.orig 2021-12-07 15:34:51 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -252,10 +252,10 @@ if(USE_EXTERNAL_YAML)
|
||||
# Set minimum yaml version for non-patched sources.
|
||||
set(YAML_VERSION_MIN "0.3.0")
|
||||
include(FindPkgConfig)
|
||||
- pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp)
|
||||
- find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h
|
||||
+ pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp03)
|
||||
+ find_path(YAML_CPP_INCLUDE_DIR yaml-cpp03/yaml.h
|
||||
HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} )
|
||||
- find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp
|
||||
+ find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp03 libyaml-cpp
|
||||
HINTS ${PC_YAML_CPP_LIBRARY_DIRS} )
|
||||
set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY})
|
||||
set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
|
||||
@@ -531,7 +531,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 share/ocio/)
|
||||
|
||||
###############################################################################
|
||||
### CPACK ###
|
||||
@@ -597,7 +597,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 +607,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 +646,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 .)
|
17
graphics/opencoloriov1/files/patch-docs_CMakeLists.txt
Normal file
17
graphics/opencoloriov1/files/patch-docs_CMakeLists.txt
Normal file
@ -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
|
@ -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
|
@ -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
|
||||
)
|
@ -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
graphics/opencoloriov1/files/patch-src_core_CMakeLists.txt
Normal file
27
graphics/opencoloriov1/files/patch-src_core_CMakeLists.txt
Normal file
@ -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/)
|
11
graphics/opencoloriov1/files/patch-src_core_Config.cpp
Normal file
11
graphics/opencoloriov1/files/patch-src_core_Config.cpp
Normal file
@ -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;
|
||||
}
|
7
graphics/opencoloriov1/pkg-descr
Normal file
7
graphics/opencoloriov1/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
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.
|
||||
|
||||
WWW: http://www.opencolorio.org
|
11
graphics/opencoloriov1/pkg-plist
Normal file
11
graphics/opencoloriov1/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user