From 97e12ddcfb37249cd5344bbcc3e92a0614958ed3 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 11 Sep 2024 12:17:28 +0200 Subject: [PATCH] Add r-fastmap (#1309) Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/r-fastmap/build.sh | 9 ++++ .../recipes_emscripten/r-fastmap/recipe.yaml | 46 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 recipes/recipes_emscripten/r-fastmap/build.sh create mode 100644 recipes/recipes_emscripten/r-fastmap/recipe.yaml diff --git a/recipes/recipes_emscripten/r-fastmap/build.sh b/recipes/recipes_emscripten/r-fastmap/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-fastmap/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-fastmap/recipe.yaml b/recipes/recipes_emscripten/r-fastmap/recipe.yaml new file mode 100644 index 000000000..65f5f4ea6 --- /dev/null +++ b/recipes/recipes_emscripten/r-fastmap/recipe.yaml @@ -0,0 +1,46 @@ +context: + name: r-fastmap + version: 1.2.0 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: b1da04a2915d1d057f3c2525e295ef15016a64e6667eac83a14641bbd83b9246 + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://r-lib.github.io/fastmap/ + repository: https://github.com/r-lib/fastmap + license: MIT + license_family: MIT + summary: | + Fast implementation of a key-value store. Environments are commonly used as + key-value stores, but every time a new key is used, it is added to R's + global symbol table, causing a small amount of memory leakage. This can be + problematic in cases where many different keys are used. Fastmap avoids this + memory leak issue by implementing the map using data structures in C++. + +extra: + recipe-maintainers: + - IsabelParedes