diff options
Diffstat (limited to 'libraries/spglib')
-rw-r--r-- | libraries/spglib/README | 10 | ||||
-rw-r--r-- | libraries/spglib/spglib.SlackBuild | 25 | ||||
-rw-r--r-- | libraries/spglib/spglib.info | 8 |
3 files changed, 28 insertions, 15 deletions
diff --git a/libraries/spglib/README b/libraries/spglib/README index 28524c3ec9..b162ea7578 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 aaeaff678d..c3714dc50d 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 @@ -22,12 +22,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - cd $(dirname $0) ; CWD=$(pwd) PRGNAM=spglib -VERSION=${VERSION:-2.0.0} +VERSION=${VERSION:-2.4.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -63,6 +61,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 +88,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 +99,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 0fece74548..e2ef6a9fc3 100644 --- a/libraries/spglib/spglib.info +++ b/libraries/spglib/spglib.info @@ -1,10 +1,10 @@ PRGNAM="spglib" -VERSION="2.0.0" +VERSION="2.4.0" HOMEPAGE="https://spglib.github.io/spglib/" -DOWNLOAD="https://github.com/spglib/spglib/archive/v2.0.0/spglib-2.0.0.tar.gz" -MD5SUM="817ad62682dea716a6faaeb3a8cf3464" +DOWNLOAD="https://github.com/spglib/spglib/archive/v2.4.0/spglib-2.4.0.tar.gz" +MD5SUM="1779172c4cc96d8ce1f5e19d050544e7" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="numpy3" +REQUIRES="python3-numpy" MAINTAINER="Giancarlo Dessì" EMAIL="slack@giand.it" |