Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From ae8423bb3477b25b3d668a1e4c4b3e84b0129bd8 Mon Sep 17 00:00:00 2001
From: Raniere Gaia Costa da Silva <Raniere.CostadaSilva@gesis.org>
Date: Thu, 29 Jan 2026 10:36:27 +0100
Subject: [PATCH] Remove dummy.c

As recommended in https://github.com/s-u/fastmatch/issues/13
---
src/dummy.c | 11 -----------
1 file changed, 11 deletions(-)
delete mode 100644 src/dummy.c

diff --git a/src/dummy.c b/src/dummy.c
deleted file mode 100644
index 5bddef9..0000000
--- a/src/dummy.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* dummy symbols to keep superfluous CRAN checks happy
- (this package uses NAMESPACE C-level symbol registration
- but the checks don't get that) */
-
-extern void R_registerRoutines(void);
-extern void R_useDynamicSymbols(void);
-
-void dummy(void) {
- R_registerRoutines();
- R_useDynamicSymbols();
-}
--
2.52.0

53 changes: 53 additions & 0 deletions recipes/recipes_emscripten/r-fastmatch/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
context:
name: r-fastmatch
version: 1.1-8

package:
name: ${{ name }}
version: ${{ version|replace("-", "_") }}

source:
url:
- https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz
- https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz
sha256: 2661c01bdc2383f4a30bf940e6bc3b68f1329db5f0e837df8160eb893f748d54
patches:
- patches/0001-Remove-dummy.c.patch

build:
number: 0
script: $R CMD INSTALL $R_ARGS .

requirements:
build:
- ${{ compiler('c') }}
- cross-r-base_${{ target_platform }} ==${{ r_base }}
host:
- r-base ==${{ r_base }}
run:

tests:
- package_contents:
lib:
- R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so
- script: run_r_test test-r-fastmatch.R
files:
recipe:
- test-r-fastmatch.R
requirements:
build:
- r-wasm-tester

about:
homepage: https://www.rforge.net/fastmatch
license: GPL-2.0-only
summary: Package providing a fast match() replacement for cases that require repeated look-ups.
It is slightly faster that R's built-in match() function on first match against
a table, but extremely fast on any subsequent lookup as it keeps the hash table
in memory.
license_family: GPL2
license_file: DESCRIPTION

extra:
recipe-maintainers:
- rgaiacs
17 changes: 17 additions & 0 deletions recipes/recipes_emscripten/r-fastmatch/test-r-fastmatch.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
library(fastmatch)

stopifnot(is.function(coalesce))
stopifnot(is.function(ctapply))
stopifnot(is.function(fmatch))

# Example from fastmatch documentation
i = rnorm(2e6)
names(i) = as.integer(rnorm(2e6))
coalesce(names(i))

i = i[order(names(i))]
ctapply(i, names(i), sum)

x = as.integer(rnorm(1e6) * 1000000)
s = 1:100
fmatch(s,x)
81 changes: 81 additions & 0 deletions recipes/recipes_emscripten/r-quanteda/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
context:
name: r-quanteda
version: 4.5.0

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

source:
url:
- https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz
- https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz
sha256: caf592519d51f1a19694fb112e8455814526a3f7b25f6befb7337e76fcacf6c2

build:
number: 0
script: $R CMD INSTALL $R_ARGS .

requirements:
build:
- ${{ compiler('c') }}
- cross-r-base_${{ target_platform }} ==${{ r_base }}
- r-matrix >=1.5_0
- r-rcpp >=0.12.12
- r-snowballc
- r-fastmatch
- r-jsonlite
- r-lifecycle
- r-magrittr
- r-stopwords
- r-stringi
- r-xml2
- r-yaml
# Workaround minor limitation of rattler-build
- r-usethis
host:
- r-base ==${{ r_base }}
- r-matrix >=1.5_0
- r-rcpp >=0.12.12
- r-snowballc
- r-fastmatch
- r-jsonlite
- r-lifecycle
- r-magrittr
- r-stopwords
- r-stringi
- r-xml2
- r-yaml
run:
- r-matrix >=1.5_0
- r-rcpp >=0.12.12
- r-snowballc
- r-fastmatch
- r-jsonlite
- r-lifecycle
- r-magrittr
- r-stopwords
- r-stringi
- r-xml2
- r-yaml

tests:
- package_contents:
lib:
- R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so

about:
homepage: https://quanteda.io
license: GPL-3.0-only
summary: A fast, flexible, and comprehensive framework for quantitative text analysis in R. Provides
functionality for corpus management, creating and manipulating tokens and n-grams,
exploring keywords in context, forming and manipulating sparse matrices of documents
by features and feature co-occurrences, analyzing keywords, computing feature similarities
and distances, applying content dictionaries, applying supervised and unsupervised
machine learning, visually representing text and text analyses, and more.
license_family: GPL3
license_file: LICENSE

extra:
recipe-maintainers:
- rgaiacs
Loading