aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2024-06-22 21:07:11 +0000
committerThierry Thomas <thierry@FreeBSD.org>2024-06-23 12:58:40 +0000
commit298551c2dc60383093f6687648519222b7127a5a (patch)
tree996ed24dfd4a0a0f868e903aef6d07b76befa31d
parente5c6ec80c6c0e8f01ce866367182b5b46d3d1d38 (diff)
science/linearelasticity: new port, Elas, a solver for linear elasticity
Required by Mmg.
-rw-r--r--science/Makefile1
-rw-r--r--science/linearelasticity/Makefile37
-rw-r--r--science/linearelasticity/distinfo3
-rw-r--r--science/linearelasticity/files/patch-CMakeLists.txt42
-rw-r--r--science/linearelasticity/pkg-descr6
-rw-r--r--science/linearelasticity/pkg-plist6
6 files changed, 95 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index ddbfcac05382..50cd1d2e219d 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -166,6 +166,7 @@
SUBDIR += libvdwxc
SUBDIR += libxc
SUBDIR += liggghts
+ SUBDIR += linearelasticity
SUBDIR += linux-zotero
SUBDIR += luscus
SUBDIR += m-aneos
diff --git a/science/linearelasticity/Makefile b/science/linearelasticity/Makefile
new file mode 100644
index 000000000000..127a2a37c42b
--- /dev/null
+++ b/science/linearelasticity/Makefile
@@ -0,0 +1,37 @@
+PORTNAME= LinearElasticity
+PORTVERSION= 1.0.0
+DISTVERSIONPREFIX= v
+CATEGORIES= science
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= Elas, a solver for linear elasticity
+WWW= https://github.com/ISCDtoolbox/LinearElasticity
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+LIB_DEPENDS= libCommons.so:devel/iscd-commons
+
+USES= cmake:testing compiler:c++17-lang
+
+USE_GITHUB= yes
+GH_ACCOUNT= ISCDtoolbox
+
+CFLAGS+= -I${LOCALBASE}/include/ISCD
+USE_LDCONFIG= yes
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+PORTDOCS= README.md
+PORTEXAMPLES= *
+
+do-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+do-install-EXAMPLES-on:
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ (cd ${WRKSRC}/demos && \
+ ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR})
+
+.include <bsd.port.mk>
diff --git a/science/linearelasticity/distinfo b/science/linearelasticity/distinfo
new file mode 100644
index 000000000000..67572e5f07ab
--- /dev/null
+++ b/science/linearelasticity/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1719072290
+SHA256 (ISCDtoolbox-LinearElasticity-v1.0.0_GH0.tar.gz) = e25d5cd448f4eb8d15461cea4203e854c87a0504c8343ff01c8f8f55b33ee2b7
+SIZE (ISCDtoolbox-LinearElasticity-v1.0.0_GH0.tar.gz) = 855724
diff --git a/science/linearelasticity/files/patch-CMakeLists.txt b/science/linearelasticity/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..f78bd758f17f
--- /dev/null
+++ b/science/linearelasticity/files/patch-CMakeLists.txt
@@ -0,0 +1,42 @@
+--- CMakeLists.txt.orig 2021-05-06 07:50:46 UTC
++++ CMakeLists.txt
+@@ -1,6 +1,4 @@ cmake_minimum_required(VERSION 2.8)
+ cmake_minimum_required(VERSION 2.8)
+-set(CMAKE_BUILD_TYPE "Release")
+-SET(CMAKE_CXX_FLAGS "-w -g -O3")
+ set(CMAKE_MACOSX_RPATH 1)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+@@ -11,24 +9,20 @@ ADD_LIBRARY( Elas SHARED ${source_files})
+ file( GLOB_RECURSE source_files sources/*)
+ file( GLOB_RECURSE header_files sources/*.h)
+ ADD_LIBRARY( Elas SHARED ${source_files})
+-find_library( Commons NAMES Commons HINTS "$ENV{HOME}/lib")
+-INCLUDE_DIRECTORIES( "$ENV{HOME}/include")
+-LINK_DIRECTORIES( "$ENV{HOME}/lib")
++set_target_properties( Elas PROPERTIES VERSION 0.0.0 SOVERSION 0)
++find_library( Commons NAMES Commons HINTS lib)
++INCLUDE_DIRECTORIES( include/ISCD)
++LINK_DIRECTORIES( ${Elas_BINARY_DIR})
+ target_link_libraries( Elas ${Commons})
+ INSTALL(
+ TARGETS Elas
+- LIBRARY DESTINATION "$ENV{HOME}/lib"
+- RUNTIME DESTINATION "$ENV{HOME}/lib")
+-INSTALL( FILES ${header_files} DESTINATION "$ENV{HOME}/include")
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ RUNTIME DESTINATION lib${LIB_SUFFIX})
++INSTALL( FILES ${header_files} DESTINATION include)
+
+ #Executable
+ project(main)
+ add_executable( elastic sources/elastic.c)
+ target_link_libraries( elastic ${Commons} Elas)
+-INSTALL( TARGETS elastic RUNTIME DESTINATION "$ENV{HOME}/bin")
+-
+-
+-
+-
+-
++INSTALL( TARGETS elastic RUNTIME DESTINATION bin)
+
diff --git a/science/linearelasticity/pkg-descr b/science/linearelasticity/pkg-descr
new file mode 100644
index 000000000000..bbb07da4c6c7
--- /dev/null
+++ b/science/linearelasticity/pkg-descr
@@ -0,0 +1,6 @@
+Elas, alias Elastic, is a simple yet efficient finite element solver for linear
+elasticity problems in two and three dimensions.
+
+A full description of all parameters and options that can be specified in the
+command line or in a parameter file [file.elas] can be found in the project
+wiki, see <https://github.com/ISCDtoolbox/LinearElasticity/wiki>.
diff --git a/science/linearelasticity/pkg-plist b/science/linearelasticity/pkg-plist
new file mode 100644
index 000000000000..4a18ee1968af
--- /dev/null
+++ b/science/linearelasticity/pkg-plist
@@ -0,0 +1,6 @@
+bin/elastic
+include/elastic.h
+include/ls_calls.h
+lib/libElas.so
+lib/libElas.so.0
+lib/libElas.so.0.0.0