Skip to content
Merged
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
68 changes: 68 additions & 0 deletions recipes/recipes_emscripten/passagemath-sympow/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
context:
version: 10.8.7

package:
name: passagemath-sympow
version: ${{ version }}

source:
- url: https://pypi.org/packages/source/p/passagemath-sympow/passagemath_sympow-${{ version }}.tar.gz
sha256: 15adfcdf976e172fa206a02f2e4dff948abfa891eaa11047fd4422cce87c6f5b

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
- sympow
- passagemath-categories
run:
- python
- cysignals
- sympow
- passagemath-categories
- passagemath-linbox
- passagemath-modules

tests:
- script: pytester
files:
recipe:
- test_passagemath_sympow.py
requirements:
build:
- pytester
run:
- pytester-run
- passagemath-repl

about:
license: GPL-2.0-or-later
license_file: README.rst
summary: 'passagemath: Special values of symmetric power elliptic curve L-functions with sympow'
description: |
Distribution of a part of the Sage library.
It provides an interface to sympow.

extra:
emscripten_tests:
python:
pytest_files:
- test_passagemath_sympow.py
recipe-maintainers:
- mkoeppe
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import pytest


def test_import_passagemath_sympow():
import passagemath_sympow
25 changes: 25 additions & 0 deletions recipes/recipes_emscripten/sympow/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -euxo pipefail

# Strip architecture-specific flags that might clash with WebAssembly
export CFLAGS="$(echo "${CFLAGS:-}" | sed -E 's/-march=[^ ]+//g; s/-mtune=[^ ]+//g')"

# Patch the Configure script to evaluate Emscripten's Wasm capabilities via Node.js
sed -i 's|-o config/fpubits|-o config/fpubits.js|g' Configure
sed -i 's|-o config/endiantuple|-o config/endiantuple.js|g' Configure

sed -i 's|config/fpubits >|node config/fpubits.js >|g' Configure
sed -i 's@^[ \t]*config/fpubits@node config/fpubits.js@g' Configure
sed -i 's|\$(config/endiantuple)|\$(node config/endiantuple.js)|g' Configure

PREFIX="${PREFIX}" VARPREFIX="${PREFIX}/var" ADDBINPATH=yes sh Configure

# Patch the generated Makefile for cross-compilation
sed -i 's/\$(HELP2MAN) \$(H2MFLAGS) .*/touch \$@/g' Makefile
sed -i 's/\$(SH) armd.sh/echo "Skipping armd.sh for cross-compilation"/g' Makefile
sed -i '/logfile/d' Makefile
sed -i 's|datafiles/\*.txt ||g' Makefile

emmake make all CC="emcc"
emmake make install
cp *.wasm $PREFIX/bin
44 changes: 44 additions & 0 deletions recipes/recipes_emscripten/sympow/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
context:
name: sympow
version: 2.023.7

package:
name: ${{ name }}
version: ${{ version }}

source:
url: https://gitlab.com/rezozer/forks/sympow/-/archive/v${{ version }}/sympow-v${{ version }}.tar.gz
sha256: f19a2b428c573f9e4c36a97b736b562e76f4bfc354497abaeb7140632bef3400

build:
number: 0

requirements:
build:
- autoconf
- automake
- libtool
- make
- ${{ compiler("c") }}
- ${{ compiler('cxx') }}
- pkg-config
- autoconf-archive
- help2man
- pari
host:
- pari

tests:
- package_contents:
files:
- bin/sympow

about:
homepage: https://gitlab.com/rezozer/forks/sympow
license: LicenseRef-sympow
license_file: COPYING
summary: SYMmetric POWer elliptic curve L-functions

extra:
recipe-maintainers:
- mkoeppe
Loading