summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO62
-rw-r--r--PKGBUILD143
-rw-r--r--R.conf2
-rw-r--r--r-mkl.install16
-rw-r--r--r.desktop11
-rw-r--r--r.pngbin0 -> 4771 bytes
6 files changed, 234 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d50708f967e0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,62 @@
+# Generated by makepkg 4.2.1
+# Thu Apr 30 05:15:56 UTC 2015
+pkgbase = r-mkl
+ pkgdesc = Language and environment for statistical computing and graphics, set up to use Intel's MKL
+ pkgver = 3.2.0
+ pkgrel = 1
+ url = http://www.r-project.org/
+ install = r-mkl.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = jdk8-openjdk
+ makedepends = gcc-fortran
+ makedepends = tk
+ depends = intel-mkl
+ depends = bzip2
+ depends = libpng
+ depends = libjpeg
+ depends = libtiff
+ depends = ncurses
+ depends = pcre
+ depends = readline
+ depends = zlib
+ depends = perl
+ depends = gcc-libs
+ depends = libxt
+ depends = libxmu
+ depends = pango
+ depends = xz
+ depends = desktop-file-utils
+ depends = zip
+ depends = unzip
+ optdepends = tk: tcl/tk interface
+ optdepends = texlive-bin: latex sty files
+ optdepends = icc: intel compiler
+ optdepends = icpc: intel compiler
+ optdepends = xiar: intel compiler
+ optdepends = xild: intel compiler
+ provides = r=3.2.0
+ conflicts = r
+ options = !makeflags
+ options = !emptydirs
+ backup = etc/R/Makeconf
+ backup = etc/R/Renviron
+ backup = etc/R/ldpaths
+ backup = etc/R/repositories
+ backup = etc/R/javaconf
+ source = http://cran.r-project.org/src/base/R-3/R-3.2.0.tar.gz
+ source = r.desktop
+ source = r.png
+ source = R.conf
+ md5sums = 66fa17ad457d7e618191aa0f52fc402e
+ md5sums = 44ca875140b148543148b7749c7d6f5e
+ md5sums = 00659f39e90627fe87f1645df5d4e3a7
+ md5sums = 1dfa62c812aed9642f6e4ac34999b9fe
+ sha512sums = c6041c854251d51dd936d3a3632c2958a0437c58488f93e5ba810e957fb7f2276e3fe4f615fb4705f2fc5a66aa50a828b54b5e4e7b4358c7fd465c71531b9828
+ sha512sums = 1a90aed5411d72dd3e7708db0cb92c518e656e1a510ece02ad934131e05b8e683b4a36da8d37198263dc19fb2f3f19656c19c01f9b67974f0d7755974076d0b7
+ sha512sums = 55ed6e819dcbb231d842d825134b84d1a24db177558d5dad9369d57fd21d0239d6433c4311531171a101ca3c7c0685493e9cc6c1fe9e4e0df59f2331cff150ba
+ sha512sums = aae388c5b6c02d9fb857914032b0cd7d68a9f21e30c39ba11f5a29aaf1d742545482054b57ce18872eabb6605bbb359b2fc1e9be5ce6881443fdbdf6b67fab3b
+
+pkgname = r-mkl
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d57c10bdced8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,143 @@
+# Maintainer: halfhorn <mwellsa -at- gmail -dot- com>
+# Contributor: jdarch <jda -dot- cloud -plus- archlinux -at- gmail -dot- com>
+# Based on the PKGBUILD for R
+
+pkgname=r-mkl
+pkgver=3.2.0
+pkgrel=1
+pkgdesc="Language and environment for statistical computing and graphics, set up to use Intel's MKL"
+arch=('i686' 'x86_64')
+license=('GPL')
+url=('http://www.r-project.org/')
+#provides=('r=3.1.2')
+provides=("r=${pkgver}")
+conflicts=('r')
+depends=('intel-mkl' 'bzip2' 'libpng' 'libjpeg' 'libtiff'
+ 'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
+ 'libxt' 'libxmu' 'pango' 'xz' 'desktop-file-utils' 'zip' 'unzip')
+makedepends=('jdk8-openjdk' 'gcc-fortran' 'tk')
+optdepends=('tk: tcl/tk interface' 'texlive-bin: latex sty files'
+ 'icc: intel compiler' 'icpc: intel compiler' 'xiar: intel compiler'
+ 'xild: intel compiler')
+backup=('etc/R/Makeconf' 'etc/R/Renviron' 'etc/R/ldpaths' 'etc/R/repositories' 'etc/R/javaconf')
+options=('!makeflags' '!emptydirs')
+install=r-mkl.install
+
+source=("http://cran.r-project.org/src/base/R-${pkgver%%.*}/R-${pkgver}.tar.gz"
+ 'r.desktop'
+ 'r.png'
+ 'R.conf')
+
+md5sums=('66fa17ad457d7e618191aa0f52fc402e'
+ '44ca875140b148543148b7749c7d6f5e'
+ '00659f39e90627fe87f1645df5d4e3a7'
+ '1dfa62c812aed9642f6e4ac34999b9fe')
+sha512sums=('c6041c854251d51dd936d3a3632c2958a0437c58488f93e5ba810e957fb7f2276e3fe4f615fb4705f2fc5a66aa50a828b54b5e4e7b4358c7fd465c71531b9828'
+ '1a90aed5411d72dd3e7708db0cb92c518e656e1a510ece02ad934131e05b8e683b4a36da8d37198263dc19fb2f3f19656c19c01f9b67974f0d7755974076d0b7'
+ '55ed6e819dcbb231d842d825134b84d1a24db177558d5dad9369d57fd21d0239d6433c4311531171a101ca3c7c0685493e9cc6c1fe9e4e0df59f2331cff150ba'
+ 'aae388c5b6c02d9fb857914032b0cd7d68a9f21e30c39ba11f5a29aaf1d742545482054b57ce18872eabb6605bbb359b2fc1e9be5ce6881443fdbdf6b67fab3b')
+
+if [ "$CARCH" == "x86_64" ]; then
+ _intel_arch=intel64
+ _intel_lib=mkl_gf_lp64
+elif [ "$CARCH" == "i686" ]; then
+ _intel_arch=ia32
+ _intel_lib=mkl_gf
+fi
+
+#_CC="icc" # uncomment to build with the Intel compiler
+
+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
+ # Fix the config script to look in Makeconf for LDFLAGS
+ sed -i '/LIBS=`eval $query VAR=LIBS`/a\LDFLAGS=`eval $query VAR=LDFLAGS`' src/scripts/config
+}
+
+build() {
+ # Set up the environment for MKL
+ source /opt/intel/mkl/bin/mklvars.sh ${_intel_arch}
+ _icclibpath=$(echo $MKLROOT | sed "s%mkl%compiler%g")/lib/${_intel_arch}
+ _mkllibpath=$MKLROOT/lib/${_intel_arch}
+ _mkllibs=" -fopenmp -Wl,--no-as-needed -L${_mkllibpath} -l${_intel_lib} -lmkl_core -lmkl_gnu_thread -ldl -lpthread -lm"
+ LDFLAGS="${LDFLAGS} -L${_icclibpath}"
+
+
+ if [ $_CC = "icc" ]; then
+ export CC="icc"
+ export CXX="icpc"
+ export AR="xiar"
+ export LD="xild"
+ export _F77="ifort"
+ export _FC="ifort"
+ else
+ export _F77="gfortran"
+ export _FC="gfortran"
+ fi
+
+ 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-blas="${_mkllibs}" \
+ --with-lapack \
+ F77=${_F77} \
+ FC=${_FC} \
+ LIBnn=lib
+
+ # Place Intel's basic math library prior to GLIBC libm
+ sed -i "s/\(^\| \)-lm\( \|$\)/\1-limf -lm\2/g" {./,etc/}Makeconf
+
+ # Build the package
+ make
+
+ # make libRmath.so
+ cd src/nmath/standalone
+ make shared
+}
+
+check() {
+ cd R-${pkgver}
+ make check-recommended
+}
+
+package() {
+ cd R-${pkgver}
+ make DESTDIR="${pkgdir}" install
+
+ # install libRmath.so
+ 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"
+}
diff --git a/R.conf b/R.conf
new file mode 100644
index 000000000000..e360859db790
--- /dev/null
+++ b/R.conf
@@ -0,0 +1,2 @@
+/usr/lib/R/lib
+
diff --git a/r-mkl.install b/r-mkl.install
new file mode 100644
index 000000000000..522ce52e7b1f
--- /dev/null
+++ b/r-mkl.install
@@ -0,0 +1,16 @@
+post_install() {
+ update-desktop-database -q
+ if [[ -x /usr/bin/mktexlsr ]]; then
+ echo ">>> updating the filename database for texlive..."
+ mktexlsr --quiet usr/share/texmf
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
diff --git a/r.desktop b/r.desktop
new file mode 100644
index 000000000000..7732c9bed1f8
--- /dev/null
+++ b/r.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=R
+GenericName=environment for statistical computing
+Comment=language and environment for statistical computing and graphics
+Exec=R
+Icon=/usr/share/pixmaps/r.png
+DocPath=/usr/lib/R/doc/html/index.html
+StartupNotify=true
+Terminal=true
+Type=Application
+Categories=Science;
diff --git a/r.png b/r.png
new file mode 100644
index 000000000000..1303ccdb9641
--- /dev/null
+++ b/r.png
Binary files differ