Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions packages/boost-python/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package:
name: boost-python
version: 1.84.0
tag:
- library
- static_library
source:
url: https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz
sha256: 4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95

build:
type: static_library
script: |
export INSTALL_DIR=${WASM_LIBRARY_DIR}
./bootstrap.sh --prefix=${INSTALL_DIR} --with-libraries=python \
--with-python=python$PYMAJOR.$PYMINOR

# https://github.com/emscripten-core/emscripten/issues/17052
# Without this, boost outputs WASM modules not static library archives as an output.
# I don't understand why... the jam file used by boost is quite hard to understand.
printf "using clang : emscripten : emcc : <archiver>emar <ranlib>emranlib <linker>emlink ;\n" | tee -a ./project-config.jam
printf "using python : $PYMAJOR.$PYMINOR : python$PYMAJOR.$PYMINOR : $PYTHONINCLUDE : $HOSTINSTALLDIR/lib/python$PYMAJOR.$PYMINOR.a ;\n" | tee -a ./project-config.jam

echo "==============================="
echo "cat ./project-config.jam"
cat ./project-config.jam
echo "==============================="

./b2 variant=release toolset=clang-emscripten link=static threading=single --disable-icu \
cxxflags="$SIDE_MODULE_CXXFLAGS -fwasm-exceptions -DBOOST_SP_DISABLE_THREADS=1" \
cflags="$SIDE_MODULE_CFLAGS -fwasm-exceptions -DBOOST_SP_DISABLE_THREADS=1" \
linkflags="-fpic $SIDE_MODULE_LDFLAGS" \
python=$PYMAJOR.$PYMINOR \
--layout=system -j"${PYODIDE_JOBS:-3}" --prefix=${INSTALL_DIR} \
-d2 install

echo "==============================="
find $WASM_LIBRARY_DIR
echo "==============================="
false

about:
home: https://www.boost.org/
summary: Free peer-reviewed portable C++ source libraries.
license: Boost
extra:
recipe-maintainers:
- johnwason
Loading