diff --git a/packages/boost-python/meta.yaml b/packages/boost-python/meta.yaml new file mode 100644 index 00000000..55c9a1a6 --- /dev/null +++ b/packages/boost-python/meta.yaml @@ -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 : emar emranlib 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