Files
2026-10-04 04:07:15 +00:00

190 lines
6.6 KiB
Makefile

PORTNAME= paraview
DISTVERSION= ${PARAVIEW_VER}.1
PORTREVISION= 2
CATEGORIES= science graphics
MASTER_SITES= http://www.paraview.org/files/v${PARAVIEW_VER}/
DISTNAME= ParaView-v${PORTVERSION}
MAINTAINER= thierry@FreeBSD.org
COMMENT= Powerful scientific data visualization application
WWW= https://www.paraview.org/
# See https://www.paraview.org/license/
LICENSE= BSD3CLAUSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \
cli11>0:devel/cli11 \
utf8cpp>0:devel/utf8cpp \
fast_float>0:math/fast_float \
nlohmann-json>0:devel/nlohmann-json \
vulkan-headers>0:graphics/vulkan-headers \
${LOCALBASE}/include/exprtk.hpp:math/exprtk \
${PYTHON_SITELIBDIR}/matplotlib/pyplot.py:math/py-matplotlib@${PY_FLAVOR}
LIB_DEPENDS= libhdf5.so:science/hdf5 \
libpng.so:graphics/png \
libtiff.so:graphics/tiff \
libfreetype.so:print/freetype2 \
libexpat.so:textproc/expat2 \
libjbig.so:graphics/jbigkit \
liborc-0.4.so:devel/orc \
libpcre.so:devel/pcre \
libicuuc.so:devel/icu \
libscn.so:devel/scnlib \
libffi.so:devel/libffi \
libtbb.so:devel/onetbb \
libogg.so:audio/libogg \
libpdalcpp.so:math/pdal \
libgl2ps.so:print/gl2ps \
libOT.so:math/openturns \
libgdal.so:graphics/gdal \
libgeos.so:graphics/geos \
libhpdf.so:print/libharu \
libproj.so:graphics/proj \
libdrm.so:graphics/libdrm \
libanari.so:science/anari \
libcgns.so:science/cgnslib \
libImath-3_2.so:math/Imath \
liblz4.so:archivers/liblz4 \
libverdict.so:math/verdict \
libnetcdf.so:science/netcdf \
libjsoncpp.so:devel/jsoncpp \
libTKernel.so:cad/opencascade \
libprotobuf.so:devel/protobuf \
libAlembic.so:graphics/alembic \
libpugixml.so:textproc/pugixml \
libavutil.so:multimedia/ffmpeg \
libcgraph.so:graphics/graphviz \
libQtNodes.so:devel/nodeeditor \
libxkbcommon.so:x11/libxkbcommon \
libtheora.so:multimedia/libtheora \
libgeotiff.so:graphics/libgeotiff \
libboost_thread.so:devel/boost-libs \
libxcb-cursor.so:x11/xcb-util-cursor \
libfontconfig.so:x11-fonts/fontconfig \
libdouble-conversion.so:devel/double-conversion
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \
bash:shells/bash \
vtk${VTK_VER:R}>0:math/vtk${VTK_VER:R} \
${PYTHON_SITELIBDIR}/matplotlib/pyplot.py:math/py-matplotlib@${PY_FLAVOR}
USES= cmake compiler:c++17-lang desktop-file-utils eigen:3 fortran gl gnome \
jpeg localbase pkgconfig python qt:6 shebangfix sqlite tar:xz xorg
USE_GL= glew opengl
USE_GNOME= libxml2
USE_QT= 5compat base svg tools webengine
#buildtools:build core gui help network opengl qmake:build sql svg \
# webengine widgets x11extras glew xmlpatterns
USE_XORG= ice sm x11 xau xcb xcursor xdamage xdmcp xext xfixes xorgproto xrender \
xxf86vm
USE_LDCONFIG= yes
CFLAGS+= -Wno-missing-template-arg-list-after-template-kw \
-I${WRKSRC}/Clients/ParaView/Documentation
CMAKE_ON= PARAVIEW_BUILD_SHARED_LIBS \
PARAVIEW_BUILD_WITH_EXTERNAL \
PARAVIEW_ENABLE_ALEMBIC \
PARAVIEW_ENABLE_ANARI \
PARAVIEW_ENABLE_FFMPEG \
PARAVIEW_ENABLE_GDAL \
PARAVIEW_ENABLE_MOTIONFX \
PARAVIEW_ENABLE_OCCT \
PARAVIEW_ENABLE_OPENTURNS \
PARAVIEW_ENABLE_PDAL \
PARAVIEW_ENABLE_XDMF2 \
PARAVIEW_ENABLE_XDMF3 \
PARAVIEW_ENABLE_WEB \
PARAVIEW_USE_PYTHON \
PARAVIEW_USE_QT \
VTK_FORBID_DOWNLOADS
CMAKE_OFF= PARAVIEW_BUILD_DEVELOPER_DOCUMENTATION \
PARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION \
PARAVIEW_ENABLE_LAS \
VTK_MODULE_USE_EXTERNAL_VTK_fmt \
VTK_MODULE_USE_EXTERNAL_VTK_ioss \
VTK_MODULE_USE_EXTERNAL_VTK_pegtl \
VTK_MODULE_USE_EXTERNAL_VTK_token
CMAKE_ARGS+= -DCMAKE_CXX_STANDARD=17 \
-DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T=1 \
-DVTK_USE_X:BOOL=ON \
-DExternalData_OBJECT_STORES="${WRKDIR}/VTK/ExternalData/MD5" \
-DFREETYPE_INCLUDE_DIRS="${LOCALBASE}/include/freetype2"
CONFIGURE_ENV= ANARI_LIBRARY=helide
# TODO: port Viskores - https://viskores.org/
CMAKE_ARGS+= -DPARAVIEW_USE_VISKORES:BOOL=OFF
# To enable external VTK, it should be configured with several modules
# -DVTK_MODULE_ENABLE_VTK_xxx=WANT
CMAKE_ARGS+= -DPARAVIEW_USE_EXTERNAL_VTK:BOOL=OFF
.if !defined(MAINTAINER_MODE)
CMAKE_ARGS+= -DVTK_FORBID_DOWNLOADS:BOOL=ON
.endif
MAKE_ENV= XDG_CONFIG_HOME=${WRKDIR}
USE_CXXSTD= c++17
SHEBANG_GLOB= *.py
SHEBANG_FILES= VTK/Examples/SearchScript.sh \
VTK/Utilities/Maintenance/*.sh \
Clients/CommandLineExecutables/paraview-config.in
OPTIONS_DEFINE= DOCS EXAMPLES OMPI
OPTIONS_SUB= yes
OMPI_DESC= OpenMPI (Message Passing Interface) support
# mpi4py and other programs must be compiled against the same MPI provider
OMPI_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mpi4py>=0:net/py-mpi4py@${PY_FLAVOR}
OMPI_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mpi4py>=0:net/py-mpi4py@${PY_FLAVOR}
OMPI_USES= mpi:openmpi
OMPI_CMAKE_ON= -DPARAVIEW_USE_MPI:BOOL=ON
OMPI_CMAKE_OFF= -DPARAVIEW_USE_MPI:BOOL=OFF
EXAMPLES_CMAKE_BOOL= PARAVIEW_ENABLE_EXAMPLES
PORTEXAMPLES= *
# TEST disabled, download too much data files
#TEST_CMAKE_ON= -DPARAVIEW_BUILD_TESTING=WANT
# PARAVIEW_BUILD_VTK_TESTING requires SCN https://pypi.org/project/scn/
# -DPARAVIEW_BUILD_VTK_TESTING=WANT
# ADIOS2 requires MPICH, not OpenMPI
#LIB_DEPENDS+= libadios2_c.so:misc/adios2
#CMAKE_ARGS+= -DPARAVIEW_ENABLE_ADIOS2:BOOL=ON
# Missing GenericIO for CosmoTools
#CMAKE_ARGS+= -DPARAVIEW_ENABLE_COSMOTOOLS:BOOL=ON
# Errors with VisItBridge / VisItLib
#CMAKE_ARGS+= -DPARAVIEW_ENABLE_VISITBRIDGE:BOOL=ON
# MomentInvariants needs to download a module
#CMAKE_ARGS+= -DPARAVIEW_ENABLE_MOMENTINVARIANTS:BOOL=ON
# No package for graphics/ospray
#LIB_DEPENDS+= libospray.so:graphics/ospray
#CMAKE_ARGS+= -DPARAVIEW_ENABLE_RAYTRACING
# openvdb does not provide OpenVDBConfig.cmake nor openvdb-config.cmake
#CMAKE_ARGS+= -DPARAVIEW_ENABLE_OPENVDB:BOOL=ON \
#LIB_DEPENDS+= libopenvdb.so:misc/openvdb
PLIST_SUB+= VERMAJORMINOR=${PARAVIEW_VER}
VTK9_CONFLICTS= vtk.py vtkmodules/__init__.py vtkmodules/all.py \
vtkmodules/gtk vtkmodules/numpy_interface \
vtkmodules/qt vtkmodules/test vtkmodules/tk \
vtkmodules/util vtkmodules/wx vtkmodules/generate_pyi.py \
vtkmodules/web/errors.py
pre-configure:
${REINPLACE_CMD} -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \
${PATCH_WRKSRC}/VTK/IO/Image/vtkPNGReader.cxx
${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}/bin/bash|' \
${PATCH_WRKSRC}/VTK/Utilities/Maintenance/vtk_site_history.py
post-install:
# vtk9 is not a real run dependency, but it installs several common files
.for py in ${VTK9_CONFLICTS}
${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/${py}
.endfor
post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/Examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
.include <./Makefile.version>
.include <../../math/vtk9/Makefile.version>
.include <bsd.port.mk>