From 01b7c20ebc7b9c3986f00afe0c2b98063e66d2ac Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 5 Jul 2024 17:12:47 +0800 Subject: [PATCH] elmerfem: update to 2024.07.04, fix build with gcc14 --- science/elmerfem/Portfile | 19 ++++++++++++++----- .../files/patch-umf4_f77wrapper.c.diff | 10 ++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 science/elmerfem/files/patch-umf4_f77wrapper.c.diff diff --git a/science/elmerfem/Portfile b/science/elmerfem/Portfile index 6c49e9d98d4b..24ad0bd92195 100644 --- a/science/elmerfem/Portfile +++ b/science/elmerfem/Portfile @@ -13,8 +13,8 @@ legacysupport.newest_darwin_requires_legacy 10 # Remember to keep qt4 as a fallback until qt5 is available on old systems. -github.setup ElmerCSC elmerfem 1df67599af4e6389d46fa172e6c53354cd73863a -version 2024.07.01 +github.setup ElmerCSC elmerfem a21b1be9009d210c8839bea8f8724bc5fb529f3b +version 2024.07.04 revision 0 categories science license GPL-2 @@ -24,9 +24,9 @@ long_description {*}${description} making it an ideal tool for multiphysical 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 e5a6991bfc8ffec2051d39cc5d874b417cf35857 \ - sha256 16588b6d131356b6b57b32ee23fc6eb0b3587281121d433b6f09639791763341 \ - size 72793009 +checksums rmd160 32c56bb0b88c8a1c960f59947ab517f2444431a3 \ + sha256 6a12ba531ff95cd10ae8e1832f2faff0048226962b22eccfbea3fbe9d8296de0 \ + size 72787611 github.tarball_from archive compilers.choose fc f90 @@ -43,6 +43,11 @@ if {${os.platform} eq "darwin" && ${os.major} > 9} { patch-fix-gfortran-with-clang.diff } +# https://github.com/ElmerCSC/elmerfem/issues/471 +patchfiles-append patch-umf4_f77wrapper.c.diff + +depends_lib-append port:SuiteSparse_UMFPACK + post-patch { reinplace "s,@CC@,${configure.cc}," ${worksrcpath}/CMakeLists.txt reinplace "s,@CXX@,${configure.cxx}," ${worksrcpath}/CMakeLists.txt @@ -94,6 +99,7 @@ if {${os.platform} eq "darwin" && ${os.major} < 13} { # TODO: add variant to support MPICH, Hypre and Mumps. configure.args-append \ -DCMAKE_Fortran_COMPILER=${configure.fc} \ + -DEXTERNAL_UMFPACK=ON \ -DGLX_INCLUDE_DIR=${prefix}/include \ -DUSE_CONTIGUOUS=OFF \ -DWITH_CONTRIB=OFF \ @@ -120,6 +126,9 @@ configure.args-append \ if {[string match macports-gcc* ${configure.compiler}]} { configure.args-replace \ -DWITH_OpenMP=OFF -DWITH_OpenMP=ON + + configure.cflags-append \ + -Wno-error=incompatible-pointer-types } if {[string match *clang* ${configure.compiler}]} { diff --git a/science/elmerfem/files/patch-umf4_f77wrapper.c.diff b/science/elmerfem/files/patch-umf4_f77wrapper.c.diff new file mode 100644 index 000000000000..8212020a66bc --- /dev/null +++ b/science/elmerfem/files/patch-umf4_f77wrapper.c.diff @@ -0,0 +1,10 @@ +--- fem/src/umf4_f77wrapper.c 2024-07-01 19:44:15.000000000 +0800 ++++ fem/src/umf4_f77wrapper.c 2024-07-05 15:31:15.000000000 +0800 +@@ -79,6 +79,7 @@ + */ + + #include "../config.h" ++#include "umfpack.h" + + #ifdef NULL + #undef NULL