core/r/PKGBUILD

69 lines
2.0 KiB
Bash
Raw Normal View History

2010-10-29 08:24:08 +08:00
#
2012-06-02 12:57:17 +08:00
# Platform packages for Chakra, part of chakra-project.org
2010-10-29 08:24:08 +08:00
#
2012-06-02 12:57:17 +08:00
# maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
2010-03-14 23:48:48 +08:00
pkgname=r
2013-01-08 12:56:03 +08:00
pkgver=2.15.2
2013-01-29 09:35:00 +08:00
pkgrel=2
2012-06-02 12:57:17 +08:00
pkgdesc="Language and environment for statistical computing and graphics"
arch=('x86_64')
2010-03-14 23:48:48 +08:00
license=('GPL')
url=('http://www.r-project.org/')
2012-06-02 12:57:17 +08:00
depends=('atlas-lapack' 'bzip2' 'libpng' 'libjpeg' 'libtiff'
2010-03-14 23:48:48 +08:00
'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
2012-06-02 12:57:17 +08:00
'tk' 'libxt' 'libxmu' 'pango' 'xz')
makedepends=('openjdk' 'gcc-fortran')
2012-06-02 12:57:17 +08:00
backup=('etc/R/Makeconf' 'etc/R/Renviron' 'etc/R/ldpaths' 'etc/R/repositories')
2010-03-14 23:48:48 +08:00
options=('!makeflags')
source=("http://cran.r-project.org/src/base/R-2/R-${pkgver}.tar.gz"
'r.desktop'
'r.png')
2013-01-08 12:56:03 +08:00
sha1sums=('c80da687d66ee88d1e34fc1ae5c1bd525f9513dd'
'bcc0320d7cc49d56408edc756b50a0f9ba98fe43'
'a69a07ec363440efc18ce0a7f2af103375dea978')
2010-03-14 23:48:48 +08:00
build() {
2012-06-02 12:57:17 +08:00
cd "${srcdir}/R-${pkgver}"
sed -i 's|#define NeedFunctionPrototypes 0|#define NeedFunctionPrototypes 1|g' src/modules/X11/dataentry.c
2010-03-14 23:48:48 +08:00
./configure --prefix=/usr \
--libdir=/usr/lib \
2012-06-02 12:57:17 +08:00
--sysconfdir=/etc/R \
2010-03-14 23:48:48 +08:00
--datarootdir=/usr/share \
rsharedir=/usr/share/R/ \
rincludedir=/usr/include/R/ \
2012-06-02 12:57:17 +08:00
rdocdir=/usr/share/doc/R/ \
2010-03-14 23:48:48 +08:00
--with-x \
2012-06-02 12:57:17 +08:00
--enable-R-shlib \
2010-03-14 23:48:48 +08:00
--with-lapack \
--with-blas \
F77=gfortran \
LIBnn=lib
make
}
package() {
2012-06-02 12:57:17 +08:00
cd "${srcdir}/R-${pkgver}"
make -j1 DESTDIR="${pkgdir}" install
2010-03-14 23:48:48 +08:00
# Fixup R wrapper scripts.
2012-06-02 12:57:17 +08:00
sed -i "s|${pkgdir} ||" "${pkgdir}/usr/bin/R"
rm "${pkgdir}/usr/lib/R/bin/R"
cd "${pkgdir}/usr/lib/R/bin"
2010-03-14 23:48:48 +08:00
ln -s ../../../bin/R
# install some freedesktop.org compatibility
2012-06-02 12:57:17 +08:00
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
}