Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ports/vtk/fix-dependency-pdal.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/IO/PDAL/CMakeLists.txt b/IO/PDAL/CMakeLists.txt
index d6cd57c..1270dfb 100644
--- a/IO/PDAL/CMakeLists.txt
+++ b/IO/PDAL/CMakeLists.txt
@@ -1,4 +1,4 @@
-vtk_module_find_package(PACKAGE PDAL)
+vtk_module_find_package(PACKAGE PDAL CONFIG_MODE)

set(classes
vtkPDALReader)
@@ -7,7 +7,7 @@ vtk_module_add_module(VTK::IOPDAL
CLASSES ${classes})
vtk_module_link(VTK::IOPDAL
PRIVATE
- pdal_base)
+ ${PDAL_LIBRARIES})
# XXX(pdal): PDAL should add include interfaces to its exported targets. See
# https://github.com/PDAL/PDAL/issues/2262.
vtk_module_include(VTK::IOPDAL
148 changes: 148 additions & 0 deletions ports/vtk/fix-mpi4py.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
diff --git a/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c b/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c
index d01c266..0220249 100644
--- a/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c
+++ b/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c
@@ -154207,9 +154207,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Datatype(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_8Datatype_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
@@ -154497,9 +154497,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Request(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_7Request_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
Py_CLEAR(p->ob_buf);
@@ -154877,9 +154877,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Message(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_7Message_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
Py_CLEAR(p->ob_buf);
@@ -155073,9 +155073,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Op(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_2Op_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
@@ -155260,9 +155260,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Group(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_5Group_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
@@ -155456,9 +155456,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Info(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_4Info_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
@@ -155675,9 +155675,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Errhandler(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_10Errhandler_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
@@ -155845,9 +155845,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Comm(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_4Comm_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
@@ -156860,9 +156860,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_Win(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_3Win_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
Py_CLEAR(p->ob_mem);
@@ -157166,9 +157166,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_File(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_4File_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
@@ -157436,9 +157436,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI_memory(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_6memory_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
@@ -157609,9 +157609,9 @@ static void __pyx_tp_dealloc_6mpi4py_3MPI__p_mem(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_6mpi4py_3MPI_6_p_mem_3__dealloc__(o);
- --Py_REFCNT(o);
+ Py_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
26 changes: 26 additions & 0 deletions ports/vtk/fix-using-hdf5.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,29 @@ index 228d246..41af04d 100644
return (herr_t)HANDLE_H5G_GET_OBJINFO_ERR ( member_name );
}
else {
diff --git a/ThirdParty/xdmf3/vtkxdmf3/core/XdmfHDF5Controller.hpp b/ThirdParty/xdmf3/vtkxdmf3/core/XdmfHDF5Controller.hpp
index c5c15d0..1212aee 100644
--- a/ThirdParty/xdmf3/vtkxdmf3/core/XdmfHDF5Controller.hpp
+++ b/ThirdParty/xdmf3/vtkxdmf3/core/XdmfHDF5Controller.hpp
@@ -30,7 +30,7 @@

// So that hdf5 does not need to be included in the header files
// It would add a dependancy to programs that use Xdmf
-#ifndef _H5Ipublic_H
+#ifndef H5Ipublic_H
#ifndef XDMF_HID_T
#define XDMF_HID_T
typedef int hid_t;
diff --git a/ThirdParty/xdmf3/vtkxdmf3/core/XdmfHDF5Writer.hpp b/ThirdParty/xdmf3/vtkxdmf3/core/XdmfHDF5Writer.hpp
index cfbec6f..d690da7 100644
--- a/ThirdParty/xdmf3/vtkxdmf3/core/XdmfHDF5Writer.hpp
+++ b/ThirdParty/xdmf3/vtkxdmf3/core/XdmfHDF5Writer.hpp
@@ -31,7 +31,7 @@

// So that hdf5 does not need to be included in the header files
// It would add a dependancy to programs that use Xdmf
-#ifndef _H5Ipublic_H
+#ifndef H5Ipublic_H
#ifndef XDMF_HID_T
#define XDMF_HID_T
typedef int hid_t;
27 changes: 27 additions & 0 deletions ports/vtk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,23 @@ vcpkg_from_github(
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
UseProj5Api.patch # Allow Proj 8.0+ (commit b66e4a7, backported). Should be in soon after 9.0.3
fix-mpi4py.patch
fix-dependency-pdal.patch
)

# =============================================================================
#Overwrite outdated modules if they have not been patched:
file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99") # due to usage of targets in netcdf-c
# =============================================================================

# To use hdf5[parallel] in vtk requires feature mpi, see https://gitlab.kitware.com/vtk/vtk/-/issues/18552
if (EXISTS "${CURRENT_INSTALLED_DIR}/share/hdf5/hdf5-config.cmake" AND NOT "mpi" IN_LIST FEATURES)
file(READ "${CURRENT_INSTALLED_DIR}/share/hdf5/hdf5-config.cmake" HDF5_CONFIG)
if ("${HDF5_CONFIG}" MATCHES "ENABLE_PARALLEL ON")
message(FATAL_ERROR "hdf5[parallel] requires feature 'mpi'")
endif()
endif()

# =============================================================================
# Options:
# Collect CMake options for optional components
Expand All @@ -55,6 +65,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS VTK_FEATURE_OPTIONS
"vtkm" VTK_MODULE_ENABLE_VTK_AcceleratorsVTKmDataModel
"vtkm" VTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters
"vtkm" VTK_MODULE_ENABLE_VTK_vtkm
"pdal" VTK_MODULE_ENABLE_VTK_IOPDAL
"python" VTK_MODULE_ENABLE_VTK_Python
"python" VTK_MODULE_ENABLE_VTK_PythonContext2D
"python" VTK_MODULE_ENABLE_VTK_PythonInterpreter
Expand All @@ -79,6 +90,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS VTK_FEATURE_OPTIONS
"openvr" VTK_MODULE_ENABLE_VTK_RenderingOpenVR
"gdal" VTK_MODULE_ENABLE_VTK_IOGDAL
"geojson" VTK_MODULE_ENABLE_VTK_IOGeoJSON
"libarchive" VTK_MODULE_ENABLE_VTK_CommonArchive
)

# Replace common value to vtk value
Expand Down Expand Up @@ -168,6 +180,21 @@ vcpkg_cmake_configure(
${ADDITIONAL_OPTIONS}
-DVTK_DEBUG_MODULE_ALL=ON
-DVTK_DEBUG_MODULE=ON
-DVTK_ENABLE_OSPRAY=OFF # Requires ospray
-DVTK_ENABLE_VISRTX=OFF # Requires visrtx
# Requires adios2
-DVTK_MODULE_ENABLE_VTK_IOADIOS2=DONT_WANT
-DVTK_MODULE_ENABLE_VTK_fides=DONT_WANT
-DVTK_MODULE_ENABLE_VTK_IOFides=DONT_WANT

-DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS=DONT_WANT # Requires OpenTURNS
-DVTK_MODULE_ENABLE_VTK_DomainsMicroscopy=DONT_WANT # Requires OpenSlide
-DVTK_MODULE_ENABLE_VTK_IOMySQL=DONT_WANT # Requires upstream update libmysql, see https://bugs.mysql.com/bug.php?id=85131
# Requires ioss
-DVTK_MODULE_ENABLE_VTK_ioss=DONT_WANT
-DVTK_MODULE_ENABLE_VTK_IOIoss=DONT_WANT
MAYBE_UNUSED_VARIABLES
VTK_MODULE_ENABLE_VTK_PythonContext2D
)

vcpkg_cmake_install()
Expand Down
24 changes: 23 additions & 1 deletion ports/vtk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vtk",
"version-semver": "9.0.3-pv5.9.1",
"port-version": 10,
"port-version": 11,
"description": "Software system for 3D computer graphics, image processing, and visualization",
"homepage": "https://github.com/Kitware/VTK",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -50,6 +50,7 @@
"all": {
"description": "Build all vtk modules",
"dependencies": [
"boost-assign",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires by internal dependency xdmf3, which requires by component VTK::xdmf3, VTK::IOXdmf3 and VTK::IOParallelXdmf3.

"ffmpeg",
"libmysql",
{
Expand All @@ -58,7 +59,10 @@
"features": [
"gdal",
"geojson",
"libarchive",
"liblas",
"mpi",
"pdal",
"python",
"qt"
]
Expand Down Expand Up @@ -105,6 +109,18 @@
"geojson": {
"description": "Convert Geo JSON format to vtkPolyData"
},
"libarchive": {
"description": "Support libarchive compilation",
"dependencies": [
"libarchive"
]
},
"liblas": {
"description": "Support liblas compilation",
"dependencies": [
"liblas"
]
},
"mpi": {
"description": "MPI functionality for VTK",
"dependencies": [
Expand Down Expand Up @@ -161,6 +177,12 @@
}
]
},
"pdal": {
"description": "Support PDAL compilation",
"dependencies": [
"pdal"
]
},
"python": {
"description": "Python functionality for VTK",
"dependencies": [
Expand Down
1 change: 1 addition & 0 deletions scripts/test_ports/vcpkg-ci-vtk/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
34 changes: 34 additions & 0 deletions scripts/test_ports/vcpkg-ci-vtk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "vcpkg-ci-vtk",
"version-date": "2022-05-30",
"description": "Port to force features of certain ports within CI",
"homepage": "https://github.com/microsoft/vcpkg",
"license": "MIT",
"dependencies": [
{
"name": "vtk",
"default-features": false,
"features": [
"cuda",
"gdal",
"geojson",
"mpi",
"opengl",
"openvr",
"paraview",
"python",
"qt",
"utf8",
"vtkm"
]
},
{
"name": "vtk",
"default-features": false,
"features": [
"atlmfc"
],
"platform": "windows"
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7494,7 +7494,7 @@
},
"vtk": {
"baseline": "9.0.3-pv5.9.1",
"port-version": 10
"port-version": 11
},
"vtk-dicom": {
"baseline": "0.8.12",
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vtk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a4b3a0e5be24cb0c2ac714595e5d47e47f4e0139",
"version-semver": "9.0.3-pv5.9.1",
"port-version": 11
},
{
"git-tree": "6a7eea485be980aa5c9fae1e0a75084f98e5dc27",
"version-semver": "9.0.3-pv5.9.1",
Expand Down