From e80548e13df8353ff4b856fc1b1689901774846c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 20 Oct 2018 12:37:47 -0700 Subject: [PATCH] [openimageio] Improve robustness --- ports/openimageio/CONTROL | 2 +- ports/openimageio/portfile.cmake | 9 ++++++++- ports/openimageio/use-webp.patch | 34 ++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 ports/openimageio/use-webp.patch diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 8771fe077..6f3687ca6 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,5 +1,5 @@ Source: openimageio -Version: 1.8.15 +Version: 1.8.15-1 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 diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 80dc8faec..7997a6105 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -9,7 +9,8 @@ vcpkg_from_github( PATCHES # fix_libraw: replace 'LibRaw_r_LIBRARIES' occurences by 'LibRaw_LIBRARIES' # since libraw port installs 'raw_r' library as 'raw' - ${CMAKE_CURRENT_LIST_DIR}/fix_libraw.patch + fix_libraw.patch + use-webp.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/ext") @@ -36,6 +37,7 @@ 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 @@ -45,14 +47,19 @@ vcpkg_configure_cmake( -DUSE_OCIO=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/use-webp.patch b/ports/openimageio/use-webp.patch new file mode 100644 index 000000000..1b03636e9 --- /dev/null +++ b/ports/openimageio/use-webp.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index abd4e23..12a7f54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -87,6 +87,7 @@ option (USE_FREETYPE "Use Freetype if found" ON) + option (USE_GIF "Use GIF if found" ON) + option (USE_PTEX "Use PTex 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 7dde986..66da94d 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -366,6 +366,7 @@ endif() + 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}") +@@ -382,6 +383,9 @@ else() + set (WEBP_FOUND FALSE) + message (STATUS "WebP library not found") + endif() ++else() ++ set (WEBP_FOUND FALSE) ++endif() + # end Webp setup + ########################################################################### +