Index: head/devel/RStudio/Makefile
===================================================================
--- head/devel/RStudio/Makefile (revision 564603)
+++ head/devel/RStudio/Makefile (revision 564604)
@@ -1,128 +1,132 @@
# $FreeBSD$
# This port opens too many files during build, more than the default setting.
# Its build is known to succeed with MAX_FILES_RStudio=4096 and MAX_FILES_RStudio_server=4096 in poudriere.conf
PORTNAME= RStudio
DISTVERSIONPREFIX= v
DISTVERSION= 1.3.1093
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel math java
MASTER_SITES= https://s3.amazonaws.com/rstudio-buildtools/dictionaries/:dictionaries \
https://s3.amazonaws.com/rstudio-buildtools/:buildtools
DISTFILES= core-dictionaries.zip:dictionaries \
gin-${GIN_VERSION}.zip:buildtools \
gwt-${GWT_VERSION}.zip:buildtools \
mathjax-27.zip:buildtools
MAINTAINER= yuri@FreeBSD.org
COMMENT= Integrated development environment (IDE) for R
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
BROKEN_i386= [ERROR] Line 101: Failed to resolve 'org.rstudio.studio.client.workbench.views.vcs.common.diff.LineActionButtonRenderer.GrayResources' via deferred binding
BUILD_DEPENDS= ant:devel/apache-ant \
${LOCALBASE}/include/sys/sysinfo.h:devel/libsysinfo \
pandoc:textproc/hs-pandoc \
R-cran-rstudioapi>0:devel/R-cran-rstudioapi
LIB_DEPENDS= libR.so:math/R \
libboost_thread.so:devel/boost-libs \
libinotify.so:devel/libinotify \
libuuid.so:misc/e2fsprogs-libuuid
FLAVORS= desktop server
FLAVOR?= ${FLAVORS:[1]}
server_PKGNAMESUFFIX= -server
-USES= cmake fortran localbase:ldflags pkgconfig qt:5 ssl
-USE_QT= core dbus declarative gui location network opengl printsupport quickcontrols sensors \
- sql svg webchannel webengine webkit widgets xml xmlpatterns buildtools_build qmake_build
+USES= cmake fortran localbase:ldflags pkgconfig ssl
USE_JAVA= yes
JAVA_VERSION= 8
JAVA_BUILD= yes
USE_GITHUB= yes
GH_PROJECT= ${PORTNAME:tl}
GH_TUPLE= rstudio:r2d3:v0.2.0:r2d3/dependencies/common/r2d3 \
rstudio:rmarkdown:aed26ac:rmarkdown/dependencies/common/rmarkdown \
rstudio:rsconnect:03c379b:rsconnect/dependencies/common/rsconnect \
trestletech:plumber:v0.4.6:plumber/dependencies/common/plumber
CMAKE_ARGS= -DFREEBSD_RSTUDIO_VERSION:STRING=${PORTVERSION} \
-DFREEBSD_LIBDIR:STRING=${PREFIX}/lib
CMAKE_ARGS+= -DQT_QMAKE_EXECUTABLE:STRING=${QMAKE}
CMAKE_ARGS+= -DRSTUDIO_BOOST_SIGNALS_VERSION=2
CMAKE_ARGS+= -DFREEBSD_PORT_VERSION:STRING=${DISTVERSION}
MAKE_ENV= HOME=${WRKDIR} \
JAVA_HOME=${JAVA_HOME} \
PATH=${JAVA_HOME}/bin:${PATH} \
ANT_OPTS="-Duser.home=${WRKDIR}"
GWT_VERSION= 2.8.1
GIN_VERSION= 2.1.2
.if ${FLAVOR:U} == desktop
-USES+= desktop-file-utils shared-mime-info
+COMMENT+= (desktop UI version)
+USES+= desktop-file-utils qt:5 shared-mime-info
+USE_QT= core dbus declarative gui location network opengl printsupport quickcontrols sensors \
+ sql svg webchannel webengine webkit widgets xml xmlpatterns buildtools_build qmake_build
CMAKE_ARGS+= -DRSTUDIO_TARGET=Desktop
INSTALL_SUBDIR= ${PORTNAME:tl}
EXECUTABLE= ${PORTNAME:tl}
.endif
.if ${FLAVOR:U} == server
COMMENT+= (web UI version)
-USES+= shebangfix
-SHEBANG_FILES= src/cpp/server/extras/admin/rstudio-server.in
CMAKE_ARGS+= -DRSTUDIO_TARGET=Server
INSTALL_SUBDIR= ${PORTNAME:tl}-server
EXECUTABLE= rserver
-RUN_DEPENDS+= bash:shells/bash
+USER= nobody
+SUB_LIST= USER=${USER}
+USE_RC_SUBR= ${PORTNAME:tl}-server
.endif
post-extract:
@${MKDIR} ${WRKSRC}/dependencies/common/dictionaries && ${MV} ${WRKDIR}/en_* ${WRKSRC}/dependencies/common/dictionaries/
@${MV} ${WRKDIR}/mathjax-* ${WRKSRC}/dependencies/common/
@${MKDIR} ${WRKSRC}/src/gwt/lib/gwt && ${MV} ${WRKDIR}/gwt-${GWT_VERSION} ${WRKSRC}/src/gwt/lib/gwt/${GWT_VERSION}
@${MKDIR} ${WRKSRC}/src/gwt/lib/gin/${GIN_VERSION} && ${MV} ${WRKDIR}/*.jar ${WRKSRC}/src/gwt/lib/gin/${GIN_VERSION}/
post-patch:
@${REINPLACE_CMD} -e ' \
s|target_link_libraries(rstudio|target_link_libraries(rstudio procstat|; \
s|get_filename_component|#get_filename_component|; \
s|set(CMAKE_PREFIX_PATH "$${QT_BIN_DIR}//..//lib//cmake")|set(CMAKE_PREFIX_PATH "${LOCALBASE}/lib/cmake")|; \
s|/usr/share/|${PREFIX}/share/|g' \
${WRKSRC}/src/cpp/desktop/CMakeLists.txt
@${REINPLACE_CMD} -e ' \
s|||' \
${WRKSRC}/src/gwt/build.xml
@${REINPLACE_CMD} -e '\
s|rHomePaths.push_back|//rHomePaths.push_back|; \
s|//rHomePaths.push_back(FilePath("/usr/local/lib/|rHomePaths.push_back(FilePath("${PREFIX}/lib/|' \
${WRKSRC}/src/cpp/core/r_util/RVersionsPosix.cpp
pre-build:
@${CP} ${FILESDIR}/global-setenv.h ${WRKSRC}/src/cpp/desktop/
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/cpp/desktop/global-setenv.h
post-install:
@(echo "#!/bin/sh"; \
echo ""; \
echo "if ! [ -d /proc/curproc ]; then"; \
echo " echo \"${PORTNAME} needs /proc to be mounted as procfs\" >&2"; \
echo " exit 1"; \
echo "fi"; \
echo ""; \
echo "# workaround for the problem that RStudio passes /lib with LD_LIBRARY_PATH that causes the /lib/libgcc_s.so.1 conflict with gcc"; \
echo "LD_PRELOAD=${PREFIX}/lib/gcc${GCC_DEFAULT}/libgcc_s.so JAVA_HOME=${JAVA_HOME} ${PREFIX}/lib/${INSTALL_SUBDIR}/bin/${EXECUTABLE} \"$$"@"\"" \
) > ${STAGEDIR}${PREFIX}/bin/${EXECUTABLE}
@${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${EXECUTABLE}
.if ${FLAVOR:U} == desktop
- @${REINPLACE_CMD} -e 's|^Exec=.*/rstudio|Exec=${PREFIX}/bin/${EXECUTABLE}|' ${STAGEDIR}${PREFIX}/share/applications/${EXECUTABLE}.desktop
+ ${REINPLACE_CMD} -e 's|^Exec=.*/rstudio|Exec=${PREFIX}/bin/${EXECUTABLE}|' ${STAGEDIR}${PREFIX}/share/applications/${EXECUTABLE}.desktop
+.endif
+.if ${FLAVOR:U} == server
+ ${RM} ${STAGEDIR}${LOCALBASE}/lib/${INSTALL_SUBDIR}/bin/rstudio-server # not compatible with FreeBSD
.endif
# Some functions expect the pandoc symlink.
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/${INSTALL_SUBDIR}/bin/pandoc
@cd ${STAGEDIR}${PREFIX}/lib/${INSTALL_SUBDIR}/bin/pandoc && ${LN} -s ../../../../bin/pandoc
# There is a variability in .js file names due to use of random numbers, so we use the automatic plist.
@${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist | ${GREP} -v ^\/ | ${SED} -e 's|%%WWWDIR%%|www/rstudio| ; s|%%CMAKE_BUILD_TYPE%%|${CMAKE_BUILD_TYPE:tl}|' > ${TMPPLIST}
.include
Index: head/devel/RStudio/files/rstudio-server.in
===================================================================
--- head/devel/RStudio/files/rstudio-server.in (nonexistent)
+++ head/devel/RStudio/files/rstudio-server.in (revision 564604)
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# $FreeBSD: head/net/dhcpd/files/dhcpd.in 470842 2018-05-25 14:04:06Z tz $
+#
+# PROVIDE: rstudio-server
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable rstudio_server:
+# rstudio_server_enable : set to "YES" to enable theb daemon, default is "NO"
+# rstudio_server_flags : any extra flags, default is ""
+
+. /etc/rc.subr
+
+name=rstudio_server
+rcvar=rstudio_server_enable
+
+load_rc_config $name
+
+rstudio_server_enable=${rstudio_server_enable:-"NO"}
+rstudio_server_flags=${rstudio_server_flags:-""}
+
+procname=%%PREFIX%%/lib/rstudio-server/bin/rserver
+command=%%PREFIX%%/lib/rstudio-server/bin/rserver
+command_args="--server-user %%USER%% ${rstudio_server_flags}"
+
+stop_postcmd=stop_postcmd
+
+stop_postcmd()
+{
+ # workaround for https://github.com/rstudio/rstudio/issues/8917
+ killall rsession rworkspaces 2>/dev/null # process list is taken from src/cpp/server/extras/admin/rstudio-server.in
+}
+
+run_rc_command "$1"
Property changes on: head/devel/RStudio/files/rstudio-server.in
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/devel/RStudio/pkg-message
===================================================================
--- head/devel/RStudio/pkg-message (revision 564603)
+++ head/devel/RStudio/pkg-message (revision 564604)
@@ -1,24 +1,26 @@
[
{ type: install
message: <