-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9597 from xhochy/r-swagger
Add r-swagger
- Loading branch information
Showing
3 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"%R%" CMD INSTALL --build . | ||
IF %ERRORLEVEL% NEQ 0 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
if [[ $target_platform =~ linux.* ]] || [[ $target_platform == win-32 ]] || [[ $target_platform == win-64 ]] || [[ $target_platform == osx-64 ]]; then | ||
export DISABLE_AUTOBREW=1 | ||
$R CMD INSTALL --build . | ||
else | ||
mkdir -p $PREFIX/lib/R/library/swagger | ||
mv * $PREFIX/lib/R/library/swagger | ||
if [[ $target_platform == osx-64 ]]; then | ||
pushd $PREFIX | ||
for libdir in lib/R/lib lib/R/modules lib/R/library lib/R/bin/exec sysroot/usr/lib; do | ||
pushd $libdir || exit 1 | ||
for SHARED_LIB in $(find . -type f -iname "*.dylib" -or -iname "*.so" -or -iname "R"); do | ||
echo "fixing SHARED_LIB $SHARED_LIB" | ||
install_name_tool -change /Library/Frameworks/R.framework/Versions/3.5.0-MRO/Resources/lib/libR.dylib "$PREFIX"/lib/R/lib/libR.dylib $SHARED_LIB || true | ||
install_name_tool -change /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libR.dylib "$PREFIX"/lib/R/lib/libR.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/local/clang4/lib/libomp.dylib "$PREFIX"/lib/libomp.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/local/gfortran/lib/libgfortran.3.dylib "$PREFIX"/lib/libgfortran.3.dylib $SHARED_LIB || true | ||
install_name_tool -change /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libquadmath.0.dylib "$PREFIX"/lib/libquadmath.0.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/local/gfortran/lib/libquadmath.0.dylib "$PREFIX"/lib/libquadmath.0.dylib $SHARED_LIB || true | ||
install_name_tool -change /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libgfortran.3.dylib "$PREFIX"/lib/libgfortran.3.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/lib/libgcc_s.1.dylib "$PREFIX"/lib/libgcc_s.1.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/lib/libiconv.2.dylib "$PREFIX"/sysroot/usr/lib/libiconv.2.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/lib/libncurses.5.4.dylib "$PREFIX"/sysroot/usr/lib/libncurses.5.4.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/lib/libicucore.A.dylib "$PREFIX"/sysroot/usr/lib/libicucore.A.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/lib/libexpat.1.dylib "$PREFIX"/lib/libexpat.1.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/lib/libcurl.4.dylib "$PREFIX"/lib/libcurl.4.dylib $SHARED_LIB || true | ||
install_name_tool -change /usr/lib/libc++.1.dylib "$PREFIX"/lib/libc++.1.dylib $SHARED_LIB || true | ||
install_name_tool -change /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libc++.1.dylib "$PREFIX"/lib/libc++.1.dylib $SHARED_LIB || true | ||
done | ||
popd | ||
done | ||
popd | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{% set version = '3.9.2' %} | ||
{% set posix = 'm2-' if win else '' %} | ||
{% set native = 'm2w64-' if win else '' %} | ||
|
||
package: | ||
name: r-swagger | ||
version: {{ version|replace("-", "_") }} | ||
|
||
source: | ||
url: | ||
- {{ cran_mirror }}/src/contrib/swagger_{{ version }}.tar.gz | ||
- {{ cran_mirror }}/src/contrib/Archive/swagger/swagger_{{ version }}.tar.gz | ||
sha256: 0917f2c6508697fc4d9cb4bc82c07767eff70f996251eee681fde362f65f4c8f | ||
|
||
build: | ||
merge_build_host: True # [win] | ||
number: 0 | ||
noarch: generic | ||
rpaths: | ||
- lib/R/lib/ | ||
- lib/ | ||
|
||
requirements: | ||
build: | ||
- {{posix}}zip # [win] | ||
host: | ||
- r-base | ||
run: | ||
- r-base | ||
|
||
test: | ||
commands: | ||
- $R -e "library('swagger')" # [not win] | ||
- "\"%R%\" -e \"library('swagger')\"" # [win] | ||
|
||
about: | ||
home: https://github.com/rstudio/swagger | ||
license: Apache 2.0 | ||
license_file: LICENSE | ||
summary: 'A collection of ''HTML'', ''JavaScript'', and ''CSS'' assets that dynamically generate | ||
beautiful documentation from a ''Swagger'' compliant API: <https://swagger.io/specification/>.' | ||
license_family: APACHE | ||
|
||
extra: | ||
recipe-maintainers: | ||
- conda-forge/r | ||
- xhochy | ||
|
||
# Package: swagger | ||
# Type: Package | ||
# Title: Dynamically Generates Documentation from a 'Swagger' Compliant API | ||
# Version: 3.9.2 | ||
# Authors@R: c( person("Javier", "Luraschi", email = "javier@rstudio.com", role = c("aut", "cre")), person(family = "RStudio", role = c("cph")), person(family = "SmartBear Software", role = c("aut", "cph")) ) | ||
# Maintainer: Javier Luraschi <javier@rstudio.com> | ||
# Description: A collection of 'HTML', 'JavaScript', and 'CSS' assets that dynamically generate beautiful documentation from a 'Swagger' compliant API: <https://swagger.io/specification/>. | ||
# License: Apache License 2.0 | file LICENSE | ||
# Encoding: UTF-8 | ||
# LazyData: true | ||
# URL: https://github.com/rstudio/swagger | ||
# BugReports: https://github.com/rstudio/swagger/issues | ||
# RoxygenNote: 6.0.1 | ||
# NeedsCompilation: no | ||
# Packaged: 2018-03-23 18:32:15 UTC; javierluraschi | ||
# Author: Javier Luraschi [aut, cre], RStudio [cph], SmartBear Software [aut, cph] | ||
# Repository: CRAN | ||
# Date/Publication: 2018-03-23 18:38:51 UTC |