<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/4194aa2b6298aa050683ee80d47d0de6845cade7">https://github.com/macports/macports-ports/commit/4194aa2b6298aa050683ee80d47d0de6845cade7</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 4194aa2b629 elmerfem: new port in science (#18798)
</span>4194aa2b629 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 4194aa2b6298aa050683ee80d47d0de6845cade7
</span>Author: Sergey Fedorov <vital.had@gmail.com>
AuthorDate: Fri May 26 01:17:02 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> elmerfem: new port in science (#18798)
</span>---
science/elmerfem/Portfile | 95 ++++++++++++++++++++++
science/elmerfem/files/patch-ElmerGUI.diff | 21 +++++
.../elmerfem/files/patch-use-right-compiler.diff | 15 ++++
3 files changed, 131 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/elmerfem/Portfile b/science/elmerfem/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..5f63a1404b0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/elmerfem/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,95 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- 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
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup cmake 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compiler_blacklist_versions 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compilers 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup linear_algebra 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup legacysupport 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup qt4 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# _strnlen, getline
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+legacysupport.newest_darwin_requires_legacy 10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup ElmerCSC elmerfem 0d2f040f4a49ea0c994c27ddf85b88924676cdfa
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 2023.05.23
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories science
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license GPL-2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Elmer is a tool that can solve a large number of partial differential equations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description {*}${description} making it an ideal tool for multiphysical problems. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ It includes models for structural mechanics, fluid dynamics, heat transfer, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ electromagnetics and beyond. Elmer can also be used on massively parallel HPC platforms.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://www.elmerfem.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 d04c615626a7157ac12c8306adfc497e5da2c277 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 c174ba79f0bb4f01b6651cacc7e4d99dc26756986b29a10f6f2cb3ff7ed9db98 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 70961371
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib-append port:qwt61
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compilers.choose fc f90
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compilers.setup require_fortran
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {*gcc-[34].*} {macports-gcc-[56]} {clang < 500}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-use-right-compiler.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-ElmerGUI.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s,@CC@,${configure.cc}," ${worksrcpath}/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s,@CXX@,${configure.cxx}," ${worksrcpath}/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s,@FC@,${configure.fc}," ${worksrcpath}/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s,CMAKE_SYSTEM_PROCESSOR,CMAKE_OSX_ARCHITECTURES,g" ${worksrcpath}/cpack/ElmerCPack.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-configure {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append ${cmake_linalglib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset openblas]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBLAS_LIBRARIES=${prefix}/lib/libopenblas.dylib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLAPACK_LIBRARIES=${prefix}/lib/libopenblas.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set qt4_dir ${prefix}/libexec/qt4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_Fortran_COMPILER=${configure.fc} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DQt4_LIBRARIES=${qt4_dir}/lib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DQWT_INCLUDE_DIR=${qt4_dir}/include/qwt \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DQWT_LIBRARY=${qt4_dir}/lib/libqwt.dylib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_CONTRIB=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_ELMERGUI=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_ELMERGUITESTER=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_ELMERGUILOGGER=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_ElmerIce=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_ELMERPOST=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_FETI4I=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DGLX_INCLUDE_DIR=${prefix}/include \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_Hypre=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_LUA=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_MKL=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_MMG=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_MPI=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_Mumps=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_NETCDF=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_OCC=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_OpenMP=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_QT5=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_QWT=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_Trilinos=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_XIOS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_Zoltan=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_CONTIGUOUS=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[string match macports-gcc* ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_OpenMP=OFF -DWITH_OpenMP=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[string match *clang* ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Load.c: error: call to undeclared function 'var_copy_transpose'; ISO C99 and later do not support implicit function declarations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cflags-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -Wno-error=implicit-function-declaration
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/elmerfem/files/patch-ElmerGUI.diff b/science/elmerfem/files/patch-ElmerGUI.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..88e0e8231aa
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/elmerfem/files/patch-ElmerGUI.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,21 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ElmerGUI/Application/src/sifgenerator.cpp.orig 2023-05-23 22:13:38.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ElmerGUI/Application/src/sifgenerator.cpp 2023-05-24 14:54:53.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1229,14 +1229,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Adjust array parameters, i.e.:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // eliminate the first '=' in "Save Coordinates = (2,3) = 1.2 2.3 3.4 4.5 5.6 6.7"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QRegularExpression qre("^\\s*\\(\\s*[1-9]+[0-9]*\\s*(,\\s*[1-9]+[0-9]*\\s*)*\\)\\s*=");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QRegularExpressionMatch match = qre.match(value);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if(match.hasMatch()){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QRegExp qre("^\\s*\\(\\s*[1-9]+[0-9]*\\s*(,\\s*[1-9]+[0-9]*\\s*)*\\)\\s*=");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (qre.exactMatch(value)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ addSifLine(" " + name, value);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cout << " [SifGenerator] array parameter adjusted: '"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ << name.toLatin1().constData() << " = " << value.toLatin1().constData() << "' to '"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ << name.toLatin1().constData() << value.toLatin1().constData() << "'" << endl;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }else{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ addSifLine(" " + name + " = ", value);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/elmerfem/files/patch-use-right-compiler.diff b/science/elmerfem/files/patch-use-right-compiler.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..38cdd10789d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/elmerfem/files/patch-use-right-compiler.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- CMakeLists.txt.orig 2023-05-23 22:13:38.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ CMakeLists.txt 2023-05-24 07:42:04.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -14,9 +14,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # message("you need to have gcc-gfrotran installed using HomeBrew")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # set(CMAKE_C_COMPILER "/usr/bin/gcc")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # set(CMAKE_CXX_COMPILER "/usr/bin/g++")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(CMAKE_C_COMPILER "/usr/local/bin/gcc-10")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(CMAKE_CXX_COMPILER "/usr/local/bin/g++-10")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(CMAKE_Fortran_COMPILER "/usr/local/bin/gfortran")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(CMAKE_C_COMPILER @CC@)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(CMAKE_CXX_COMPILER @CXX@)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(CMAKE_Fortran_COMPILER @FC@)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # set(BLA_VENDOR "OpenBLAS")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # option(HUNTER_ENABLED "Enable Hunter package manager support" OFF)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # set (CMAKE_GENERATOR "Unix Makefiles" CACHE INTERNAL "" FORCE)
</span></pre><pre style='margin:0'>
</pre>