# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup cmake 1.1 PortGroup mpi 1.0 PortGroup muniversal 1.0 PortGroup compiler_blacklist_versions 1.0 # Require C++11 compiler.cxx_standard 2011 # some older Clang say they support C++11 when they don't # this is the same blacklisting as for jsoncpp, on which vtk depends. compiler.blacklist-append {clang < 900} name vtk version 9.3.0 revision 0 categories graphics devel platforms darwin license BSD set branch [join [lrange [split ${version} .] 0 1] .] maintainers {stromnov @stromnov} \ {@Dave-Allured noaa.gov:dave.allured} \ openmaintainer description Visualization Toolkit (VTK) long_description Visualization Toolkit (VTK) is an open-source, freely \ available software system for 3D computer graphics, \ image processing and visualization. homepage http://www.vtk.org master_sites http://www.vtk.org/files/release/${branch} distname VTK-${version} checksums rmd160 8e45c2178c4c7890fdb1a1d7840698cbcdd7ab16 \ sha256 fdc7b9295225b34e4fdddc49cd06e66e94260cb00efee456e0f66568c9681be9 \ size 99932810 mpi.setup depends_lib-append \ port:double-conversion \ path:share/pkgconfig/eigen3.pc:eigen3 \ port:expat \ port:freetype \ port:gl2ps \ port:glew \ port:hdf5 \ path:include/turbojpeg.h:libjpeg-turbo \ port:jsoncpp \ port:libharu \ port:libogg \ port:libtheora \ port:lz4 \ port:netcdf-cxx \ port:pugixml \ port:tiff \ port:zlib mpi.enforce_variant hdf5 configure.pre_args-delete \ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON configure.args-append \ ../${distname}/ \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DVTK_BUILD_EXAMPLES:BOOL=OFF \ -DVTK_WRAP_PYTHON:BOOL=OFF \ -DVTK_WRAP_JAVA:BOOL=OFF \ -DVTK_USE_COCOA:BOOL=ON # As proposed at #46890 if {${os.major} <= 10} { configure.args-append \ -DIOKit:FILEPATH=/System/Library/Frameworks/IOKit.framework } variant ffmpeg description {Add support for ffmpeg} { depends_lib-append path:lib/libavcodec.dylib:ffmpeg configure.args-append \ -DModule_vtkIOFFMPEG:BOOL=ON } variant qt5 description {Add Qt5 support.} { PortGroup qt5 1.0 configure.args-append \ -DQT_QMAKE_EXECUTABLE:PATH=${qt_qmake_cmd} \ -DQMLPLUGINDUMP_EXECUTABLE:PATH=${qt_bins_dir}/qmlplugindump \ -DVTK_QT_VERSION=5 \ -DVTK_GROUP_ENABLE_Qt:STRING=YES \ -DVTK_MODULE_ENABLE_VTK_GUISupportQt=YES \ -DVTK_MODULE_ENABLE_VTK_RenderingQt=YES \ -DVTK_MODULE_ENABLE_VTK_ViewsQt=YES } # Supported pythons set python_versions {38 39 310 311} foreach pyver ${python_versions} { # Conflicting python versions set other_python_versions {} foreach other_pyver ${python_versions} { if {${other_pyver} ne ${pyver}} { if {${other_pyver} ni ${other_python_versions}} { lappend other_python_versions python${other_pyver} } } } # Get python branch set python_branch "[string index ${pyver} 0].[string range ${pyver} 1 end]" set python_major_ver "[string index ${pyver} 0]" variant python${pyver} conflicts {*}${other_python_versions} description "Add Python ${python_branch} support" " depends_lib-append port:python${pyver} configure.args-delete \ -DVTK_WRAP_PYTHON:BOOL=OFF configure.args-append \ -DVTK_WRAP_PYTHON:BOOL=ON \ -DPython${python_major_ver}_EXECUTABLE:STRING=${prefix}/bin/python${python_branch} \ -DPython${python_major_ver}_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/${python_branch}/Headers/ \ -DPython${python_major_ver}_LIBRARY=${frameworks_dir}/Python.framework/Versions/${python_branch}/lib/libpython${python_branch}.dylib \ -DVTK_PYTHON_SITE_PACKAGES_SUFFIX=Library/Frameworks/Python.framework/Versions/${python_branch}/lib/python${python_branch}/site-packages \ if {[mpi_variant_isset]} { depends_lib-append port:py${pyver}-mpi4py configure.args-append \ -DVTK_USE_SYSTEM_MPI4PY:BOOL=ON } " } variant xdmf description {Add XDMF readers} { depends_lib-append port:boost \ port:xdmf configure.args-append \ -DVTK_USE_SYSTEM_XDMF2:BOOL=OFF \ -DNETCDF_DIR=${prefix} \ -DBOOST_ROOT=${prefix} \ -DModule_vtkIOXdmf2:BOOL=ON \ -DModule_vtkxdmf2:BOOL=ON \ -DModule_vtkxdmf3:BOOL=ON \ -DModule_vtkIOXdmf3:BOOL=ON } if {[mpi_variant_isset]} { configure.args-append \ -DVTK_Group_MPI:BOOL=ON } if {${os.platform} eq "darwin" && ${os.major} < 11} { known_fail yes pre-fetch { ui_error "${name} @${version} requires macOS 10.7 or greater." return -code error "incompatible macOS X version" } } livecheck.type regex livecheck.url http://www.vtk.org/VTK/resources/software.html livecheck.regex {[vV][tT][kK]-(\d+(?:\.\d+)*)\.[tz]}