mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
85 lines
2.5 KiB
Bash
85 lines
2.5 KiB
Bash
pkgname=r
|
|
pkgver=3.5.0
|
|
pkgrel=2
|
|
pkgdesc="Language and environment for statistical computing and graphics"
|
|
arch=('x86_64')
|
|
license=('GPL')
|
|
url='http://www.r-project.org/'
|
|
depends=('openblas' 'lapack' 'bzip2' 'libpng' 'libjpeg' 'libtiff'
|
|
'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
|
|
'libxt' 'libxmu' 'pango' 'xz' 'desktop-file-utils' 'icu')
|
|
makedepends=('openjdk' 'tk' 'gcc-fortran')
|
|
backup=('etc/R/Makeconf' 'etc/R/Renviron' 'etc/R/ldpaths' 'etc/R/repositories' 'etc/R/javaconf')
|
|
options=('!makeflags' '!emptydirs')
|
|
source=("http://cran.r-project.org/src/base/R-${pkgver%%.*}/R-${pkgver}.tar.gz"
|
|
'r.desktop'
|
|
'r.png'
|
|
'R.conf')
|
|
sha256sums=('fd1725535e21797d3d9fea8963d99be0ba4c3aecadcf081b43e261458b416870'
|
|
'9301e9bcda74f69ae7eeb818c1ad8c3b46b30533d5b6f1f7bf6320c2333ab0f9'
|
|
'1580d06a737951f4f3c903cbd514247d9071fc6868eb9c2de94bb999cc195cb1'
|
|
'b7833166041b06f716b6a79095d27d4abd83549816dc53193213827139eae6ef')
|
|
|
|
prepare() {
|
|
cd R-${pkgver}
|
|
|
|
# set texmf dir correctly in makefile
|
|
sed -i 's|$(rsharedir)/texmf|${datarootdir}/texmf|' share/Makefile.in
|
|
# fix for texinfo 5.X
|
|
# sed -i 's|test ${makeinfo_version_min} -lt 7|test ${makeinfo_version_min} -lt 0|' configure
|
|
}
|
|
|
|
build() {
|
|
cd R-${pkgver}
|
|
|
|
./configure --prefix=/usr \
|
|
--libdir=/usr/lib \
|
|
--sysconfdir=/etc/R \
|
|
--datarootdir=/usr/share \
|
|
rsharedir=/usr/share/R/ \
|
|
rincludedir=/usr/include/R/ \
|
|
rdocdir=/usr/share/doc/R/ \
|
|
--with-x \
|
|
--enable-R-shlib \
|
|
--with-lapack \
|
|
--with-blas \
|
|
F77=gfortran \
|
|
LIBnn=lib
|
|
make
|
|
|
|
# make libRmath.so
|
|
cd src/nmath/standalone
|
|
make shared
|
|
}
|
|
|
|
package() {
|
|
cd R-${pkgver}
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
cd src/nmath/standalone
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# Fixup R wrapper scripts.
|
|
sed -i "s|${pkgdir} ||" "${pkgdir}/usr/bin/R"
|
|
rm "${pkgdir}/usr/lib/R/bin/R"
|
|
cd "${pkgdir}/usr/lib/R/bin"
|
|
ln -s ../../../bin/R
|
|
|
|
# install some freedesktop.org compatibility
|
|
install -Dm644 "${srcdir}/r.desktop" \
|
|
"${pkgdir}/usr/share/applications/r.desktop"
|
|
install -Dm644 "${srcdir}/r.png" \
|
|
"${pkgdir}/usr/share/pixmaps/r.png"
|
|
|
|
# move the config directory to /etc and create symlinks
|
|
install -d "${pkgdir}/etc/R"
|
|
cd "${pkgdir}/usr/lib/R/etc"
|
|
for i in *; do
|
|
mv -f ${i} "${pkgdir}/etc/R"
|
|
ln -s /etc/R/${i} ${i}
|
|
done
|
|
|
|
# Install ld.so.conf.d file to ensure other applications access the shared lib
|
|
install -Dm644 "${srcdir}/R.conf" "${pkgdir}/etc/ld.so.conf.d/R.conf"
|
|
}
|