This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_tarballs.jl
65 lines (53 loc) · 1.63 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 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 = "ECOSBuilder"
version = v"2.0.5"
# Collection of sources required to build ECOSBuilder
sources = [
"https://github.com/embotech/ecos/archive/v2.0.5.tar.gz" =>
"14c6ef81dfe9dad6af353e3499ad3a7a0eb1ebd289a995b038e3bc67c6101151",
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
cd ecos-2.0.5/
make shared
mkdir $prefix/lib
if [[ $target = *"w64"* ]]; then
cp libecos.dll $prefix/lib
fi
if [[ $target = *"linux"* ]] || [[ $target = *"freebsd"* ]]; then
cp libecos.so $prefix/lib;
fi
if [[ $target = *"apple"* ]]; then
cp libecos.dylib $prefix/lib
fi
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:i686, :glibc),
Linux(:x86_64, :glibc),
Linux(:aarch64, :glibc),
Linux(:armv7l, :glibc, :eabihf),
Linux(:powerpc64le, :glibc),
Linux(:i686, :musl),
Linux(:x86_64, :musl),
Linux(:aarch64, :musl),
Linux(:armv7l, :musl, :eabihf),
MacOS(:x86_64),
FreeBSD(:x86_64),
Windows(:i686),
Windows(:x86_64)
]
platforms = expand_gcc_versions(platforms)
# The products that we will ensure are always built
products(prefix) = [
LibraryProduct(prefix, "libecos", :ecos)
]
# 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)