summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBioArchLinuxBot2024-04-11 18:21:05 +0000
committerBioArchLinuxBot2024-04-11 18:21:05 +0000
commita6c86a9746d237f1419747458e0fb55cdd2a24e0 (patch)
tree40b37fb2e6fc30b4f039a2f3a60977948930ccaa
parentd49d78cf030cba7f01cfd5f5445044f8ee6d3894 (diff)
downloadaur-a6c86a9746d237f1419747458e0fb55cdd2a24e0.tar.gz
[lilac] updated to 1.0.5-7
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD56
-rw-r--r--fix-tests.patch13
3 files changed, 63 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7dbfc12eac94..ab492fc3ce6a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,26 @@
pkgbase = r-getoptlong
pkgdesc = Parsing Command-Line Arguments and Simple Variable Interpolation
pkgver = 1.0.5
- pkgrel = 4
+ pkgrel = 7
url = https://cran.r-project.org/package=GetoptLong
arch = any
license = MIT
- depends = r
+ checkdepends = r-testthat
+ depends = perl-json
+ depends = perl-json-xs
+ depends = perl-yaml-syck
depends = r-crayon
depends = r-globaloptions
depends = r-rjson
- depends = perl
optdepends = r-knitr
optdepends = r-markdown
optdepends = r-rmarkdown
optdepends = r-testthat
source = https://cran.r-project.org/src/contrib/GetoptLong_1.0.5.tar.gz
- sha256sums = 8c237986ed3dfb72d956ad865ef7768644eebf144675ad66140acfd1aca9d701
+ source = fix-tests.patch
+ md5sums = 859f5b437ccf1eda9fe0e99eb80b2def
+ md5sums = 2973d9109d39fe8fb5f1d3b93b7cb481
+ b2sums = e33d5c05f4a597144881cefdfcc1c96698136de1559797ac58a0e4f16cf92498e41407d3675fdebafef205379d17fba76f3354c25bbe509444c0afd0dc4e6b59
+ b2sums = fa9093742756bbc717c4702230155ff18358d209aa04bdce99940f717e19acdfe64bbfd5a46c7f9bda6ca767a376d5b9388c8c6029352ed27e2c539a4387e22d
pkgname = r-getoptlong
diff --git a/PKGBUILD b/PKGBUILD
index 0039dd6ef37e..a555e3288ce9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,25 @@
-# system requirements: Perl, Getopt::Long
-# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
+# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
+# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
_pkgname=GetoptLong
_pkgver=1.0.5
pkgname=r-${_pkgname,,}
-pkgver=1.0.5
-pkgrel=4
-pkgdesc='Parsing Command-Line Arguments and Simple Variable Interpolation'
-arch=('any')
-url="https://cran.r-project.org/package=${_pkgname}"
+pkgver=${_pkgver//-/.}
+pkgrel=7
+pkgdesc="Parsing Command-Line Arguments and Simple Variable Interpolation"
+arch=(any)
+url="https://cran.r-project.org/package=$_pkgname"
license=('MIT')
depends=(
- r
+ perl-json
+ perl-json-xs
+ perl-yaml-syck
r-crayon
r-globaloptions
r-rjson
- perl
+)
+checkdepends=(
+ r-testthat
)
optdepends=(
r-knitr
@@ -23,16 +27,36 @@ optdepends=(
r-rmarkdown
r-testthat
)
-source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
-sha256sums=('8c237986ed3dfb72d956ad865ef7768644eebf144675ad66140acfd1aca9d701')
+source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
+ "fix-tests.patch")
+md5sums=('859f5b437ccf1eda9fe0e99eb80b2def'
+ '2973d9109d39fe8fb5f1d3b93b7cb481')
+b2sums=('e33d5c05f4a597144881cefdfcc1c96698136de1559797ac58a0e4f16cf92498e41407d3675fdebafef205379d17fba76f3354c25bbe509444c0afd0dc4e6b59'
+ 'fa9093742756bbc717c4702230155ff18358d209aa04bdce99940f717e19acdfe64bbfd5a46c7f9bda6ca767a376d5b9388c8c6029352ed27e2c539a4387e22d')
+
+prepare() {
+ # fix tests
+ patch -Np1 -i fix-tests.patch
+
+ # use system perl modules
+ cd "$_pkgname/inst/extdata"
+ rm -r perl_lib
+}
build() {
- R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
+ mkdir build
+ R CMD INSTALL -l build "$_pkgname"
+}
+
+check() {
+ cd "$_pkgname/tests"
+ R_LIBS="$srcdir/build" NOT_CRAN=true GETOPTLONG_TESTING=true Rscript --vanilla test-all.R
}
package() {
- install -dm0755 "${pkgdir}/usr/lib/R/library"
- cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library"
- install -Dm644 "${_pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ 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"
}
-# vim:set ts=2 sw=2 et:
diff --git a/fix-tests.patch b/fix-tests.patch
new file mode 100644
index 000000000000..bfedd4cb7377
--- /dev/null
+++ b/fix-tests.patch
@@ -0,0 +1,13 @@
+diff --git a/GetoptLong/R/get_options.R b/GetoptLong/R/get_options.R
+index a01c65e..97a80ef 100644
+--- a/GetoptLong/R/get_options.R
++++ b/GetoptLong/R/get_options.R
+@@ -45,7 +45,7 @@ GetoptLong = function(..., help_head = NULL, help_foot = NULL, envir = parent.fr
+ argv_str = NULL, template_control = list(),
+ help_style = GetoptLong.options$help_style) {
+
+- if(is.null(get_scriptname())) {
++ if(is.null(get_scriptname()) || identical(Sys.getenv("GETOPTLONG_TESTING"), "true")) {
+ IS_UNDER_COMMAND_LINE = FALSE
+ } else {
+ IS_UNDER_COMMAND_LINE = TRUE