R: add various features

* Ensure that R can link blas, liblapack, and libgfortran at run-time.
* Ensure that R can run the Tcl/Tk interpreter.
* Add Java support.
* Install texinfo and PDF documentation.

+78 -3
+54 -3
pkgs/applications/science/math/R/default.nix
··· 1 1 { stdenv, fetchurl, blas, bzip2, gfortran, liblapack, libX11, libXmu, libXt 2 2 , libjpeg, libpng, libtiff, ncurses, pango, pcre, perl, readline, tcl 3 - , texLive, tk, xz, zlib, less, texinfo, graphviz 3 + , texLive, tk, xz, zlib, less, texinfo, graphviz, icu, pkgconfig, bison 4 + , imake, which, jdk, atlas 4 5 }: 5 6 6 7 stdenv.mkDerivation rec { ··· 13 14 14 15 buildInputs = [ blas bzip2 gfortran liblapack libX11 libXmu libXt 15 16 libXt libjpeg libpng libtiff ncurses pango pcre perl readline tcl 16 - texLive tk xz zlib less texinfo graphviz ]; 17 + texLive tk xz zlib less texinfo graphviz icu pkgconfig bison imake 18 + which jdk atlas 19 + ]; 20 + 21 + patches = [ ./no-usr-local-search-paths.patch ]; 22 + 23 + preConfigure = '' 24 + configureFlagsArray=( 25 + --disable-lto 26 + --with-blas="-L${atlas}/lib -lf77blas -latlas" 27 + --with-lapack="-L${liblapack}/lib -llapack" 28 + --with-readline 29 + --with-tcltk --with-tcl-config="${tcl}/lib/tclConfig.sh" --with-tk-config="${tk}/lib/tkConfig.sh" 30 + --with-cairo 31 + --with-libpng 32 + --with-jpeglib 33 + --with-libtiff 34 + --with-system-zlib 35 + --with-system-bzlib 36 + --with-system-pcre 37 + --with-system-xz 38 + --with-ICU 39 + R_SHELL="${stdenv.shell}" 40 + JAVA_HOME="${jdk}" 41 + LDFLAGS="-L${gfortran.gcc}/lib" 42 + ) 43 + echo "TCLLIBPATH=${tk}/lib" >>etc/Renviron.in 44 + ''; 45 + 46 + installTargets = [ "install" "install-info" "install-pdf" ]; 47 + 48 + doCheck = true; 17 49 18 50 enableParallelBuilding = true; 19 51 20 52 meta = { 21 - description = "a free software environment for statistical computing and graphics"; 22 53 homepage = "http://www.r-project.org/"; 54 + description = "a free software environment for statistical computing and graphics"; 23 55 license = stdenv.lib.licenses.gpl2Plus; 56 + 57 + longDescription = '' 58 + GNU R is a language and environment for statistical computing and 59 + graphics that provides a wide variety of statistical (linear and 60 + nonlinear modelling, classical statistical tests, time-series 61 + analysis, classification, clustering, ...) and graphical 62 + techniques, and is highly extensible. One of R's strengths is the 63 + ease with which well-designed publication-quality plots can be 64 + produced, including mathematical symbols and formulae where 65 + needed. R is an integrated suite of software facilities for data 66 + manipulation, calculation and graphical display. It includes an 67 + effective data handling and storage facility, a suite of operators 68 + for calculations on arrays, in particular matrices, a large, 69 + coherent, integrated collection of intermediate tools for data 70 + analysis, graphical facilities for data analysis and display 71 + either on-screen or on hardcopy, and a well-developed, simple and 72 + effective programming language which includes conditionals, loops, 73 + user-defined recursive functions and input and output facilities. 74 + ''; 24 75 25 76 platforms = stdenv.lib.platforms.linux; 26 77 maintainers = [ stdenv.lib.maintainers.simons ];
+24
pkgs/applications/science/math/R/no-usr-local-search-paths.patch
··· 1 + diff -ubr R-3.0.1-orig/configure R-3.0.1/configure 2 + --- R-3.0.1-orig/configure 2013-07-04 10:46:42.336133947 +0200 3 + +++ R-3.0.1/configure 2013-07-04 10:46:17.181919960 +0200 4 + @@ -3800,13 +3800,13 @@ 5 + : ${LIBnn=$libnn} 6 + ## We provide these defaults so that headers and libraries in 7 + ## '/usr/local' are found (by the native tools, mostly). 8 + -if test -f "/sw/etc/fink.conf"; then 9 + - : ${CPPFLAGS="-I/sw/include -I/usr/local/include"} 10 + - : ${LDFLAGS="-L/sw/lib -L/usr/local/lib"} 11 + -else 12 + - : ${CPPFLAGS="-I/usr/local/include"} 13 + - : ${LDFLAGS="-L/usr/local/${LIBnn}"} 14 + -fi 15 + +# if test -f "/sw/etc/fink.conf"; then 16 + +# : ${CPPFLAGS="-I/sw/include -I/usr/local/include"} 17 + +# : ${LDFLAGS="-L/sw/lib -L/usr/local/lib"} 18 + +# else 19 + +# : ${CPPFLAGS="-I/usr/local/include"} 20 + +# : ${LDFLAGS="-L/usr/local/${LIBnn}"} 21 + +# fi 22 + 23 + ## take care not to override the command-line setting 24 + if test "${libdir}" = '${exec_prefix}/lib'; then