mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-13 03:03:15 +00:00
science/elmerfem: Update 8.4.20200708 -> 9.0
PR: 258784 Original patch submitted by: henrik@gulbra.net (maintainer)
This commit is contained in:
parent
cf68fe1051
commit
a9a91e3c14
@ -1,8 +1,8 @@
|
||||
# Created by: Pedro Giffuni
|
||||
|
||||
PORTNAME= elmerfem
|
||||
PORTVERSION= 8.4.20200708
|
||||
PORTREVISION= 2
|
||||
DISTVERSIONPREFIX= release-
|
||||
DISTVERSION= 9.0
|
||||
CATEGORIES= science
|
||||
|
||||
MAINTAINER= henrik@gulbra.net
|
||||
@ -10,23 +10,25 @@ COMMENT= Multiphysical simulation software
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
LIB_DEPENDS= libmetis.so:math/metis \
|
||||
LIB_DEPENDS= libblas.so:math/blas \
|
||||
libmetis.so:math/metis \
|
||||
libmpich.so:net/mpich \
|
||||
libopenblas.so:math/openblas \
|
||||
libparpack.so:math/arpack-ng
|
||||
|
||||
USES= cmake compiler:c++11-lang fortran
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ElmerCSC
|
||||
GH_TAGNAME= 679a882b
|
||||
USE_LDCONFIG= ${PREFIX}/lib/elmersolver
|
||||
|
||||
ALL_TARGET= # empty
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ElmerCSC
|
||||
|
||||
CMAKE_ARGS= -DELMER_FEM_REVISION:STRING=${GH_TAGNAME}
|
||||
|
||||
ALL_TARGET= # empty
|
||||
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
FCPPFLAGS+= -ansi
|
||||
|
||||
PORTSCOUT= limit:^release-[1-9]
|
||||
|
||||
CMAKE_ARGS+= -DHAVE_INTTYPES_H=ON
|
||||
.if !defined(MAINTAINER_MODE)
|
||||
@ -36,31 +38,35 @@ CMAKE_ARGS+= -Wno-dev
|
||||
OPTIONS_DEFINE= GUI OCC
|
||||
OPTIONS_DEFAULT= GUI OCC
|
||||
OPTIONS_SUB= yes
|
||||
OCC_IMPLIES= GUI
|
||||
|
||||
GUI_DESC= Build with ElmerGUI (Graphical User Interface)
|
||||
OCC_DESC= Use OpenCASCADE for CAD import in ElmerGUI
|
||||
|
||||
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,}
|
||||
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_IMPLIES= GUI
|
||||
OCC_LIB_DEPENDS= libexpat.so:textproc/expat2 \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libpng.so:graphics/png \
|
||||
libpython3.7m.so:lang/python37 \
|
||||
libpython${_PYVERSION}.so:lang/python${PYTHON_SUFFIX} \
|
||||
libtiff.so:graphics/tiff \
|
||||
libTKernel.so:cad/opencascade \
|
||||
libvtksys-8.2.so:math/vtk8
|
||||
libvtksys-9.0.so:math/vtk9
|
||||
OCC_USES= python
|
||||
OCC_CMAKE_BOOL= WITH_OCC
|
||||
OCC_CMAKE_ON= -DVTK_DIR=${LOCALBASE}/lib/cmake/vtk-9.0
|
||||
|
||||
QT5_LIBS= buildtools_build concurrent core declarative gui location \
|
||||
_LIBSTAGEDIR= ${STAGEDIR}/${PREFIX}/lib/elmersolver
|
||||
_PYVERSION= ${PYTHON_VER}${PYTHON_ABIVER}
|
||||
_QT5_LIBS= buildtools_build concurrent core declarative gui location \
|
||||
network opengl printsupport qmake_build script sensors \
|
||||
sql svg webchannel webkit widgets xml
|
||||
|
||||
@ -80,9 +86,10 @@ FFLAGS+= -fallow-argument-mismatch
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${RM} ${WRKSRC}/cmake/Modules/CMakeParseArguments.cmake
|
||||
@${RM} -r ${WRKSRC}/elmergrid/src/metis-5.1.0
|
||||
@${REINPLACE_CMD} -e 's,"metis.*/metis\.h",<metis.h>,' \
|
||||
${WRKSRC}/elmergrid/src/femelmer.c
|
||||
${WRKSRC}/elmergrid/src/egparallel.c
|
||||
|
||||
post-patch-OCC-on:
|
||||
@${REINPLACE_CMD} -e "s|\$${VERSION}|`${PKG_QUERY} '%v' opencascade`|" \
|
||||
@ -92,6 +99,10 @@ post-patch-OCC-on:
|
||||
|
||||
post-install:
|
||||
${LN} -sf ElmerSolver_mpi ${STAGEDIR}${PREFIX}/bin/ElmerSolver
|
||||
${LN} -sf libelmersolver.so ${_LIBSTAGEDIR}/libelmersolver.so.0
|
||||
${LN} -sf libfhuti.so ${_LIBSTAGEDIR}/libfhuti.so.0
|
||||
${LN} -sf libmatc.so ${_LIBSTAGEDIR}/libmatc.so.0
|
||||
${LN} -sf libmpi_stubs.so ${_LIBSTAGEDIR}/libmpi_stubs.so.0
|
||||
@${STRIP_CMD} ${STAGEDIR}/${PREFIX}/bin/ElmerGrid
|
||||
|
||||
do-test:
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1595166083
|
||||
SHA256 (ElmerCSC-elmerfem-8.4.20200708-679a882b_GH0.tar.gz) = 13c8b9a4af76ae8fc6b6fcff612572e671ac31cffe070bbef7ace740e4044f1d
|
||||
SIZE (ElmerCSC-elmerfem-8.4.20200708-679a882b_GH0.tar.gz) = 63393434
|
||||
TIMESTAMP = 1637005486
|
||||
SHA256 (ElmerCSC-elmerfem-release-9.0_GH0.tar.gz) = 08c5bf261e87ff37456c1aa0372db3c83efabe4473ea3ea0b8ec66f5944d1aa0
|
||||
SIZE (ElmerCSC-elmerfem-release-9.0_GH0.tar.gz) = 64060003
|
||||
|
@ -1,4 +1,6 @@
|
||||
--- ElmerGUI/Application/cad/cadview.cpp.orig 2020-06-26 12:18:06 UTC
|
||||
- includes workaround for https://github.com/ElmerCSC/elmerfem/issues/304
|
||||
|
||||
--- ElmerGUI/Application/cad/cadview.cpp.orig 2021-11-10 14:49:01 UTC
|
||||
+++ ElmerGUI/Application/cad/cadview.cpp
|
||||
@@ -74,7 +74,7 @@
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
@ -9,3 +11,54 @@
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
@@ -343,9 +343,6 @@ bool CadView::readFile(QString fileName) {
|
||||
|
||||
const gp_Trsf &Transformation = Location.Transformation();
|
||||
|
||||
- const Poly_Array1OfTriangle &Triangles = Triangulation->Triangles();
|
||||
- const TColgp_Array1OfPnt &Nodes = Triangulation->Nodes();
|
||||
-
|
||||
int nofTriangles = Triangulation->NbTriangles();
|
||||
int nofNodes = Triangulation->NbNodes();
|
||||
|
||||
@@ -366,8 +363,8 @@ bool CadView::readFile(QString fileName) {
|
||||
vtkTriangle *triangle = vtkTriangle::New();
|
||||
partGrid->Allocate(nofTriangles, nofTriangles);
|
||||
|
||||
- for (int i = Triangles.Lower(); i <= Triangles.Upper(); i++) {
|
||||
- Triangles(i).Get(n0, n1, n2);
|
||||
+ for (int i = 1; i <= nofTriangles; i++) {
|
||||
+ Triangulation->Triangle(i).Get(n0, n1, n2);
|
||||
|
||||
if (Face.Orientation() != TopAbs_FORWARD) {
|
||||
int tmp = n2;
|
||||
@@ -375,9 +372,9 @@ bool CadView::readFile(QString fileName) {
|
||||
n1 = tmp;
|
||||
}
|
||||
|
||||
- triangle->GetPointIds()->SetId(0, n0 - Nodes.Lower());
|
||||
- triangle->GetPointIds()->SetId(1, n1 - Nodes.Lower());
|
||||
- triangle->GetPointIds()->SetId(2, n2 - Nodes.Lower());
|
||||
+ triangle->GetPointIds()->SetId(0, n0 - 1);
|
||||
+ triangle->GetPointIds()->SetId(1, n1 - 1);
|
||||
+ triangle->GetPointIds()->SetId(2, n2 - 1);
|
||||
|
||||
partGrid->InsertNextCell(triangle->GetCellType(),
|
||||
triangle->GetPointIds());
|
||||
@@ -385,13 +382,13 @@ bool CadView::readFile(QString fileName) {
|
||||
|
||||
double x[3];
|
||||
vtkPoints *partPoints = vtkPoints::New();
|
||||
- for (int i = Nodes.Lower(); i <= Nodes.Upper(); i++) {
|
||||
- gp_XYZ XYZ = Nodes(i).Coord();
|
||||
+ for (int i = 1; i <= nofNodes; i++) {
|
||||
+ gp_XYZ XYZ = Triangulation->Node(i).Coord();
|
||||
Transformation.Transforms(XYZ);
|
||||
x[0] = XYZ.X();
|
||||
x[1] = XYZ.Y();
|
||||
x[2] = XYZ.Z();
|
||||
- partPoints->InsertPoint(i - Nodes.Lower(), x);
|
||||
+ partPoints->InsertPoint(i - 1, x);
|
||||
}
|
||||
|
||||
partGrid->SetPoints(partPoints);
|
||||
|
@ -0,0 +1,10 @@
|
||||
--- cmake/Modules/FindPackageHandleStandardArgs.cmake.orig 2020-11-10 19:52:44 UTC
|
||||
+++ cmake/Modules/FindPackageHandleStandardArgs.cmake
|
||||
@@ -100,7 +100,6 @@
|
||||
# License text for the above reference.)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
|
||||
-include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
|
||||
|
||||
# internal helper macro
|
||||
macro(_FPHSA_FAILURE_MESSAGE _msg)
|
@ -1,4 +1,4 @@
|
||||
--- elmergrid/src/CMakeLists.txt.orig 2020-03-06 10:30:22 UTC
|
||||
--- elmergrid/src/CMakeLists.txt.orig 2020-11-10 19:52:44 UTC
|
||||
+++ elmergrid/src/CMakeLists.txt
|
||||
@@ -12,19 +12,13 @@ IF(CMAKE_CROSSCOMPILING)
|
||||
ENDIF()
|
||||
@ -8,11 +8,11 @@
|
||||
-SET(METIS_INSTALL FALSE CACHE BOOL "")
|
||||
-ADD_SUBDIRECTORY(metis-5.1.0)
|
||||
-
|
||||
SET(elmergrid_SRCS common.h femdef.h femelmer.h femfilein.h
|
||||
femfileout.h feminfo.h femknot.h femmesh.h
|
||||
femtypes.h nrutil.h common.c femelmer.c femfilein.c femfileout.c
|
||||
feminfo.c femknot.c femmesh.c fempre.c
|
||||
nrutil.c)
|
||||
SET(elmergrid_SRCS egdef.h egparallel.h egnative.h egconvert.h
|
||||
egexport.h egextra.h egmesh.h
|
||||
egtypes.h egutils.h egparallel.c egnative.c egconvert.c egexport.c
|
||||
egextra.c egmesh.c fempre.c
|
||||
egutils.c)
|
||||
|
||||
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/metis)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
@ -12,9 +12,13 @@ bin/matc
|
||||
lib/elmersolver/libamd.a
|
||||
lib/elmersolver/libamdf77.a
|
||||
lib/elmersolver/libelmersolver.so
|
||||
lib/elmersolver/libelmersolver.so.0
|
||||
lib/elmersolver/libfhuti.so
|
||||
lib/elmersolver/libfhuti.so.0
|
||||
lib/elmersolver/libmatc.so
|
||||
lib/elmersolver/libmatc.so.0
|
||||
lib/elmersolver/libmpi_stubs.so
|
||||
lib/elmersolver/libmpi_stubs.so.0
|
||||
lib/elmersolver/libumfpack.a
|
||||
%%GUI%%share/ElmerGUI/edf-extra/advection-diffusion.xml
|
||||
%%GUI%%share/ElmerGUI/edf-extra/divergencesolver.xml
|
||||
@ -292,7 +296,9 @@ share/elmersolver/include/pelementmaps.mod
|
||||
share/elmersolver/include/porousmaterials.mod
|
||||
share/elmersolver/include/radiation.mod
|
||||
share/elmersolver/include/radiationfactorglobals.mod
|
||||
share/elmersolver/include/saveutils.mod
|
||||
share/elmersolver/include/smoothers.mod
|
||||
share/elmersolver/include/solidmechanicsutils.mod
|
||||
share/elmersolver/include/solverutils.mod
|
||||
share/elmersolver/include/sparitercomm.mod
|
||||
share/elmersolver/include/spariterglobals.mod
|
||||
@ -353,6 +359,7 @@ share/elmersolver/lib/FluxSolver.so
|
||||
share/elmersolver/lib/FourierLoss.so
|
||||
share/elmersolver/lib/FreeSurfaceReduced.so
|
||||
share/elmersolver/lib/FreeSurfaceSolver.so
|
||||
share/elmersolver/lib/GmshOutputReader.so
|
||||
share/elmersolver/lib/HarmonicSignals.so
|
||||
share/elmersolver/lib/HeatSolve.so
|
||||
share/elmersolver/lib/HeatSolveVec.so
|
||||
@ -369,6 +376,7 @@ share/elmersolver/lib/MagnetoDynamics.so
|
||||
share/elmersolver/lib/MagnetoDynamics2D.so
|
||||
share/elmersolver/lib/MarchingODESolver.so
|
||||
share/elmersolver/lib/Mesh2MeshSolver.so
|
||||
share/elmersolver/lib/MeshChecksum.so
|
||||
share/elmersolver/lib/MeshSolve.so
|
||||
share/elmersolver/lib/ModelMixedPoisson.so
|
||||
share/elmersolver/lib/ModelPDE.so
|
||||
|
Loading…
Reference in New Issue
Block a user