git: ade17adf6f1f - main - devel/RStudio: Update 1.3.1093 -> 1.4.1717

Yuri Victorovich yuri at FreeBSD.org
Thu Jun 10 17:11:18 UTC 2021


The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ade17adf6f1f5671bbbd8cf62f14f38fe88f33f4

commit ade17adf6f1f5671bbbd8cf62f14f38fe88f33f4
Author:     Yuri Victorovich <yuri at FreeBSD.org>
AuthorDate: 2021-06-10 17:09:41 +0000
Commit:     Yuri Victorovich <yuri at FreeBSD.org>
CommitDate: 2021-06-10 17:11:11 +0000

    devel/RStudio: Update 1.3.1093 -> 1.4.1717
---
 devel/RStudio/Makefile                             | 23 ++++---
 devel/RStudio/distinfo                             |  6 +-
 devel/RStudio/files/patch-CMakeGlobals.txt         | 24 ++++++-
 devel/RStudio/files/patch-src_cpp_CMakeLists.txt   | 18 ++++++
 .../patch-src_cpp_core_system_PosixSystem.cpp      | 29 +++------
 .../files/patch-src_cpp_desktop_DesktopMain.cpp    | 12 ++--
 .../files/patch-src_cpp_desktop_DesktopWebView.cpp | 29 ---------
 .../files/patch-src_cpp_diagnostics_CMakeLists.txt |  4 +-
 .../files/patch-src_cpp_server_CMakeLists.txt      |  6 +-
 .../files/patch-src_cpp_session_CMakeLists.txt     | 73 ++++++++++++++--------
 .../patch-src_cpp_session_postback_CMakeLists.txt  |  6 +-
 ...tch-src_cpp_shared__core_system_PosixSystem.cpp | 23 +++++++
 .../patch-src_cpp_shared__core_system_User.cpp     | 13 ----
 13 files changed, 151 insertions(+), 115 deletions(-)

diff --git a/devel/RStudio/Makefile b/devel/RStudio/Makefile
index 98d2d41af71e..d0067d59bdae 100644
--- a/devel/RStudio/Makefile
+++ b/devel/RStudio/Makefile
@@ -3,8 +3,7 @@
 
 PORTNAME=	RStudio
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.3.1093
-PORTREVISION=	2
+DISTVERSION=	1.4.1717
 CATEGORIES=	devel math java
 MASTER_SITES=	https://s3.amazonaws.com/rstudio-buildtools/dictionaries/:dictionaries \
 		https://s3.amazonaws.com/rstudio-buildtools/:buildtools
@@ -23,18 +22,21 @@ BROKEN_i386=	[ERROR] Line 101: Failed to resolve 'org.rstudio.studio.client.work
 
 BUILD_DEPENDS=	ant:devel/apache-ant \
 		${LOCALBASE}/include/sys/sysinfo.h:devel/libsysinfo \
+		node:www/node \
 		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
+		libsoci_core.so:databases/soci \
+		libuuid.so:misc/e2fsprogs-libuuid \
+		libyaml-cpp.so:devel/yaml-cpp
 
 FLAVORS=	desktop server
 FLAVOR?=	${FLAVORS:[1]}
 server_PKGNAMESUFFIX=	-server
 
-USES=		cmake fortran localbase:ldflags pkgconfig ssl
+USES=		cmake fortran localbase:ldflags pgsql pkgconfig sqlite ssl
 USE_JAVA=	yes
 JAVA_VERSION=	8
 JAVA_BUILD=	yes
@@ -50,6 +52,9 @@ CMAKE_ARGS=	-DFREEBSD_RSTUDIO_VERSION:STRING=${PORTVERSION} \
 CMAKE_ARGS+=	-DQT_QMAKE_EXECUTABLE:STRING=${QMAKE}
 CMAKE_ARGS+=	-DRSTUDIO_BOOST_SIGNALS_VERSION=2
 CMAKE_ARGS+=	-DFREEBSD_PORT_VERSION:STRING=${DISTVERSION}
+CMAKE_ARGS+=	-DFREEBSD_LOCALBASE:STRING=${LOCALBASE} # SOCI package is looked up here, see patch patch-src_cpp_CMakeLists.txt
+CMAKE_ON=	RSTUDIO_USE_SYSTEM_YAML_CPP \
+		RSTUDIO_USE_SYSTEM_SOCI
 MAKE_ENV=	HOME=${WRKDIR} \
 		JAVA_HOME=${JAVA_HOME} \
 		PATH=${JAVA_HOME}/bin:${PATH} \
@@ -73,6 +78,7 @@ EXECUTABLE=	${PORTNAME:tl}
 .if ${FLAVOR:U} == server
 COMMENT+=	(web UI version)
 CMAKE_ARGS+=	-DRSTUDIO_TARGET=Server
+LDFLAGS+=	-linotify
 INSTALL_SUBDIR=	${PORTNAME:tl}-server
 EXECUTABLE=	rserver
 USER=		nobody
@@ -81,8 +87,8 @@ 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}/dependencies/dictionaries && ${MV} ${WRKDIR}/en_* ${WRKSRC}/dependencies/dictionaries/
+	@${MV} ${WRKDIR}/mathjax-* ${WRKSRC}/dependencies/
 	@${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}/
 
@@ -96,10 +102,13 @@ post-patch:
 	@${REINPLACE_CMD} -e ' \
 		s|</java>|<jvmarg value="-Duser.home=${WRKDIR}"/></java>|' \
 		${WRKSRC}/src/gwt/build.xml
-	@${REINPLACE_CMD} -e '\
+	@${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
+	@${REINPLACE_CMD} -e ' \
+		s|<condition property="node.bin" value="../../../$${node.dir}/bin/node">|<condition property="node.bin" value="${LOCALBASE}/bin/node">|' \
+		${WRKSRC}/src/gwt/build.xml
 
 pre-build:
 	@${CP} ${FILESDIR}/global-setenv.h ${WRKSRC}/src/cpp/desktop/
diff --git a/devel/RStudio/distinfo b/devel/RStudio/distinfo
index ae70277ac122..caf142ce08d5 100644
--- a/devel/RStudio/distinfo
+++ b/devel/RStudio/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1600502392
+TIMESTAMP = 1623197060
 SHA256 (core-dictionaries.zip) = 4341a9630efb9dcf7f215c324136407f3b3d6003e1c96f2e5e1f9f14d5787494
 SIZE (core-dictionaries.zip) = 876339
 SHA256 (gin-2.1.2.zip) = b98e704164f54be596779696a3fcd11be5785c9907a99ec535ff6e9525ad5f9a
@@ -7,8 +7,8 @@ SHA256 (gwt-2.8.1.zip) = 0b7af89fdadb4ec51cdb400ace94637d6fe9ffa401b168e2c3d3723
 SIZE (gwt-2.8.1.zip) = 95650299
 SHA256 (mathjax-27.zip) = c56cbaa6c4ce03c1fcbaeb2b5ea3c312d2fb7626a360254770cbcb88fb204176
 SIZE (mathjax-27.zip) = 3285230
-SHA256 (RStudio-rstudio-v1.3.1093_GH0.tar.gz) = af8dc5e71ee934043856938af2e2065d1f1efef08aba37962ed03f6ccb8201bb
-SIZE (RStudio-rstudio-v1.3.1093_GH0.tar.gz) = 89554292
+SHA256 (RStudio-rstudio-v1.4.1717_GH0.tar.gz) = 3af234180fd7cef451aef40faac2c7b52860f14a322244c1c7aede029814d261
+SIZE (RStudio-rstudio-v1.4.1717_GH0.tar.gz) = 96928031
 SHA256 (rstudio-r2d3-v0.2.0_GH0.tar.gz) = 6355a7632134c8c9487056019a9c458db2c98d10388cf66b018d5461d0a947af
 SIZE (rstudio-r2d3-v0.2.0_GH0.tar.gz) = 21977747
 SHA256 (rstudio-rmarkdown-aed26ac_GH0.tar.gz) = b6f6f48dd9930514204739d8957c2737f0b1d110aebf9f89fa31de10598cb29b
diff --git a/devel/RStudio/files/patch-CMakeGlobals.txt b/devel/RStudio/files/patch-CMakeGlobals.txt
index fa4da3d5e013..60af3c7c1151 100644
--- a/devel/RStudio/files/patch-CMakeGlobals.txt
+++ b/devel/RStudio/files/patch-CMakeGlobals.txt
@@ -1,6 +1,6 @@
---- CMakeGlobals.txt.orig	2020-01-23 23:30:24 UTC
+--- CMakeGlobals.txt.orig	2021-05-24 22:22:25 UTC
 +++ CMakeGlobals.txt
-@@ -84,7 +84,7 @@ endif()
+@@ -118,7 +118,7 @@ endif()
  
  # record git revision hash (cache it since we don't use this in development
  # mode and we don't want it to force rebuilds there)
@@ -9,7 +9,7 @@
     find_program(GIT_EXECUTABLE git)
     if(GIT_EXECUTABLE)
        execute_process(
-@@ -95,6 +95,7 @@ if(NOT RSTUDIO_SESSION_WIN32 AND NOT RSTUDIO_GIT_REVIS
+@@ -129,6 +129,7 @@ if(NOT RSTUDIO_SESSION_WIN32 AND NOT RSTUDIO_GIT_REVIS
        SET(RSTUDIO_GIT_REVISION_HASH "${RSTUDIO_GIT_REVISION_HASH}" CACHE STRING "Git Revision Hash")
     endif()
  endif()
@@ -17,3 +17,21 @@
  
  # record these from Jenkins if available
  if("$ENV{GIT_COMMIT}" STREQUAL "")
+@@ -238,14 +239,14 @@ else()
+ endif()
+ 
+ # if the install prefix is /usr/local then tweak as appropriate
+-if(NOT DEFINED CMAKE_INSTALL_PREFIX)
++if(TRUE OR NOT DEFINED CMAKE_INSTALL_PREFIX) # force to set deeper CMAKE_INSTALL_PREFIX because many files are installed into its root
+    if(APPLE)
+       set(CMAKE_INSTALL_PREFIX "/Applications")
+    elseif(UNIX)
+       if(RSTUDIO_DESKTOP)
+-         set(CMAKE_INSTALL_PREFIX "/usr/local/lib/rstudio")
++         set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/lib/rstudio")
+       else()
+-         set(CMAKE_INSTALL_PREFIX "/usr/local/lib/rstudio-server")
++         set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/lib/rstudio-server")
+       endif()
+    endif()
+ endif()
diff --git a/devel/RStudio/files/patch-src_cpp_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_CMakeLists.txt
new file mode 100644
index 000000000000..6754f2c1a030
--- /dev/null
+++ b/devel/RStudio/files/patch-src_cpp_CMakeLists.txt
@@ -0,0 +1,18 @@
+--- src/cpp/CMakeLists.txt.orig	2021-05-24 22:22:25 UTC
++++ src/cpp/CMakeLists.txt
+@@ -433,11 +433,11 @@ endif()
+ if(UNIX)
+    set(SOCI_LIBRARY_DIR "${RSTUDIO_TOOLS_SOCI}/build/lib")
+    if(NOT APPLE AND RSTUDIO_USE_SYSTEM_SOCI)
+-      set(SOCI_LIBRARY_DIR "/usr/lib")
++      set(SOCI_LIBRARY_DIR "${FREEBSD_LOCALBASE}/lib")
+    endif()
+-   find_library(SOCI_CORE_LIB NAMES "libsoci_core.a" "soci_core" PATHS "${SOCI_LIBRARY_DIR}" NO_DEFAULT_PATH)
+-   find_library(SOCI_SQLITE_LIB NAMES "libsoci_sqlite3.a" "soci_sqlite3" PATHS "${SOCI_LIBRARY_DIR}" NO_DEFAULT_PATH)
+-   find_library(SOCI_POSTGRESQL_LIB NAMES "libsoci_postgresql.a" "soci_postgresql" PATHS "${SOCI_LIBRARY_DIR}" NO_DEFAULT_PATH)
++   find_library(SOCI_CORE_LIB NAMES "libsoci_core.so" "soci_core" PATHS "${SOCI_LIBRARY_DIR}" NO_DEFAULT_PATH)
++   find_library(SOCI_SQLITE_LIB NAMES "libsoci_sqlite3.so" "soci_sqlite3" PATHS "${SOCI_LIBRARY_DIR}" NO_DEFAULT_PATH)
++   find_library(SOCI_POSTGRESQL_LIB NAMES "libsoci_postgresql.so" "soci_postgresql" PATHS "${SOCI_LIBRARY_DIR}" NO_DEFAULT_PATH)
+    find_library(DL_LIB "dl")
+    find_library(SQLITE_LIB "sqlite3")
+    get_filename_component(SQLITE_LIB "${SQLITE_LIB}" REALPATH)
diff --git a/devel/RStudio/files/patch-src_cpp_core_system_PosixSystem.cpp b/devel/RStudio/files/patch-src_cpp_core_system_PosixSystem.cpp
index 5f0def0c79fb..c5632b95d384 100644
--- a/devel/RStudio/files/patch-src_cpp_core_system_PosixSystem.cpp
+++ b/devel/RStudio/files/patch-src_cpp_core_system_PosixSystem.cpp
@@ -1,10 +1,10 @@
 - one of the patches is a workaround for access to /proc/{pid}/fd : https://github.com/rstudio/rstudio/issues/8912
 
---- src/cpp/core/system/PosixSystem.cpp.orig	2020-09-17 18:16:48 UTC
+--- src/cpp/core/system/PosixSystem.cpp.orig	2021-05-24 22:22:25 UTC
 +++ src/cpp/core/system/PosixSystem.cpp
-@@ -40,20 +40,25 @@
+@@ -41,20 +41,25 @@
  
- #include <uuid/uuid.h>
+ #include <shared_core/system/PosixSystem.hpp>
  
 -#ifdef __APPLE__
 +#if !defined(__APPLE__) && !defined(__FreeBSD__)
@@ -30,7 +30,7 @@
  #include <boost/thread.hpp>
  #include <boost/format.hpp>
  #include <boost/lexical_cast.hpp>
-@@ -575,6 +580,7 @@ Error getOpenFds(std::vector<uint32_t>* pFds)
+@@ -560,6 +565,7 @@ Error getOpenFds(std::vector<uint32_t>* pFds)
  #ifndef __APPLE__
  Error getOpenFds(pid_t pid, std::vector<uint32_t>* pFds)
  {
@@ -38,7 +38,7 @@
     std::string pidStr = safe_convert::numberToString(pid);
     boost::format fmt("/proc/%1%/fd");
     FilePath filePath(boost::str(fmt % pidStr));
-@@ -601,6 +607,7 @@ Error getOpenFds(pid_t pid, std::vector<uint32_t>* pFd
+@@ -586,6 +592,7 @@ Error getOpenFds(pid_t pid, std::vector<uint32_t>* pFd
           pFds->push_back(fd.get());
        }
     }
@@ -46,7 +46,7 @@
  
     return Success();
  }
-@@ -922,7 +929,7 @@ Error executablePath(const char * argv0,
+@@ -911,7 +918,7 @@ Error executablePath(const char * argv0,
  
  #elif defined(HAVE_PROCSELF)
  
@@ -55,7 +55,7 @@
  
  #else
  
-@@ -1431,7 +1438,7 @@ Error osResourceLimit(ResourceLimit limit, int* pLimit
+@@ -1420,7 +1427,7 @@ Error osResourceLimit(ResourceLimit limit, int* pLimit
        case CpuLimit:
           *pLimit = RLIMIT_CPU;
           break;
@@ -64,7 +64,7 @@
        case NiceLimit:
           *pLimit = RLIMIT_NICE;
           break;
-@@ -1504,7 +1511,7 @@ Error systemInformation(SysInfo* pSysInfo)
+@@ -1493,7 +1500,7 @@ Error systemInformation(SysInfo* pSysInfo)
  {
     pSysInfo->cores = boost::thread::hardware_concurrency();
  
@@ -73,7 +73,7 @@
     struct sysinfo info;
     if (::sysinfo(&info) == -1)
        return systemError(errno, ERROR_LOCATION);
-@@ -1944,7 +1951,7 @@ Error restrictCoreDumps()
+@@ -1897,7 +1904,7 @@ Error restrictCoreDumps()
        return error;
  
     // no ptrace core dumps permitted
@@ -82,16 +82,7 @@
     int res = ::prctl(PR_SET_DUMPABLE, 0);
     if (res == -1)
        return systemError(errno, ERROR_LOCATION);
-@@ -1955,7 +1962,7 @@ Error restrictCoreDumps()
- 
- Error enableCoreDumps()
- {
--#ifndef __APPLE__
-+#if !defined(__APPLE__) && !defined(__FreeBSD__)
-    int res = ::prctl(PR_SET_DUMPABLE, 1);
-    if (res == -1)
-       return systemError(errno, ERROR_LOCATION);
-@@ -1981,7 +1988,7 @@ void printCoreDumpable(const std::string& context)
+@@ -1928,7 +1935,7 @@ void printCoreDumpable(const std::string& context)
     ostr << "  hard limit: " << rLimitHard << std::endl;
  
     // ptrace
diff --git a/devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp b/devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp
index 5b17bed329d5..f41019b204b7 100644
--- a/devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp
+++ b/devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp
@@ -1,6 +1,6 @@
---- src/cpp/desktop/DesktopMain.cpp.orig	2020-05-18 18:11:10 UTC
+--- src/cpp/desktop/DesktopMain.cpp.orig	2021-05-24 22:22:25 UTC
 +++ src/cpp/desktop/DesktopMain.cpp
-@@ -47,6 +47,8 @@
+@@ -49,6 +49,8 @@
  #include "DesktopActivationOverlay.hpp"
  #include "DesktopSessionServersOverlay.hpp"
  
@@ -9,16 +9,16 @@
  #ifdef _WIN32
  #include <core/system/RegistryKey.hpp>
  #include <Windows.h>
-@@ -372,7 +374,7 @@ QString inferDefaultRenderingEngine()
+@@ -349,7 +351,7 @@ QString inferDefaultRenderingEngineMac()
  
- #endif
+ #endif /* Q_OS_MAC */
  
 -#ifdef Q_OS_LINUX
 +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
  
- QString inferDefaultRenderingEngine()
+ QString inferDefaultRenderingEngineLinux()
  {
-@@ -461,6 +463,7 @@ std::string getSessionUrl()
+@@ -477,6 +479,7 @@ std::string getSessionUrl()
  
  int main(int argc, char* argv[])
  {
diff --git a/devel/RStudio/files/patch-src_cpp_desktop_DesktopWebView.cpp b/devel/RStudio/files/patch-src_cpp_desktop_DesktopWebView.cpp
deleted file mode 100644
index df00a6e0924c..000000000000
--- a/devel/RStudio/files/patch-src_cpp_desktop_DesktopWebView.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/cpp/desktop/DesktopWebView.cpp.orig	2020-01-23 23:30:24 UTC
-+++ src/cpp/desktop/DesktopWebView.cpp
-@@ -272,7 +272,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* even
-          
-       case QWebEngineContextMenuData::MediaTypeAudio:
-          
--#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
-+#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) && !defined(__FreeBSD__) // FreeBSD stayed with qt5-webengine-5.9.5_14 while Qt advanced to 5.12.0
-          if (data.mediaFlags().testFlag(QWebEngineContextMenuData::MediaPaused))
-             menu->addAction(label(tr("&Play")), [&]() { triggerPageAction(QWebEnginePage::ToggleMediaPlayPause); });
-          else
-@@ -289,7 +289,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* even
-          
-       case QWebEngineContextMenuData::MediaTypeVideo:
-          
--#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
-+#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) && !defined(__FreeBSD__) // FreeBSD stayed with qt5-webengine-5.9.5_14 while Qt advanced to 5.12.0
-          if (data.mediaFlags().testFlag(QWebEngineContextMenuData::MediaPaused))
-             menu->addAction(label(tr("&Play")), [&]() { triggerPageAction(QWebEnginePage::ToggleMediaPlayPause); });
-          else
-@@ -347,7 +347,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* even
-       menu->addAction(selectAll);
-    }
-    
--#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
-+#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) && !defined(__FreeBSD__) // FreeBSD stayed with qt5-webengine-5.9.5_14 while Qt advanced to 5.12.0
-    menu->addSeparator();
-    menu->addAction(label(tr("&Reload")), [&]() { triggerPageAction(QWebEnginePage::Reload); });
-    menu->addAction(label(tr("I&nspect element")), [&]() {
diff --git a/devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt
index 4dba9a09bf82..bc626e6d8585 100644
--- a/devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt
+++ b/devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt
@@ -1,4 +1,4 @@
---- src/cpp/diagnostics/CMakeLists.txt.orig	2020-01-23 23:30:24 UTC
+--- src/cpp/diagnostics/CMakeLists.txt.orig	2021-05-24 22:22:25 UTC
 +++ src/cpp/diagnostics/CMakeLists.txt
 @@ -57,6 +57,7 @@ add_stripped_executable(diagnostics
  # set link dependencies
@@ -6,5 +6,5 @@
     rstudio-core
 +   procstat
  )
+ 
  if(NOT RSTUDIO_SESSION_WIN32)
-    install(TARGETS diagnostics DESTINATION ${RSTUDIO_INSTALL_BIN})
diff --git a/devel/RStudio/files/patch-src_cpp_server_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_server_CMakeLists.txt
index b599ff51d262..167552275470 100644
--- a/devel/RStudio/files/patch-src_cpp_server_CMakeLists.txt
+++ b/devel/RStudio/files/patch-src_cpp_server_CMakeLists.txt
@@ -1,8 +1,8 @@
---- src/cpp/server/CMakeLists.txt.orig	2020-01-23 23:30:24 UTC
+--- src/cpp/server/CMakeLists.txt.orig	2021-05-24 22:22:25 UTC
 +++ src/cpp/server/CMakeLists.txt
-@@ -156,6 +156,9 @@ include_directories(
+@@ -137,6 +137,9 @@ include_directories(
  # define executable
- add_stripped_executable(rserver ${SERVER_SOURCE_FILES} ${SERVER_HEADER_FILES})
+ add_stripped_executable(rserver ServerMain.cpp ${SERVER_SOURCE_FILES} ${SERVER_HEADER_FILES})
  
 +# additional libraries
 +target_link_libraries(rserver -L${FREEBSD_LIBDIR} -linotify)
diff --git a/devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt
index defef341e58e..a0ed7d4a0034 100644
--- a/devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt
+++ b/devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt
@@ -1,19 +1,40 @@
---- src/cpp/session/CMakeLists.txt.orig	2020-05-18 18:11:10 UTC
+--- src/cpp/session/CMakeLists.txt.orig	2021-05-24 22:22:25 UTC
 +++ src/cpp/session/CMakeLists.txt
-@@ -25,9 +25,9 @@ endif()
- if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27")
-   message(FATAL_ERROR "Mathjax 2.7 not found (re-run install-dependencies script to install)")
+@@ -24,7 +24,7 @@ set(PANDOC_VERSION "2.11.4" CACHE INTERNAL "Pandoc ver
+ if(WIN32)
+    set(RSTUDIO_DEPENDENCIES_DICTIONARIES_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/dictionaries")
+    set(RSTUDIO_DEPENDENCIES_MATHJAX_DIR      "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27")
+-   set(RSTUDIO_DEPENDENCIES_PANDOC_DIR       "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
++   #set(RSTUDIO_DEPENDENCIES_PANDOC_DIR       "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
+ else()
+ 
+    # indirection to help build machine find these libraries?
+@@ -40,17 +40,18 @@ else()
+       set(RSTUDIO_DEPENDENCIES_MATHJAX_DIR "${RSTUDIO_DEPENDENCIES_DIR}/mathjax-27")
+    endif()
+ 
+-   if(EXISTS "${RSTUDIO_TOOLS_ROOT}/pandoc/${PANDOC_VERSION}")
+-      set(RSTUDIO_DEPENDENCIES_PANDOC_DIR "${RSTUDIO_TOOLS_ROOT}/pandoc/${PANDOC_VERSION}")
+-   else()
+-      set(RSTUDIO_DEPENDENCIES_PANDOC_DIR "${RSTUDIO_DEPENDENCIES_DIR}/pandoc/${PANDOC_VERSION}")
+-   endif()
++   #if(EXISTS "${RSTUDIO_TOOLS_ROOT}/pandoc/${PANDOC_VERSION}")
++   #   set(RSTUDIO_DEPENDENCIES_PANDOC_DIR "${RSTUDIO_TOOLS_ROOT}/pandoc/${PANDOC_VERSION}")
++   #else()
++   #   set(RSTUDIO_DEPENDENCIES_PANDOC_DIR "${RSTUDIO_DEPENDENCIES_DIR}/pandoc/${PANDOC_VERSION}")
++   #endif()
+ 
  endif()
--if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
--  message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
--endif()
-+#if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
-+#  message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
-+#endif()
  
- # verify embedded packages are available
- foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES})
-@@ -38,19 +38,19 @@ foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES})
+ foreach(DEP "${RSTUDIO_DEPENDENCIES_DICTIONARIES_DIR}"
+             "${RSTUDIO_DEPENDENCIES_MATHJAX_DIR}"
+-            "${RSTUDIO_DEPENDENCIES_PANDOC_DIR}")
++            #"${RSTUDIO_DEPENDENCIES_PANDOC_DIR}"
++)
+    if(NOT EXISTS "${DEP}")
+       message(FATAL_ERROR "${DEP} not found (re-run install-dependencies script to install")
+    endif()
+@@ -65,19 +66,19 @@ foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES})
  endforeach()
  
  # verify libclang is installed (Windows only)
@@ -45,9 +66,9 @@
  # include files
  file(GLOB_RECURSE SESSION_HEADER_FILES "*.h*")
  
-@@ -391,6 +391,9 @@ endif()
- # define executable
- add_stripped_executable(rsession ${SESSION_SOURCE_FILES} ${SESSION_HEADER_FILES})
+@@ -444,6 +445,9 @@ add_stripped_executable(
+    ${SESSION_SOURCE_FILES}
+    ${SESSION_HEADER_FILES})
  
 +# additional libraries
 +target_link_libraries(rsession -L${FREEBSD_LIBDIR} -linotify -lprocstat)
@@ -55,25 +76,23 @@
  # skip libR RPATH at development time
  if(RSTUDIO_DEVELOPMENT OR RSTUDIO_RUN_IN_PLACE)
     set_target_properties(rsession PROPERTIES SKIP_BUILD_RPATH TRUE)
-@@ -519,11 +522,11 @@ if (NOT RSTUDIO_SESSION_WIN32)
-    # install pandoc
-    set(PANDOC_VERSION "2.7.3" CACHE INTERNAL "Pandoc version")
+@@ -579,10 +583,10 @@ if(NOT RSTUDIO_SESSION_WIN32 AND NOT RSESSION_ALTERNAT
+            DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
  
--   set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
--   file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+    # install pandoc
+-   file(GLOB PANDOC_FILES "${RSTUDIO_DEPENDENCIES_PANDOC_DIR}/pandoc*")
 -   install(FILES ${PANDOC_FILES}
 -           PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
--           DESTINATION  ${RSTUDIO_INSTALL_BIN}/pandoc)
-+   #set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
-+   #file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+-           DESTINATION "${RSTUDIO_INSTALL_BIN}/pandoc")
++   #file(GLOB PANDOC_FILES "${RSTUDIO_DEPENDENCIES_PANDOC_DIR}/pandoc*")
 +   #install(FILES ${PANDOC_FILES}
 +   #        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
-+   #        DESTINATION  ${RSTUDIO_INSTALL_BIN}/pandoc)
++   #        DESTINATION "${RSTUDIO_INSTALL_BIN}/pandoc")
  
     # install embedded packages
     foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES})
-@@ -558,18 +561,18 @@ if (NOT RSTUDIO_SESSION_WIN32)
-            DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
+@@ -622,18 +626,18 @@ if(NOT RSTUDIO_SESSION_WIN32 AND NOT RSESSION_ALTERNAT
+       DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
  
     # install libclang
 -   if(WIN32)
diff --git a/devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt
index 9c0bd05ab04e..3ec99eb75845 100644
--- a/devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt
+++ b/devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt
@@ -1,10 +1,10 @@
---- src/cpp/session/postback/CMakeLists.txt.orig	2020-01-23 23:30:24 UTC
+--- src/cpp/session/postback/CMakeLists.txt.orig	2021-05-24 22:22:25 UTC
 +++ src/cpp/session/postback/CMakeLists.txt
-@@ -36,6 +36,7 @@ add_executable(rpostback ${POSTBACK_SOURCE_FILES} ${PO
+@@ -36,6 +36,7 @@ add_stripped_executable(rpostback ${POSTBACK_SOURCE_FI
  # set link dependencies
  target_link_libraries(rpostback
     rstudio-core
 +   procstat
+    ${CRASHPAD_LIBRARIES}
  )
  
- if (RSTUDIO_SERVER)
diff --git a/devel/RStudio/files/patch-src_cpp_shared__core_system_PosixSystem.cpp b/devel/RStudio/files/patch-src_cpp_shared__core_system_PosixSystem.cpp
new file mode 100644
index 000000000000..6a304d8a4651
--- /dev/null
+++ b/devel/RStudio/files/patch-src_cpp_shared__core_system_PosixSystem.cpp
@@ -0,0 +1,23 @@
+--- src/cpp/shared_core/system/PosixSystem.cpp.orig	2021-06-09 01:52:44 UTC
++++ src/cpp/shared_core/system/PosixSystem.cpp
+@@ -29,8 +29,10 @@
+ #include <memory.h>
+ #include <netdb.h>
+ #include <pwd.h>
++#include <netinet/in.h> // for sa_family_t
++#include <sys/socket.h> // for struct sockaddr
+ 
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ #include <sys/prctl.h>
+ #endif
+ 
+@@ -80,7 +82,7 @@ Error restorePrivilegesImpl(uid_t in_uid)
+ 
+ Error enableCoreDumps()
+ {
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
+    int res = ::prctl(PR_SET_DUMPABLE, 1);
+    if (res == -1)
+       return systemError(errno, ERROR_LOCATION);
diff --git a/devel/RStudio/files/patch-src_cpp_shared__core_system_User.cpp b/devel/RStudio/files/patch-src_cpp_shared__core_system_User.cpp
deleted file mode 100644
index dc2aacfdae43..000000000000
--- a/devel/RStudio/files/patch-src_cpp_shared__core_system_User.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-- Workaround for https://github.com/rstudio/rstudio/issues/8908
-
---- src/cpp/shared_core/system/User.cpp.orig	2021-02-05 21:40:04 UTC
-+++ src/cpp/shared_core/system/User.cpp
-@@ -64,6 +64,8 @@ struct User::Impl
- 
-       // Get the maximum size of a passwd for this system.
-       long buffSize = ::sysconf(_SC_GETPW_R_SIZE_MAX);
-+      if (buffSize == -1)
-+      	buffSize = 4096;
-       if (buffSize == 1)
-          buffSize = 4096; // some systems return -1, be conservative!
- 


More information about the dev-commits-ports-main mailing list