3
3
using BinaryBuilder, Pkg
4
4
5
5
name = " SPRAL"
6
- version = v "2023.11.15 "
6
+ version = v "2024.1.18 "
7
7
8
8
# Collection of sources required to complete build
9
9
sources = [
10
- GitSource (" https://github.com/ralna/spral.git" , " e723071ce2e0e6181bb65e1b365dc47449e1a912 " )
10
+ GitSource (" https://github.com/ralna/spral.git" , " c1dfe13538c621ede929bb13bbaa54070b63e02e " )
11
11
]
12
12
13
13
# Bash recipe for building across all platforms
14
14
script = raw """
15
+ # Update Ninja
16
+ cp ${host_prefix}/bin/ninja /usr/bin/ninja
17
+
15
18
cd ${WORKSPACE}/srcdir/spral
16
19
17
20
if [[ "${target}" == *mingw* ]]; then
18
- LBT="-lblastrampoline-5"
21
+ HWLOC="hwloc-15"
22
+ LBT="blastrampoline-5"
19
23
else
20
- LBT="-lblastrampoline"
24
+ HWLOC="hwloc"
25
+ LBT="blastrampoline"
21
26
fi
22
27
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
27
33
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
41
36
"""
42
37
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
-
68
38
# These are the platforms we will build for by default, unless further
69
39
# platforms are passed in on the command line
70
40
platforms = supported_platforms ()
@@ -78,6 +48,7 @@ products = [
78
48
79
49
# Dependencies that must be installed before this package can be built
80
50
dependencies = [
51
+ HostBuildDependency (PackageSpec (name= " Ninja_jll" , uuid= " 76642167-d241-5cee-8c94-7a494e8cb7b7" )),
81
52
Dependency (PackageSpec (name= " METIS_jll" , uuid= " d00139f3-1899-568f-a2f0-47f597d42d70" )),
82
53
Dependency (PackageSpec (name= " CompilerSupportLibraries_jll" , uuid= " e66e0078-7015-5450-92f7-15fbd957f2ae" )),
83
54
Dependency (PackageSpec (name= " libblastrampoline_jll" , uuid= " 8e850b90-86db-534c-a0d3-1478176c7d93" ), compat= " 5.4.0" ),
0 commit comments