From 283abf38366868d5565996223e50fca30774bed7 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 10 Oct 2019 02:24:02 -0700 Subject: [PATCH 01/14] [openimageio]Upgrade version and add features. --- ports/openimageio/CONTROL | 36 +++- ports/openimageio/fix-dependency.patch | 167 ++++++++++++++++++ ports/openimageio/fix_libraw.patch | 35 ---- ports/openimageio/portfile.cmake | 42 ++--- .../openimageio/remove_wrong_dependency.patch | 15 -- .../openimageio/use-vcpkg-find-openexr.patch | 27 --- ports/openimageio/use-webp.patch | 34 ---- 7 files changed, 214 insertions(+), 142 deletions(-) create mode 100644 ports/openimageio/fix-dependency.patch delete mode 100644 ports/openimageio/fix_libraw.patch delete mode 100644 ports/openimageio/remove_wrong_dependency.patch delete mode 100644 ports/openimageio/use-vcpkg-find-openexr.patch delete mode 100644 ports/openimageio/use-webp.patch diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 70b2e528fa8252..c97593e2f21c12 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,5 +1,5 @@ Source: openimageio -Version: 2019-08-08-4 +Version: 2019-10-10-1 Homepage: https://github.com/OpenImageIO/oiio Description: A library for reading and writing images, and a bunch of related classes, utilities, and application Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace @@ -10,4 +10,36 @@ Description: Enable RAW image files support Feature: opencolorio Build-Depends: opencolorio -Description: Enable opencolorio support for openimageio \ No newline at end of file +Description: Enable opencolorio support for openimageio + +Feature: ffmpeg +Build-Depends: ffmpeg +Description: Enable ffmpeg support for openimageio + +Feature: field3d +Build-Depends: field3d +Description: Enable field3D support for openimageio + +Feature: freetype +Build-Depends: freetype +Description: Enable freetype support for openimageio + +Feature: opencv +Build-Depends: opencv +Description: Enable opencv support for openimageio + +Feature: gif +Build-Depends: giflib +Description: Enable giflib support for openimageio + +Feature: openjpeg +Build-Depends: openjpeg +Description: Enable openjpeg support for openimageio + +Feature: ptex +Build-Depends: ptex +Description: Enable ptex support for openimageio + +Feature: webp +Build-Depends: libwebp +Description: Enable libwebp support for openimageio \ No newline at end of file diff --git a/ports/openimageio/fix-dependency.patch b/ports/openimageio/fix-dependency.patch new file mode 100644 index 00000000000000..c5ae8788d5cee5 --- /dev/null +++ b/ports/openimageio/fix-dependency.patch @@ -0,0 +1,167 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8a5f120..37d048c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,6 +53,18 @@ include (compiler) + # Helpful macros for our project + include (oiio_macros) + ++option (USE_FFMPEG "Use ffmpeg if found" ON) ++option (USE_DCMTK "Use DCMTK if found" ON) ++option (USE_FIELD3D "Use Field3D if found" ON) ++option (USE_FREETYPE "Use FreeType if found" ON) ++option (USE_GIF "Use Gif if found" ON) ++option (USE_NUKE "Use Nuke if found" ON) ++option (USE_OPENCV "Use OpenCV if found" ON) ++option (USE_OPENJPEG "Use OpenJPEG if found" ON) ++option (USE_PTEX "Use Ptex if found" ON) ++option (USE_QT "Use QT if found" ON) ++option (USE_WEBP "Use WebP if found" ON) ++ + + option (VERBOSE "Print lots of messages while compiling" OFF) + set (${PROJ_NAME}_NAMESPACE ${PROJECT_NAME} CACHE STRING +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 2410d84..2a8e076 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -182,10 +182,17 @@ oiio_find_package (PNG REQUIRED) + oiio_find_package (TIFF 3.0 REQUIRED) + + # IlmBase & OpenEXR +-oiio_find_package (OpenEXR 2.0 REQUIRED) ++find_package (Threads) ++if (CMAKE_USE_PTHREADS_INIT) ++ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) ++endif () ++find_package (OpenEXR 2.0 REQUIRED) + # We use Imath so commonly, may as well include it everywhere. +-include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" +- "${ILMBASE_INCLUDES}/OpenEXR") ++set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase") ++set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") ++set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) ++set(ILMBASE_FOUND TRUE) ++include_directories ("${OPENEXR_INCLUDE_DIR}") + + # JPEG -- prefer Turbo-JPEG to regular libjpeg + oiio_find_package (JPEGTurbo +@@ -217,41 +224,72 @@ if (NOT BZIP2_FOUND) + set (BZIP2_LIBRARIES "") # TODO: why does it break without this? + endif () + +-oiio_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) ++if (USE_FREETYPE) ++ oiio_find_package (Freetype ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + + oiio_find_package (HDF5 + ISDEPOF Field3D) + oiio_find_package (OpenColorIO + DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) +-oiio_find_package (OpenCV +- DEFINITIONS -DUSE_OPENCV=1) +- ++if (USE_OPENCV) ++ oiio_find_package (OpenCV ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + # Intel TBB + oiio_find_package (TBB 2017 + DEFINITIONS -DUSE_TBB=1 + ISDEPOF OpenVDB) + +-oiio_find_package (DCMTK 3.6.1) # For DICOM images +-oiio_find_package (FFmpeg 2.6) +-oiio_find_package (Field3D +- DEPS HDF5 +- DEFINITIONS -DUSE_FIELD3D=1) +-oiio_find_package (GIF 4) ++if (USE_DCMTK) ++ oiio_find_package (DCMTK 3.6.1) # For DICOM images ++else() ++ set(DCMTK_FOUND OFF) ++endif() ++if (USE_FFMPEG) ++ oiio_find_package (FFmpeg 2.6) ++else() ++ set(FFMPEG_FOUND OFF) ++endif() ++if (USE_FIELD3D) ++ oiio_find_package (Field3D ++ DEPS HDF5 ++ DEFINITIONS -DUSE_FIELD3D=1) ++endif() ++if (USE_GIF) ++ oiio_find_package (GIF 4) ++else() ++ set(GIF_FOUND OFF) ++endif() + oiio_find_package (Libheif 1.3) # For HEIF/HEIC format + oiio_find_package (LibRaw) +-oiio_find_package (OpenJpeg) ++if (USE_OPENJPEG) ++ oiio_find_package (OpenJpeg) ++else() ++ set(OPENJPEG_FOUND OFF) ++endif() + oiio_find_package (OpenVDB 5.0 + DEPS TBB + DEFINITIONS -DUSE_OPENVDB=1) +-oiio_find_package (PTex) +-oiio_find_package (Webp) ++if (USE_PTEX) ++ oiio_find_package (PTex) ++else() ++ set (PTEX_FOUND FALSE) ++endif() ++if (USE_WEBP) ++ oiio_find_package (Webp) ++else() ++ set (WEBP_FOUND FALSE) ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) + oiio_find_package (R3DSDK) # RED camera + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-oiio_find_package (Nuke) ++if (USE_NUKE) ++ oiio_find_package (Nuke) ++endif() + + oiio_find_package (OpenGL) # used for iv + +@@ -260,11 +298,12 @@ set (qt5_modules Core Gui Widgets) + if (OPENGL_FOUND) + list (APPEND qt5_modules OpenGL) + endif () +-option (USE_QT "Use Qt if found" ON) +-oiio_find_package (Qt5 COMPONENTS ${qt5_modules}) +-if (USE_QT AND NOT Qt5_FOUND AND APPLE) +- message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") +- message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") ++if (USE_QT) ++ oiio_find_package (Qt5 COMPONENTS ${qt5_modules}) ++ if (NOT Qt5_FOUND AND APPLE) ++ message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") ++ message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") ++ endif() + endif () + + +diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt +index f629ff9..43c7b85 100644 +--- a/src/raw.imageio/CMakeLists.txt ++++ b/src/raw.imageio/CMakeLists.txt +@@ -1,7 +1,7 @@ + if (LIBRAW_FOUND) + add_oiio_plugin (rawinput.cpp + INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} +- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} ++ LINK_LIBRARIES ${LibRaw_LIBRARIES} + DEFINITIONS "-DUSE_LIBRAW=1") + else () + message (WARNING "Raw plugin will not be built") diff --git a/ports/openimageio/fix_libraw.patch b/ports/openimageio/fix_libraw.patch deleted file mode 100644 index 707530247bf08b..00000000000000 --- a/ports/openimageio/fix_libraw.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 2692bb0..f2709d0 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -380,7 +380,7 @@ if (USE_LIBRAW) - message (STATUS "Looking for LibRaw with ${LIBRAW_PATH}") - endif () - find_package (LibRaw) -- if (LibRaw_r_LIBRARIES AND LibRaw_INCLUDE_DIR) -+ if (LibRaw_LIBRARIES AND LibRaw_INCLUDE_DIR) - set (LIBRAW_FOUND TRUE) - include_directories (${LibRaw_INCLUDE_DIR}) - if (NOT LibRaw_FIND_QUIETLY) -@@ -394,7 +394,7 @@ if (USE_LIBRAW) - if (LINKSTATIC) - find_package (Jasper) - find_library (LCMS2_LIBRARIES NAMES lcms2) -- set (LibRaw_r_LIBRARIES ${LibRaw_r_LIBRARIES} ${JASPER_LIBRARIES} ${LCMS2_LIBRARIES}) -+ set (LibRaw_LIBRARIES ${LibRaw_LIBRARIES} ${JASPER_LIBRARIES} ${LCMS2_LIBRARIES}) - endif () - else () - message (STATUS "Not using LibRaw") -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index e3608a2..f503035 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -1,7 +1,7 @@ - if (USE_LIBRAW AND LIBRAW_FOUND) - add_oiio_plugin (rawinput.cpp - INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -+ LINK_LIBRARIES ${LibRaw_LIBRARIES} - DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index aeccf0bc039188..029373e57abb72 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -3,14 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio - REF ad1ab61a56c63d770e4beb335efe8b1f1a9e36cd - SHA512 48ee7862583e7adb86b56b20634c34aebf83ef0a3a14ad96182494ce6a84cb027334840a6c4c335e9342110c3a36532e3eeae22a3ed7363cd91b27cb7ca58154 + REF 781bc97c35a74cb2e24387075b69414080bca9e1 + SHA512 b75b7c3f36c7ba7daeb014312c3dfaeaae4d24e0826e439bdb19a4879866fb3eb4a09baf4eb8f706e68afcccf9409b6d168ded3dc8d81d0f3299b603958f8953 HEAD_REF master PATCHES - fix_libraw.patch - use-webp.patch - remove_wrong_dependency.patch - use-vcpkg-find-openexr.patch + fix-dependency.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/ext") @@ -20,17 +17,17 @@ file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindOpenEXR.cmake") file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILDSTATIC ON) - set(LINKSTATIC ON) -else() - set(BUILDSTATIC OFF) - set(LINKSTATIC OFF) -endif() - vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS libraw USE_LIBRAW - opencolorio USE_OCIO + opencolorio USE_OCIO + ffmpeg USE_FFMPEG + field3d USE_FIELD3D + freetype USE_FREETYPE + gif USE_GIF + opencv USE_OPENCV + openjpeg USE_OPENJPEG + ptex USE_PTEX + webp USE_WEBP ) vcpkg_configure_cmake( @@ -40,27 +37,14 @@ vcpkg_configure_cmake( -DOIIO_BUILD_TOOLS=OFF -DOIIO_BUILD_TESTS=OFF -DHIDE_SYMBOLS=ON - -DUSE_DICOM=OFF - -DUSE_FFMPEG=OFF - -DUSE_FIELD3D=OFF - -DUSE_FREETYPE=OFF - -DUSE_GIF=OFF + -DUSE_DCMTK=OFF -DUSE_NUKE=OFF - -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=OFF - -DUSE_OPENSSL=OFF - -DUSE_PTEX=OFF -DUSE_PYTHON=OFF -DUSE_QT=OFF - -DUSE_WEBP=OFF - -DBUILDSTATIC=${BUILDSTATIC} -DLINKSTATIC=${LINKSTATIC} -DBUILD_MISSING_PYBIND11=OFF -DBUILD_MISSING_DEPS=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -DVERBOSE=ON - OPTIONS_DEBUG - -DOPENEXR_CUSTOM_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib ) vcpkg_install_cmake() diff --git a/ports/openimageio/remove_wrong_dependency.patch b/ports/openimageio/remove_wrong_dependency.patch deleted file mode 100644 index 5338c6563c9dbe..00000000000000 --- a/ports/openimageio/remove_wrong_dependency.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index 5449675..cdd5235 100644 ---- a/src/libOpenImageIO/CMakeLists.txt -+++ b/src/libOpenImageIO/CMakeLists.txt -@@ -171,10 +171,6 @@ elseif(MINGW) - target_link_libraries (OpenImageIO psapi ws2_32) - endif () - --if (VISIBILITY_MAP_FILE) -- add_dependencies (OpenImageIO "${VISIBILITY_MAP_FILE}") --endif () -- - if (USE_EXTERNAL_PUGIXML) - target_link_libraries (OpenImageIO ${PUGIXML_LIBRARIES}) - endif () diff --git a/ports/openimageio/use-vcpkg-find-openexr.patch b/ports/openimageio/use-vcpkg-find-openexr.patch deleted file mode 100644 index bacc4f686ea25c..00000000000000 --- a/ports/openimageio/use-vcpkg-find-openexr.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 7ebc1cf..a920c72 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -64,12 +64,19 @@ find_package (PNG REQUIRED) - ########################################################################### - # IlmBase & OpenEXR setup - -+find_package (Threads) -+if (CMAKE_USE_PTHREADS_INIT) -+ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) -+endif () -+ - find_package (OpenEXR 2.0 REQUIRED) - #OpenEXR 2.2 still has problems with importing ImathInt64.h unqualified - #thus need for ilmbase/OpenEXR --include_directories ("${OPENEXR_INCLUDE_DIR}" -- "${ILMBASE_INCLUDE_DIR}" -- "${ILMBASE_INCLUDE_DIR}/OpenEXR") -+set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase") -+set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") -+set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) -+set(ILMBASE_FOUND TRUE) -+include_directories ("${OPENEXR_INCLUDE_DIR}") - if (NOT OpenEXR_FIND_QUIETLY) - message (STATUS "OPENEXR_INCLUDE_DIR = ${OPENEXR_INCLUDE_DIR}") - message (STATUS "OPENEXR_LIBRARIES = ${OPENEXR_LIBRARIES}") diff --git a/ports/openimageio/use-webp.patch b/ports/openimageio/use-webp.patch deleted file mode 100644 index ab03b1703721c0..00000000000000 --- a/ports/openimageio/use-webp.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7f43455..393af70 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -96,6 +96,7 @@ option (USE_GIF "Use GIF if found" ON) - option (USE_PTEX "Use PTex if found" ON) - option (USE_WEBP "Use WebP if found" ON) - option (USE_LIBRAW "Use LibRaw if found" ON) -+option (USE_WEBP "Use WebP if found" ON) - set (LIBRAW_PATH "" CACHE STRING "Custom LibRaw path") - option (OIIO_THREAD_ALLOW_DCLP "OIIO threads may use DCLP for speed" ON) - option (USE_NUKE "Build Nuke plugins, if Nuke is found" ON) -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index f2709d0..3a95da6 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -411,6 +411,7 @@ if (USE_WEBP) - if (NOT WEBP_FIND_QUIETLY) - message (STATUS "WEBP_HOME=${WEBP_HOME}") - endif () -+ if(USE_WEBP) - find_path (WEBP_INCLUDE_DIR webp/encode.h - "${PROJECT_SOURCE_DIR}/src/include" - "${WEBP_HOME}") -@@ -427,6 +428,9 @@ if (USE_WEBP) - set (WEBP_FOUND FALSE) - message (STATUS "WebP library not found") - endif() -+ else() -+ set (WEBP_FOUND FALSE) -+ endif() - else () - message (STATUS "Not using WebP") - endif () From bb57bf4977614b9dca21b078bd1141ab15597d2a Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 10 Oct 2019 22:02:42 -0700 Subject: [PATCH 02/14] [openimageio]Add definitions. --- ports/openimageio/fix-dependency.patch | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ports/openimageio/fix-dependency.patch b/ports/openimageio/fix-dependency.patch index c5ae8788d5cee5..2a73aeaa03b7d3 100644 --- a/ports/openimageio/fix-dependency.patch +++ b/ports/openimageio/fix-dependency.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8a5f120..37d048c 100644 +index 8a5f120..6789963 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -53,6 +53,18 @@ include (compiler) +@@ -53,6 +53,17 @@ include (compiler) # Helpful macros for our project include (oiio_macros) @@ -17,10 +17,20 @@ index 8a5f120..37d048c 100644 +option (USE_PTEX "Use Ptex if found" ON) +option (USE_QT "Use QT if found" ON) +option (USE_WEBP "Use WebP if found" ON) -+ option (VERBOSE "Print lots of messages while compiling" OFF) set (${PROJ_NAME}_NAMESPACE ${PROJECT_NAME} CACHE STRING +@@ -86,6 +97,10 @@ set (CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library naming postfix for Debug build + + set(OIIO_TESTSUITE_IMAGEDIR "${PROJECT_SOURCE_DIR}/.." CACHE PATH + "Location of oiio-images, openexr-images, libtiffpic, etc.." ) ++ ++if (BUILD_SHARED_LIBS) ++ add_definitions (-DOpenImageIO_EXPORTS=1 -DOpenImageIO_Util_EXPORTS=1) ++endif() + + if (NOT OIIO_THREAD_ALLOW_DCLP) + add_definitions ("-DOIIO_THREAD_ALLOW_DCLP=0") diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake index 2410d84..2a8e076 100644 --- a/src/cmake/externalpackages.cmake From 23c806dc2502a9e6280a40286e13f8e5ec2319e3 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 29 Oct 2019 20:00:28 -0700 Subject: [PATCH 03/14] [openimageio]Remove vcpkg_common_functions --- ports/openimageio/portfile.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 029373e57abb72..a9cfbc455cd728 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio @@ -61,5 +59,4 @@ file(COPY ${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake DESTINATION ${C file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/openimageio) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openimageio/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/openimageio/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} copyright) From 0fba1ab2bc4ecb53218f91bc03e0621ca0451d07 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 24 Dec 2019 21:42:31 -0800 Subject: [PATCH 04/14] [openimageio] update to 2.1.9.0 and fix static build. --- ports/openimageio/CONTROL | 2 +- ports/openimageio/fix-dependency.patch | 177 ------------------ ports/openimageio/fix_libraw.patch | 13 ++ ports/openimageio/fix_static_build.patch | 13 ++ ports/openimageio/portfile.cmake | 16 +- .../openimageio/use-vcpkg-find-openexr.patch | 24 +++ 6 files changed, 63 insertions(+), 182 deletions(-) delete mode 100644 ports/openimageio/fix-dependency.patch create mode 100644 ports/openimageio/fix_libraw.patch create mode 100644 ports/openimageio/fix_static_build.patch create mode 100644 ports/openimageio/use-vcpkg-find-openexr.patch diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index c97593e2f21c12..f6da6cd9b4c607 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,5 +1,5 @@ Source: openimageio -Version: 2019-10-10-1 +Version: 2.1.9.0 Homepage: https://github.com/OpenImageIO/oiio Description: A library for reading and writing images, and a bunch of related classes, utilities, and application Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace diff --git a/ports/openimageio/fix-dependency.patch b/ports/openimageio/fix-dependency.patch deleted file mode 100644 index 2a73aeaa03b7d3..00000000000000 --- a/ports/openimageio/fix-dependency.patch +++ /dev/null @@ -1,177 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8a5f120..6789963 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,6 +53,17 @@ include (compiler) - # Helpful macros for our project - include (oiio_macros) - -+option (USE_FFMPEG "Use ffmpeg if found" ON) -+option (USE_DCMTK "Use DCMTK if found" ON) -+option (USE_FIELD3D "Use Field3D if found" ON) -+option (USE_FREETYPE "Use FreeType if found" ON) -+option (USE_GIF "Use Gif if found" ON) -+option (USE_NUKE "Use Nuke if found" ON) -+option (USE_OPENCV "Use OpenCV if found" ON) -+option (USE_OPENJPEG "Use OpenJPEG if found" ON) -+option (USE_PTEX "Use Ptex if found" ON) -+option (USE_QT "Use QT if found" ON) -+option (USE_WEBP "Use WebP if found" ON) - - option (VERBOSE "Print lots of messages while compiling" OFF) - set (${PROJ_NAME}_NAMESPACE ${PROJECT_NAME} CACHE STRING -@@ -86,6 +97,10 @@ set (CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library naming postfix for Debug build - - set(OIIO_TESTSUITE_IMAGEDIR "${PROJECT_SOURCE_DIR}/.." CACHE PATH - "Location of oiio-images, openexr-images, libtiffpic, etc.." ) -+ -+if (BUILD_SHARED_LIBS) -+ add_definitions (-DOpenImageIO_EXPORTS=1 -DOpenImageIO_Util_EXPORTS=1) -+endif() - - if (NOT OIIO_THREAD_ALLOW_DCLP) - add_definitions ("-DOIIO_THREAD_ALLOW_DCLP=0") -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 2410d84..2a8e076 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -182,10 +182,17 @@ oiio_find_package (PNG REQUIRED) - oiio_find_package (TIFF 3.0 REQUIRED) - - # IlmBase & OpenEXR --oiio_find_package (OpenEXR 2.0 REQUIRED) -+find_package (Threads) -+if (CMAKE_USE_PTHREADS_INIT) -+ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) -+endif () -+find_package (OpenEXR 2.0 REQUIRED) - # We use Imath so commonly, may as well include it everywhere. --include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" -- "${ILMBASE_INCLUDES}/OpenEXR") -+set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase") -+set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") -+set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) -+set(ILMBASE_FOUND TRUE) -+include_directories ("${OPENEXR_INCLUDE_DIR}") - - # JPEG -- prefer Turbo-JPEG to regular libjpeg - oiio_find_package (JPEGTurbo -@@ -217,41 +224,72 @@ if (NOT BZIP2_FOUND) - set (BZIP2_LIBRARIES "") # TODO: why does it break without this? - endif () - --oiio_find_package (Freetype -- DEFINITIONS -DUSE_FREETYPE=1 ) -+if (USE_FREETYPE) -+ oiio_find_package (Freetype -+ DEFINITIONS -DUSE_FREETYPE=1 ) -+endif() - - oiio_find_package (HDF5 - ISDEPOF Field3D) - oiio_find_package (OpenColorIO - DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) --oiio_find_package (OpenCV -- DEFINITIONS -DUSE_OPENCV=1) -- -+if (USE_OPENCV) -+ oiio_find_package (OpenCV -+ DEFINITIONS -DUSE_OPENCV=1) -+endif() - # Intel TBB - oiio_find_package (TBB 2017 - DEFINITIONS -DUSE_TBB=1 - ISDEPOF OpenVDB) - --oiio_find_package (DCMTK 3.6.1) # For DICOM images --oiio_find_package (FFmpeg 2.6) --oiio_find_package (Field3D -- DEPS HDF5 -- DEFINITIONS -DUSE_FIELD3D=1) --oiio_find_package (GIF 4) -+if (USE_DCMTK) -+ oiio_find_package (DCMTK 3.6.1) # For DICOM images -+else() -+ set(DCMTK_FOUND OFF) -+endif() -+if (USE_FFMPEG) -+ oiio_find_package (FFmpeg 2.6) -+else() -+ set(FFMPEG_FOUND OFF) -+endif() -+if (USE_FIELD3D) -+ oiio_find_package (Field3D -+ DEPS HDF5 -+ DEFINITIONS -DUSE_FIELD3D=1) -+endif() -+if (USE_GIF) -+ oiio_find_package (GIF 4) -+else() -+ set(GIF_FOUND OFF) -+endif() - oiio_find_package (Libheif 1.3) # For HEIF/HEIC format - oiio_find_package (LibRaw) --oiio_find_package (OpenJpeg) -+if (USE_OPENJPEG) -+ oiio_find_package (OpenJpeg) -+else() -+ set(OPENJPEG_FOUND OFF) -+endif() - oiio_find_package (OpenVDB 5.0 - DEPS TBB - DEFINITIONS -DUSE_OPENVDB=1) --oiio_find_package (PTex) --oiio_find_package (Webp) -+if (USE_PTEX) -+ oiio_find_package (PTex) -+else() -+ set (PTEX_FOUND FALSE) -+endif() -+if (USE_WEBP) -+ oiio_find_package (Webp) -+else() -+ set (WEBP_FOUND FALSE) -+endif() - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) - oiio_find_package (R3DSDK) # RED camera - - set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") --oiio_find_package (Nuke) -+if (USE_NUKE) -+ oiio_find_package (Nuke) -+endif() - - oiio_find_package (OpenGL) # used for iv - -@@ -260,11 +298,12 @@ set (qt5_modules Core Gui Widgets) - if (OPENGL_FOUND) - list (APPEND qt5_modules OpenGL) - endif () --option (USE_QT "Use Qt if found" ON) --oiio_find_package (Qt5 COMPONENTS ${qt5_modules}) --if (USE_QT AND NOT Qt5_FOUND AND APPLE) -- message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") -- message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") -+if (USE_QT) -+ oiio_find_package (Qt5 COMPONENTS ${qt5_modules}) -+ if (NOT Qt5_FOUND AND APPLE) -+ message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") -+ message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") -+ endif() - endif () - - -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index f629ff9..43c7b85 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -1,7 +1,7 @@ - if (LIBRAW_FOUND) - add_oiio_plugin (rawinput.cpp - INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -+ LINK_LIBRARIES ${LibRaw_LIBRARIES} - DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") diff --git a/ports/openimageio/fix_libraw.patch b/ports/openimageio/fix_libraw.patch new file mode 100644 index 00000000000000..32e974fcba2796 --- /dev/null +++ b/ports/openimageio/fix_libraw.patch @@ -0,0 +1,13 @@ +diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt +index 81a0ff5..23326a0 100644 +--- a/src/raw.imageio/CMakeLists.txt ++++ b/src/raw.imageio/CMakeLists.txt +@@ -5,7 +5,7 @@ + if (LIBRAW_FOUND) + add_oiio_plugin (rawinput.cpp + INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} +- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} ++ LINK_LIBRARIES ${LibRaw_LIBRARIES} + DEFINITIONS "-DUSE_LIBRAW=1") + else () + message (WARNING "Raw plugin will not be built") diff --git a/ports/openimageio/fix_static_build.patch b/ports/openimageio/fix_static_build.patch new file mode 100644 index 00000000000000..14b912b9ab7f78 --- /dev/null +++ b/ports/openimageio/fix_static_build.patch @@ -0,0 +1,13 @@ +diff --git a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake +index 4f4f31c..a18895e 100644 +--- a/src/cmake/compiler.cmake ++++ b/src/cmake/compiler.cmake +@@ -451,7 +451,7 @@ set (EXTRA_DSO_LINK_ARGS "" CACHE STRING "Extra command line definitions when bu + # + option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON) + if (NOT BUILD_SHARED_LIBS) +- add_definitions (-D${PROJECT_NAME}_STATIC_DEFINE=1) ++ add_definitions (-D${PROJECT_NAME}_STATIC_DEFINE=1 -DOIIO_STATIC_DEFINE=1) + endif () + + diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index a9cfbc455cd728..c94bb423eb533a 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -1,11 +1,13 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio - REF 781bc97c35a74cb2e24387075b69414080bca9e1 - SHA512 b75b7c3f36c7ba7daeb014312c3dfaeaae4d24e0826e439bdb19a4879866fb3eb4a09baf4eb8f706e68afcccf9409b6d168ded3dc8d81d0f3299b603958f8953 + REF fdd982a9922ff508b8b22e5d024356b582572f46 #2.1.9.0 + SHA512 1d076cb035b1b2cb603343465ed810ca47223211870d58f48c177d40d71a9cf82e53548b0c70127daf5dbd06f1b24772919e49e55110d914a542bcb62b99f6e8 HEAD_REF master PATCHES - fix-dependency.patch + fix_libraw.patch + use-vcpkg-find-openexr.patch + fix_static_build.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/ext") @@ -15,6 +17,12 @@ file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindOpenEXR.cmake") file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(LINKSTATIC ON) +else() + set(LINKSTATIC OFF) +endif() + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS libraw USE_LIBRAW opencolorio USE_OCIO @@ -59,4 +67,4 @@ file(COPY ${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake DESTINATION ${C file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openimageio/use-vcpkg-find-openexr.patch b/ports/openimageio/use-vcpkg-find-openexr.patch new file mode 100644 index 00000000000000..507e7db84526b7 --- /dev/null +++ b/ports/openimageio/use-vcpkg-find-openexr.patch @@ -0,0 +1,24 @@ +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 2f4f7ce..eb40d91 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) + checked_find_package (TIFF 3.0 REQUIRED) + + # IlmBase & OpenEXR ++find_package (Threads) ++if (CMAKE_USE_PTHREADS_INIT) ++ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) ++endif () + checked_find_package (OpenEXR 2.0 REQUIRED) + # We use Imath so commonly, may as well include it everywhere. +-include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" +- "${ILMBASE_INCLUDES}/OpenEXR") ++set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase") ++set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") ++set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) ++set(ILMBASE_FOUND TRUE) ++include_directories ("${OPENEXR_INCLUDE_DIR}") + if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) + # clang C++ >= 11 doesn't like 'register' keyword in old exr headers + add_compile_options (-Wno-deprecated-register) From c66716353cac6d568f9bbb4cd8b6baf86f0f4f07 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 24 Dec 2019 21:53:30 -0800 Subject: [PATCH 05/14] [openimageio] Fix generated cmake files. --- ports/openimageio/portfile.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index c94bb423eb533a..08ed70b363a98e 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -57,11 +57,13 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenImageIO) + # Clean -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc + ${CURRENT_PACKAGES_DIR}/debug/doc + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) file(COPY ${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) From 88727b4d8aa6acfd710b48941a8b940de141dc96 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 25 Dec 2019 20:06:42 -0800 Subject: [PATCH 06/14] [openimageio] Remove feature ptex due to some link error. Fix dependencies opencv and webp. Merge fix dependency patches. --- ports/openimageio/CONTROL | 4 -- ports/openimageio/fix-dependency.patch | 61 +++++++++++++++++++ ports/openimageio/fix_libraw.patch | 13 ---- ports/openimageio/fix_static_build.patch | 2 +- ports/openimageio/portfile.cmake | 11 ++-- .../openimageio/use-vcpkg-find-openexr.patch | 24 -------- 6 files changed, 68 insertions(+), 47 deletions(-) create mode 100644 ports/openimageio/fix-dependency.patch delete mode 100644 ports/openimageio/fix_libraw.patch delete mode 100644 ports/openimageio/use-vcpkg-find-openexr.patch diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index f6da6cd9b4c607..04e78b8c74abee 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -36,10 +36,6 @@ Feature: openjpeg Build-Depends: openjpeg Description: Enable openjpeg support for openimageio -Feature: ptex -Build-Depends: ptex -Description: Enable ptex support for openimageio - Feature: webp Build-Depends: libwebp Description: Enable libwebp support for openimageio \ No newline at end of file diff --git a/ports/openimageio/fix-dependency.patch b/ports/openimageio/fix-dependency.patch new file mode 100644 index 00000000000000..a0bac908b7da05 --- /dev/null +++ b/ports/openimageio/fix-dependency.patch @@ -0,0 +1,61 @@ +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 2f4f7ce..4c49082 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) + checked_find_package (TIFF 3.0 REQUIRED) + + # IlmBase & OpenEXR ++find_package (Threads) ++if (CMAKE_USE_PTHREADS_INIT) ++ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) ++endif () + checked_find_package (OpenEXR 2.0 REQUIRED) + # We use Imath so commonly, may as well include it everywhere. +-include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" +- "${ILMBASE_INCLUDES}/OpenEXR") ++set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase") ++set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") ++set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) ++set(ILMBASE_FOUND TRUE) ++include_directories ("${OPENEXR_INCLUDE_DIR}") + if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) + # clang C++ >= 11 doesn't like 'register' keyword in old exr headers + add_compile_options (-Wno-deprecated-register) +@@ -217,7 +224,7 @@ checked_find_package (HDF5 + ISDEPOF Field3D) + checked_find_package (OpenColorIO + DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) +-checked_find_package (OpenCV ++checked_find_package (OpenCV CONFIG + DEFINITIONS -DUSE_OPENCV=1) + + # Intel TBB +@@ -237,8 +244,12 @@ checked_find_package (OpenJpeg) + checked_find_package (OpenVDB 5.0 + DEPS TBB + DEFINITIONS -DUSE_OPENVDB=1) +-checked_find_package (PTex) +-checked_find_package (Webp) ++checked_find_package (ptex CONFIG) ++set(PTEX_FOUND ${ptex_FOUND}) ++set(PTEX_LIBRARIES Ptex::Ptex) ++checked_find_package (Webp CONFIG) ++set(WEBP_FOUND ${Webp_FOUND}) ++set(WEBP_LIBRARY WebP::webp WebP::webpdemux WebP::webpdecoder) + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) + checked_find_package (R3DSDK) # RED camera +diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt +index 81a0ff5..23326a0 100644 +--- a/src/raw.imageio/CMakeLists.txt ++++ b/src/raw.imageio/CMakeLists.txt +@@ -5,7 +5,7 @@ + if (LIBRAW_FOUND) + add_oiio_plugin (rawinput.cpp + INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} +- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} ++ LINK_LIBRARIES ${LibRaw_LIBRARIES} + DEFINITIONS "-DUSE_LIBRAW=1") + else () + message (WARNING "Raw plugin will not be built") diff --git a/ports/openimageio/fix_libraw.patch b/ports/openimageio/fix_libraw.patch deleted file mode 100644 index 32e974fcba2796..00000000000000 --- a/ports/openimageio/fix_libraw.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index 81a0ff5..23326a0 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -5,7 +5,7 @@ - if (LIBRAW_FOUND) - add_oiio_plugin (rawinput.cpp - INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -+ LINK_LIBRARIES ${LibRaw_LIBRARIES} - DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") diff --git a/ports/openimageio/fix_static_build.patch b/ports/openimageio/fix_static_build.patch index 14b912b9ab7f78..825026dc8bf604 100644 --- a/ports/openimageio/fix_static_build.patch +++ b/ports/openimageio/fix_static_build.patch @@ -7,7 +7,7 @@ index 4f4f31c..a18895e 100644 option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON) if (NOT BUILD_SHARED_LIBS) - add_definitions (-D${PROJECT_NAME}_STATIC_DEFINE=1) -+ add_definitions (-D${PROJECT_NAME}_STATIC_DEFINE=1 -DOIIO_STATIC_DEFINE=1) ++ add_definitions (-DOIIO_STATIC_DEFINE=1) endif () diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 08ed70b363a98e..9aef62de42c3e5 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -5,15 +5,16 @@ vcpkg_from_github( SHA512 1d076cb035b1b2cb603343465ed810ca47223211870d58f48c177d40d71a9cf82e53548b0c70127daf5dbd06f1b24772919e49e55110d914a542bcb62b99f6e8 HEAD_REF master PATCHES - fix_libraw.patch - use-vcpkg-find-openexr.patch + fix-dependency.patch fix_static_build.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/ext") -file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindLibRaw.cmake") -file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindOpenEXR.cmake") +file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindLibRaw.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindOpenEXR.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindOpenCV.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindWebp.cmake") file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") @@ -32,7 +33,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS gif USE_GIF opencv USE_OPENCV openjpeg USE_OPENJPEG - ptex USE_PTEX webp USE_WEBP ) @@ -47,6 +47,7 @@ vcpkg_configure_cmake( -DUSE_NUKE=OFF -DUSE_PYTHON=OFF -DUSE_QT=OFF + -DUSE_PTEX=OFF -DLINKSTATIC=${LINKSTATIC} -DBUILD_MISSING_PYBIND11=OFF -DBUILD_MISSING_DEPS=OFF diff --git a/ports/openimageio/use-vcpkg-find-openexr.patch b/ports/openimageio/use-vcpkg-find-openexr.patch deleted file mode 100644 index 507e7db84526b7..00000000000000 --- a/ports/openimageio/use-vcpkg-find-openexr.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 2f4f7ce..eb40d91 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) - checked_find_package (TIFF 3.0 REQUIRED) - - # IlmBase & OpenEXR -+find_package (Threads) -+if (CMAKE_USE_PTHREADS_INIT) -+ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) -+endif () - checked_find_package (OpenEXR 2.0 REQUIRED) - # We use Imath so commonly, may as well include it everywhere. --include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" -- "${ILMBASE_INCLUDES}/OpenEXR") -+set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase") -+set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") -+set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) -+set(ILMBASE_FOUND TRUE) -+include_directories ("${OPENEXR_INCLUDE_DIR}") - if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) - # clang C++ >= 11 doesn't like 'register' keyword in old exr headers - add_compile_options (-Wno-deprecated-register) From 9d0fc9a47c82533a51f658b16d70ff685a974343 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 26 Dec 2019 22:28:50 -0800 Subject: [PATCH 07/14] [openimageio] Add feature tools --- ports/openimageio/CONTROL | 5 ++++- ports/openimageio/fix-dependency.patch | 12 +++++++++++- ports/openimageio/fix-tools-path.patch | 13 +++++++++++++ ports/openimageio/portfile.cmake | 3 ++- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 ports/openimageio/fix-tools-path.patch diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 04e78b8c74abee..b77d11a89f8694 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -38,4 +38,7 @@ Description: Enable openjpeg support for openimageio Feature: webp Build-Depends: libwebp -Description: Enable libwebp support for openimageio \ No newline at end of file +Description: Enable libwebp support for openimageio + +Feature: tools +Description: Build openimageio tools \ No newline at end of file diff --git a/ports/openimageio/fix-dependency.patch b/ports/openimageio/fix-dependency.patch index a0bac908b7da05..abbc89114c7244 100644 --- a/ports/openimageio/fix-dependency.patch +++ b/ports/openimageio/fix-dependency.patch @@ -1,5 +1,5 @@ diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 2f4f7ce..4c49082 100644 +index 2f4f7ce..6419c79 100644 --- a/src/cmake/externalpackages.cmake +++ b/src/cmake/externalpackages.cmake @@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) @@ -46,6 +46,16 @@ index 2f4f7ce..4c49082 100644 option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) checked_find_package (R3DSDK) # RED camera +@@ -254,7 +265,9 @@ if (OPENGL_FOUND) + list (APPEND qt5_modules OpenGL) + endif () + option (USE_QT "Use Qt if found" ON) ++if (USE_QT) + checked_find_package (Qt5 COMPONENTS ${qt5_modules}) ++endif() + if (USE_QT AND NOT Qt5_FOUND AND APPLE) + message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") + message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt index 81a0ff5..23326a0 100644 --- a/src/raw.imageio/CMakeLists.txt diff --git a/ports/openimageio/fix-tools-path.patch b/ports/openimageio/fix-tools-path.patch new file mode 100644 index 00000000000000..07e02fddf8e6fe --- /dev/null +++ b/ports/openimageio/fix-tools-path.patch @@ -0,0 +1,13 @@ +diff --git a/src/cmake/oiio_macros.cmake b/src/cmake/oiio_macros.cmake +index 9e54f67..d9c9437 100644 +--- a/src/cmake/oiio_macros.cmake ++++ b/src/cmake/oiio_macros.cmake +@@ -142,7 +142,7 @@ macro (fancy_add_executable) + target_link_libraries (${_target_NAME} PRIVATE ${_target_LINK_LIBRARIES}) + endif () + set_target_properties (${_target_NAME} PROPERTIES FOLDER "Tools") +- install_targets (${_target_NAME}) ++ install(TARGETS ${_target_NAME} RUNTIME DESTINATION tools) + else () + message (STATUS "${ColorRed}Disabling ${_target_NAME} ${ColorReset}") + endif () diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 9aef62de42c3e5..cd4c65fd80fe4c 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES fix-dependency.patch fix_static_build.patch + fix-tools-path.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/ext") @@ -34,13 +35,13 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS opencv USE_OPENCV openjpeg USE_OPENJPEG webp USE_WEBP + tools OIIO_BUILD_TOOLS ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS ${FEATURE_OPTIONS} - -DOIIO_BUILD_TOOLS=OFF -DOIIO_BUILD_TESTS=OFF -DHIDE_SYMBOLS=ON -DUSE_DCMTK=OFF From 7400c26160e795f48a45c17a6c5db38c1b2fe59d Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Sun, 29 Dec 2019 19:17:08 -0800 Subject: [PATCH 08/14] [openimageio] Fix openimageio targets.cmake name --- ports/openimageio/fix-config-cmake.patch | 12 ++++++++++++ ports/openimageio/portfile.cmake | 1 + 2 files changed, 13 insertions(+) create mode 100644 ports/openimageio/fix-config-cmake.patch diff --git a/ports/openimageio/fix-config-cmake.patch b/ports/openimageio/fix-config-cmake.patch new file mode 100644 index 00000000000000..f61afccbd8ba6b --- /dev/null +++ b/ports/openimageio/fix-config-cmake.patch @@ -0,0 +1,12 @@ +diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in +index c6e1a13..3d784f3 100644 +--- a/src/cmake/Config.cmake.in ++++ b/src/cmake/Config.cmake.in +@@ -6,5 +6,5 @@ include(CMakeFindDependencyMacro) + # e.g. if switching to Boost::Boost instead of using ${Boost_LIBRARY_DIRS} the add: + # find_dependency(Boost @Boost_VERSION@) + +-include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/OpenImageIOTargets.cmake") + check_required_components("@PROJECT_NAME@") +\ No newline at end of file diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index cd4c65fd80fe4c..3a9a84d5b36246 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( fix-dependency.patch fix_static_build.patch fix-tools-path.patch + fix-config-cmake.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/ext") From 8eda8b27f5f609c97ea46f4c79d9dd12cf9cc9b6 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 1 Jan 2020 20:53:40 -0800 Subject: [PATCH 09/14] [openimageio] Fix find openjpeg --- ports/openimageio/fix-dependency.patch | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/ports/openimageio/fix-dependency.patch b/ports/openimageio/fix-dependency.patch index abbc89114c7244..c4df2184e60a24 100644 --- a/ports/openimageio/fix-dependency.patch +++ b/ports/openimageio/fix-dependency.patch @@ -1,5 +1,5 @@ diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 2f4f7ce..6419c79 100644 +index 2f4f7ce..7275804 100644 --- a/src/cmake/externalpackages.cmake +++ b/src/cmake/externalpackages.cmake @@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) @@ -31,7 +31,12 @@ index 2f4f7ce..6419c79 100644 DEFINITIONS -DUSE_OPENCV=1) # Intel TBB -@@ -237,8 +244,12 @@ checked_find_package (OpenJpeg) +@@ -233,12 +240,16 @@ checked_find_package (Field3D + checked_find_package (GIF 4) + checked_find_package (Libheif 1.3) # For HEIF/HEIC format + checked_find_package (LibRaw) +-checked_find_package (OpenJpeg) ++checked_find_package (OpenJPEG CONFIG) checked_find_package (OpenVDB 5.0 DEPS TBB DEFINITIONS -DUSE_OPENVDB=1) @@ -56,6 +61,19 @@ index 2f4f7ce..6419c79 100644 if (USE_QT AND NOT Qt5_FOUND AND APPLE) message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") +diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt +index 7bc6adb..0ac8937 100644 +--- a/src/jpeg2000.imageio/CMakeLists.txt ++++ b/src/jpeg2000.imageio/CMakeLists.txt +@@ -3,7 +3,7 @@ + # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md + + if (OPENJPEG_FOUND) +- if (${OPENJPEG_VERSION} VERSION_LESS 2.0) ++ if (0) + # Old OpenJpeg 1.5. Remove this eventually. + # + # For reasons I don't understand, OpenJPEG 1.5 fails imageinout_test diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt index 81a0ff5..23326a0 100644 --- a/src/raw.imageio/CMakeLists.txt From 7f04a8bb634253c6924b79f08c0177b60e7fb3db Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Sun, 5 Jan 2020 21:50:57 -0800 Subject: [PATCH 10/14] [openimageio] Add dependency pybind11 --- ports/openimageio/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index b77d11a89f8694..bd50a3dc98aabf 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -2,7 +2,7 @@ Source: openimageio Version: 2.1.9.0 Homepage: https://github.com/OpenImageIO/oiio Description: A library for reading and writing images, and a bunch of related classes, utilities, and application -Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace +Build-Depends: libjpeg-turbo, tiff, libpng, openexr, pybind11, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace Feature: libraw Build-Depends: libraw From 8fd3e75c01d01c31b989f36173cd035508e09bee Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 7 Jan 2020 01:01:45 -0800 Subject: [PATCH 11/14] [openimageio] Fix find dependency ffmpeg[avresample] --- ports/openimageio/CONTROL | 2 +- ports/openimageio/fix-dependency.patch | 12 ++++++++++-- ports/openimageio/portfile.cmake | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index bd50a3dc98aabf..2f357834dc176c 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -13,7 +13,7 @@ Build-Depends: opencolorio Description: Enable opencolorio support for openimageio Feature: ffmpeg -Build-Depends: ffmpeg +Build-Depends: ffmpeg[avresample] Description: Enable ffmpeg support for openimageio Feature: field3d diff --git a/ports/openimageio/fix-dependency.patch b/ports/openimageio/fix-dependency.patch index c4df2184e60a24..3dc3a16d01d625 100644 --- a/ports/openimageio/fix-dependency.patch +++ b/ports/openimageio/fix-dependency.patch @@ -1,5 +1,5 @@ diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 2f4f7ce..7275804 100644 +index 2f4f7ce..16035df 100644 --- a/src/cmake/externalpackages.cmake +++ b/src/cmake/externalpackages.cmake @@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) @@ -31,7 +31,15 @@ index 2f4f7ce..7275804 100644 DEFINITIONS -DUSE_OPENCV=1) # Intel TBB -@@ -233,12 +240,16 @@ checked_find_package (Field3D +@@ -226,19 +233,23 @@ checked_find_package (TBB 2017 + ISDEPOF OpenVDB) + + checked_find_package (DCMTK 3.6.1) # For DICOM images +-checked_find_package (FFmpeg 2.6) ++checked_find_package (FFMPEG) + checked_find_package (Field3D + DEPS HDF5 + DEFINITIONS -DUSE_FIELD3D=1) checked_find_package (GIF 4) checked_find_package (Libheif 1.3) # For HEIF/HEIC format checked_find_package (LibRaw) diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 3a9a84d5b36246..c0e58b20a33395 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -16,6 +16,7 @@ file(REMOVE_RECURSE "${SOURCE_PATH}/ext") file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindLibRaw.cmake" "${SOURCE_PATH}/src/cmake/modules/FindOpenEXR.cmake" "${SOURCE_PATH}/src/cmake/modules/FindOpenCV.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindFFmpeg.cmake" "${SOURCE_PATH}/src/cmake/modules/FindWebp.cmake") file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") From 22419c5ed1b7843b2c1653112dc7fde7eefbc701 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Sun, 12 Jan 2020 20:39:49 -0800 Subject: [PATCH 12/14] [openimageio] Add feature python --- ports/openimageio/CONTROL | 6 +++++- ports/openimageio/portfile.cmake | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 2f357834dc176c..9cec72c8c04cce 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -2,7 +2,7 @@ Source: openimageio Version: 2.1.9.0 Homepage: https://github.com/OpenImageIO/oiio Description: A library for reading and writing images, and a bunch of related classes, utilities, and application -Build-Depends: libjpeg-turbo, tiff, libpng, openexr, pybind11, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace +Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace Feature: libraw Build-Depends: libraw @@ -40,5 +40,9 @@ Feature: webp Build-Depends: libwebp Description: Enable libwebp support for openimageio +Feature: python +Build-Depends: pybind11 +Description: Enable libwebp support for openimageio + Feature: tools Description: Build openimageio tools \ No newline at end of file diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index c0e58b20a33395..43ee950c21b3d1 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -37,9 +37,14 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS opencv USE_OPENCV openjpeg USE_OPENJPEG webp USE_WEBP + python USE_PYTHON tools OIIO_BUILD_TOOLS ) +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -48,7 +53,6 @@ vcpkg_configure_cmake( -DHIDE_SYMBOLS=ON -DUSE_DCMTK=OFF -DUSE_NUKE=OFF - -DUSE_PYTHON=OFF -DUSE_QT=OFF -DUSE_PTEX=OFF -DLINKSTATIC=${LINKSTATIC} From 2ae9ee4955dd8092fef118fdabefc255b1154366 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Sun, 12 Jan 2020 20:43:01 -0800 Subject: [PATCH 13/14] [openimageio] Fix instructions for python --- ports/openimageio/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 9cec72c8c04cce..d4cb9eff84775e 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -42,7 +42,7 @@ Description: Enable libwebp support for openimageio Feature: python Build-Depends: pybind11 -Description: Enable libwebp support for openimageio +Description: Enable pybind11 support for openimageio Feature: tools Description: Build openimageio tools \ No newline at end of file From e97271e2e8e5ae2265d05c82a439e3eb88f6e448 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Sun, 19 Jan 2020 21:40:24 -0800 Subject: [PATCH 14/14] [openimageio] Change feature name python to pybind11, add vcpkg_copy_tool_dependencies --- ports/openimageio/CONTROL | 4 ++-- ports/openimageio/fix-tools-path.patch | 2 +- ports/openimageio/portfile.cmake | 24 ++++++++++++++---------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index d4cb9eff84775e..728f22a6ba5fe1 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -40,9 +40,9 @@ Feature: webp Build-Depends: libwebp Description: Enable libwebp support for openimageio -Feature: python +Feature: pybind11 Build-Depends: pybind11 -Description: Enable pybind11 support for openimageio +Description: Enable Python bindings support for openimageio Feature: tools Description: Build openimageio tools \ No newline at end of file diff --git a/ports/openimageio/fix-tools-path.patch b/ports/openimageio/fix-tools-path.patch index 07e02fddf8e6fe..b7bf3753bd10f7 100644 --- a/ports/openimageio/fix-tools-path.patch +++ b/ports/openimageio/fix-tools-path.patch @@ -7,7 +7,7 @@ index 9e54f67..d9c9437 100644 endif () set_target_properties (${_target_NAME} PROPERTIES FOLDER "Tools") - install_targets (${_target_NAME}) -+ install(TARGETS ${_target_NAME} RUNTIME DESTINATION tools) ++ install(TARGETS ${_target_NAME} RUNTIME DESTINATION tools/openimageio) else () message (STATUS "${ColorRed}Disabling ${_target_NAME} ${ColorReset}") endif () diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 43ee950c21b3d1..7e6a6aae30fd61 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -28,17 +28,17 @@ else() endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - libraw USE_LIBRAW + libraw USE_LIBRAW opencolorio USE_OCIO - ffmpeg USE_FFMPEG - field3d USE_FIELD3D - freetype USE_FREETYPE - gif USE_GIF - opencv USE_OPENCV - openjpeg USE_OPENJPEG - webp USE_WEBP - python USE_PYTHON - tools OIIO_BUILD_TOOLS + ffmpeg USE_FFMPEG + field3d USE_FIELD3D + freetype USE_FREETYPE + gif USE_GIF + opencv USE_OPENCV + openjpeg USE_OPENJPEG + webp USE_WEBP + pybind11 USE_PYTHON + tools OIIO_BUILD_TOOLS ) vcpkg_find_acquire_program(PYTHON3) @@ -67,6 +67,10 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenImageIO) +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openimageio) +endif() + # Clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/debug/doc