-
Notifications
You must be signed in to change notification settings - Fork 571
/
Copy pathbuild_tarballs.jl
47 lines (37 loc) · 1.3 KB
/
build_tarballs.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using BinaryBuilder
name = "OpenSpecFun"
version = v"0.5.3"
# Collection of sources required to build openspecfun
sources = [
ArchiveSource("https://github.com/JuliaMath/openspecfun/archive/v0.5.3.tar.gz",
"1505c7a45f9f39ffe18be36f7a985cb427873948281dbcd376a11c2cd15e41e7"),
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/openspecfun-*/
# It needs to be told it's on Windows
if [[ ${target} == *mingw* ]]; then
OS=WINNT
elif [[ ${target} == *darwin* ]]; then
OS=Darwin
fi
# Build it
make OS=${OS} CC="$CC" CXX="$CXX" FC="$FC" -j${nproc}
# Install it
make install OS=${OS} prefix=$prefix
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line. Since openspecfun uses
# Fortran for AMOS, we need the combinatorial explosion of platforms
# and GCC versions.
platforms = expand_gfortran_versions(supported_platforms())
# The products that we will ensure are always built
products = [
LibraryProduct("libopenspecfun", :libopenspecfun)
]
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("CompilerSupportLibraries_jll"),
]
# Build the tarballs.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)