# -*- 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 compiler_blacklist_versions 1.0 PortGroup compilers 1.0 PortGroup github 1.0 PortGroup legacysupport 1.1 PortGroup linear_algebra 1.0 PortGroup qt4 1.0 # _strnlen, getline legacysupport.newest_darwin_requires_legacy 10 github.setup ElmerCSC elmerfem 9da4cd3aa0528ed4a81d875890b941ba2e14cbf9 version 2023.10.02 revision 0 categories science license GPL-2 maintainers {@barracuda156 gmail.com:vital.had} openmaintainer description Elmer is a tool that can solve a large number of partial differential equations long_description {*}${description} making it an ideal tool for multiphysical problems. \ It includes models for structural mechanics, fluid dynamics, heat transfer, \ electromagnetics and beyond. Elmer can also be used on massively parallel HPC platforms. homepage https://www.elmerfem.org checksums rmd160 89cc29e8388a7cce219b20c9534847babcc92508 \ sha256 e54fae85496de48efb287bb95bf872b82f6e05e2ea4c91ba9857d2d104d7a078 \ size 71943091 github.tarball_from archive depends_lib-append port:qwt61 compilers.choose fc f90 compilers.setup require_fortran compiler.blacklist-append \ {*gcc-[34].*} {macports-gcc-[56]} {clang < 500} if {${os.platform} eq "darwin" && ${os.major} > 9} { # CMakeLists check for a version of CXX compiler, assuming a coherent build with GCC. # However since Macports uses Clangs on x86, the check does not do what was intended. # Just remove it for all systems with a default GCC > 9, i.e. everything but 10.4 and 10.5, # so that the needed Fortran flag is actually used. patchfiles-append \ patch-fix-gfortran-with-clang.diff } post-patch { reinplace "s,@CC@,${configure.cc}," ${worksrcpath}/CMakeLists.txt reinplace "s,@CXX@,${configure.cxx}," ${worksrcpath}/CMakeLists.txt reinplace "s,@FC@,${configure.fc}," ${worksrcpath}/CMakeLists.txt reinplace "s,CMAKE_SYSTEM_PROCESSOR,CMAKE_OSX_ARCHITECTURES,g" ${worksrcpath}/cpack/ElmerCPack.cmake } pre-configure { configure.args-append ${cmake_linalglib} if {[variant_isset openblas]} { configure.args-append \ -DBLAS_LIBRARIES=${prefix}/lib/libopenblas.dylib \ -DLAPACK_LIBRARIES=${prefix}/lib/libopenblas.dylib } } # See: https://trac.macports.org/ticket/67502 configure.pre_args-delete \ -DCMAKE_INSTALL_NAME_DIR="${cmake.install_prefix}/lib" set qt4_dir ${prefix}/libexec/qt4 configure.args-append \ -DCMAKE_Fortran_COMPILER=${configure.fc} \ -DGLX_INCLUDE_DIR=${prefix}/include \ -DQt4_LIBRARIES=${qt4_dir}/lib \ -DQWT_INCLUDE_DIR=${qt4_dir}/include/qwt \ -DQWT_LIBRARY=${qt4_dir}/lib/libqwt.dylib \ -DUSE_CONTIGUOUS=OFF \ -DWITH_CONTRIB=OFF \ -DWITH_ELMERGUI=ON \ -DWITH_ELMERGUITESTER=OFF \ -DWITH_ELMERGUILOGGER=ON \ -DWITH_ElmerIce=OFF \ -DWITH_ELMERPOST=OFF \ -DWITH_FETI4I=OFF \ -DWITH_Hypre=OFF \ -DWITH_LUA=OFF \ -DWITH_MKL=OFF \ -DWITH_MMG=OFF \ -DWITH_MPI=OFF \ -DWITH_Mumps=OFF \ -DWITH_NETCDF=OFF \ -DWITH_OCC=OFF \ -DWITH_OpenMP=OFF \ -DWITH_QT5=OFF \ -DWITH_QWT=ON \ -DWITH_Trilinos=OFF \ -DWITH_XIOS=OFF \ -DWITH_Zoltan=OFF if {[string match macports-gcc* ${configure.compiler}]} { configure.args-replace \ -DWITH_OpenMP=OFF -DWITH_OpenMP=ON } if {[string match *clang* ${configure.compiler}]} { # Load.c: error: call to undeclared function 'var_copy_transpose'; ISO C99 and later do not support implicit function declarations configure.cflags-append \ -Wno-error=implicit-function-declaration } variant ice description "Enable ElmerIce with support for NetCDF and HDF5" { depends_lib-append \ port:hdf5 \ port:netcdf \ port:netcdf-fortran configure.args-replace \ -DWITH_ElmerIce=OFF -DWITH_ElmerIce=ON \ -DWITH_NETCDF=OFF -DWITH_NETCDF=ON }