# Maintainer: Pekka Ristola # Contributor: Guoyi Zhang # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com # Contributor: frichtlm # Contributor: wagnerflo # Contributor: Tobias Neumann # Contributor: Nick B _pkgname=ggplot2 _pkgver=3.5.1 pkgname=r-${_pkgname,,} pkgver=${_pkgver//-/.} pkgrel=1 pkgdesc="Create Elegant Data Visualisations Using the Grammar of Graphics" arch=(any) url="https://cran.r-project.org/package=$_pkgname" license=('MIT') depends=( r-cli r-glue r-gtable r-isoband r-lifecycle r-rlang r-scales r-tibble r-vctrs r-withr ) checkdepends=( r-hexbin r-mapproj r-quantreg r-sf r-sp r-svglite r-testthat r-xml2 ttf-font ) optdepends=( r-covr r-dplyr r-ggplot2movies r-hexbin r-hmisc r-knitr r-mapproj r-maps r-multcomp r-munsell r-profvis r-quantreg r-ragg r-rcolorbrewer r-rmarkdown r-sf r-svglite r-testthat r-vdiffr r-xml2 ) source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") md5sums=('f2add92370293ac6078f1963427d6ab2') b2sums=('6082e08ffed5d945d444890c5ef6084ed477a4e7db70c23a02ff0664571a7ca8d1c74c06c77a3aff5ff6913505ab5a6cf116f310ab78d7c3d63583c948587b78') 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" install -d "$pkgdir/usr/share/licenses/$pkgname" ln -s "/usr/lib/R/library/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname" }