summaryrefslogtreecommitdiffstats
path: root/libraries/spglib/spglib.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/spglib/spglib.SlackBuild')
-rw-r--r--libraries/spglib/spglib.SlackBuild23
1 files changed, 14 insertions, 9 deletions
diff --git a/libraries/spglib/spglib.SlackBuild b/libraries/spglib/spglib.SlackBuild
index aaeaff678d..d4f51517d1 100644
--- a/libraries/spglib/spglib.SlackBuild
+++ b/libraries/spglib/spglib.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for spglib
-# Copyright 2020-2022 Giancarlo Dessì, Cagliari, IT
+# Copyright 2020-2024 Giancarlo Dessì, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=spglib
-VERSION=${VERSION:-2.0.0}
+VERSION=${VERSION:-2.3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -63,6 +63,13 @@ else
LIBDIRSUFFIX=""
fi
+# BUILDING OPTIONS:
+# python interface and openmp enabled by default
+with_python="-DSPGLIB_WITH_Python=ON" ; [ "${PYTHON:-yes}" = "no" ] && with_python=""
+with_omp="-DSPGLIB_USE_OMP=ON" ; [ "${OMP:-yes}" = "no" ] && with_omp=""
+# fortran interface disabled by default
+with_fortran="-DSPGLIB_WITH_Fortran=ON" ; [ "${FORTRAN:-no}" = "no" ] && with_fortran=""
+
set -e
rm -rf $PKG
@@ -83,6 +90,10 @@ cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DSPGLIB_WITH_TESTS=OFF \
+ $with_python \
+ $with_omp \
+ $with_fortran \
-DCMAKE_BUILD_TYPE=Release ..
make
make install/strip DESTDIR=$PKG
@@ -90,17 +101,11 @@ cd ..
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
-#Build the python bindings
-(
- cd python
- python3 setup.py install --root=$PKG
-)
-
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README.md Contributing.md CITATION.cff $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install