Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMSH: new recipe #6122

Merged
merged 1 commit into from Aug 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
93 changes: 93 additions & 0 deletions sci-libs/gmsh/gmsh-4.8.4.recipe
@@ -0,0 +1,93 @@
SUMMARY="A three-dimensional finite element mesh generator"
DESCRIPTION="Gmsh is an open source 3D finite element mesh generator with a \
built-in CAD engine and post-processor. Its design goal is to provide a fast, \
light and user-friendly meshing tool with parametric input and advanced \
visualization capabilities. Gmsh is built around four modules: geometry, \
mesh, solver and post-processing. The specification of any input to these \
modules is done either interactively using the graphical user interface, in \
ASCII text files using Gmsh's own scripting language (.geo files), or using \
the C++, C, Python or Julia Application Programming Interface (API)."
HOMEPAGE="http://gmsh.info/"
COPYRIGHT="1997-2021 C. Geuzaine and J.-F. Remacle"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://gmsh.info/src/gmsh-4.8.4-source.tgz"
CHECKSUM_SHA256="760dbdc072eaa3c82d066c5ba3b06eacdd3304eb2a97373fe4ada9509f0b6ace"
SOURCE_DIR="gmsh-$portVersion-source"

ARCHITECTURES="!x86_gcc2 !x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"

libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"

PROVIDES="
gmsh$secondaryArchSuffix = $portVersion
cmd:gmsh$secondaryArchSuffix = $portVersion
cmd:onelab.py$secondaryArchSuffix = $portVersion
lib:libgmsh$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libgmp$secondaryArchSuffix
lib:libhdf5$secondaryArchSuffix
"

PROVIDES_devel="
gmsh${secondaryArchSuffix}_devel = $portVersion
devel:libgmsh$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
gmsh$secondaryArchSuffix == $portVersion base
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfreetype$secondaryArchSuffix
devel:libgmp$secondaryArchSuffix
devel:libhdf5$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3.7
cmd:sed
cmd:strip$secondaryArchSuffix
"

defineDebugInfoPackage gmsh$secondaryArchSuffix \
"$libDir"/libgmsh.so.$libVersion

BUILD()
{
rm -rf build
cmake -B build -S . \
$cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_BUILD_SHARED=ON \
-DENABLE_BUILD_DYNAMIC=ON \
-DCMAKE_EXE_LINKER_FLAGS="-lnetwork"

cmake --build build $jobArgs
}

INSTALL()
{
cmake --install build

prepareInstalledDevelLib libgmsh

fixPkgconfig

packageEntries devel \
$developDir
}

TEST()
{
cd build
make test
}