1 # Maintainer: Ronald van Haren <ronald.archlinux.org>
2 # Maintainer: Antonio Rojas <arojas@archlinux.org>
3 # Contributor: Damir Perisa <damir.perisa@bluewin.ch>
4 # Contributor: K. Piche <kpiche@rogers.com>
9 pkgdesc="Language and environment for statistical computing and graphics"
12 url='https://www.r-project.org/'
13 depends=('lapack' 'libtiff' 'pcre2' 'perl' 'libxmu' 'pango' 'zip' 'unzip' 'curl' 'icu' 'which')
14 makedepends=('jdk-openjdk' 'gcc-fortran' 'tk' 'texlive-core')
15 optdepends=('tk: tcl/tk interface'
16 'texlive-bin: latex sty files'
17 'gcc-fortran: needed to compile some CRAN packages'
18 'openblas: faster linear algebra')
19 backup=('etc/R/Makeconf' 'etc/R/Renviron' 'etc/R/ldpaths' 'etc/R/repositories' 'etc/R/javaconf')
20 options=('!emptydirs')
21 source=("https://cran.r-project.org/src/base/R-${pkgver%%.*}/R-${pkgver}.tar.gz"
25 sha256sums=('2036225e9f7207d4ce097e54972aecdaa8b40d7d9911cd26491fac5a0fab38af'
26 '25b01ea93fa704884b65ba002d44d4e99725bd826997e8c73b6467df9f23c798'
27 '1580d06a737951f4f3c903cbd514247d9071fc6868eb9c2de94bb999cc195cb1'
28 'b7833166041b06f716b6a79095d27d4abd83549816dc53193213827139eae6ef')
32 # set texmf dir correctly in makefile
33 sed -i 's|$(rsharedir)/texmf|${datarootdir}/texmf|' share/Makefile.in
38 ./configure --prefix=/usr \
41 --datarootdir=/usr/share \
42 rsharedir=/usr/share/R/ \
43 rincludedir=/usr/include/R/ \
44 rdocdir=/usr/share/doc/R/ \
54 cd src/nmath/standalone
60 make DESTDIR="$pkgdir" install install-pdf
63 cd src/nmath/standalone
64 make DESTDIR="${pkgdir}" install
66 # Fixup R wrapper scripts.
67 sed -i "s|${pkgdir} ||" "${pkgdir}/usr/bin/R"
68 rm "${pkgdir}/usr/lib/R/bin/R"
69 cd "${pkgdir}/usr/lib/R/bin"
72 # install some freedesktop.org compatibility
73 install -Dm644 "${srcdir}/r.desktop" -t "${pkgdir}/usr/share/applications"
74 install -Dm644 "${srcdir}/r.png" -t "${pkgdir}/usr/share/pixmaps"
76 # move the config directory to /etc and create symlinks
77 install -d "${pkgdir}/etc/R"
78 cd "${pkgdir}/usr/lib/R/etc"
80 mv -f ${i} "${pkgdir}/etc/R"
81 ln -s /etc/R/${i} ${i}
84 # Install ld.so.conf.d file to ensure other applications access the shared lib
85 install -Dm644 "${srcdir}/R.conf" -t "${pkgdir}/etc/ld.so.conf.d"