Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit d211af8

Browse files
Merge pull request #1 from kalmarek/scs-2.1.1
Scs 2.1.1
2 parents fe2ee4e + a51d810 commit d211af8

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

build_tarballs.jl

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,27 @@
33
using BinaryBuilder
44

55
name = "SCSBuilder"
6-
version = v"2.0.2"
6+
version = v"2.1.1"
77

88
# Collection of sources required to build SCSBuilder
99
sources = [
10-
"https://github.com/cvxgrp/scs/archive/v2.0.2.tar.gz" =>
11-
"8725291dfe952a1f117f1f725906843db392fe8d29eebd8feb14b49f25fc669e",
10+
"https://github.com/cvxgrp/scs/archive/$(version).tar.gz" =>
11+
"0e20b91e8caf744b84aa985ba4e98cc7235ee33612b2bad2bf31ea5ad4e07d93",
1212

1313
]
1414

15-
# Adapted from builder by kalmarek (https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/313)
16-
# Bash recipe for building across all platforms
15+
# Bash recipe for building across all platforms
1716
script = raw"""
18-
cd $WORKSPACE/srcdir
19-
cd scs-2.0.2/
20-
# Mac OS and Windows do not have openmp by default
21-
#if [ $target = "x86_64-apple-darwin14" ] || [ $target = "x86_64-w64-mingw32" ] || [ $target = "i686-w64-mingw32" ]; then
22-
# flags="DLONG=1"
23-
#else
24-
# flags="DLONG=1 USE_OPENMP=1"
25-
#fi
26-
# GOMP 4.0 would be required for OPENMP, which makes travis fail because it only has gcc version 4.8.4
17+
cd $WORKSPACE/srcdir/scs-*
2718
flags="DLONG=1 USE_OPENMP=0"
28-
#if [ $target = "x86_64-apple-darwin14" ]; then
29-
# install_name_tool -id libopenblas64_.dylib ${prefix}/lib/libopenblas64_.0.3.0.dev.dylib
30-
#fi
3119
blasldflags="-L${prefix}/lib"
32-
if [[ ${nbits} == 32 ]]; then blasldflags="${blasldflags} -lopenblas"; else flags="${flags} BLAS64=1 BLASSUFFIX=_64_"; blasldflags="${blasldflags} -lopenblas64_"; fi
20+
# see https://github.com/JuliaPackaging/Yggdrasil/blob/0bc1abd56fa176e3d2cc2e48e7bf85a26c948c40/OpenBLAS/build_tarballs.jl#L23
21+
if [[ ${nbits} == 64 ]] && [[ ${target} != aarch64* ]]; then
22+
flags="${flags} BLAS64=1 BLASSUFFIX=_64_"
23+
blasldflags+=" -lopenblas64_"
24+
else
25+
blasldflags+=" -lopenblas"
26+
fi
3327
make BLASLDFLAGS="${blasldflags}" ${flags} out/libscsdir.${dlext}
3428
make BLASLDFLAGS="${blasldflags}" ${flags} out/libscsindir.${dlext}
3529
mv out/libscs* ${prefix}/lib/
@@ -40,8 +34,8 @@ mv out/libscs* ${prefix}/lib/
4034
# Eventually, this should be fixed upstream
4135
if [[ ${target} == "x86_64-apple-darwin14" ]]; then
4236
echo "-- Modifying library name for OpenBLAS"
43-
install_name_tool -change libopenblas64_.0.3.0.dev.dylib libopenblas64_.dylib ${prefix}/lib/libscsindir.dylib
44-
install_name_tool -change libopenblas64_.0.3.0.dev.dylib libopenblas64_.dylib ${prefix}/lib/libscsdir.dylib
37+
install_name_tool -change libopenblas64_.0.3.5.dev.dylib libopenblas64_.dylib ${prefix}/lib/libscsindir.dylib
38+
install_name_tool -change libopenblas64_.0.3.5.dev.dylib libopenblas64_.dylib ${prefix}/lib/libscsdir.dylib
4539
fi
4640
"""
4741

@@ -72,9 +66,8 @@ products(prefix) = [
7266

7367
# Dependencies that must be installed before this package can be built
7468
dependencies = [
75-
"https://github.com/JuliaLinearAlgebra/OpenBLASBuilder/releases/download/v0.3.0-3/build_OpenBLAS.v0.3.0.jl"
69+
"https://github.com/JuliaPackaging/Yggdrasil/releases/download/OpenBLAS-v0.3.5-2/build_OpenBLAS.v0.3.5.jl"
7670
]
7771

7872
# Build the tarballs, and possibly a `build.jl` as well.
7973
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)
80-

0 commit comments

Comments
 (0)