On Sat, Jun 27, 2020 at 01:30:13AM +0000, Brian Callahan wrote: > Hi ports -- > > Attached is a new port, math/rstudio. RStudio is the IDE for R.
First of all, kudos for the effort. I tried and gave up quite a few times before. > --- > pkg/DESCR: > RStudio is an integrated development environment (IDE) for R. > It includes a console, syntax-highlighting editor that supports direct > code execution, as well as tools for plotting, history, debugging and > workspace management. > --- > > This is a rather big port, and I am not certain that it is ready for > import just yet. But it is clearly at the point where it needs to be > shared. Looking for comments and suggestions. > > Some notes/caveats: > 1. The binary lives as /usr/local/lib/rstudio/bin/rstudio. A simple > script exists to allow console users easy access. > > 2. There are no precompiled packages other than what comes with the > IDE. Trying to build some (igraph, notably) exposed some potential > issues with R--like how R thinks the fortran compiler is named > gfortran when it should be egfortran. Enviroment variables for compiling packages can be setup (need to?) in ~/.R/Makevars. Maybe this can help with the gfortran issue. I use clang for most of them, but I have one in my R library (apologies, I can't remember which) that needs gcc. This is my ~/.R/Makevars for compiling with GCC: # GCC # Compilers CC=/usr/local/bin/egcc CXX=/usr/local/bin/eg++ CXX11=/usr/local/bin/eg++ # Compiler flags CFLAGS=-Wall -pedantic -O2 -pipe -std=c99 -DHAVE_SYS_SELECT_H -fPIC CXX11FLAGS=-Wall -pedantic -O2 -pipe -std=c++11 -DHAVE_SYS_SELECT_H -fPIC CXXFLAGS=-Wall -O2 -pipe LIB_DIR=/usr/local/lib And this is for compiling with clang (my default). A big note about wxneeded in LDFLAGS: some packages need this during build, and only during build -- IIRC due to some configure check, without it configure complains that we're cross-compiling, never took the time to investigate this properly -- not during runtime. This means that while building (which happens in /tmp, by R's default) /tmp must be mounted wxallowed. Again this is just because of a couple of packages, YMMV and you'll probably won't need it. But I digress... Again, here's ~/.R/Makevars for clang: # clang CC=/usr/bin/clang CXX=/usr/bin/clang CXX11=/usr/bin/clang # Compiler flags CFLAGS=-Wall -pedantic -O2 -std=c99 -DHAVE_SYS_SELECT_H -fPIC CXX11FLAGS=-Wall -pedantic -O2 -std=c++11 -DHAVE_SYS_SELECT_H -fPIC CXXFLAGS=-Wall -pedantic -O2 -DHAVE_SYS_SELECT_H -fPIC LIB_DIR=/usr/local/lib LIBS=-lgfortran -lkvm # Preprocessor flags (C and FORTRAN) CPPFLAGS=-fPIC -I/usr/include -I/usr/local/include # Linker flags LDFLAGS=-L/usr/lib -L/usr/local/lib -lkvm -Wl,-R/usr/local/lib/R/lib,-z,wxneeded > 3. Fonts don't render in the Plots window. Not sure why. Help > appreciated. pango/harfbuzz fallout, probably. Pango stopped supporting Type 1 fonts. I have the same issue with R itself. My solution it to add options.X11(family = "DejaVu Sans") or some other TrueType family. > 4. I am only a Desktop user but I did provide the Server as well. If > you use the server I'd be interested in knowing how it works. The server is basically the same this but with the entire GUI served over HTTP, and with session control. When you login you get a new R session, just like with the desktop, with the added bonus of being able to leave it running, logout, and come back later to the same session. I think this is a prime candidate for a -no_x11 flavor, since it would probably be much lighter and perhaps easier to port, since it won't pull GUI dependencies (I think), but hey, I'm happy enough with this being ported as it is. > 5. There are undoubtedly improvements to be made here, so I'm open to > whatever comes down the pipeline. > > OK? > > ~Brian --