Skip to content

Commit

Permalink
r-momr (#13703)
Browse files Browse the repository at this point in the history
  • Loading branch information
lecorguille authored Feb 19, 2019
1 parent e6d83d9 commit 4e0eccc
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
38 changes: 38 additions & 0 deletions recipes/r-momr/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

if [[ $target_platform =~ linux.* ]] || [[ $target_platform == osx-64 ]]; then
export DISABLE_AUTOBREW=1
mv DESCRIPTION DESCRIPTION.old
grep -v '^Priority: ' DESCRIPTION.old > DESCRIPTION
$R CMD INSTALL --build .
else
mkdir -p $PREFIX/lib/R/library/momr
mv * $PREFIX/lib/R/library/momr

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
46 changes: 46 additions & 0 deletions recipes/r-momr/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% set version = '1.1' %}

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

source:
url:
- {{ cran_mirror }}/src/contrib/momr_{{ version }}.tar.gz
- {{ cran_mirror }}/src/contrib/Archive/momr/momr_{{ version }}.tar.gz
sha256: b9249b5b7fd6a201ba015327db1ed54abc958bd03e8a4713c249d486b8fa3b24

build:
number: 0
rpaths:
- lib/R/lib/
- lib/

requirements:
host:
- r-base
- r-hmisc
- r-gplots
- r-nortest

run:
- r-base
- r-hmisc
- r-gplots
- r-nortest

test:
commands:
- $R -e "library('momr')"

about:
home: https://CRAN.R-project.org/package=momr
license: Artistic-2.0 (Restricts use)
summary: '''MetaOMineR'' suite is a set of R packages that offers many functions and modules
needed for the analyses of quantitative metagenomics data. ''momr'' is the core
package and contains routines for biomarker identification and exploration. Developed
since the beginning of field, ''momr'' has evolved and is structured around the
different modules such as preprocessing, analysis, vizualisation, etc. See package
help for more information.'
license_family: OTHER
license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/Artistic-2.0'

0 comments on commit 4e0eccc

Please sign in to comment.