File tree Expand file tree Collapse file tree 4 files changed +148
-0
lines changed Expand file tree Collapse file tree 4 files changed +148
-0
lines changed Original file line number Diff line number Diff line change
1
+ package :
2
+ name : openblas
3
+ version : 0.3.26
4
+ tag :
5
+ - library
6
+ - shared_library
7
+ source :
8
+ sha256 : 4e6e4f5cb14c209262e33e6816d70221a2fe49eb69eaf0a06f065598ac602c68
9
+ url : https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.26/OpenBLAS-0.3.26.tar.gz
10
+ patches :
11
+ - patches/0001-Add-Wno-return-type-flag.patch
12
+ - patches/0002-Align-xerbla_array-signature-with-scipy-expectation.patch
13
+
14
+ build :
15
+ type : shared_library
16
+ script : |
17
+ # seems like .zip does not maintain executable flags, need to reset these
18
+ chmod u+x c_check
19
+ chmod u+x f_check
20
+ chmod u+x exports/gensymbol
21
+ # Replace void returns by int returns
22
+ sed -ri 's/void(\s+)BLASFUNC/int\1BLASFUNC/g' common_interface.h
23
+ sed -ri 's/void(\s+)cblas_/int\1cblas_/g' cblas.h ctest/*.c
24
+ sed -ri 's/void(\s+)(C?NAME)/int\1\2/g' interface/*.c
25
+ sed -ri 's/((extern)?.+) void ([a-z0-9]+_)/\1\2 int \3/g' lapack-netlib/SRC/*.c \
26
+ lapack-netlib/SRC/DEPRECATED/*.c
27
+ # For some functions (mostly handling complex I think) f2c actually
28
+ # generate a function that returns void so I need to revert the void to int
29
+ # change the previous line does.
30
+ sed -ri 's@int ([cz](dotc|dotu|ladiv))@void \1@g' lapack-netlib/SRC/*.c\
31
+ lapack-netlib/SRC/DEPRECATED/*.c
32
+
33
+ emmake make libs shared CC=emcc HOSTCC=gcc TARGET=RISCV64_GENERIC NOFORTRAN=1 NO_LAPACKE=1 \
34
+ USE_THREAD=0 LDFLAGS="${SIDE_MODULE_LDFLAGS}"
35
+ mkdir -p dist
36
+ # Add libf2c symbols to libopenblas.so
37
+ emcc ${WASM_LIBRARY_DIR}/lib/libf2c.a libopenblas.a ${SIDE_MODULE_LDFLAGS} \
38
+ -o libopenblas.so
39
+
40
+ cp libopenblas.so dist
41
+ emmake make install PREFIX=${WASM_LIBRARY_DIR}
42
+
43
+ requirements :
44
+ host :
45
+ - libf2c
46
+ about :
47
+ home : https://www.openblas.net/
48
+ license : BSD-3-Clause
Original file line number Diff line number Diff line change
1
+ package :
2
+ name : pybamm
3
+ version : 24.9.0
4
+ top-level :
5
+ - pybamm
6
+ source :
7
+ url : https://files.pythonhosted.org/packages/27/b6/b5eed6cae2ee1e0b2a87b08ccb12e655a67198d5da11da811020536ba5f5/pybamm-24.9.0.tar.gz
8
+ sha256 : 743dac0d17bd2f773050fe841cf3581658283f886e27795d9f5fd67d1ff563b5
9
+ build :
10
+ ldflags : -L${WASM_LIBRARY_DIR}/lib
11
+ requirements :
12
+ host :
13
+ - openblas
14
+ - suitesparse
15
+ - sundials
16
+ - casadi
17
+ run :
18
+ - numpy
19
+ - scipy
20
+ - casadi
21
+ - xarray
22
+ - anytree
23
+ - sympy
24
+ - typing-extensions
25
+ - pandas
26
+ - pooch # have to think about this one
27
+ about :
28
+ home : https://pybamm.org/
29
+ PyPI : https://pypi.org/project/pybamm
30
+ summary : Python Battery Mathematical Modelling
31
+ license : BSD-3-Clause
Original file line number Diff line number Diff line change
1
+ package :
2
+ name : suitesparse
3
+ version : 6.0.3
4
+ tag :
5
+ - library
6
+ - shared_library
7
+ source :
8
+ sha256 : 7111b505c1207f6f4bd0be9740d0b2897e1146b845d73787df07901b4f5c1fb7
9
+ url : https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v6.0.3.tar.gz
10
+ # patches:
11
+ # - patches/0001-Remove-non-essential-build-targets.patch
12
+
13
+ requirements :
14
+ run :
15
+ - openblas
16
+ host :
17
+ - openblas
18
+
19
+ build :
20
+ type : shared_library
21
+ script : |
22
+ # Fix return type to avoid linker errors
23
+ grep -rl "void LAPACK" . | xargs sed -i 's/void LAPACK/int LAPACK/g'
24
+ grep -rl "void BLAS" . | xargs sed -i 's/void BLAS/int BLAS/g'
25
+
26
+ emmake make -j ${PYODIDE_JOBS:-3} install \
27
+ LDFLAGS="${SIDE_MODULE_LDFLAGS} -L${WASM_LIBRARY_DIR}/lib " \
28
+ BLAS="${WASM_LIBRARY_DIR}/lib/libopenblas.so" \
29
+ LAPACK="${WASM_LIBRARY_DIR}/lib/libopenblas.so" \
30
+ INSTALL=${WASM_LIBRARY_DIR}
31
+
32
+ cp ${WASM_LIBRARY_DIR}/lib/libsuitesparseconfig.so \
33
+ ${WASM_LIBRARY_DIR}/lib/libamd.so \
34
+ ${WASM_LIBRARY_DIR}/lib/libcamd.so \
35
+ ${WASM_LIBRARY_DIR}/lib/libccolamd.so \
36
+ ${WASM_LIBRARY_DIR}/lib/libcolamd.so \
37
+ ${WASM_LIBRARY_DIR}/lib/libklu.so \
38
+ ${DISTDIR}
39
+ about :
40
+ home : https://github.com/DrTimothyAldenDavis/SuiteSparse
41
+ license : Mixed, see https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/dev/LICENSE.txt
Original file line number Diff line number Diff line change
1
+ package :
2
+ name : sundials
3
+ version : 6.5.0
4
+ source :
5
+ url : https://github.com/LLNL/sundials/releases/download/v6.5.0/sundials-6.5.0.tar.gz
6
+ sha256 : 4e0b998dff292a2617e179609b539b511eb80836f5faacf800e688a886288502
7
+ requirements :
8
+ host :
9
+ - openblas
10
+ - suitesparse
11
+ build :
12
+ type : shared_library
13
+ script : |
14
+ mkdir build
15
+ cd build
16
+ emcmake cmake ${CMAKE_ARGS} \
17
+ -DCMAKE_INSTALL_PREFIX=${WASM_LIBRARY_DIR} \
18
+ -DCMAKE_BUILD_TYPE=Release \
19
+ -DBUILD_ARKODE=OFF \
20
+ -DEXAMPLES_ENABLE_C=OFF \
21
+ -DEXAMPLES_ENABLE_FORTRAN=OFF \
22
+ -DEXAMPLES_INSTALL=OFF \
23
+ -DENABLE_KLU=ON \
24
+ -DKLU_LIBRARY_DIR=${WASM_LIBRARY_DIR}/lib/ \
25
+ -DKLU_INCLUDE_DIR=${WASM_LIBRARY_DIR}/include
26
+ ..
27
+
28
+ emmake make -j ${PYODIDE_JOBS:-3} install
You can’t perform that action at this time.
0 commit comments