source: trunk/dports/math/R/Portfile @ 50984

Last change on this file since 50984 was 50984, checked in by and.damore@…, 10 years ago

Maintainer email change, second batch, mail without @macports.org domain are put in domain:user form.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $
2
3PortSystem 1.0
4
5name             R
6version          2.9.0
7categories       math science
8maintainers      epfl.ch:kjell.konis
9platforms        darwin
10
11description      R is GNU S - an interpreted language for statistical computing
12
13long_description \
14    R is a language and environment for statistical computing and graphics. \
15    R provides a wide variety of statistical (linear and nonlinear modelling, \
16    classical statistical tests, time-series analysis, classification, \
17    clustering, ...) and graphical techniques, and is highly extensible.
18
19homepage         http://www.r-project.org/
20
21master_sites     http://cran.us.r-project.org/src/base/R-2/ \
22                 http://cran.ms.unimelb.edu.au/src/base/R-2/ \
23                 http://cran.at.r-project.org/src/base/R-2/ \
24                 http://cran.hu.r-project.org/src/base/R-2/ \
25                 http://cran.r-project.org/src/base/R-2/
26
27checksums        md5     a5b79a2bc1372136cda4674b5f46d146 \
28                 sha1    97c610b31113db27999cf615d4182d68c8602a4f \
29                 rmd160  90c9b42d7e8f3c78fa3442690dedb23c10d9a294
30
31depends_lib      port:gettext \
32                 port:glib2 \
33                 port:jpeg \
34                 port:libiconv \
35                 port:pango \
36                 port:readline \
37                 port:tcl \
38                 port:tk \
39                 port:tiff \
40                 port:xorg-libXmu \
41                 port:xorg-libXScrnSaver
42
43universal_variant no
44
45
46variant gcc42 description {Build with gcc42} {
47    configure.compiler macports-gcc-4.2
48    depends_lib-append port:gcc42
49}
50
51variant gcc43 description {Build with gcc43 (default)} {
52    configure.compiler macports-gcc-4.3
53    depends_lib-append port:gcc43
54}
55
56if {![variant_isset gcc42] && ![variant_isset gcc43]} {
57    default_variants +gcc43
58}
59
60post-extract {
61  reinplace "s|R_HOME|\"${prefix}/lib/R\"|" ${worksrcpath}/src/unix/Rscript.c
62}
63
64configure.args   --mandir=\\\${prefix}/share/man \
65                 --enable-R-shlib \
66                 --disable-nls \
67                 --without-libintl-prefix \
68                 --disable-R-framework \
69                 --without-aqua \
70                 --with-tcl-config=${prefix}/lib/tclConfig.sh \
71                 --with-tk-config=${prefix}/lib/tkConfig.sh \
72                 --x-include=${prefix}/include \
73                 --x-lib=${prefix}/lib
74
75test.run         yes
76test.target      check
77destroot.destdir prefix=${destroot}${prefix}
78
79post-destroot {
80  foreach r { "/bin/R" "/lib/R/bin/R" } {
81    foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } {
82      reinplace "s|${dir}=${destroot}|${dir}=|" \
83        "${destroot}${prefix}${r}"
84    }
85  }
86
87  foreach v { "rhome" "rincludedir"} {
88    reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
89  }
90
91  system "install_name_tool -id ${prefix}/lib/R/lib/libR.dylib \
92    ${destroot}${prefix}/lib/R/lib/libR.dylib"
93  system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \
94    ${destroot}${prefix}/lib/R/lib/libR.dylib"
95
96  system "install_name_tool -id ${prefix}/lib/R/lib/libRblas.dylib \
97    ${destroot}${prefix}/lib/R/lib/libRblas.dylib"
98
99  system "install_name_tool -id ${prefix}/lib/R/lib/libRlapack.dylib \
100    ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
101  system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \
102    ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
103  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
104    ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
105
106  foreach so [ exec find ${destroot}${prefix}/lib/R -name "\*.so" ] {
107    regsub ":$" ${so} "" destroot_so_path
108    regsub ${destroot} ${destroot_so_path} "" so_path
109    system "install_name_tool -id ${so_path} ${destroot_so_path}"
110    system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib ${destroot_so_path}"
111  }
112}
113
Note: See TracBrowser for help on using the repository browser.