science/elmerfem: Update to 8.4.20200708 and fix dependencies

* Update to commit 679a882b on the devel branch (after elmerice merge + fixes)
* Removed DISTVERSIONPREFIX; we use the devel branch now, not official releases
* Removed Tcl dependency; this was only used for ElmerPost, which is obsolete
* Moved lots of library dependencies that were only needed for OpenCASCADE
* Added OCC option for OpenCASCADE dependency; on by default.
* Fixed indirect dependencies (Python 2.7 -> 3.7 and VTK 6.2 -> 8.2)
* Moved WITH_QT5 and QT_FOUND to GUI_CMAKE_ON to avoid CMake warnings
* Added QT5_LIBS to avoid lines longer than 80 characters in the Makefile
* Removed the partial f02cb33a patch file, which is no longer needed
* Removed the last sentence in pkg-descr (written for science/elmerfem-devel)
* Added HelmholtzProjection.so and SpringAssembly.so to pkg-plist

PR:	248246
Submitted by:	henrik@gulbra.net (maintainer)
This commit is contained in:
Fernando Apesteguía 2020-07-31 09:49:03 +00:00
parent b360b5f39e
commit 900fea1a34
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=543850
7 changed files with 47 additions and 70 deletions

View File

@ -2,9 +2,7 @@
# $FreeBSD$
PORTNAME= elmerfem
PORTVERSION= 8.4.20200309
PORTREVISION= 1
DISTVERSIONPREFIX= release-
PORTVERSION= 8.4.20200708
CATEGORIES= science
MAINTAINER= henrik@gulbra.net
@ -17,10 +15,10 @@ LIB_DEPENDS= libmetis.so:math/metis \
libopenblas.so:math/openblas \
libparpack.so:math/arpack-ng
USES= cmake compiler:c++11-lang fortran tcl
USES= cmake compiler:c++11-lang fortran
USE_GITHUB= yes
GH_ACCOUNT= ElmerCSC
GH_TAGNAME= 39f692c
GH_TAGNAME= 679a882b
USE_LDCONFIG= ${PREFIX}/lib/elmersolver
ALL_TARGET= # empty
@ -35,25 +33,36 @@ CMAKE_ARGS+= -DHAVE_INTTYPES_H=ON
CMAKE_ARGS+= -Wno-dev
.endif
OPTIONS_DEFINE= GUI
OPTIONS_DEFAULT= GUI
OPTIONS_DEFINE= GUI OCC
OPTIONS_DEFAULT= GUI OCC
OPTIONS_SUB= yes
OCC_IMPLIES= GUI
GUI_LIB_DEPENDS= libexpat.so:textproc/expat2 \
GUI_DESC= Build with ElmerGUI (Graphical User Interface)
GUI_CMAKE_BOOL= WITH_ELMERGUI WITH_PARAVIEW
GUI_CMAKE_ON= -DQWT_LIBRARY=${QT_LIBDIR}/libqwt6.so \
-DQWT_INCLUDE_DIR=${QT_INCDIR}/qwt6 \
-DDESIRED_QT_VERSION=5 \
-DWITH_QT5:BOOL=TRUE \
-DQT_FOUND:BOOL=TRUE
GUI_LIB_DEPENDS= libqwt6.so:x11-toolkits/qwt6
GUI_USES= gl jpeg qt:5 xorg
GUI_USE= gl=gl,glu xorg=ice,sm,x11,xext,xt qt=${QT5_LIBS:ts,}
OCC_DESC= Use OpenCASCADE for CAD import in ElmerGUI
OCC_CMAKE_BOOL= WITH_OCC
OCC_CMAKE_ON= -DVTK_DIR=${LOCALBASE}/lib/vtk-8.2/cmake/vtk-8.2
OCC_LIB_DEPENDS= libexpat.so:textproc/expat2 \
libfreetype.so:print/freetype2 \
libpng16.so:graphics/png \
libpython2.7.so:lang/python27 \
libqwt6.so:x11-toolkits/qwt6 \
libpython3.7m.so:lang/python37 \
libtiff.so:graphics/tiff \
libvtksys-6.2.so:math/vtk6
GUI_USES= gl jpeg qt:5 xorg
GUI_USE= gl=gl,glu xorg=ice,sm,x11,xext,xt \
qt=buildtools_build,concurrent,core,declarative,gui,location,network,opengl,printsupport,qmake_build,script,sensors,sql,svg,webchannel,webkit,widgets,xml
libTKernel.so:cad/opencascade \
libvtksys-8.2.so:math/vtk8
GUI_CMAKE_BOOL= WITH_ELMERGUI WITH_PARAVIEW WITH_QT5 QT_FOUND # WITH_OCC requires the QVTKWidget.h that is only provided by the math/vtk6 with QT5=yes
GUI_CMAKE_ON= -DQWT_LIBRARY=${QT_LIBDIR}/libqwt6.so \
-DQWT_INCLUDE_DIR=${QT_INCDIR}/qwt6 \
-DDESIRED_QT_VERSION=5
QT5_LIBS= buildtools_build concurrent core declarative gui location \
network opengl printsupport qmake_build script sensors \
sql svg webchannel webkit widgets xml
.include <bsd.port.pre.mk>
@ -69,11 +78,11 @@ post-patch:
@${REINPLACE_CMD} -e 's,"metis.*/metis\.h",<metis.h>,' \
${WRKSRC}/elmergrid/src/femelmer.c
post-patch-GUI-on:
#@${REINPLACE_CMD} -e "s|\$${VERSION}|`${PKG_QUERY} '%v' opencascade`|" \
# "${WRKSRC}/cmake/Modules/FindOCE.cmake"
#@${REINPLACE_CMD} -e 's|$${INCLUDE}|${LOCALBASE}/include/OpenCASCADE|' \
# "${WRKSRC}/cmake/Modules/FindOCE.cmake"
post-patch-OCC-on:
@${REINPLACE_CMD} -e "s|\$${VERSION}|`${PKG_QUERY} '%v' opencascade`|" \
"${WRKSRC}/cmake/Modules/FindOCE.cmake"
@${REINPLACE_CMD} -e 's|$${INCLUDE}|${LOCALBASE}/include/OpenCASCADE|' \
"${WRKSRC}/cmake/Modules/FindOCE.cmake"
post-install:
${LN} -sf ElmerSolver_mpi ${STAGEDIR}${PREFIX}/bin/ElmerSolver

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1583810165
SHA256 (ElmerCSC-elmerfem-release-8.4.20200309-39f692c_GH0.tar.gz) = ac47ad284120077fdb453d7ef2be849b194bedf756bcb5f08fcb46960393ee67
SIZE (ElmerCSC-elmerfem-release-8.4.20200309-39f692c_GH0.tar.gz) = 59972679
TIMESTAMP = 1595166083
SHA256 (ElmerCSC-elmerfem-8.4.20200708-679a882b_GH0.tar.gz) = 13c8b9a4af76ae8fc6b6fcff612572e671ac31cffe070bbef7ace740e4044f1d
SIZE (ElmerCSC-elmerfem-8.4.20200708-679a882b_GH0.tar.gz) = 63393434

View File

@ -1,6 +1,6 @@
--- CMakeLists.txt.orig 2017-05-19 12:19:26 UTC
--- CMakeLists.txt.orig 2020-06-26 12:18:06 UTC
+++ CMakeLists.txt
@@ -264,7 +264,7 @@ ADD_SUBDIRECTORY(umfpack)
@@ -470,7 +470,7 @@ ADD_SUBDIRECTORY(umfpack)
ADD_SUBDIRECTORY(fhutiter)
ADD_SUBDIRECTORY(meshgen2d)
ADD_SUBDIRECTORY(fem)

View File

@ -1,11 +1,11 @@
--- ElmerGUI/Application/cad/cadview.cpp.orig 2020-03-06 10:30:22 UTC
--- ElmerGUI/Application/cad/cadview.cpp.orig 2020-06-26 12:18:06 UTC
+++ ElmerGUI/Application/cad/cadview.cpp
@@ -69,7 +69,7 @@
#include <TopoDS_Shape.hxx>
#include <BRepTools.hxx>
#include <TopTools_HSequenceOfShape.hxx>
@@ -74,7 +74,7 @@
#include <BRepAdaptor_Curve2d.hxx>
#include <BRepBndLib.hxx>
#include <BRepGProp.hxx>
-#include <BRepMesh.hxx>
+#include <BRepMesh_IncrementalMesh.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS.hxx>
#include <BRepTools.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>

View File

@ -1,31 +0,0 @@
This is **part** of the GitHub commit, only the bit fixing the build:
CMake Error at fem/tests/CMakeLists.txt:17 (FOREACH):
FOREACH Invalid integer: 'depth'
Call Stack (most recent call first):
fem/tests/CMakeLists.txt:29 (SUBDIRLIST)
From f02cb33acd59a32c41fe9f67367155e271c22ae8 Mon Sep 17 00:00:00 2001
From: Foad Sojoodi Farimani <foad@Foads-MacBook-Pro.local>
Date: Fri, 3 Apr 2020 22:25:02 +0200
Subject: [PATCH] now compiles on macOS
---
README.adoc | 49 ++++++++--------------------------------
fem/tests/CMakeLists.txt | 2 +-
2 files changed, 11 insertions(+), 40 deletions(-)
diff --git a/fem/tests/CMakeLists.txt b/fem/tests/CMakeLists.txt
index e8bd7ed84..06d1168ea 100644
--- fem/tests/CMakeLists.txt
+++ fem/tests/CMakeLists.txt
@@ -14,7 +14,7 @@ SET(MESH2D_BIN "${CMAKE_BINARY_DIR}/meshgen2d/src/Mesh2D")
MACRO(SUBDIRLIST result curdir depth)
set(glob_pattern "*")
- FOREACH(D RANGE 1 depth)
+ FOREACH(D RANGE 1 ${depth})
FILE(GLOB children RELATIVE ${curdir} ${glob_pattern})
FOREACH(child ${children})
IF(IS_DIRECTORY ${curdir}/${child})

View File

@ -7,7 +7,4 @@ New solvers can be added as separate modules linked into the program.
While Elmer is powerful, it is not for the faint of heart. New users
can expect to spend days or weeks honing their skills in one domain.
This port is a development version of Elmer, which may or may not be
better suited to your needs than the latest official release.
WWW: https://www.csc.fi/web/elmer

View File

@ -357,6 +357,7 @@ share/elmersolver/lib/HarmonicSignals.so
share/elmersolver/lib/HeatSolve.so
share/elmersolver/lib/HeatSolveVec.so
share/elmersolver/lib/HelmholtzBEM.so
share/elmersolver/lib/HelmholtzProjection.so
share/elmersolver/lib/HelmholtzSolve.so
share/elmersolver/lib/IncompressibleNSVec.so
share/elmersolver/lib/Isosurface.so
@ -408,6 +409,7 @@ share/elmersolver/lib/ShearrateSolver.so
share/elmersolver/lib/ShellSolver.so
share/elmersolver/lib/Smitc.so
share/elmersolver/lib/Spalart-Allmaras.so
share/elmersolver/lib/SpringAssembly.so
share/elmersolver/lib/StatCurrentSolve.so
share/elmersolver/lib/StatCurrentSolveVec.so
share/elmersolver/lib/StatElecBoundary.so