Skip to content

Commit

Permalink
elmerfem: update to 2024.07.04, fix build with gcc14
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Jul 5, 2024
1 parent 02dcc33 commit 01b7c20
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
19 changes: 14 additions & 5 deletions science/elmerfem/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 \
Expand All @@ -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}]} {
Expand Down
10 changes: 10 additions & 0 deletions science/elmerfem/files/patch-umf4_f77wrapper.c.diff
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 01b7c20

Please sign in to comment.