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
29 changes: 29 additions & 0 deletions recipes/recipes_emscripten/bliss/build.sh
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +23 to +24

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These two libraries are identical. It would be better to make libbliss.a a shared library, aka a side module with correspoinding EM_FORGE_SIDE_MODULE_LDFLAGS.

And you can add this to the CMakeList

set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)

to fix

ADD_LIBRARY called with SHARED option but the target platform does not
support dynamic linking.  Building a STATIC library instead.  This may lead
to problems.


cp ../src/*.hh $PREFIX/include/bliss/

cp bliss.js $PREFIX/bin/
cp bliss.wasm $PREFIX/bin/
44 changes: 44 additions & 0 deletions recipes/recipes_emscripten/bliss/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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:
- wangyenshu
22 changes: 22 additions & 0 deletions recipes/recipes_emscripten/eclib/build.sh
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions recipes/recipes_emscripten/eclib/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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
Comment thread
wangyenshu marked this conversation as resolved.
- 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:
- wangyenshu
15 changes: 15 additions & 0 deletions recipes/recipes_emscripten/sirocco/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euxo pipefail

autoreconf --install

emconfigure ./configure \
--prefix="${PREFIX}" \
--disable-shared \
--enable-static \
CPPFLAGS="-I${PREFIX}/include" \
LDFLAGS="-L${PREFIX}/lib"

emmake make

emmake make install
44 changes: 44 additions & 0 deletions recipes/recipes_emscripten/sirocco/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
context:
name: sirocco
version: 2.1.1

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

source:
url: https://github.com/miguelmarco/SIROCCO2/releases/download/${{ version }}/libsirocco-${{ version }}.tar.gz
sha256: 83d1dd5622120eda42c475696235dd67be8072a76baad0a70693d9743a659a61

build:
number: 0

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

tests:
- package_contents:
files:
- lib/libsirocco.a
- include/sirocco.h

about:
homepage: https://github.com/miguelmarco/SIROCCO2
license: GPL-3.0-only
license_file: LICENSE
summary: Sirocco Is a ROot Certified COntinuator

extra:
recipe-maintainers:
- wangyenshu
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:
- wangyenshu
2 changes: 1 addition & 1 deletion variant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ orc:
pango:
- '1.48'
pari:
- 2.13.* *_pthread
- 2.17.*
perl:
- 5.32.1
petsc:
Expand Down
Loading