r-rnetcdf: fix systemrequirements, use openmpi

This commit is contained in:
Pekka Ristola 2023-10-10 14:47:04 +03:00
parent e9895844c5
commit c3dc063d66
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 28 additions and 9 deletions

View file

@ -1,32 +1,44 @@
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
_pkgname=RNetCDF
_pkgver=2.6-2
_pkgver=2.7-1
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=2
pkgrel=0
pkgdesc="Interface to 'NetCDF' Datasets"
arch=(x86_64)
url="https://cran.r-project.org/package=${_pkgname}"
license=(GPL)
depends=(
netcdf
netcdf-openmpi
openmpi
r
udunits
)
checkdepends=(
r-bit64
r-pbdmpi
r-rmpi
)
optdepends=(
r-bit64
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('faa65d9a33a7dd02fcf2a204d5c89819')
sha256sums=('b4de45798fc5f3021f23187bc52d5931a86a4f5c91fcdba7ca4f92c966ec022e')
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"$_pkgname-fix-build.patch::https://github.com/mjwoods/RNetCDF/pull/128.patch")
md5sums=('4ea0d88f5bb0b80ac2befd5903367977'
'218440db93cdbfd1c963e73461176ecd')
sha256sums=('80626172829077807c6f14506782ffd85a316f0c09539c3d64d4594edc756d0b'
'186ebb62ea7b289108475ead24044f9d71f3bfdae06998f92e70faf1ceb74952')
prepare() {
# fix build
patch -Np1 -d "$_pkgname" < "$_pkgname-fix-build.patch"
}
build() {
mkdir -p build
R CMD INSTALL "$_pkgname" -l build
R CMD INSTALL "$_pkgname" -l build \
--configure-args="--with-mpicc=/usr/bin/mpicc --with-mpiexec=mpiexec"
}
check() {

View file

@ -10,7 +10,7 @@ def pre_build():
r_pre_build(
_G,
expect_license = "GPL (>= 2) | file LICENSE",
expect_systemrequirements = "netcdf udunits-2",
expect_systemrequirements = "netcdf (>=4.1.3), udunits-2 (>=2.0.4)",
)
def post_build():

View file

@ -6,6 +6,8 @@ repo_depends:
- udunits
repo_makedepends:
- r-bit64
- r-pbdmpi
- r-rmpi
update_on:
- source: rpkgs
pkgname: RNetCDF
@ -13,6 +15,11 @@ update_on:
md5: true
- alias: r
- source: alpmfiles
pkgname: netcdf
pkgname: netcdf-openmpi
filename: usr/lib/libnetcdf\.so\.([^.]+)
repo: extra
- source: alpm
alpm: openmpi
repo: extra
provided: libmpi.so
strip_release: true