-
Notifications
You must be signed in to change notification settings - Fork 511
/
build_tarballs.jl
49 lines (42 loc) · 1.81 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
48
49
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg
name = "AcousticsToolbox"
version_string = "2022_4_20"
version = VersionNumber(replace(version_string, "_" => "."))
# Collection of sources required to complete build
sources = [
ArchiveSource("http://oalib.hlsresearch.com/AcousticsToolbox/at_$(version_string).zip", "ff3494c8a0c696dca17ddacb9a2a412eaf664c3204f4a424afe77e66edefc950")
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/at
rm -rf ../__MACOSX
perl -p -i -e 's/\-march=native//; s/\-ffast\-math//; s/\-mtune=native//;' Makefile
find . -name *.exe -exec rm {} \;
make
mkdir -p $bindir
find . -name *.exe -exec cp {} $bindir \;
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
platforms = expand_gfortran_versions(platforms)
# The products that we will ensure are always built
products = [
ExecutableProduct("field3d.exe", :field3d),
ExecutableProduct("field.exe", :field),
ExecutableProduct("kraken.exe", :kraken),
ExecutableProduct("krakenc.exe", :krakenc),
ExecutableProduct("bellhop3d.exe", :bellhop3d),
ExecutableProduct("sparc.exe", :sparc),
ExecutableProduct("scooter.exe", :scooter),
ExecutableProduct("bounce.exe", :bounce),
ExecutableProduct("bellhop.exe", :bellhop)
]
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"))
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")