Skip to content
Closed
Show file tree
Hide file tree
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
30 changes: 30 additions & 0 deletions recipes/recipes_emscripten/xeus-cpp/build.sh
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions recipes/recipes_emscripten/xeus-cpp/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add upper bound
- xeus-lite <2.0

- xeus >=3.0.5,<4.0
- xtl >=0.7,<0.8
- llvm =16.0.6
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use CppInterOp instead of llvm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is for a build of 0.3.0 then changing to CppInterOp would be unnecessary. Will be needed 0.4.0 comes out. Also CppInterOp uses llvm 17, so this change will not work if xeus-cpp 0.3.0 is not compatible with llvm 17.

- 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