-
Notifications
You must be signed in to change notification settings - Fork 517
/
build_tarballs.jl
64 lines (56 loc) · 2.07 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, Pkg
name = "Singular"
version = v"4.1.3" # this is actually 4.1.3p4 with some extra patches
# Collection of sources required to build normaliz
sources = [
GitSource("https://github.com/Singular/Sources.git", "20bab7d91a9351cbc13245eeb4da8a9ec894b6d2"),
]
# Bash recipe for building across all platforms
script = raw"""
cd Sources
./autogen.sh
export CPPFLAGS="-I${prefix}/include"
./configure --prefix=$prefix --host=$target --build=${MACHTYPE} \
--with-libparse \
--enable-shared \
--disable-static \
--enable-p-procs-static \
--disable-p-procs-dynamic \
--enable-gfanlib \
--with-readline=no \
--with-gmp=$prefix \
--with-flint=$prefix \
--without-python
make -j${nproc}
make install
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
platforms = filter!(p -> !(p isa Windows), platforms)
platforms = expand_cxxstring_abis(platforms)
# The products that we will ensure are always built
products = [
LibraryProduct("libpolys", :libpolys),
LibraryProduct("libSingular", :libsingular),
# LibraryProduct("customstd", :customstd),
# LibraryProduct("subsets", :subsets),
ExecutableProduct("Singular", :Singular),
ExecutableProduct("libparse", :libparse),
# LibraryProduct("syzextra", :syzextra),
# LibraryProduct("interval", :interval),
LibraryProduct("libfactory", :libfactory),
LibraryProduct("libsingular_resources", :libsingular_resources),
LibraryProduct("libomalloc", :libomalloc),
]
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("cddlib_jll"),
Dependency("FLINT_jll"),
Dependency("GMP_jll"),
Dependency("MPFR_jll"),
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"6")