aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorGiancarlo Dessì <slack@giand.it>2023-09-16 09:46:25 +0900
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-09-17 00:10:23 +0700
commit2a784d9cd944a8f3cdae5b81bd589deaaa0ec23a (patch)
tree75442e1e636a51424ba283a2013589dd158c1cf5 /libraries
parent71ce973db67ce03c8c67d59fa4b988f3dc37442b (diff)
libraries/spglib: Updated for version 2.1.0.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/spglib/README10
-rw-r--r--libraries/spglib/spglib.SlackBuild21
-rw-r--r--libraries/spglib/spglib.info6
3 files changed, 26 insertions, 11 deletions
diff --git a/libraries/spglib/README b/libraries/spglib/README
index 28524c3ec9a2..b162ea757808 100644
--- a/libraries/spglib/README
+++ b/libraries/spglib/README
@@ -2,3 +2,13 @@ Spglib is a C library that implements a computer algorithm to search
crystal symmetries of crystal structures.
It is supported as optional dependency in Avogadro 2 or can be used
with python, fortran, rust, and ruby interfaces.
+
+This slackbuild installs by default the Python interface and the
+support to system OPENMP. You can disable both or one of these options
+passing the respective environment variable
+ PYTHON=no ./spglib.SlackBuild (python3-numpy not required)
+ OMP=no ./spglib.SlackBuild
+
+The build of Fortran interface is disabled by default. You can enable
+this option passing
+ FORTRAN=yes ./spglib.SlackBuild
diff --git a/libraries/spglib/spglib.SlackBuild b/libraries/spglib/spglib.SlackBuild
index 0b9829b8b476..8c015ba0330b 100644
--- a/libraries/spglib/spglib.SlackBuild
+++ b/libraries/spglib/spglib.SlackBuild
@@ -27,7 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=spglib
-VERSION=${VERSION:-2.0.2}
+VERSION=${VERSION:-2.1.0}
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
diff --git a/libraries/spglib/spglib.info b/libraries/spglib/spglib.info
index 72ffb9b121e3..5119e673f7c7 100644
--- a/libraries/spglib/spglib.info
+++ b/libraries/spglib/spglib.info
@@ -1,8 +1,8 @@
PRGNAM="spglib"
-VERSION="2.0.2"
+VERSION="2.1.0"
HOMEPAGE="https://spglib.github.io/spglib/"
-DOWNLOAD="https://github.com/spglib/spglib/archive/v2.0.2/spglib-2.0.2.tar.gz"
-MD5SUM="021da5274ac27e5c97bfa64c5f34ebe0"
+DOWNLOAD="https://github.com/spglib/spglib/archive/v2.1.0/spglib-2.1.0.tar.gz"
+MD5SUM="d6ad86854e982968d6355c6fccf639ea"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="python3-numpy"