Skip to content
Open
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
28 changes: 28 additions & 0 deletions recipes/recipes_emscripten/gf2x/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euxo pipefail

autoreconf -vfi

export CFLAGS_FOR_BUILD="-O2"
export CXXFLAGS_FOR_BUILD="-O2"
export CPPFLAGS_FOR_BUILD=""
export LDFLAGS_FOR_BUILD=""

export HOST_CFLAGS="-O2"
export HOST_CXXFLAGS="-O2"
export HOST_LDFLAGS=""

BUILD_ARCH=$("${CC_FOR_BUILD:-cc}" -dumpmachine || echo "x86_64-pc-linux-gnu")

emconfigure ./configure \
--build="${BUILD_ARCH}" \
--host=wasm32-unknown-emscripten \
--disable-shared \
--prefix="${PREFIX}" \
CC_FOR_BUILD="${CC_FOR_BUILD:-cc}" \
CPP_FOR_BUILD="${CC_FOR_BUILD:-cc} -E" \
HOST_CC="${CC_FOR_BUILD:-cc}" \
ABI=32

emmake make -j${CPU_COUNT:-4}
emmake make install
39 changes: 39 additions & 0 deletions recipes/recipes_emscripten/gf2x/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
context:
name: gf2x
version: 1.3.0

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

source:
url: https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${{ version }}/gf2x-gf2x-${{ version }}.tar.gz
sha256: 11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0

build:
number: 0

requirements:
build:
- autoconf
- automake
- libtool
- make
- ${{ compiler('c') }}
- ${{ compiler('cxx') }}

tests:
- package_contents:
files:
- lib/libgf2x.a
- include/gf2x.h

about:
homepage: https://gitlab.inria.fr/gf2x/gf2x
license: GPL-3.0-only
license_file: COPYING
summary: gf2x is a C/C++ software package containing routines for fast arithmetic in GF(2)[x] (multiplication, squaring, GCD) and searching for irreducible/primitive trinomials.

extra:
recipe-maintainers:
- wangyenshu