# -*- 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 active_variants 1.1 PortGroup cmake 1.1 PortGroup conflicts_build 1.0 PortGroup github 1.0 name InsightToolkit4 github.setup InsightSoftwareConsortium ITK 4.13.3 v revision 3 categories graphics science devel license Apache conflicts_build InsightToolkit maintainers {yahoo.com:n_larsson @nilason} openmaintainer description Insight Segmentation and Registration Toolkit (ITK) long_description {*}${description} is an open-source, cross-platform system that \ provides developers with an extensive suite of software tools \ for image analysis. Developed through extreme programming \ methodologies, ITK builds on a proven, spatially-oriented \ architecture for processing, segmentation, and registration \ of scientific images in two, three, or more dimensions. homepage https://itk.org distname InsightToolkit-${version} dist_subdir InsightToolkit checksums rmd160 e3564ec4c7f6395b2bce9bc30f6008f55c5d7e65 \ sha256 edd2770aaf76e0e9b0aeb089cdf8774f46ebb2c9a74287608bb43c81134ebf16 \ size 19345356 # find out include dir for "mpi.h" set mpl_include_dir "" if {![catch {set result [active_variants hdf5 openmpi]}]} { if {$result} { set mpl_include_dir "-I${prefix}/include/openmpi-mp" } } if {![catch {set result [active_variants hdf5 mpich]}]} { if {$result} { set mpl_include_dir "-I${prefix}/include/mpich-mp" } } if {$mpl_include_dir ne ""} { configure.cxxflags-append ${mpl_include_dir} } compiler.cxx_standard 2014 # setting cmake.set_cxx_standard is not passed to the SWIG Python build configure.cxxflags-append -std=gnu++14 patchfiles-append patch-python3.8.diff \ patch-python3.10.diff \ patch-swigpy-sliceobject.diff depends_lib-append path:include/turbojpeg.h:libjpeg-turbo \ port:dcmtk \ port:double-conversion \ port:expat \ port:fftw-3 \ port:fftw-3-single \ port:gdcm \ port:gtest \ port:hdf5 \ port:libaec \ port:libminc \ port:libpng \ port:tiff \ port:zlib configure.args-append \ -DBUILD_EXAMPLES=OFF \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTING=OFF \ -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib/itk \ -DITK_FORBID_DOWNLOADS=ON \ -DITK_INSTALL_LIBRARY_DIR=${prefix}/lib/itk \ -DITK_USE_FFTWD=ON \ -DITK_USE_FFTWF=ON \ -DITK_USE_GPU=ON \ -DITK_USE_KWSTYLE=OFF \ -DITK_USE_SYSTEM_DCMTK=ON \ -DITK_USE_SYSTEM_DOUBLECONVERSION=ON \ -DITK_USE_SYSTEM_EXPAT=ON \ -DITK_USE_SYSTEM_FFTW=ON \ -DITK_USE_SYSTEM_GDCM=ON \ -DITK_USE_SYSTEM_JPEG=ON \ -DITK_USE_SYSTEM_LIBRARIES=ON \ -DITK_USE_SYSTEM_MINC=ON \ -DITK_USE_SYSTEM_PNG=ON \ -DITK_USE_SYSTEM_TIFF=ON \ -DITK_USE_SYSTEM_VXL=OFF \ -DITK_USE_SYSTEM_ZLIB=ON \ -DITK_WRAPPING=OFF \ -DITK_WRAP_PYTHON=OFF \ -DUSE_FFTWF=ON github.livecheck.regex {(4\.[^\"]+)} # create Python subports set python_versions {310 311} foreach v ${python_versions} { subport py${v}-${name} { PortGroup python 1.0 categories graphics science devel python patchfiles-append patch-findpython.diff depends_build-append \ port:castxml \ port:swig \ port:swig-python depends_lib-append port:${name} use_configure yes python.default_version ${v} python.pep517 no build.cmd make build.target destroot.cmd make install destroot.destdir DESTDIR=${destroot} master_sites ${github.master_sites} post-patch { fs-traverse f ${worksrcpath} { if {[file extension ${f}] eq ".py"} { reinplace -q "s|/usr/bin/env python|${python.bin}|" ${f} } } } } } # Python bindings for supported Python versions if {[string match "py*" ${subport}]} { description Python ${python.branch} bindings for {*}${description} long_description This package provides {*}${description}. configure.args-append \ -DITK_USE_SYSTEM_CASTXML=ON \ -DITK_USE_SYSTEM_SWIG=ON \ -DModule_BridgeNumPy=OFF \ -DPY_SITE_PACKAGES_PATH=${python.pkgd} \ -DPython_EXECUTABLE=${python.bin} \ -DPYTHON_INCLUDE_DIRS=${python.include} configure.args-replace \ -DITK_WRAPPING=OFF -DITK_WRAPPING=ON \ -DITK_WRAP_PYTHON=OFF -DITK_WRAP_PYTHON=ON \ post-destroot { delete ${destroot}${prefix}/bin delete ${destroot}${prefix}/include delete ${destroot}${prefix}/lib delete ${destroot}${prefix}/share } }