Skip to content

Commit 619f01b

Browse files
authored
[SPRAL] Upgrade to v2024.1.18 (#7975)
* [SPRAL] Upgrade to v2014.1.18 * Link with LBT and not OpenBLAS * Don't compile examples and tests
1 parent fea21cd commit 619f01b

File tree

1 file changed

+17
-46
lines changed

1 file changed

+17
-46
lines changed

S/SPRAL/build_tarballs.jl

Lines changed: 17 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,68 +3,38 @@
33
using BinaryBuilder, Pkg
44

55
name = "SPRAL"
6-
version = v"2023.11.15"
6+
version = v"2024.1.18"
77

88
# Collection of sources required to complete build
99
sources = [
10-
GitSource("https://github.com/ralna/spral.git", "e723071ce2e0e6181bb65e1b365dc47449e1a912")
10+
GitSource("https://github.com/ralna/spral.git", "c1dfe13538c621ede929bb13bbaa54070b63e02e")
1111
]
1212

1313
# Bash recipe for building across all platforms
1414
script = raw"""
15+
# Update Ninja
16+
cp ${host_prefix}/bin/ninja /usr/bin/ninja
17+
1518
cd ${WORKSPACE}/srcdir/spral
1619
1720
if [[ "${target}" == *mingw* ]]; then
18-
LBT="-lblastrampoline-5"
21+
HWLOC="hwloc-15"
22+
LBT="blastrampoline-5"
1923
else
20-
LBT="-lblastrampoline"
24+
HWLOC="hwloc"
25+
LBT="blastrampoline"
2126
fi
2227
23-
if [[ "${target}" == *-freebsd* ]] || [[ "${target}" == *-apple-* ]]; then
24-
CC=gcc
25-
CXX=g++
26-
fi
28+
meson setup builddir --cross-file=${MESON_TARGET_TOOLCHAIN%.*}_gcc.meson \
29+
--prefix=$prefix \
30+
-Dlibhwloc=$HWLOC \
31+
-Dlibblas=$LBT \
32+
-Dliblapack=$LBT
2733
28-
./autogen.sh
29-
mkdir build
30-
cd build
31-
export CFLAGS="-O3 -fPIC"
32-
export CXXFLAGS="-O3 -fPIC"
33-
export FFLAGS="-O3 -fPIC"
34-
export FCFLAGS="-O3 -fPIC"
35-
../configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} \
36-
--with-blas="-L${libdir} ${LBT}" --with-lapack="-L${libdir} ${LBT}" \
37-
--with-metis="-L${libdir} -lmetis" --with-metis-inc-dir="${includedir}"
38-
make
39-
gfortran -fPIC -shared $(flagon -Wl,--whole-archive) libspral.a $(flagon -Wl,--no-whole-archive) -lgomp ${LBT} -lhwloc -lmetis -lstdc++ -o ${libdir}/libspral.${dlext}
40-
make install
34+
meson compile -C builddir
35+
meson install -C builddir
4136
"""
4237

43-
#----------------------------------------------------------------#
44-
# # Install a version of Meson ≥ 0.63.0
45-
# python3 -m pip install --user --upgrade meson
46-
#
47-
# cd ${WORKSPACE}/srcdir/spral
48-
#
49-
# if [[ "${target}" == *mingw* ]]; then
50-
# HWLOC="hwloc-15"
51-
# LBT="blastrampoline-5"
52-
# else
53-
# HWLOC="hwloc"
54-
# LBT="blastrampoline"
55-
# fi
56-
#
57-
# CC=gcc CXX=g++ meson setup builddir --cross-file=${MESON_TARGET_TOOLCHAIN} \
58-
# --prefix=$prefix -Dlibhwloc=$HWLOC \
59-
# -Dlibblas=$LBT -Dliblapack=$LBT
60-
#
61-
# for i in {1..10}
62-
# do
63-
# meson compile -C builddir || true
64-
# done
65-
# meson install -C builddir
66-
#----------------------------------------------------------------#
67-
6838
# These are the platforms we will build for by default, unless further
6939
# platforms are passed in on the command line
7040
platforms = supported_platforms()
@@ -78,6 +48,7 @@ products = [
7848

7949
# Dependencies that must be installed before this package can be built
8050
dependencies = [
51+
HostBuildDependency(PackageSpec(name="Ninja_jll", uuid="76642167-d241-5cee-8c94-7a494e8cb7b7")),
8152
Dependency(PackageSpec(name="METIS_jll", uuid="d00139f3-1899-568f-a2f0-47f597d42d70")),
8253
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")),
8354
Dependency(PackageSpec(name="libblastrampoline_jll", uuid="8e850b90-86db-534c-a0d3-1478176c7d93"), compat="5.4.0"),

0 commit comments

Comments
 (0)