Skip to content

Commit

Permalink
Merge pull request #1456 from emscripten-forge/tree
Browse files Browse the repository at this point in the history
Add tree
  • Loading branch information
ianthomas23 authored Dec 10, 2024
2 parents 7ebc847 + 070bdb1 commit 09c6ba0
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/run_with_pixi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
jobs:

build_simple_with_pixi:
if: false
runs-on: ubuntu-latest
env:
TARGET_PLATFORM: emscripten-wasm32
Expand Down
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ platforms = ["osx-arm64", "osx-64", "linux-64"]
############################################
[feature.feature_rattler_build]
[feature.feature_rattler_build.dependencies]
rattler-build = ">= 0.18.2"
rattler-build = ">=0.18.2"
python = "3.11.*"
typer = "*"
curl = "*"
Expand Down
16 changes: 16 additions & 0 deletions recipes/recipes_emscripten/tree/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export CONFIG_LDFLAGS="\
-Os \
--minify=0 \
-sALLOW_MEMORY_GROWTH=1 \
-sEXPORTED_RUNTIME_METHODS=FS,ENV,getEnvStrings,TTY \
-sFORCE_FILESYSTEM=1 \
-sMODULARIZE=1 \
"

emmake make \
CFLAGS="$CFLAGS -Os" \
LDFLAGS="$LDFLAGS $CONFIG_LDFLAGS"

mkdir -p $PREFIX/bin
cp tree $PREFIX/bin/tree.js
cp tree.wasm $PREFIX/bin/
41 changes: 41 additions & 0 deletions recipes/recipes_emscripten/tree/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
context:
name: tree
version: 2.2.1

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

source:
url: http://oldmanprogrammer.net/tar/${{ name }}/${{ name }}-${{ version }}.tgz
sha256: 68ac45dc78c0c311ada06200ffc3c285e74223ba208061f8d15ffac25e44b2ec

build:
number: 0

requirements:
build:
- ${{ compiler("c") }}
- make

tests:
- script:
- test -f $PREFIX/bin/tree.js
- test -f $PREFIX/bin/tree.wasm
- script: |
OUTPUT=$(run_modularized $PREFIX/bin/tree.js --version)
if [[ "$OUTPUT" != "tree v2.2.1 © 1996 - 2024 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro" ]]; then
echo "Unexpected output: $OUTPUT"
exit 1
fi
requirements:
build:
- run_modularized >= 0.1.2
about:
license: GPL-2.0-only
license_file: LICENSE

extra:
recipe-maintainers:
- ianthomas23

0 comments on commit 09c6ba0

Please sign in to comment.