aboutsummaryrefslogtreecommitdiff
path: root/academic/gmsh/gmsh.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/gmsh/gmsh.SlackBuild')
-rw-r--r--academic/gmsh/gmsh.SlackBuild31
1 files changed, 26 insertions, 5 deletions
diff --git a/academic/gmsh/gmsh.SlackBuild b/academic/gmsh/gmsh.SlackBuild
index 32d8a75d818d..029fada39a58 100644
--- a/academic/gmsh/gmsh.SlackBuild
+++ b/academic/gmsh/gmsh.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# Slackware build script for gmsh
-# Copyright 2020 Fellype do Nascimento, Campinas, Brazil
+# Copyright 2020-2022 Fellype do Nascimento, Guaratingueta, Brazil
#
# Based on SlackBuild by Loris Vincenzi and PKGBUILD for gmsh at AUR
#
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gmsh
-VERSION=${VERSION:-4.5.4}
+VERSION=${VERSION:-4.9.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -79,13 +79,36 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# In order build getdp with gmsh support it is needed to build
+# a small static Gmsh library first
+# do it using BUILDSTATICLIB=yes ./gmsh.SlackBuild
+# default is BUILDSTATICLIB=no
+if [ "${BUILDSTATICLIB:-no}" = "yes" ]; then
+ echo "**building a static library for gmsh**"
+ mkdir lib
+ cd lib
+ cmake -DDEFAULT=0 \
+ -DENABLE_PARSER=1 \
+ -DENABLE_POST=1 \
+ -DENABLE_ANN=1 \
+ -DENABLE_BLAS_LAPACK=1 \
+ -DENABLE_BUILD_LIB=1 \
+ -DENABLE_PRIVATE_API=1 \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ ..
+ make lib
+ make install/fast DESTDIR=$PKG/
+ cd ..
+fi
+
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_INSTALL_DOCDIR:PATH=/usr/share/gmsh \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DENABLE_BUILD_SHARED=ON \
+ -DENABLE_BLAS_LAPACK=1 \
+ -DENABLE_BUILD_SHARED=1 \
-DENABLE_PETSC=OFF \
-DENABLE_SLEPC=OFF \
..
@@ -100,7 +123,6 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
install -d "$PKG/usr/share/pixmaps/$PRGNAM"
install -m644 utils/icons/*.png "$PKG/usr/share/pixmaps/$PRGNAM"
-install -D -m644 utils/icons/solid_32x32.png "$PKG/usr/share/icons/$PRGNAM.png"
install -D -m644 utils/icons/$PRGNAM.svg "$PKG/usr/share/icons/hicolor/scalable/apps/$PRGNAM.svg"
desktop-file-install --dir="$PKG/usr/share/applications" "$CWD/$PRGNAM.desktop"
@@ -116,7 +138,6 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG.txt CREDITS.txt LICENSE.txt README.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
rm $PKG/usr/share/gmsh/*.txt
-rm -Rf $PKG/tmp
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc