Ticket #39197: Portfile2

File Portfile2, 4.2 KB (added by kjellpk (Kjell Konis), 11 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem 1.0
5PortGroup cmake 1.0
6
7name                RStudio
8version             0.98.133
9categories          aqua
10maintainers         me.com:kjell.konis
11license             AGPL-3
12
13description         Powerful IDE for R
14long_description \
15  RStudio IDE is a powerful and productive user interface for R. Its \
16  free and open source, and works great on Mac OS X.
17
18homepage            http://www.rstudio.com
19platforms           macosx
20supported_archs     x86_64
21
22distfiles           v${version} \
23                    gin-1.5.zip \
24                    gwt-2.5.1.zip \
25                    junit-4.9b3.jar \
26                    core-dictionaries.zip \
27                    mathjax-20.zip
28
29master_sites        https://github.com/rstudio/rstudio/tarball/ \
30                    https://s3.amazonaws.com/rstudio-buildtools/ \
31                    https://s3.amazonaws.com/rstudio-dictionaries/
32
33checksums           v${version} \
34                        rmd160  31af216104816f7bdd61cdac4caeec7671b111d8 \
35                        sha256  429309d8782d6844f536b335e9609c978e28cbf063dc344ec759dbd88a793883 \
36                    gin-1.5.zip \
37                        rmd160  cde394d111b3af798935ab5391da79ef3173c8cb \
38                        sha256  f561f4eb5d5fe1cff95c881e6aed53a86e9f0de8a52863295a8600375f96ab94 \
39                    gwt-2.5.1.zip \
40                        rmd160  80bc2f0d03fe389dd37cb8550945a6fa7e586596 \
41                        sha256  c457df45a3eed582452c5784ed11746685df494c0ffe4a8ae4de52945916593a \
42                    junit-4.9b3.jar \
43                        rmd160  740d63fa9425f49fe0fc5ff452914df9ada58d38 \
44                        sha256  dc566c3f5da446defe36c534f7ee19cdfe7e565020038b2ef38f01bc9c070551 \
45                    core-dictionaries.zip \
46                        rmd160  1f9e86729e4d7646ebd221cb0b1480d51a899009 \
47                        sha256  4341a9630efb9dcf7f215c324136407f3b3d6003e1c96f2e5e1f9f14d5787494 \
48                    mathjax-20.zip \
49                        rmd160  9569d3f35b4adb33d27dbe692d1d973c3c93c376 \
50                        sha256  547d823d0c9cce41012009b96889905261ae9a1b85a1ed04cc4e6705a11b6fc6
51
52extract.only        v${version}
53
54worksrcdir          rstudio-rstudio-7855759
55
56post-extract {
57    reinplace "s|rScriptPaths.push_back(\"/usr/bin/R\");|rScriptPaths.push_back(\"${prefix}/bin/R\");|g" \
58              "${worksrcpath}/src/cpp/core/r_util/REnvironmentPosix.cpp"
59    reinplace "s|rScriptPaths.push_back(\"/usr/local/bin/R\");|//rScriptPaths.push_back(\"/usr/local/bin/R\");|g" \
60              "${worksrcpath}/src/cpp/core/r_util/REnvironmentPosix.cpp"
61    reinplace "s|rScriptPaths.push_back(\"/opt/local/bin/R\");|//rScriptPaths.push_back(\"/opt/local/bin/R\");|g" \
62              "${worksrcpath}/src/cpp/core/r_util/REnvironmentPosix.cpp"
63    reinplace "s|/Library/Frameworks/R.framework|${frameworks_dir}/R.framework|g" \
64              "${worksrcpath}/src/cpp/core/r_util/REnvironmentPosix.cpp"
65
66    reinplace "s|sudo|#sudo|g" "${worksrcpath}/dependencies/osx/install-dependencies-osx"
67    reinplace "s|./install-boost|#./install-boost|g" "${worksrcpath}/dependencies/common/install-common"
68
69    reinplace "s|curl -L https://s3.amazonaws.com/rstudio-dictionaries/\$1 > \$1|cp ${distpath}/\$1 \$1 |g" \
70              "${worksrcpath}/dependencies/common/install-dictionaries"
71    reinplace "s|curl -L https://s3.amazonaws.com/rstudio-buildtools/\$1 > \$1|cp ${distpath}/\$1 \$1 |g" \
72              "${worksrcpath}/dependencies/common/install-gwt"
73    reinplace "s|curl -L https://s3.amazonaws.com/rstudio-buildtools/\$1 > \$1|cp ${distpath}/\$1 \$1 |g" \
74              "${worksrcpath}/dependencies/common/install-mathjax"
75
76    system -W ${worksrcpath}/dependencies/osx ./install-dependencies-osx
77}
78
79depends_lib         port:R \
80                    port:qt4-mac \
81                    port:boost
82
83universal_variant   no
84
85configure.pre_args-replace -DCMAKE_INSTALL_PREFIX=${prefix} \
86                           -DCMAKE_INSTALL_PREFIX=${destroot}${applications_dir}
87
88configure.args-append      -DRSTUDIO_TARGET=Desktop \
89                           -DCMAKE_FRAMEWORK_PATH=${frameworks_dir}
90
91destroot.destdir    prefix=${destroot}
92
93
94