Skip to content

Commit

Permalink
Merge pull request #23944 from cbrueffer/quickjsr
Browse files Browse the repository at this point in the history
Add r-quickjsr.
  • Loading branch information
mfansler committed Jan 17, 2024
2 parents 50ff864 + 7228d5a commit 2fbd229
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 0 deletions.
22 changes: 22 additions & 0 deletions recipes/r-quickjsr/LICENSE-quickjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
QuickJS Javascript Engine

Copyright (c) 2017-2021 Fabrice Bellard
Copyright (c) 2017-2021 Charlie Gordon

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 2 additions & 0 deletions recipes/r-quickjsr/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"%R%" CMD INSTALL --build . %R_ARGS%
IF %ERRORLEVEL% NEQ 0 exit /B 1
4 changes: 4 additions & 0 deletions recipes/r-quickjsr/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

export DISABLE_AUTOBREW=1
${R} CMD INSTALL --build . ${R_ARGS}
4 changes: 4 additions & 0 deletions recipes/r-quickjsr/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
- "10.12" # [osx and x86_64]
MACOSX_SDK_VERSION: # [osx and x86_64]
- "10.12" # [osx and x86_64]
69 changes: 69 additions & 0 deletions recipes/r-quickjsr/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{% set version = '1.0.7' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
url:
- {{ cran_mirror }}/src/contrib/QuickJSR_{{ version }}.tar.gz
- {{ cran_mirror }}/src/contrib/Archive/QuickJSR/QuickJSR_{{ version }}.tar.gz
sha256: 3161c243fed64ea215084b44141bea9ee416fa1ef3910aeb78abe55f3d3e9893

build:
merge_build_host: True # [win]
number: 0
rpaths:
- lib/R/lib/
- lib/
missing_dso_whitelist:
- '*/R.dll'

requirements:
build:
- {{ compiler('c') }} # [not win]
- {{ compiler('m2w64_c') }} # [win]
- {{ compiler('cxx') }} # [not win]
- {{ compiler('m2w64_cxx') }} # [win]
- {{ posix }}filesystem # [win]
- {{ posix }}make
- {{ posix }}sed # [win]
- {{ posix }}coreutils # [win]
- {{ posix }}zip # [win]
- cross-r-base {{ r_base }} # [build_platform != target_platform]
host:
- r-base
- r-r6
- r-rcpp
- r-jsonlite
run:
- r-base
- {{ native }}gcc-libs # [win]
- {{ native }}libwinpthread-git # [win]
- r-r6
- r-rcpp
- r-jsonlite

test:
commands:
- $R -e "library('QuickJSR')" # [not win]
- "\"%R%\" -e \"library('QuickJSR')\"" # [win]

about:
home: https://github.com/andrjohns/QuickJSR
doc_url: https://bellard.org/quickjs/
license: MIT
summary: An 'R' interface to the 'QuickJS' portable 'JavaScript' engine. The engine is bundled
entirely within the package, requiring no external system dependencies beyond a
'C' compiler.
license_family: MIT
license_file:
- {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
- LICENSE
- LICENSE-quickjs

extra:
recipe-maintainers:
- conda-forge/r

0 comments on commit 2fbd229

Please sign in to comment.