1 | # $Id: Portfile 69211 2010-06-28 22:02:28Z dports@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name R |
---|
6 | version 2.11.1 |
---|
7 | revision 1 |
---|
8 | categories math science |
---|
9 | maintainers epfl.ch:kjell.konis |
---|
10 | platforms darwin |
---|
11 | |
---|
12 | description R is GNU S - an interpreted language for statistical computing |
---|
13 | |
---|
14 | long_description \ |
---|
15 | R is a language and environment for statistical computing and graphics. \ |
---|
16 | R provides a wide variety of statistical (linear and nonlinear modeling, \ |
---|
17 | classical statistical tests, time-series analysis, classification, \ |
---|
18 | clustering, ...) and graphical techniques, and is highly extensible. |
---|
19 | |
---|
20 | homepage http://www.r-project.org/ |
---|
21 | |
---|
22 | master_sites http://cran.us.r-project.org/src/base/R-2/ \ |
---|
23 | http://cran.ms.unimelb.edu.au/src/base/R-2/ \ |
---|
24 | http://cran.at.r-project.org/src/base/R-2/ \ |
---|
25 | http://cran.hu.r-project.org/src/base/R-2/ \ |
---|
26 | http://cran.r-project.org/src/base/R-2/ |
---|
27 | |
---|
28 | checksums md5 7421108ade3e9223263394b9bbe277ce \ |
---|
29 | sha1 0b36780627f3cc5cea3f41e0b717ed7ee92ba086 \ |
---|
30 | rmd160 a5223a3f784ad0f808d893d82a4e0a130c9a9b3a |
---|
31 | |
---|
32 | depends_lib port:gettext \ |
---|
33 | port:icu \ |
---|
34 | path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
35 | port:jpeg \ |
---|
36 | port:libiconv \ |
---|
37 | path:lib/pkgconfig/pango.pc:pango \ |
---|
38 | port:readline \ |
---|
39 | port:tcl \ |
---|
40 | port:tk \ |
---|
41 | port:tiff \ |
---|
42 | port:xorg-libXmu \ |
---|
43 | port:xorg-libXScrnSaver |
---|
44 | |
---|
45 | universal_variant no |
---|
46 | |
---|
47 | variant recommended description {Install recommended R packages} { |
---|
48 | configure.args-delete --without-recommended-packages |
---|
49 | configure.args-append --with-recommended-packages |
---|
50 | } |
---|
51 | |
---|
52 | variant gcc42 conflicts gcc43 gcc44 description {Build with gcc42} { |
---|
53 | configure.compiler macports-gcc-4.2 |
---|
54 | depends_lib-append port:gcc42 |
---|
55 | } |
---|
56 | |
---|
57 | variant gcc43 conflicts gcc42 gcc44 description {Build with gcc43} { |
---|
58 | configure.compiler macports-gcc-4.3 |
---|
59 | depends_lib-append port:gcc43 |
---|
60 | } |
---|
61 | |
---|
62 | variant gcc44 conflicts gcc42 gcc43 description {Build with gcc44} { |
---|
63 | configure.compiler macports-gcc-4.4 |
---|
64 | depends_lib-append port:gcc44 |
---|
65 | } |
---|
66 | |
---|
67 | default_variants +recommended |
---|
68 | |
---|
69 | if {![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44]} { |
---|
70 | default_variants-append +gcc44 |
---|
71 | } |
---|
72 | |
---|
73 | post-extract { |
---|
74 | reinplace "s|R_HOME|\"${prefix}/lib/R\"|" "${worksrcpath}/src/unix/Rscript.c" |
---|
75 | } |
---|
76 | |
---|
77 | configure.env-append r_arch=${build_arch} |
---|
78 | |
---|
79 | configure.args --mandir=\\\${prefix}/share/man \ |
---|
80 | --enable-BLAS-shlib \ |
---|
81 | --enable-R-shlib \ |
---|
82 | --disable-nls \ |
---|
83 | --without-libintl-prefix \ |
---|
84 | --disable-R-framework \ |
---|
85 | --without-aqua \ |
---|
86 | --with-tcl-config=${prefix}/lib/tclConfig.sh \ |
---|
87 | --with-tk-config=${prefix}/lib/tkConfig.sh \ |
---|
88 | --x-include=${prefix}/include \ |
---|
89 | --x-lib=${prefix}/lib \ |
---|
90 | --without-recommended-packages |
---|
91 | |
---|
92 | test.run yes |
---|
93 | test.target check |
---|
94 | destroot.destdir prefix=${destroot}${prefix} |
---|
95 | |
---|
96 | post-destroot { |
---|
97 | foreach r { "/bin/R" "/lib/R/bin/R" } { |
---|
98 | foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } { |
---|
99 | reinplace "s|${dir}=${destroot}|${dir}=|" "${destroot}${prefix}${r}" |
---|
100 | } |
---|
101 | } |
---|
102 | |
---|
103 | foreach v { "rhome" "rincludedir" } { |
---|
104 | reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc" |
---|
105 | } |
---|
106 | |
---|
107 | reinplace "s|rlibdir=\$\{rhome\}/lib|rlibdir=\$\{rhome\}/lib/${build_arch}|" \ |
---|
108 | "${destroot}${prefix}/lib/pkgconfig/libR.pc" |
---|
109 | |
---|
110 | foreach dylib [ exec find ${destroot}${prefix}/lib/R/lib/${build_arch} -name "\*.dylib" ] { |
---|
111 | regsub ":$" ${dylib} "" destroot_dylib_path |
---|
112 | regsub ${destroot} ${destroot_dylib_path} "" dylib_path |
---|
113 | system "install_name_tool -id ${dylib_path} ${destroot_dylib_path}" |
---|
114 | system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/${build_arch}/libR.dylib \ |
---|
115 | ${destroot_dylib_path}" |
---|
116 | system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/${build_arch}/libRblas.dylib \ |
---|
117 | ${destroot_dylib_path}" |
---|
118 | system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/${build_arch}/libRlapack.dylib \ |
---|
119 | ${destroot_dylib_path}" |
---|
120 | } |
---|
121 | |
---|
122 | foreach so [ exec find ${destroot}${prefix}/lib/R -name "\*.so" ] { |
---|
123 | regsub ":$" ${so} "" destroot_so_path |
---|
124 | regsub ${destroot} ${destroot_so_path} "" so_path |
---|
125 | system "install_name_tool -id ${so_path} ${destroot_so_path}" |
---|
126 | system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/${build_arch}/libR.dylib \ |
---|
127 | ${destroot_so_path}" |
---|
128 | system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/${build_arch}/libRblas.dylib \ |
---|
129 | ${destroot_so_path}" |
---|
130 | system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/${build_arch}/libRlapack.dylib \ |
---|
131 | ${destroot_so_path}" |
---|
132 | } |
---|
133 | |
---|
134 | reinplace "s|-dylib_file libRblas\.dylib:\$\(R_HOME\)/lib\$\(R_ARCH\)/libRblas\.dylib| |" \ |
---|
135 | "${destroot}${prefix}/lib/R/etc/${build_arch}/Makeconf" |
---|
136 | } |
---|