From 10be24d1b7cc39a3aa7b660405d5b54645a58e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertu=C4=9Frul=20Erata?= Date: Wed, 20 Jul 2016 19:22:15 +0300 Subject: [PATCH] R lang in main --- programming/language/R/actions.py | 61 ++++++++ programming/language/R/comar/package.py | 6 + programming/language/R/files/99R | 2 + .../language/R/files/R-2.11.1-parallel.patch | 11 ++ .../R/files/R-2.13.1-zlib_header_fix.patch | 13 ++ programming/language/R/files/Rscript.patch | 12 ++ .../language/R/files/config_site.patch | 43 ++++++ .../language/R/files/dont_use_atlas.patch | 42 ++++++ programming/language/R/files/ld.so.conf | 1 + programming/language/R/files/lib64.patch | 31 ++++ programming/language/R/pspec.xml | 132 ++++++++++++++++++ programming/language/R/translations.xml | 23 +++ 12 files changed, 377 insertions(+) create mode 100644 programming/language/R/actions.py create mode 100644 programming/language/R/comar/package.py create mode 100644 programming/language/R/files/99R create mode 100644 programming/language/R/files/R-2.11.1-parallel.patch create mode 100644 programming/language/R/files/R-2.13.1-zlib_header_fix.patch create mode 100644 programming/language/R/files/Rscript.patch create mode 100644 programming/language/R/files/config_site.patch create mode 100644 programming/language/R/files/dont_use_atlas.patch create mode 100644 programming/language/R/files/ld.so.conf create mode 100644 programming/language/R/files/lib64.patch create mode 100644 programming/language/R/pspec.xml create mode 100644 programming/language/R/translations.xml diff --git a/programming/language/R/actions.py b/programming/language/R/actions.py new file mode 100644 index 0000000000..605d453244 --- /dev/null +++ b/programming/language/R/actions.py @@ -0,0 +1,61 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +def setup(): + shelltools.export("R_HOME_DIR", "/usr/lib/R") + shelltools.export("BLAS_LIBS","/usr/lib") + shelltools.export("LAPACK_LIBS","-L/usr/lib -llapack -lblas") + + autotools.aclocal("-I m4") + autotools.autoconf() + autotools.configure("--prefix=/usr \ + --with-recommended-packages \ + --enable-R-profiling \ + --enable-R-shlib \ + --enable-shared \ + --enable-prebuilt-html \ + --disable-openmp \ + --with-blas=-lblas \ + --with-lapack \ + --without-tcltk \ + --with-readline \ + --with-system-pcre \ + --with-system-zlib \ + --with-system-bzlib \ + --with-system-xz \ + rdocdir=/usr/share/doc/R \ + rincludedir=/usr/include \ + --with-x") + +def build(): + shelltools.export("R_HOME","") + autotools.make() + + # build math library + shelltools.cd("src/nmath/standalone") + autotools.make("-j1") + +#def check(): + #shelltools.export("R_HOME","") + #autotools.make("check") + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + + # install math library remove static libs + autotools.install("-C src/nmath/standalone") + pisitools.rename("/usr/lib/libRmath.so","libRmath.so.0.0.0") + pisitools.dosym("/usr/lib/libRmath.so.0.0.0","/usr/lib/libRmath.so.0") + pisitools.dosym("/usr/lib/libRmath.so.0.0.0","/usr/lib/libRmath.so") + + pisitools.remove("/usr/lib/libRmath.a") + + diff --git a/programming/language/R/comar/package.py b/programming/language/R/comar/package.py new file mode 100644 index 0000000000..6e434d8613 --- /dev/null +++ b/programming/language/R/comar/package.py @@ -0,0 +1,6 @@ +#!/usr/bin/python + +import os + +def postInstall(fromVersion, fromRelease, toVersion, toRelease): + os.system("R CMD javareconf") \ No newline at end of file diff --git a/programming/language/R/files/99R b/programming/language/R/files/99R new file mode 100644 index 0000000000..fdf284f7b2 --- /dev/null +++ b/programming/language/R/files/99R @@ -0,0 +1,2 @@ +R_HOME_DIR=/usr/lib/R +R_HOME=/usr/lib/R diff --git a/programming/language/R/files/R-2.11.1-parallel.patch b/programming/language/R/files/R-2.11.1-parallel.patch new file mode 100644 index 0000000000..d1e19ef671 --- /dev/null +++ b/programming/language/R/files/R-2.11.1-parallel.patch @@ -0,0 +1,11 @@ +--- src/include/Makefile.in.orig 2010-06-15 18:18:54.000000000 +0000 ++++ src/include/Makefile.in 2010-06-15 18:19:48.000000000 +0000 +@@ -81,7 +81,7 @@ + Rmath.h0: $(srcdir)/Rmath.h0.in $(top_builddir)/config.status + @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +-install: installdirs install-intl-@USE_INCLUDED_LIBINTL@ ++install: $(OBJ_HEADERS) installdirs install-intl-@USE_INCLUDED_LIBINTL@ + @for d in $(SUBDIRS); do \ + (cd $${d} && $(MAKE) $@) || exit 1; \ + done \ No newline at end of file diff --git a/programming/language/R/files/R-2.13.1-zlib_header_fix.patch b/programming/language/R/files/R-2.13.1-zlib_header_fix.patch new file mode 100644 index 0000000000..0e1482e65b --- /dev/null +++ b/programming/language/R/files/R-2.13.1-zlib_header_fix.patch @@ -0,0 +1,13 @@ +--- src/main/unzip.h.orig 2011-09-24 19:35:53.000000000 -0700 ++++ src/main/unzip.h 2011-09-24 19:37:06.000000000 -0700 +@@ -58,6 +58,10 @@ + #define ZLIB_FILEFUNC_SEEK_END (2) + #define ZLIB_FILEFUNC_SEEK_SET (0) + ++#ifndef OF ++#define OF(x) x ++#endif ++ + #define ZLIB_FILEFUNC_MODE_READ (1) + #define ZLIB_FILEFUNC_MODE_WRITE (2) + #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) diff --git a/programming/language/R/files/Rscript.patch b/programming/language/R/files/Rscript.patch new file mode 100644 index 0000000000..8792da4162 --- /dev/null +++ b/programming/language/R/files/Rscript.patch @@ -0,0 +1,12 @@ +diff -Nuar R-2.7.1.orig/src/unix/Makefile.in R-2.7.1/src/unix/Makefile.in +--- R-2.7.1.orig/src/unix/Makefile.in 2008-06-23 12:38:27.000000000 +0300 ++++ R-2.7.1/src/unix/Makefile.in 2008-06-24 16:40:23.000000000 +0300 +@@ -66,7 +66,7 @@ + + ## we need to build at install time to capture the correct 'rhome' + install-Rscript: +- $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -DR_HOME='"$(rhome)"' -o Rscript \ ++ $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -DR_HOME='"/usr/lib/R/"' -o Rscript \ + $(srcdir)/Rscript.c + @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexecbindir)" + @$(INSTALL_PROGRAM) Rscript "$(DESTDIR)$(Rexecbindir)/Rscript" diff --git a/programming/language/R/files/config_site.patch b/programming/language/R/files/config_site.patch new file mode 100644 index 0000000000..1004098740 --- /dev/null +++ b/programming/language/R/files/config_site.patch @@ -0,0 +1,43 @@ +diff -Nuar R-2.12.1.orig//config.site R-2.12.1/config.site +--- R-2.12.1.orig//config.site 2010-11-14 01:05:06.000000000 +0200 ++++ R-2.12.1/config.site 2010-12-22 07:11:10.429000021 +0200 +@@ -28,7 +28,7 @@ + ## The paper size for the local (PostScript) printer. + ## It must either be left blank or set to one of 'a4' or 'letter'. + ## If left blank the system will use 'a4'. +-## R_PAPERSIZE=a4 ++ R_PAPERSIZE=a4 + + ## Set the default behavior of R when ending a session + ## Set this to one of '--save' or '--no-save' depending whether you +@@ -207,23 +207,26 @@ + ## If unset configure searches in turn for (currently) + ## firefox mozilla galeon opera xdg-open kfmclient gnome-moz-remote open + ## and uses the full path. +-## R_BROWSER= ++R_BROWSER=xdg-open ++ ++## Default pdf viewer ++R_PDFVIEWER=xdg-open + + ## BLAS and LAPACK settings + ## Use BLAS_LIBS for all '-L' and '-l' options needed for linking + ## against an external BLAS implementation. +-## BLAS_LIBS= ++## BLAS_LIBS=/usr/lib + ## Use LAPACK_LIBS for all '-L' and '-l' options needed for linking + ## against an external LAPACK implementation. + ## Note that (see R-admin) that our main intention is to allow a + ## LAPACK-containing BLAS to be used, so this is rarely needed, and + ## it is not used if the BLAS already contains LAPACK. +-## LAPACK_LIBS= ++## LAPACK_LIBS="-L/usr/lib -llapack -lblas" + + ## Make name. + ## Set this if you want to use a make by another name. + ## For example, if your GNU make is called 'gmake', use 'MAKE=gmake'. +-## MAKE= ++MAKE=gmake + + ## Tar name + ## Set this to prefer a tar which has the capability to automagically diff --git a/programming/language/R/files/dont_use_atlas.patch b/programming/language/R/files/dont_use_atlas.patch new file mode 100644 index 0000000000..ed9afd2ed2 --- /dev/null +++ b/programming/language/R/files/dont_use_atlas.patch @@ -0,0 +1,42 @@ +diff -Nuar R-2.11.0.orig/configure.ac R-2.11.0/configure.ac +--- R-2.11.0.orig/configure.ac 2010-04-01 01:10:02.000000000 +0300 ++++ R-2.11.0/configure.ac 2010-05-02 18:42:50.276871339 +0300 +@@ -2508,7 +2508,6 @@ + if test "${acx_blas_ok}" = "yes"; then + ## Try to figure out which BLAS was used. + case "${BLAS_LIBS0}" in +- *-latlas*) r_blas=ATLAS ;; + *-lsgemm*) r_blas=PhiPack ;; + *sunperf*) r_blas=SunPerf ;; + *-lessl*) r_blas=ESSL ;; +diff -Nuar R-2.11.0.orig/m4/R.m4 R-2.11.0/m4/R.m4 +--- R-2.11.0.orig/m4/R.m4 2010-03-28 01:10:03.000000000 +0200 ++++ R-2.11.0/m4/R.m4 2010-05-02 18:44:38.987876278 +0300 +@@ -2536,19 +2536,6 @@ + fi + fi + +-## BLAS linked to by default? (happens on some supercomputers) +-if test "${acx_blas_ok}" = no; then +- AC_CHECK_FUNC(${dgemm}, [acx_blas_ok=yes]) +-fi +- +-## BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) +-if test "${acx_blas_ok}" = no; then +- AC_CHECK_LIB(atlas, ATL_xerbla, +- [AC_CHECK_LIB(f77blas, ${dgemm}, +- [acx_blas_ok=yes +- BLAS_LIBS="-lf77blas -latlas"], +- [], [-latlas])]) +-fi + + ## BLAS in PhiPACK libraries? (requires generic BLAS lib, too) + if test "${acx_blas_ok}" = no; then +@@ -2744,7 +2731,6 @@ + F77_SYMBOL(drotmg)(); + F77_SYMBOL(dsbmv)(); + F77_SYMBOL(dscal)(); +- F77_SYMBOL(dsdot)(); + F77_SYMBOL(dspmv)(); + F77_SYMBOL(dspr)(); + F77_SYMBOL(dspr2)(); diff --git a/programming/language/R/files/ld.so.conf b/programming/language/R/files/ld.so.conf new file mode 100644 index 0000000000..6bf6bdfb01 --- /dev/null +++ b/programming/language/R/files/ld.so.conf @@ -0,0 +1 @@ +/usr/lib/R/lib diff --git a/programming/language/R/files/lib64.patch b/programming/language/R/files/lib64.patch new file mode 100644 index 0000000000..0eec18e033 --- /dev/null +++ b/programming/language/R/files/lib64.patch @@ -0,0 +1,31 @@ +diff -Nuar R-3.0.1.orig/configure.ac R-3.0.1/configure.ac +--- R-3.0.1.orig/configure.ac 2013-03-25 01:05:05.000000000 +0200 ++++ R-3.0.1/configure.ac 2013-05-18 23:41:55.803629789 +0300 +@@ -137,7 +137,7 @@ + linux*) + ## Not all distros use this: some choose to march out of step + case "${host_cpu}" in +- x86_64|mips64|ppc64|powerpc64|sparc64|s390x) ++ mips64|ppc64|powerpc64|sparc64|s390x) + if test -d /usr/lib64; then + libnn=lib64 + fi +diff -Nuar R-3.0.1.orig/src/scripts/R.sh.in R-3.0.1/src/scripts/R.sh.in +--- R-3.0.1.orig/src/scripts/R.sh.in 2013-03-06 01:02:41.000000000 +0200 ++++ R-3.0.1/src/scripts/R.sh.in 2013-05-18 23:42:28.075630689 +0300 +@@ -7,13 +7,13 @@ + linux*) + run_arch=`uname -m` + case "$run_arch" in +- x86_64|mips64|ppc64|powerpc64|sparc64|s390x) ++ mips64|ppc64|powerpc64|sparc64|s390x) + libnn=lib64 + libnn_fallback=lib + ;; + *) + libnn=lib +- libnn_fallback=lib64 ++ libnn_fallback=lib + ;; + esac + if [ -x "@prefix@/${libnn}/R/bin/exec/R" ]; then diff --git a/programming/language/R/pspec.xml b/programming/language/R/pspec.xml new file mode 100644 index 0000000000..d3b23e1bf7 --- /dev/null +++ b/programming/language/R/pspec.xml @@ -0,0 +1,132 @@ + + + + + + R + http://www.r-project.org + + PisiLinux Community + admins@pisilinux.org + + GPLv2 + LGPLv2.1 + app:console + A free software environment for statistical computing and graphics + This package includes the core R userspace and all R development components. + http://cran.r-project.org/src/base/R-3/R-3.3.1.tar.gz + + libXmu-devel + icu4c-devel + jdk7-openjdk + xdg-utils + blas-devel + lapack-devel + libXt-devel + libSM-devel + cairo-devel + pango-devel + libjpeg-turbo-devel + tiff-devel + libgfortran + xz-devel + readline-devel + curl-devel + + + + + R-2.11.1-parallel.patch + R-2.13.1-zlib_header_fix.patch + + + + + + R + + blas + make + tiff + libXt + icu4c + libSM + cairo + pango + libXmu + lapack + xdg-utils + libgfortran + jre7-openjdk + libjpeg-turbo + xz + curl + zlib + bzip2 + glib2 + libX11 + libpng + libpcre + readline + + + /etc + /usr/bin + /usr/lib/R + /usr/share/man + + + 99R + ld.so.conf + + + System.Package + + + + + R-mathlib + library + Math library for R + + R + + + /usr/lib + /usr/include/Rmath.h + + + + + R-docs + data:doc + Documents for R + + /usr/share/doc/R + + + + + R-devel + Development files for R + + R + + + /usr/include + /usr/lib/pkgconfig/libR.pc + /usr/lib/pkgconfig/libRmath.pc + + + + + + 2016-06-27 + 3.3.1 + First release + Ertuğrul Erata + ertugrulerata@gmail.com + + + diff --git a/programming/language/R/translations.xml b/programming/language/R/translations.xml new file mode 100644 index 0000000000..f4d5f931d3 --- /dev/null +++ b/programming/language/R/translations.xml @@ -0,0 +1,23 @@ + + + + R + R özgür istatistik ve grafik ortamı + R özgür istatistik ve grafik ortamı + + + + R-devel + R için geliştirme dosyaları + + + + R-docs + R belgeleri + + + + R-mathlib + R Mathlib kitaplığı + +