Merge pull request #13879 from acowley/suitesparse-dylib
suitesparse: build dylibs on darwin
This commit is contained in:
commit
f13a4b6b09
|
@ -5,6 +5,7 @@ let
|
||||||
name = "suitesparse-${version}";
|
name = "suitesparse-${version}";
|
||||||
|
|
||||||
int_t = if openblas.blas64 then "int64_t" else "int32_t";
|
int_t = if openblas.blas64 then "int64_t" else "int32_t";
|
||||||
|
SHLIB_EXT = if stdenv.isDarwin then "dylib" else "so";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit name;
|
inherit name;
|
||||||
|
@ -46,10 +47,10 @@ stdenv.mkDerivation {
|
||||||
for i in "$out"/lib/lib*.a; do
|
for i in "$out"/lib/lib*.a; do
|
||||||
ar -x $i
|
ar -x $i
|
||||||
done
|
done
|
||||||
gcc *.o --shared -o "$out/lib/libsuitesparse.so" -lopenblas
|
''${CC} *.o ${if stdenv.isDarwin then "-dynamiclib" else "--shared"} -o "$out/lib/libsuitesparse.${SHLIB_EXT}" -lopenblas
|
||||||
)
|
)
|
||||||
for i in umfpack cholmod amd camd colamd spqr; do
|
for i in umfpack cholmod amd camd colamd spqr; do
|
||||||
ln -s libsuitesparse.so "$out"/lib/lib$i.so;
|
ln -s libsuitesparse.${SHLIB_EXT} "$out"/lib/lib$i.${SHLIB_EXT}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install documentation
|
# Install documentation
|
||||||
|
|
Loading…
Reference in New Issue