Skip to content

Commit

Permalink
Add r-fastmap (#1309)
Browse files Browse the repository at this point in the history
Co-authored-by: Thorsten Beier <[email protected]>
  • Loading branch information
IsabelParedes and DerThorsten authored Sep 11, 2024
1 parent 4c49088 commit 97e12dd
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
9 changes: 9 additions & 0 deletions recipes/recipes_emscripten/r-fastmap/build.sh
Original file line number Diff line number Diff line change
@@ -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
46 changes: 46 additions & 0 deletions recipes/recipes_emscripten/r-fastmap/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 97e12dd

Please sign in to comment.