Skip to content

Commit

Permalink
wrap of spglib (#200)
Browse files Browse the repository at this point in the history
* wrap of spglib

* [spglib] Adapt to new BinaryBuilder
  • Loading branch information
unkcpz authored and staticfloat committed Nov 21, 2019
1 parent 99fe8f3 commit 9c7db0e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions S/spglib/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder

name = "spglib"
version = v"1.14.1"

# Collection of sources required to build spglib
sources = [
"https://github.com/atztogo/spglib/archive/v$(version).tar.gz" =>
"9803b0648d9c2d99377f3e1c4cecf712320488403cd674192ec5cbe956bb3c78",
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/spglib-*/
if [[ ${target} == *-mingw32 ]]; then
sed -i -e 's/LIBRARY/RUNTIME/' CMakeLists.txt
fi
mkdir _build
cd _build/
cmake -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
../
make -j${nproc}
make install VERBOSE=1
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()

# The products that we will ensure are always built
products = [
LibraryProduct("libsymspg", :libsymspg)
]

# Dependencies that must be installed before this package can be built
dependencies = [
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)

0 comments on commit 9c7db0e

Please sign in to comment.