From 30b2f6bb8fbafd535a01867c2f68fb6a9c616420 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Sat, 13 Nov 2021 08:38:22 +0800 Subject: [PATCH] [vtk] Fix missing includes (#21319) --- ports/vtk/missing-limits.patch | 48 ++++++++++++++++++++++++++++++++++ ports/vtk/portfile.cmake | 9 ++++--- ports/vtk/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/v-/vtk.json | 5 ++++ 5 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 ports/vtk/missing-limits.patch diff --git a/ports/vtk/missing-limits.patch b/ports/vtk/missing-limits.patch new file mode 100644 index 0000000000..2450e480cf --- /dev/null +++ b/ports/vtk/missing-limits.patch @@ -0,0 +1,48 @@ +diff --git a/Common/Core/vtkGenericDataArrayLookupHelper.h b/Common/Core/vtkGenericDataArrayLookupHelper.h +index ab9d572..202aaa2 100644 +--- a/Common/Core/vtkGenericDataArrayLookupHelper.h ++++ b/Common/Core/vtkGenericDataArrayLookupHelper.h +@@ -25,6 +25,7 @@ + #include "vtkIdList.h" + #include + #include ++#include + #include + #include + +diff --git a/Common/DataModel/vtkPiecewiseFunction.cxx b/Common/DataModel/vtkPiecewiseFunction.cxx +index 22eca0b..11086f1 100644 +--- a/Common/DataModel/vtkPiecewiseFunction.cxx ++++ b/Common/DataModel/vtkPiecewiseFunction.cxx +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx b/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx +index a16bb27..1052192 100644 +--- a/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx ++++ b/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx +@@ -27,6 +27,7 @@ + #include "vtkHyperTreeGridNonOrientedCursor.h" + + #include ++#include + + vtkStandardNewMacro(vtkHyperTreeGridThreshold); + +diff --git a/Rendering/Core/vtkColorTransferFunction.cxx b/Rendering/Core/vtkColorTransferFunction.cxx +index 55c046b..1be0291 100644 +--- a/Rendering/Core/vtkColorTransferFunction.cxx ++++ b/Rendering/Core/vtkColorTransferFunction.cxx +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 89a55a25d9..63bd5eec20 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -28,6 +28,7 @@ vcpkg_from_github( 156fb524.patch d107698a.patch fix-gdal.patch + missing-limits.patch # This patch can be removed in next version. Since it has been merged to upstream via https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7611 ) # ============================================================================= @@ -146,7 +147,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS # We set all libraries to "system" and explicitly list the ones that should use embedded copies vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} ${VTK_FEATURE_OPTIONS} @@ -268,9 +269,9 @@ if("paraview" IN_LIST FEATURES) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/vtkpythonmodules/static_python) #python headers + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/vtkpythonmodules/static_python") #python headers file(GLOB_RECURSE STATIC_PYTHON_FILES "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/*/static_python/*.h") - file(INSTALL ${STATIC_PYTHON_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) + file(INSTALL ${STATIC_PYTHON_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") endif() endif() @@ -298,4 +299,4 @@ file(RENAME "${CURRENT_PACKAGES_DIR}/share/licenses" "${CURRENT_PACKAGES_DIR}/sh # Usage configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) # Handle copyright -file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") +file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") \ No newline at end of file diff --git a/ports/vtk/vcpkg.json b/ports/vtk/vcpkg.json index ca0058ec87..f443603a66 100644 --- a/ports/vtk/vcpkg.json +++ b/ports/vtk/vcpkg.json @@ -1,7 +1,7 @@ { "name": "vtk", "version-semver": "9.0.3-pv5.9.1", - "port-version": 3, + "port-version": 4, "description": "Software system for 3D computer graphics, image processing, and visualization", "homepage": "https://github.com/Kitware/VTK", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index bcacbb0558..7f8bb2e4a4 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7058,7 +7058,7 @@ }, "vtk": { "baseline": "9.0.3-pv5.9.1", - "port-version": 3 + "port-version": 4 }, "vtk-dicom": { "baseline": "0.8.12", diff --git a/versions/v-/vtk.json b/versions/v-/vtk.json index 6ab4ccbbe2..975f7bb0e1 100644 --- a/versions/v-/vtk.json +++ b/versions/v-/vtk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "223022edbe63b3ecdb3e9204a4ad63ab61b36ece", + "version-semver": "9.0.3-pv5.9.1", + "port-version": 4 + }, { "git-tree": "1b201a8e060b6c2688ccc2e96cae175f2d8af205", "version-semver": "9.0.3-pv5.9.1",