-
Notifications
You must be signed in to change notification settings - Fork 508
/
build_tarballs.jl
91 lines (77 loc) · 2.54 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
include("../coin-or-common.jl")
name = "Ipopt"
version = Ipopt_version # v3.14.14
sources = [
GitSource("https://github.com/coin-or/Ipopt.git", Ipopt_gitsha)
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/Ipopt*
# Remove misleading libtool files
rm -f ${prefix}/lib/*.la
LIBASL="-lasl"
if [[ "${target}" == *-linux-* ]]; then
LIBASL="${LIBASL} -lrt"
fi
export CPPFLAGS="${CPPFLAGS} -I${includedir} -I${includedir}/coin"
if [[ ${target} == *mingw* ]]; then
export LDFLAGS="-L${libdir}"
fi
# BLAS and LAPACK
if [[ "${target}" == *mingw* ]]; then
LBT="-lblastrampoline-5"
else
LBT="-lblastrampoline"
fi
./configure \
CFLAGS="-O3 -DNDEBUG" \
CXXFLAGS="-O3 -DNDEBUG" \
FFLAGS="-O3" \
FCFLAGS="-O3" \
--prefix=${prefix} \
--build=${MACHTYPE} \
--host=${target} \
--enable-shared \
--with-pic \
--disable-dependency-tracking \
lt_cv_deplibs_check_method=pass_all \
--with-lapack-lflags="-L${libdir} ${LBT}" \
--with-mumps-cflags="-I${includedir}/libseq" \
--with-mumps-lflags="-L${libdir} -ldmumps" \
--with-spral-cflags="-I${includedir}" \
--with-spral-lflags="-L${libdir} -lspral" \
--with-asl-lflags="-L${libdir} ${LIBASL}"
make -j${nproc}
make install
"""
platforms = supported_platforms()
platforms = expand_cxxstring_abis(platforms)
platforms = expand_gfortran_versions(platforms)
# The products that we will ensure are always built
products = [
LibraryProduct("libipopt", :libipopt),
LibraryProduct("libipoptamplinterface", :libipoptamplinterface),
ExecutableProduct("ipopt", :amplexe),
]
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="ASL_jll", uuid="ae81ac8f-d209-56e5-92de-9978fef736f9"), ASL_version),
Dependency(PackageSpec(name="MUMPS_seq_jll", uuid="d7ed1dd3-d0ae-5e8e-bfb4-87a502085b8d"), compat="=$(MUMPS_seq_version_LBT)"),
Dependency(PackageSpec(name="SPRAL_jll", uuid="319450e9-13b8-58e8-aa9f-8fd1420848ab"), compat="=$(SPRAL_version_LBT)"),
Dependency(PackageSpec(name="libblastrampoline_jll", uuid="8e850b90-86db-534c-a0d3-1478176c7d93"), compat="5.4.0"),
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;
preferred_gcc_version = gcc_version,
preferred_llvm_version = llvm_version,
julia_compat = "1.9"
)