diff --git a/recipes/recipes_emscripten/xeus-cpp/build.sh b/recipes/recipes_emscripten/xeus-cpp/build.sh new file mode 100644 index 00000000000..55bd000f96b --- /dev/null +++ b/recipes/recipes_emscripten/xeus-cpp/build.sh @@ -0,0 +1,30 @@ +mkdir build +cd build + +export CMAKE_PREFIX_PATH=$PREFIX +export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX + +if [[ $target_platform == "emscripten-wasm32" ]]; then + export USE_WASM=ON +else + export USE_WASM=OFF +fi + +ls $PREFIX/lib +echo "BUILDING" + +# Configure step +emcmake cmake ${CMAKE_ARGS} -S .. -B . \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=$USE_WASM \ + -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \ + -DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4" \ + -DCMAKE_VERBOSE_MAKEFILE=ON + +# Build step +EMCC_CFLAGS='-sERROR_ON_UNDEFINED_SYMBOLS=0' emmake make -j1 + +# Install step +emmake make install diff --git a/recipes/recipes_emscripten/xeus-cpp/recipe.yaml b/recipes/recipes_emscripten/xeus-cpp/recipe.yaml new file mode 100644 index 00000000000..f2632d940c6 --- /dev/null +++ b/recipes/recipes_emscripten/xeus-cpp/recipe.yaml @@ -0,0 +1,49 @@ +context: + version: 0.3.0 + +package: + name: xeus-cpp + version: '{{ version }}' + +source: + url: https://github.com/compiler-research/xeus-cpp/archive/refs/tags/{{ version }}.tar.gz + sha256: 217d7870014327130902071c6e3027c62c0d97f356e0fca59a95376b1a6699e9 + +build: + number: 0 + +requirements: + build: + - '{{ compiler("cxx") }}' + - cmake + - make # [unix] + host: + - nlohmann_json + - xeus-lite + - xeus >=3.0.5,<4.0 + - xtl >=0.7,<0.8 + - llvm =16.0.6 + - cpp-argparse + - pugixml + +test: + commands: + - sel(emscripten): test -f $PREFIX/bin/xcpp.wasm + - sel(emscripten): test -f $PREFIX/bin/xcpp.js + - sel(emscripten): test -f $PREFIX/share/jupyter/kernels/xcpp/kernel.json + - sel(emscripten): test -f $PREFIX/share/jupyter/kernels/xcpp/logo-32x32.png + - sel(emscripten): test -f $PREFIX/share/jupyter/kernels/xcpp/logo-64x64.png + +about: + home: https://github.com/compiler-research/xeus-cpp + license: BSD-3 + license_family: BSD-3 + license_file: LICENSE + summary: xeus-cpp + doc_url: https://github.com/compiler-research/xeus-cpp + dev_url: https://github.com/compiler-research/xeus-cpp + +extra: + recipe-maintainers: + - DerThorsten + - anutosh491 \ No newline at end of file