Ticket #15415: Portfile

File Portfile, 9.7 KB (added by kjell.konis@…, 16 years ago)

Revised Portfile

Line 
1# $Id: Portfile 36650 2008-05-09 10:11:44Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name             R
6version          2.7.0
7categories       math science
8maintainers      kjell.konis@epfl.ch
9platforms        darwin
10revision         1
11
12description      R is GNU S - an interpreted language for statistical computing
13
14long_description \
15    R is a language and environment for statistical computing and graphics. \
16    R provides a wide variety of statistical (linear and nonlinear modelling, \
17    classical statistical tests, time-series analysis, classification, \
18    clustering, ...) and graphical techniques, and is highly extensible.
19
20homepage         http://www.r-project.org/
21
22master_sites     http://cran.us.r-project.org/src/base/R-2/ \
23                 http://cran.au.r-project.org/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
28checksums        md5    9eaee3eceec1d5f72cea5640ca90768c \
29                 sha1   d0a3193e474696ad767845ef6b8ee1555a26b898 \
30                 rmd160 c3c9cf0c0a1eb6191492f1be19e277e8223a42c9
31
32depends_lib      port:cairo \
33                 port:expat \
34                 port:fontconfig \
35                 port:freetype \
36                 port:gettext \
37                 port:glib2 \
38                 port:jpeg \
39                 port:libiconv \
40                 port:libpixman \
41                 port:libpng \
42                 port:pango \
43                 port:readline \
44                 port:tcl \
45                 port:tk \
46                 port:tiff \
47                 port:xrender \
48                 port:zlib \
49                 lib:libX11.6:XFree86
50
51variant gcc42 description {Build with gcc42 (default)} {
52    configure.compiler macports-gcc-4.2
53    depends_lib-append port:gcc42
54}
55
56variant gcc43 description {Build with gcc43} {
57    configure.compiler macports-gcc-4.3
58    depends_lib-append port:gcc43
59}
60
61if {![variant_isset gcc42] && ![variant_isset gcc43]} {
62    default_variants +gcc42
63}
64
65post-extract {
66  reinplace "s|R_HOME|\"${prefix}/lib/R\"|" ${worksrcpath}/src/unix/Rscript.c
67}
68
69configure.args   --mandir=\\\${prefix}/share/man \
70                 --enable-R-shlib \
71                 --with-blas='-framework vecLib' \
72                 --with-lapack \
73                 --disable-R-framework \
74                 --without-aqua \
75                 --with-tcl-config=${prefix}/lib/tclConfig.sh \
76                 --with-tk-config=${prefix}/lib/tkConfig.sh
77
78test.run         yes
79test.target      check
80destroot.destdir prefix=${destroot}${prefix}
81
82post-destroot {
83  reinplace "s|R_HOME_DIR=${destroot}|R_HOME_DIR=|" \
84    "${destroot}${prefix}/bin/R"
85  reinplace "s|R_HOME_DIR=${destroot}|R_HOME_DIR=|" \
86    "${destroot}${prefix}/lib/R/bin/R"
87  reinplace "s|R_SHARE_DIR=${destroot}|R_SHARE_DIR=|" \
88    "${destroot}${prefix}/bin/R"
89  reinplace "s|R_SHARE_DIR=${destroot}|R_SHARE_DIR=|" \
90    "${destroot}${prefix}/lib/R/bin/R"
91  reinplace "s|R_INCLUDE_DIR=${destroot}|R_INCLUDE_DIR=|" \
92    "${destroot}${prefix}/bin/R"
93  reinplace "s|R_INCLUDE_DIR=${destroot}|R_INCLUDE_DIR=|" \
94    "${destroot}${prefix}/lib/R/bin/R"
95  reinplace "s|R_DOC_DIR=${destroot}|R_DOC_DIR=|" \
96    "${destroot}${prefix}/bin/R"
97  reinplace "s|R_DOC_DIR=${destroot}|R_DOC_DIR=|" \
98    "${destroot}${prefix}/lib/R/bin/R"
99  system "install_name_tool -id ${prefix}/lib/R/lib/libR.dylib \
100    ${destroot}${prefix}/lib/R/lib/libR.dylib"
101  system "install_name_tool -id ${prefix}/lib/R/modules/R_X11.so \
102    ${destroot}${prefix}/lib/R/modules/R_X11.so"
103  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
104    ${destroot}${prefix}/lib/R/modules/R_X11.so"
105  system "install_name_tool -id ${prefix}/lib/R/modules/internet.so \
106    ${destroot}${prefix}/lib/R/modules/internet.so"
107  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
108    ${destroot}${prefix}/lib/R/modules/internet.so"
109  system "install_name_tool -id ${prefix}/lib/R/modules/lapack.so \
110    ${destroot}${prefix}/lib/R/modules/lapack.so"
111  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
112    ${destroot}${prefix}/lib/R/modules/lapack.so"
113  system "install_name_tool -id ${prefix}/lib/R/modules/vfonts.so \
114    ${destroot}${prefix}/lib/R/modules/vfonts.so"
115  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
116    ${destroot}${prefix}/lib/R/modules/vfonts.so"
117  system "install_name_tool -id ${prefix}/lib/R/library/tools/libs/tools.so \
118    ${destroot}${prefix}/lib/R/library/tools/libs/tools.so"
119  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
120    ${destroot}${prefix}/lib/R/library/tools/libs/tools.so"
121  system "install_name_tool -id ${prefix}/lib/R/library/spatial/libs/spatial.so \
122    ${destroot}${prefix}/lib/R/library/spatial/libs/spatial.so"
123  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
124    ${destroot}${prefix}/lib/R/library/spatial/libs/spatial.so"
125  system "install_name_tool -id ${prefix}/lib/R/library/class/libs/class.so \
126    ${destroot}${prefix}/lib/R/library/class/libs/class.so"
127  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
128    ${destroot}${prefix}/lib/R/library/class/libs/class.so"
129  system "install_name_tool -id ${prefix}/lib/R/library/lattice/libs/lattice.so \
130    ${destroot}${prefix}/lib/R/library/lattice/libs/lattice.so"
131  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
132    ${destroot}${prefix}/lib/R/library/lattice/libs/lattice.so"
133  system "install_name_tool -id ${prefix}/lib/R/library/tcltk/libs/tcltk.so \
134    ${destroot}${prefix}/lib/R/library/tcltk/libs/tcltk.so"
135  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
136    ${destroot}${prefix}/lib/R/library/tcltk/libs/tcltk.so"
137  system "install_name_tool -id ${prefix}/lib/R/library/survival/libs/survival.so \
138    ${destroot}${prefix}/lib/R/library/survival/libs/survival.so"
139  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
140    ${destroot}${prefix}/lib/R/library/survival/libs/survival.so"
141  system "install_name_tool -id ${prefix}/lib/R/library/stats/libs/stats.so \
142    ${destroot}${prefix}/lib/R/library/stats/libs/stats.so"
143  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
144    ${destroot}${prefix}/lib/R/library/stats/libs/stats.so"
145  system "install_name_tool -id ${prefix}/lib/R/library/KernSmooth/libs/KernSmooth.so \
146    ${destroot}${prefix}/lib/R/library/KernSmooth/libs/KernSmooth.so"
147  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
148    ${destroot}${prefix}/lib/R/library/KernSmooth/libs/KernSmooth.so"
149  system "install_name_tool -id ${prefix}/lib/R/library/mgcv/libs/mgcv.so \
150    ${destroot}${prefix}/lib/R/library/mgcv/libs/mgcv.so"
151  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
152    ${destroot}${prefix}/lib/R/library/mgcv/libs/mgcv.so"
153  system "install_name_tool -id ${prefix}/lib/R/library/methods/libs/methods.so \
154    ${destroot}${prefix}/lib/R/library/methods/libs/methods.so"
155  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
156    ${destroot}${prefix}/lib/R/library/methods/libs/methods.so"
157  system "install_name_tool -id ${prefix}/lib/R/library/nlme/libs/nlme.so \
158    ${destroot}${prefix}/lib/R/library/nlme/libs/nlme.so"
159  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
160    ${destroot}${prefix}/lib/R/library/nlme/libs/nlme.so"
161  system "install_name_tool -id ${prefix}/lib/R/library/grDevices/libs/grDevices.so \
162    ${destroot}${prefix}/lib/R/library/grDevices/libs/grDevices.so"
163  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
164    ${destroot}${prefix}/lib/R/library/grDevices/libs/grDevices.so"
165  system "install_name_tool -id ${prefix}/lib/R/library/foreign/libs/foreign.so \
166    ${destroot}${prefix}/lib/R/library/foreign/libs/foreign.so"
167  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
168    ${destroot}${prefix}/lib/R/library/foreign/libs/foreign.so"
169  system "install_name_tool -id ${prefix}/lib/R/library/MASS/libs/MASS.so \
170    ${destroot}${prefix}/lib/R/library/MASS/libs/MASS.so"
171  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
172    ${destroot}${prefix}/lib/R/library/MASS/libs/MASS.so"
173  system "install_name_tool -id ${prefix}/lib/R/library/nnet/libs/nnet.so \
174    ${destroot}${prefix}/lib/R/library/nnet/libs/nnet.so"
175  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
176    ${destroot}${prefix}/lib/R/library/nnet/libs/nnet.so"
177  system "install_name_tool -id ${prefix}/lib/R/library/grid/libs/grid.so \
178    ${destroot}${prefix}/lib/R/library/grid/libs/grid.so"
179  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
180    ${destroot}${prefix}/lib/R/library/grid/libs/grid.so"
181  system "install_name_tool -id ${prefix}/lib/R/library/rpart/libs/rpart.so \
182    ${destroot}${prefix}/lib/R/library/rpart/libs/rpart.so"
183  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
184    ${destroot}${prefix}/lib/R/library/rpart/libs/rpart.so"
185  system "install_name_tool -id ${prefix}/lib/R/library/splines/libs/splines.so \
186    ${destroot}${prefix}/lib/R/library/splines/libs/splines.so"
187  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
188    ${destroot}${prefix}/lib/R/library/splines/libs/splines.so"
189  system "install_name_tool -id ${prefix}/lib/R/library/cluster/libs/cluster.so \
190    ${destroot}${prefix}/lib/R/library/cluster/libs/cluster.so"
191  system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
192    ${destroot}${prefix}/lib/R/library/cluster/libs/cluster.so"
193}
194