2023-10-08 20:15:37 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v{{version}}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
display-name: suite-sparse
|
|
|
|
versions:
|
|
|
|
github: DrTimothyAldenDavis/SuiteSparse
|
|
|
|
dependencies:
|
|
|
|
glaros.dtc.umn.edu/metis: '*'
|
|
|
|
gnu.org/m4: '*'
|
|
|
|
netlib.org/lapack: '*'
|
|
|
|
gnu.org/gmp: '*'
|
|
|
|
openmp.llvm.org: '*'
|
|
|
|
gnu.org/mpfr: '*'
|
|
|
|
gnu.org/gcc: '*' # libfortran
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
cmake.org: '*'
|
|
|
|
freedesktop.org/pkg-config: '*'
|
|
|
|
linux:
|
|
|
|
gnu.org/make: '*'
|
|
|
|
script:
|
2023-10-13 20:32:16 +03:00
|
|
|
# version 7.2.1 shipped without bumping the version number
|
|
|
|
- run: |
|
|
|
|
sed -i.bak \
|
|
|
|
-e 's/^set ( SUITESPARSE_VERSION_MAJOR.*/set ( SUITESPARSE_VERSION_MAJOR {{version.major}} )/' \
|
|
|
|
-e 's/^set ( SUITESPARSE_VERSION_MINOR.*/set ( SUITESPARSE_VERSION_MINOR {{version.minor}} )/' \
|
|
|
|
-e 's/^set ( SUITESPARSE_VERSION_SUB.*/set ( SUITESPARSE_VERSION_SUB {{version.patch}} )/' \
|
|
|
|
CMakeLists.txt
|
|
|
|
rm CMakeLists.txt.bak
|
|
|
|
working-directory: SuiteSparse_config
|
2023-10-08 20:15:37 +03:00
|
|
|
- make library $ARGS CMAKE_OPTIONS="$CMAKE_ARGS"
|
|
|
|
- make install $ARGS CMAKE_OPTIONS="$CMAKE_ARGS"
|
2023-12-30 08:50:42 +03:00
|
|
|
- run: ln -s mongoose suitesparse_mongoose
|
|
|
|
working-directory: '{{prefix}}/bin'
|
|
|
|
if: '<7.4.0'
|
|
|
|
- run: ln -s suitesparse_mongoose mongoose
|
|
|
|
working-directory: '{{prefix}}/bin'
|
|
|
|
if: '>=7.4.0'
|
|
|
|
- run: |
|
|
|
|
mv suitesparse/* .
|
|
|
|
rmdir suitesparse
|
|
|
|
ln -s . suitesparse
|
|
|
|
working-directory: '{{prefix}}/include'
|
|
|
|
if: '>=7.4.0'
|
2023-10-08 20:15:37 +03:00
|
|
|
env:
|
|
|
|
ARGS:
|
|
|
|
- INSTALL={{prefix}}
|
|
|
|
- JOBS={{hw.concurrency}}
|
|
|
|
CMAKE_ARGS:
|
|
|
|
- -DCMAKE_INSTALL_PREFIX="{{prefix}}
|
|
|
|
- -DCMAKE_INSTALL_LIBDIR=lib
|
|
|
|
- -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- -DCMAKE_FIND_FRAMEWORK=LAST
|
|
|
|
- -DCMAKE_VERBOSE_MAKEFILE=ON
|
|
|
|
- -Wno-dev
|
|
|
|
- -DBUILD_TESTING=OFF
|
|
|
|
linux:
|
|
|
|
CMAKE_ARGS:
|
|
|
|
- -DLAPACK_LIBRARIES={{deps.netlib.org/lapack.prefix}}/lib/liblapack.so.{{deps.netlib.org/lapack.version.major}}
|
|
|
|
- -DBLAS_LIBRARIES={{deps.netlib.org/lapack.prefix}}/lib/libblas.so.{{deps.netlib.org/lapack.version.major}}
|
|
|
|
darwin:
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
|
|
|
LD: clang
|
|
|
|
CMAKE_ARGS:
|
|
|
|
- -DLAPACK_LIBRARIES={{deps.netlib.org/lapack.prefix}}/lib/liblapack.{{deps.netlib.org/lapack.version.major}}.dylib
|
|
|
|
- -DBLAS_LIBRARIES={{deps.netlib.org/lapack.prefix}}/lib/libblas.{{deps.netlib.org/lapack.version.major}}.dylib
|
|
|
|
provides:
|
|
|
|
- bin/mongoose
|
2023-12-30 08:50:42 +03:00
|
|
|
- bin/suitesparse_mongoose
|
2023-10-08 20:15:37 +03:00
|
|
|
test:
|
|
|
|
dependencies:
|
|
|
|
freedesktop.org/pkg-config: '*'
|
|
|
|
script:
|
|
|
|
- pkg-config --modversion SuiteSparse_config | grep {{version}}
|
|
|
|
- cc test.c -lsuitesparseconfig -lklu -o test -Wl,-rpath,{{pkgx.prefix}}
|
|
|
|
- ./test
|