diff --git a/recipes/recipes_emscripten/bliss/build.sh b/recipes/recipes_emscripten/bliss/build.sh new file mode 100644 index 0000000000..3492d0ca3c --- /dev/null +++ b/recipes/recipes_emscripten/bliss/build.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -euxo pipefail + +export CFLAGS="-I$PREFIX/include $(echo "${CFLAGS:-}" | sed -E 's/-march=[^ ]+//g; s/-mtune=[^ ]+//g')" +export CXXFLAGS="-I$PREFIX/include $(echo "${CXXFLAGS:-}" | sed -E 's/-march=[^ ]+//g; s/-mtune=[^ ]+//g')" +export LDFLAGS="-L$PREFIX/lib ${LDFLAGS:-}" + +emcmake cmake -S . -B build \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_GMP=ON \ + -DGMP_LIBRARIES=$PREFIX/lib/libgmp.a \ + -DBUILD_SHARED_LIBS=OFF + +cd build +emmake make -j${CPU_COUNT:-1} + +mkdir -p $PREFIX/lib +mkdir -p $PREFIX/include/bliss +mkdir -p $PREFIX/bin + +cp libbliss.a $PREFIX/lib/ +cp libbliss_static.a $PREFIX/lib/ || true + +cp ../src/*.hh $PREFIX/include/bliss/ + +cp bliss.js $PREFIX/bin/ +cp bliss.wasm $PREFIX/bin/ \ No newline at end of file diff --git a/recipes/recipes_emscripten/bliss/recipe.yaml b/recipes/recipes_emscripten/bliss/recipe.yaml new file mode 100644 index 0000000000..3345931091 --- /dev/null +++ b/recipes/recipes_emscripten/bliss/recipe.yaml @@ -0,0 +1,44 @@ +context: + name: bliss + version: '0.77' + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://users.aalto.fi/~tjunttil/bliss/downloads/bliss-${{ version }}.zip + sha256: acc8b98034f30fad24c897f365abd866c13d9f1bb207e398d0caf136875972a4 + +build: + number: 0 + +requirements: + build: + - autoconf + - automake + - libtool + - make + - ${{ compiler("c") }} + - ${{ compiler('cxx') }} + - pkg-config + - autoconf-archive + host: + - gmp + +tests: + - package_contents: + files: + - bin/bliss.js + - lib/libbliss.a + - include/bliss/graph.hh + +about: + license: LGPL-3.0-only AND GPL-3.0-only + license_file: COPYING + summary: Combinatorial matrix recognition + homepage: https://users.aalto.fi/~tjunttil/bliss/index.html + +extra: + recipe-maintainers: + - mkoeppe diff --git a/recipes/recipes_emscripten/passagemath-bliss/recipe.yaml b/recipes/recipes_emscripten/passagemath-bliss/recipe.yaml new file mode 100644 index 0000000000..87e62f8dbe --- /dev/null +++ b/recipes/recipes_emscripten/passagemath-bliss/recipe.yaml @@ -0,0 +1,65 @@ +context: + version: 10.8.7 + +package: + name: passagemath-bliss + version: ${{ version }} + +source: +- url: https://pypi.org/packages/source/p/passagemath-bliss/passagemath_bliss-${{ version }}.tar.gz + sha256: 1c26e1496c11452ce0da64a08356f73ca3ce03e120b781a6f1a6ca19abcea45c + +build: + script: ${{ PYTHON }} -m pip install . + number: 0 + +requirements: + build: + - python + - crossenv >=1.2 + - cross-python_emscripten-wasm32 + - ${{ compiler("c") }} + - ${{ compiler("cxx") }} + - pip + - passagemath-setup + - passagemath-environment + - cython + - cysignals + - pkgconfig + - passagemath-abi == ${{ version }} + host: + - python + - bliss + run: + - python + - cysignals + +tests: +- script: pytester + files: + recipe: + - test_passagemath_bliss.py + requirements: + build: + - pytester + run: + - pytester-run + - passagemath-graphs + - passagemath-repl + +about: + license: GPL-2.0-or-later + license_file: README.rst + summary: 'passagemath: Graph (iso/auto)morphisms with bliss' + description: | + Distribution of a part of the Sage library. + It provides a Cython interface to the bliss library for the purpose + of computing graph (iso/auto)morphisms. + +extra: + emscripten_tests: + python: + pytest_files: + - test_passagemath_bliss.py + recipe-maintainers: + - mkoeppe diff --git a/recipes/recipes_emscripten/passagemath-bliss/test_passagemath_bliss.py b/recipes/recipes_emscripten/passagemath-bliss/test_passagemath_bliss.py new file mode 100644 index 0000000000..2e49e56ed5 --- /dev/null +++ b/recipes/recipes_emscripten/passagemath-bliss/test_passagemath_bliss.py @@ -0,0 +1,5 @@ +import pytest + + +def test_import_passagemath_bliss(): + import passagemath_bliss