Opened 11 years ago

Last modified 15 months ago

#39197 assigned submission

New port: RStudio

Reported by: kjellpk (Kjell Konis) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager), roger.filmyer@…, petrrr
Port: RStudio

Description

RStudio is a powerful IDE for R.

Note that as part of the build process, RStudio downloads and installs 3 dependencies. I put this is the post-extract phase. The 3 pieces are

(1) RStudio dictionaries (not sure about license)

(2) GWT (Apache License 2.0)

(3) Mathjax (Apache License 2.0)

These are used in a way where it is not at all convenient to put them in separate (or even sub) ports.

Attachments (2)

Portfile (2.1 KB) - added by kjellpk (Kjell Konis) 11 years ago.
Portfile2 (4.2 KB) - added by kjellpk (Kjell Konis) 11 years ago.

Download all attachments as: .zip

Change History (33)

Changed 11 years ago by kjellpk (Kjell Konis)

Attachment: Portfile added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Some observations:

  • Line 2 should be "# $Id$" as usual.
  • You don't need to list "depends_build cmake"; the cmake portgroup does that for you.
  • Since you fetch from github, consider using the github portgroup.
  • The port appears to fetch the latest version from the git repository. It must instead fetch a specific commit that you've tested, so that the process is repeatable. Even better would be to fetch a git tag instead, which is what the github portgroup does by default. Perhaps "v0.98.133" which was created yesterday. Naturally your version number would change as well. So with the github portgroup, this would be "github.setup rstudio rstudio 0.98.133 v", and then remove the fetch.type and git.url, and add checksums.
  • Instead of "system 'cd … && …'" you should use "system -W … '…'"
  • I don't like the script that downloads and installs additional dependencies in post-extract, but I don't suppose I'd like it any better anywhere else either. One slight improvement might be if the scripts were patched to not download any files, and to instead list the files to be downloaded in the Portfile as usual with checksums.
  • The last line of the script is "sudo cp /etc/pam.d/ftpd /etc/pam.d/rstudio". Certainly MacPorts does not permit ports to touch files outside of ${workpath} except in the activate and deactivate phases. If MacPorts doesn't interrupt the install at this point, it will at least prevent action from having happened. So if this action is important to the port, you'll have to perform it in a post-activate block. However I would hope a port wouldn't put files in /etc; ${prefix}/etc would be more appropriate.

comment:2 Changed 11 years ago by kjellpk (Kjell Konis)

Thanks for the comments. I was able to take care of the first 5 without too much trouble.

The 'sudo cp /etc/pam.d/ftpd /etc/pam.d/rstudio' should get commented out during the post-extract phase but it looks like the dependencies scrips are getting changed so whether that works depends on the specific tag (which makes your github suggestion even more useful).

It turns out there is a download function in each of the dependency installer scripts. I'll see if I can patch those to just copy from distfiles.

Anyway, I'll keep working on this but it might be a while.

comment:3 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Changed 11 years ago by kjellpk (Kjell Konis)

Attachment: Portfile2 added

comment:4 Changed 11 years ago by kjellpk (Kjell Konis)

Well, after a brief 4 month delay, I think I have addressed all of the bullet points. I couldn't get file downloads from multiple sites to work with the github portgroup but it looks like the only downside to not using that is a weirdly named worksrcdir. All downloads now occur during fetch and have checksums.

comment:5 Changed 10 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to larryv@…
Port: RStudio added
Status: newassigned
Version: 2.1.3

Sorry for the delay on this. I’ll take a look sometime this week.

comment:6 Changed 10 years ago by kjellpk (Kjell Konis)

Let me update the portfile to the current version of RStudio first.

comment:7 Changed 10 years ago by seanfarley (Sean Farley)

Could we separate MathJax into its own port so that #39216 could use it as well?

comment:8 in reply to:  7 Changed 10 years ago by kjellpk (Kjell Konis)

Replying to sean@…:

Could we separate MathJax into its own port so that #39216 could use it as well?

Sounds like a good idea to me. I wanted to get this port out the door quickly so I kinda hacked the RStudio build into MacPorts as quick as possible but it definitely makes sense to have the dependencies as separate (or sub) ports.

comment:9 Changed 10 years ago by kjellpk (Kjell Konis)

RStudio's reliance on Boost 1.50 (1.55 is current in Macports) is a showstopper. I'm not going to be able to move forward until I figure out a way to resolve this.

comment:10 in reply to:  9 Changed 10 years ago by seanfarley (Sean Farley)

Replying to kjell.konis@…:

RStudio's reliance on Boost 1.50 (1.55 is current in Macports) is a showstopper. I'm not going to be able to move forward until I figure out a way to resolve this.

Ouch. Well, we could at least get the mathjax and ipython ports updated. I don't know off the top of my head how to link to an external installation of mathjax for ipython nor for RStudio but can try if anyone can provide some pointers.

comment:11 Changed 10 years ago by bountin (Martin Prebio)

Cc: martin.prebio@… added

Cc Me!

comment:12 Changed 10 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:13 Changed 10 years ago by howarth@…

On fink I got rstudio-0.98.826 to build against boost 1.55 with the following change gleaned from a Google search…

--- rstudio-0.98.826/src/cpp/desktop-mac/MainFrameController.h.orig     2014-05-08 08:29:46.000000000 -0400
+++ rstudio-0.98.826/src/cpp/desktop-mac/MainFrameController.h  2014-05-08 08:31:28.000000000 -0400
@@ -13,6 +13,11 @@
  *
  */
 
+#ifdef check
+#undef check
+#endif
+#import "boost/type_traits.hpp"
+
 #import "WebViewController.h"
 
 #import "MainFrameMenu.h"

comment:14 Changed 10 years ago by kjellpk (Kjell Konis)

Thanks, this is really helpful. I'll see if I can get this working in mp this weekend.

comment:15 Changed 10 years ago by kjellpk (Kjell Konis)

I had a chat with the RStudio developers and they told me they are sticking with Boost 1.50 and QT 4.8.0. Using the latest versions of these dependencies breaks things and they don't currently have the resources to deal with that. I think this port will have to be put on hold until RStudio can put some effort into portability.

comment:16 Changed 9 years ago by roger.filmyer@…

According to their github page, it looks like it's now possible to use Boost 1.56 and QT 5.4.0. Is it worth looking at this again? Is this being discussed on another ticket?

Last edited 9 years ago by roger.filmyer@… (previous) (diff)

comment:17 Changed 9 years ago by kjellpk (Kjell Konis)

I'm not aware of another ticket. There is still the remaining problem that during the build, Rstudio was downloading and installing some (prebuilt) binaries (GWT and Mathjax). I'll take another look and see if I can satisfy these dependencies using MacPorts.

comment:18 Changed 9 years ago by roger.filmyer@…

Isn't GWT in macports as webtoolkit-java-sdk? That version is only 2.4.0 though, RStudio looks like it uses 2.7.0, which is the newest version.

comment:19 Changed 9 years ago by roger.filmyer@…

Mathjax doesn't look like it exists as a MacPorts port. There is another port, py-ipython #39216, which has a possible dependency on mathjax and a better discussion of it.

Version 1, edited 9 years ago by roger.filmyer@… (previous) (next) (diff)

comment:20 Changed 9 years ago by roger.filmyer@…

Cc: roger.filmyer@… added

Cc Me!

comment:21 Changed 9 years ago by roger.filmyer@…

I submitted a ticket to update webtoolkit-java-sdk. Should bring us closer to the finish line.

comment:22 Changed 9 years ago by roger.filmyer@…

Okay. Webtoolkit-java-sdk is now at 2.7, the required version for Rstudio to build. What else do we need to do?

comment:23 Changed 9 years ago by kjellpk (Kjell Konis)

Thanks for updating Webtoolkit-java-sdk. It looks like some more dependencies have popped up. These are installed by the script .../dependencies/commoninstall-common. The important bit is

./install-gwt
./install-dictionaries
./install-mathjax
./install-boost
./install-pandoc
./install-libclang
./install-packages

There are ports for gwt, boost, and pandoc. The last one, packages, is just an R package. Mathjax will probably need it's own port. I still need to investigate dictionaries and libclang.

comment:24 Changed 9 years ago by roger.filmyer@…

I'll try working on Mathjax. It looks like RStudio is using version 2.3.1 (tagged in github as v2.3-latest), so I'll try and make a port with 2 versions - 2.3.1 and the current one (2.5.3).

comment:25 Changed 9 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:26 Changed 9 years ago by petrrr

Cc: Peter.Danecek@… removed

comment:27 in reply to:  24 Changed 2 years ago by barracuda156

Replying to roger.filmyer@…:

I'll try working on Mathjax. It looks like RStudio is using version 2.3.1 (tagged in github as v2.3-latest), so I'll try and make a port with 2 versions - 2.3.1 and the current one (2.5.3).

So what happened to it?

Was it building for PowerPC back then? New versions use Qt5, unfortunately, but up to 0.9x Qt4 was used. I wanna build it now on Leopard and Snow Leo.

comment:28 Changed 2 years ago by bountin (Martin Prebio)

Cc: bountin added

comment:29 Changed 2 years ago by bountin (Martin Prebio)

Cc: bountin removed

comment:30 Changed 15 months ago by barracuda156

Any ideas how to sort this out for PPC? The last version to support 32-bit systems is v0.95.265, at least explicitly: https://www.rstudio.com/products/rstudio/release-notes/rstudio-0-96/ However, those old RStudio versions want archaic Boost.

Then, v0.98.1103 is the last one to support Qt4, apparently. Next version moved to Cocoa for macOS.

comment:31 Changed 15 months ago by bountin (Martin Prebio)

Cc: bountin removed
Note: See TracTickets for help on using tickets.