Ticket #39197: Portfile

File Portfile, 2.1 KB (added by kjellpk (Kjell Konis), 12 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#
3
4PortSystem 1.0
5PortGroup cmake 1.0
6
7name                       RStudio
8version                    0.97
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
22fetch.type                 git
23git.url                    https://github.com/rstudio/rstudio.git
24
25post-extract {
26    reinplace "s|rScriptPaths.push_back(\"/usr/bin/R\");|rScriptPaths.push_back(\"${prefix}/bin/R\");|g" \
27              "${worksrcpath}/src/cpp/core/r_util/REnvironmentPosix.cpp"
28    reinplace "s|rScriptPaths.push_back(\"/usr/local/bin/R\");|//rScriptPaths.push_back(\"/usr/local/bin/R\");|g" \
29              "${worksrcpath}/src/cpp/core/r_util/REnvironmentPosix.cpp"
30    reinplace "s|rScriptPaths.push_back(\"/opt/local/bin/R\");|//rScriptPaths.push_back(\"/opt/local/bin/R\");|g" \
31              "${worksrcpath}/src/cpp/core/r_util/REnvironmentPosix.cpp"
32    reinplace "s|/Library/Frameworks/R.framework|${frameworks_dir}/R.framework|g" \
33              "${worksrcpath}/src/cpp/core/r_util/REnvironmentPosix.cpp"
34    reinplace "s|sudo|#sudo|g" "${worksrcpath}/dependencies/osx/install-dependencies-osx"
35    reinplace "s|./install-boost|#./install-boost|g" "${worksrcpath}/dependencies/common/install-common"
36    system    "cd ${worksrcpath}/dependencies/osx && ./install-dependencies-osx"
37}
38
39depends_build              port:cmake
40depends_lib                port:R port:qt4-mac port:boost
41
42universal_variant          no
43
44configure.pre_args-replace -DCMAKE_INSTALL_PREFIX=${prefix} \
45                           -DCMAKE_INSTALL_PREFIX=${destroot}${applications_dir}
46
47configure.args-append      -DRSTUDIO_TARGET=Desktop -DCMAKE_FRAMEWORK_PATH=${frameworks_dir}
48
49destroot.destdir           prefix=${destroot}
50
51
52