blob: 507958c64ebefdcbe15c0556ea5513899344db05 (
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
|
# Maintainer: sukanka <su975853527@gmail.com>
_pkgname=torch
_pkgver=0.12.0
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=2
pkgdesc="Tensors and Neural Networks with 'GPU' Acceleration"
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=('MIT')
depends=(
r-bit64
r-callr
r-cli
r-coro
r-desc
r-ellipsis
r-glue
r-jsonlite
r-magrittr
r-r6
r-rcpp
r-rlang
r-safetensors
r-withr
)
optdepends=(
r-covr
r-katex
r-knitr
r-mvtnorm
r-numderiv
r-palmerpenguins
r-rmarkdown
r-testthat
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"fix-build.patch")
md5sums=('1e182d06b2a6ddecf95b9ee57b8df0af'
'539874681ec47604d54ac506a0f7a14d')
b2sums=('d1eeb00a04a84fa15f25489aee3d7067b217e0e3150dada676f0267646609bd9082b1c764c29825b8b56727ef73735015d306756cafa23d800e15bdef41b5f98'
'81629ea7a33491bf8dcec19019d97b90d838559adb023cde8e1bca1165bba58c9d48fb931300f51a717c0b048fd13750b3fdec16c416ed43e1de9296d146ee6e')
prepare() {
# remove unnecessary torch.so library copy
patch -Np1 -i fix-build.patch
}
build() {
mkdir build
R CMD INSTALL -l build "$_pkgname"
}
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"
}
|