diff --git a/recipes/recipes_emscripten/eclib/build.sh b/recipes/recipes_emscripten/eclib/build.sh new file mode 100644 index 0000000000..ce5052dd3d --- /dev/null +++ b/recipes/recipes_emscripten/eclib/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +autoreconf -vfi + +emconfigure ./configure \ + --prefix=$PREFIX \ + --disable-shared \ + --enable-static \ + --with-flint=$PREFIX \ + --with-ntl=$PREFIX \ + --with-pari=$PREFIX \ + CPPFLAGS="-I$PREFIX/include" \ + LDFLAGS="-L$PREFIX/lib" + + +find . -type f -name "Makefile" -exec sed -i 's/^LIBS =.*/& -lmpfr -lgmp/g' {} + + +emmake make +emmake make install + +cp progs/*.wasm $PREFIX/bin diff --git a/recipes/recipes_emscripten/eclib/recipe.yaml b/recipes/recipes_emscripten/eclib/recipe.yaml new file mode 100644 index 0000000000..b083ccb1f8 --- /dev/null +++ b/recipes/recipes_emscripten/eclib/recipe.yaml @@ -0,0 +1,49 @@ +context: + name: eclib + version: '20250627' + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/JohnCremona/eclib/releases/download/${{ version }}/eclib-${{ version }}.tar.bz2 + sha256: b88d4b52612e491c5415946d9e35f2062ca1015ee7fbbe0b61f158fa74cb4bc9 + +build: + number: 0 + +requirements: + build: + - autoconf + - automake + - libtool + - make + - ${{ compiler("c") }} + - ${{ compiler('cxx') }} + - pkg-config + - autoconf-archive + host: + - gmp + - ntl + - libflint + - pari + - mpfr + +tests: + - package_contents: + files: + - include/eclib/interface.h + - lib/libec.a + - lib/pkgconfig/eclib.pc + - bin/mwrank + +about: + homepage: https://github.com/JohnCremona/eclib + license: GPL-2.0-only + license_file: COPYING + summary: The eclib package includes mwrank (for 2-descent on elliptic curves over Q) and modular symbol code used to create the elliptic curve database. + +extra: + recipe-maintainers: + - mkoeppe diff --git a/recipes/recipes_emscripten/passagemath-eclib/recipe.yaml b/recipes/recipes_emscripten/passagemath-eclib/recipe.yaml new file mode 100644 index 0000000000..4309cd3a6e --- /dev/null +++ b/recipes/recipes_emscripten/passagemath-eclib/recipe.yaml @@ -0,0 +1,83 @@ +context: + version: 10.8.7 + +package: + name: passagemath-eclib + version: ${{ version }} + +source: +- url: https://pypi.org/packages/source/p/passagemath-eclib/passagemath_eclib-${{ version }}.tar.gz + sha256: d0be686f01864847c4263abaa045745c1ccbdbbe22485c9d320a1647b57fb90c + +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 + - numpy + - passagemath-abi == ${{ version }} + host: + - python + - numpy + - eclib + - fflas-ffpack + - givaro + - gmp + - libflint + - linbox + - mpfr + - ntl + - pari + - passagemath-categories + - passagemath-flint + - passagemath-linbox + - passagemath-modules + - passagemath-ntl + run: + - python + - cysignals + - passagemath-categories + - passagemath-linbox + - passagemath-modules + - passagemath-ntl + +tests: +- script: pytester + files: + recipe: + - test_passagemath_eclib.py + requirements: + build: + - pytester + run: + - pytester-run + - passagemath-repl + +about: + license: GPL-2.0-or-later + license_file: README.rst + summary: 'passagemath: Elliptic curves over the rationals with eclib/mwrank' + description: | + Distribution of a part of the Sage library. + It provides the Cython interface to John Cremona's programs for enumerating + and computing with elliptic curves defined over the rational numbers. + +extra: + emscripten_tests: + python: + pytest_files: + - test_passagemath_eclib.py + recipe-maintainers: + - mkoeppe diff --git a/recipes/recipes_emscripten/passagemath-eclib/test_passagemath_eclib.py b/recipes/recipes_emscripten/passagemath-eclib/test_passagemath_eclib.py new file mode 100644 index 0000000000..41c75d4bc8 --- /dev/null +++ b/recipes/recipes_emscripten/passagemath-eclib/test_passagemath_eclib.py @@ -0,0 +1,5 @@ +import pytest + + +def test_import_passagemath_eclib(): + import passagemath_eclib