diff options
| author | Phil Christensen <philc@microsoft.com> | 2018-12-06 15:06:28 -0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2018-12-06 15:06:28 -0800 |
| commit | 7347305e8459fcc78553a9f88196e0d93eb0a8fe (patch) | |
| tree | ac9eee9ff267c6a71a83249bed7a94f02b00d9a5 /ports/vtk | |
| parent | ed9357a5aafea7192932b5874264bd103fc61255 (diff) | |
| parent | 63c1b2628e958f8e02356411f032941c0c2f3bbb (diff) | |
| download | vcpkg-7347305e8459fcc78553a9f88196e0d93eb0a8fe.tar.gz vcpkg-7347305e8459fcc78553a9f88196e0d93eb0a8fe.zip | |
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/3425
Diffstat (limited to 'ports/vtk')
| -rw-r--r-- | ports/vtk/CONTROL | 2 | ||||
| -rw-r--r-- | ports/vtk/fix-find-lz4.patch | 20 | ||||
| -rw-r--r-- | ports/vtk/portfile.cmake | 43 |
3 files changed, 45 insertions, 20 deletions
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 8b9ae8f6b..d06f16331 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.1.0-1 +Version: 8.1.0-3 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora diff --git a/ports/vtk/fix-find-lz4.patch b/ports/vtk/fix-find-lz4.patch new file mode 100644 index 000000000..7389a24f4 --- /dev/null +++ b/ports/vtk/fix-find-lz4.patch @@ -0,0 +1,20 @@ +diff --git a/CMake/FindLZ4.cmake b/CMake/FindLZ4.cmake +index 07343e1f79..b43a9af2c7 100644 +--- a/CMake/FindLZ4.cmake ++++ b/CMake/FindLZ4.cmake +@@ -1,7 +1,13 @@ +- +-find_library(LZ4_LIBRARIES NAMES lz4) ++find_library(LZ4_LIBRARY NAMES lz4 PATH_SUFFIXES lib) ++find_library(LZ4_LIBRARY_DEBUG NAME lz4d PATH_SUFFIXES debug/lib) + find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) + ++if(NOT LZ4_LIBRARY_DEBUG) ++ set(LZ4_LIBRARY_DEBUG ${LZ4_LIBRARY}) ++endif(NOT LZ4_LIBRARY_DEBUG) ++ ++set(LZ4_LIBRARIES optimized ${LZ4_LIBRARY} debug ${LZ4_LIBRARY_DEBUG}) ++ + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LZ4 + DEFAULT_MSG diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 54246008a..86616fd1f 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -2,15 +2,6 @@ include(vcpkg_common_functions) set(VTK_SHORT_VERSION "8.1") set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0") - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO "Kitware/VTK" - REF "v${VTK_LONG_VERSION}" - SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf - HEAD_REF "master" -) - # ============================================================================= # Options: @@ -46,13 +37,18 @@ endif() set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file + # ============================================================================= -# Apply patches to the source code -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +# Clone & patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "Kitware/VTK" + REF "v${VTK_LONG_VERSION}" + SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf + HEAD_REF "master" PATCHES # Disable ssize_t because this can conflict with ssize_t that is defined on windows. - ${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch + dont-define-ssize_t.patch # We force CMake to use it's own version of the FindHDF5 module since newer versions # shipped with CMake behave differently. E.g. the one shipped with CMake 3.9 always @@ -61,16 +57,17 @@ vcpkg_apply_patches( # Maybe in the future we can disable the patch and use the new version shipped with CMake # together with the hdf5-config.cmake that is written by HDF5 itself, but currently VTK # disables taking the config into account explicitly. - ${CMAKE_CURRENT_LIST_DIR}/use-fixed-find-hdf5.patch + use-fixed-find-hdf5.patch # We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency # will link to both, the debug and the release library. - ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch + disable-workaround-findhdf5.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-find-libharu.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-find-mysql.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-find-odbc.patch + fix-find-libproj4.patch + fix-find-libharu.patch + fix-find-mysql.patch + fix-find-odbc.patch + fix-find-lz4.patch ) # Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK, @@ -294,6 +291,14 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTE string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") +# Remove any remaining stray absolute references to the installed directory. +file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/*.cmake) +foreach(FILE IN LISTS CMAKE_FILES) + file(READ "${FILE}" _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}") + file(WRITE "${FILE}" "${_contents}") +endforeach() + # ============================================================================= # Clean-up other directories |
