# Maintainer: Pekka Ristola # Contributor: Guoyi Zhang # Contributor: anzi2001 # Contributor: haha662 # Contributor: Kibouo # Contributor: Ward Segers # Contributor: Alex Branham _pkgname=rmarkdown _pkgver=2.26 pkgname=r-${_pkgname,,} pkgver=${_pkgver//-/.} pkgrel=1 pkgdesc="Dynamic Documents for R" arch=(any) url="https://cran.r-project.org/package=$_pkgname" license=('GPL-3.0-only') depends=( pandoc r-bslib r-evaluate r-fontawesome r-htmltools r-jquerylib r-jsonlite r-knitr r-tinytex r-xfun r-yaml ) checkdepends=( r-curl r-shiny r-testthat texlive-basic texlive-fontsrecommended texlive-latexextra ) optdepends=( r-cleanrmd r-digest r-downlit r-dygraphs r-fs r-katex r-rsconnect r-sass r-shiny r-testthat r-tibble r-vctrs r-withr ) source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") md5sums=('d4f5e42ce1e7d2ab04fb1beff82c4ff5') b2sums=('787c2e0505c07345cc1e20826ca1a85d8fabc58a0468f76d7fb0e5d2a555168913afa0fca38fad5d7359c1fb6f0bcb44fdddbd9f2686a828c0e7d8f3818f829f') prepare() { # Skip a test that might fail depending on environment sed -i '/"Converting bib file is working"/a\ \ skip("Inconsistent test")' \ "$_pkgname/tests/testthat/test-pandoc.R" } build() { mkdir build R CMD INSTALL -l build "$_pkgname" } check() { cd "$_pkgname/tests" R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R } package() { install -d "$pkgdir/usr/lib/R/library" cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library" }