aboutsummaryrefslogtreecommitdiff
path: root/devel/RStudio/files
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-05-31 07:29:11 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-05-31 07:29:11 +0000
commitcd9e0d60c3484c9cc24cbd2072da1926a6f32f09 (patch)
treec477ba321241157388370a7bc4d437db91d3662b /devel/RStudio/files
parentee276aa98f48db88dfb1cd08428199a0ead02b58 (diff)
downloadports-cd9e0d60c3484c9cc24cbd2072da1926a6f32f09.tar.gz
ports-cd9e0d60c3484c9cc24cbd2072da1926a6f32f09.zip
devel/RStudio: Update 1.1.453 -> 1.2.637
Port changes: * Add to PATCHFILES for corrections that the upstream made needed to build on FreeBSD * Add USES=ssl * Add USE_QT5=webengine * Update GWT_VERSION/GIN_VERSION - versions of side-projects needed to build RStudio * Implemented the FreeBSD-specific version of getOpenFds included in the PosixSystem.cpp patch * Added numerous corrections to the PosixSystem.cpp patch * Now rstudio and other related executables depend on libprocstat.so - corresponding patches were added Reported by: portscout
Notes
Notes: svn path=/head/; revision=471195
Diffstat (limited to 'devel/RStudio/files')
-rw-r--r--devel/RStudio/files/patch-boost-1.6762
-rw-r--r--devel/RStudio/files/patch-src_cpp_CMakeLists.txt10
-rw-r--r--devel/RStudio/files/patch-src_cpp_core_system_PosixSystem.cpp132
-rw-r--r--devel/RStudio/files/patch-src_cpp_desktop_DesktopDownloadItemHelper.cpp15
-rw-r--r--devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp8
-rw-r--r--devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt10
-rw-r--r--devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt18
-rw-r--r--devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt10
8 files changed, 144 insertions, 121 deletions
diff --git a/devel/RStudio/files/patch-boost-1.67 b/devel/RStudio/files/patch-boost-1.67
deleted file mode 100644
index 81f26e02eb24..000000000000
--- a/devel/RStudio/files/patch-boost-1.67
+++ /dev/null
@@ -1,62 +0,0 @@
-Regressed by https://github.com/boostorg/date_time/commit/f9f2aaf5216c
-
-src/cpp/core/DateTime.cpp:68:26: error: no matching conversion for functional-style cast from 'double' to 'boost::posix_time::seconds'
- return time_t_epoch + seconds(sec);
- ^~~~~~~~~~~
-src/cpp/core/file_lock/FileLock.cpp:136:34: error: no matching conversion for functional-style cast from 'double' to 'boost::posix_time::seconds'
- FileLock::s_timeoutInterval = boost::posix_time::seconds(timeoutInterval);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-src/cpp/core/file_lock/FileLock.cpp:140:30: error: no matching conversion for functional-style cast from 'double' to 'boost::posix_time::seconds'
- FileLock::s_refreshRate = boost::posix_time::seconds(refreshRate);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-src/cpp/core/file_lock/FileLock.cpp:215:38: error: no matching constructor for initialization of 'boost::posix_time::seconds'
-boost::posix_time::seconds FileLock::s_timeoutInterval(kDefaultTimeoutInterval);
- ^ ~~~~~~~~~~~~~~~~~~~~~~~
-src/cpp/core/file_lock/FileLock.cpp:216:38: error: no matching constructor for initialization of 'boost::posix_time::seconds'
-boost::posix_time::seconds FileLock::s_refreshRate(kDefaultRefreshRate);
- ^ ~~~~~~~~~~~~~~~~~~~
-/usr/local/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'double' to 'const boost::posix_time::seconds' for 1st argument
- class BOOST_SYMBOL_VISIBLE seconds : public time_duration
- ^
-/usr/local/include/boost/date_time/posix_time/posix_time_duration.hpp:58:37: note: candidate template ignored: disabled by 'enable_if' [with T = double]
- typename boost::enable_if<boost::is_integral<T>, void>::type* = 0) :
- ^
-
---- src/cpp/core/DateTime.cpp.orig 2018-04-16 22:26:34 UTC
-+++ src/cpp/core/DateTime.cpp
-@@ -65,7 +65,7 @@ boost::posix_time::ptime timeFromSecondsSinceEpoch(dou
- using namespace boost::posix_time;
-
- ptime time_t_epoch(date(1970,1,1));
-- return time_t_epoch + seconds(sec);
-+ return time_t_epoch + seconds(long(sec));
- }
-
- boost::posix_time::ptime timeFromMillisecondsSinceEpoch(int64_t ms)
---- src/cpp/core/file_lock/FileLock.cpp.orig 2018-04-16 22:26:34 UTC
-+++ src/cpp/core/file_lock/FileLock.cpp
-@@ -46,8 +46,8 @@ const char * const kLockTypeLinkBased = "linkbased";
- #endif
-
- const char * const kLocksConfPath = "/etc/rstudio/file-locks";
--const double kDefaultRefreshRate = 20.0;
--const double kDefaultTimeoutInterval = 30.0;
-+const long kDefaultRefreshRate = 20;
-+const long kDefaultTimeoutInterval = 30;
-
- std::string lockTypeToString(FileLock::LockType type)
- {
-@@ -132,11 +132,11 @@ void FileLock::initialize(const Settings& settings)
- FileLock::s_defaultType = stringToLockType(settings.get("lock-type", kLockTypeDefault));
-
- // timeout interval
-- double timeoutInterval = getFieldPositive(settings, "timeout-interval", kDefaultTimeoutInterval);
-+ long timeoutInterval = getFieldPositive(settings, "timeout-interval", kDefaultTimeoutInterval);
- FileLock::s_timeoutInterval = boost::posix_time::seconds(timeoutInterval);
-
- // refresh rate
-- double refreshRate = getFieldPositive(settings, "refresh-rate", kDefaultRefreshRate);
-+ long refreshRate = getFieldPositive(settings, "refresh-rate", kDefaultRefreshRate);
- FileLock::s_refreshRate = boost::posix_time::seconds(refreshRate);
-
- // logging
diff --git a/devel/RStudio/files/patch-src_cpp_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_CMakeLists.txt
deleted file mode 100644
index 6f3298407d89..000000000000
--- a/devel/RStudio/files/patch-src_cpp_CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/cpp/CMakeLists.txt.orig 2017-11-16 21:40:37 UTC
-+++ src/cpp/CMakeLists.txt
-@@ -101,7 +101,6 @@ if(UNIX)
- add_definitions(-Wformat -Wformat-security)
- add_definitions(-D_FORTIFY_SOURCE=2)
- add_definitions(-fstack-protector --param ssp-buffer-size=4)
-- add_definitions(-pie -fPIE)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
- endif()
-
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 18a29f60c731..e3860d3614ec 100644
--- a/devel/RStudio/files/patch-src_cpp_core_system_PosixSystem.cpp
+++ b/devel/RStudio/files/patch-src_cpp_core_system_PosixSystem.cpp
@@ -1,4 +1,4 @@
---- src/cpp/core/system/PosixSystem.cpp.orig 2017-11-16 21:40:37 UTC
+--- src/cpp/core/system/PosixSystem.cpp.orig 2018-05-16 18:21:36 UTC
+++ src/cpp/core/system/PosixSystem.cpp
@@ -36,6 +36,7 @@
#include <ifaddrs.h>
@@ -8,70 +8,130 @@
#include <uuid/uuid.h>
-@@ -46,9 +47,9 @@
+@@ -45,13 +46,22 @@
+ #include <libproc.h>
#endif
- #ifndef __APPLE__
--#include <sys/prctl.h>
-+//#include <sys/prctl.h>
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+ #include <sys/prctl.h>
#include <sys/sysinfo.h>
--#include <linux/kernel.h>
-+//#include <linux/kernel.h>
+ #include <linux/kernel.h>
#include <dirent.h>
#endif
-@@ -670,7 +671,7 @@ Error executablePath(const char * argv0,
++#if defined(__FreeBSD__)
++#include <sys/param.h>
++#include <sys/queue.h>
++#include <sys/socket.h>
++#include <libprocstat.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#endif
++
+ #include <boost/thread.hpp>
+ #include <boost/format.hpp>
+ #include <boost/lexical_cast.hpp>
+@@ -569,7 +579,35 @@ Error getOpenFds(std::vector<unsigned in
+ return getOpenFds(getpid(), pFds);
+ }
+
+-#ifndef __APPLE__
++#if defined(__FreeBSD__)
++Error getOpenFds(pid_t pid, std::vector<unsigned int>* pFds)
++{
++ struct procstat *prstat;
++ struct kinfo_proc *kipp, *p;
++ struct filestat_list *head;
++ struct filestat *fst;
++ unsigned i, cnt;
++
++ prstat = procstat_open_sysctl();
++ p = procstat_getprocs(prstat, KERN_PROC_PROC, pid, &cnt);
++
++ for (i = 0; i < cnt; i++) {
++ kipp = &p[i];
++ if (kipp->ki_pid == pid) {
++ head = procstat_getfiles(prstat, kipp, 0);
++ if (head != NULL)
++ STAILQ_FOREACH(fst, head, next)
++ if (fst->fs_fd >= 0)
++ pFds->push_back(fst->fs_fd);
++ }
++ }
++
++ procstat_freeprocs(prstat, p);
++ procstat_close(prstat);
++
++ return Success();
++}
++#elif !defined(__APPLE__)
+ Error getOpenFds(pid_t pid, std::vector<unsigned int>* pFds)
+ {
+ std::string pidStr = safe_convert::numberToString(pid);
+@@ -859,7 +897,11 @@ Error executablePath(const char * argv0,
#elif defined(HAVE_PROCSELF)
-- executablePath = std::string("/proc/self/exe");
++#if defined(__FreeBSD__)
+ executablePath = std::string("/proc/curproc/file");
++#else
+ executablePath = std::string("/proc/self/exe");
++#endif
#else
-@@ -1102,7 +1103,7 @@ Error osResourceLimit(ResourceLimit limi
+@@ -1296,7 +1338,7 @@ Error osResourceLimit(ResourceLimit limi
case CpuLimit:
*pLimit = RLIMIT_CPU;
break;
-#ifndef __APPLE__
-+#if !defined(__APPLE__) && !defined(__FreeBSD__)
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
case NiceLimit:
*pLimit = RLIMIT_NICE;
break;
-@@ -1175,7 +1176,7 @@ Error systemInformation(SysInfo* pSysInf
+@@ -1369,7 +1411,7 @@ Error systemInformation(SysInfo* pSysInf
{
pSysInfo->cores = boost::thread::hardware_concurrency();
-#ifndef __APPLE__
-+#if !defined(__APPLE__) && !defined(__FreeBSD__)
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
struct sysinfo info;
if (::sysinfo(&info) == -1)
return systemError(errno, ERROR_LOCATION);
-@@ -1495,9 +1496,9 @@ Error restrictCoreDumps()
+@@ -1402,7 +1444,7 @@ void toPids(const std::vector<std::strin
+
+ } // anonymous namespace
+
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+ core::Error pidof(const std::string& process, std::vector<PidType>* pPids)
+ {
+ // use pidof to capture pids
+@@ -1711,7 +1753,7 @@ Error restrictCoreDumps()
+ return error;
// no ptrace core dumps permitted
- #ifndef __APPLE__
-- int res = ::prctl(PR_SET_DUMPABLE, 0);
-- if (res == -1)
-- return systemError(errno, ERROR_LOCATION);
-+// int res = ::prctl(PR_SET_DUMPABLE, 0);
-+// if (res == -1)
-+// return systemError(errno, ERROR_LOCATION);
- #endif
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+ int res = ::prctl(PR_SET_DUMPABLE, 0);
+ if (res == -1)
+ return systemError(errno, ERROR_LOCATION);
+@@ -1722,7 +1764,7 @@ Error restrictCoreDumps()
- return Success();
-@@ -1521,10 +1522,10 @@ void printCoreDumpable(const std::string
+ Error enableCoreDumps()
+ {
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+ int res = ::prctl(PR_SET_DUMPABLE, 1);
+ if (res == -1)
+ return systemError(errno, ERROR_LOCATION);
+@@ -1748,7 +1790,7 @@ void printCoreDumpable(const std::string
+ ostr << " hard limit: " << rLimitHard << std::endl;
// ptrace
- #ifndef __APPLE__
-- int dumpable = ::prctl(PR_GET_DUMPABLE, NULL, NULL, NULL, NULL);
-- if (dumpable == -1)
-- LOG_ERROR(systemError(errno, ERROR_LOCATION));
-- ostr << " pr_get_dumpable: " << dumpable << std::endl;
-+// int dumpable = ::prctl(PR_GET_DUMPABLE, NULL, NULL, NULL, NULL);
-+// if (dumpable == -1)
-+// LOG_ERROR(systemError(errno, ERROR_LOCATION));
-+// ostr << " pr_get_dumpable: " << dumpable << std::endl;
- #endif
-
- std::cerr << ostr.str();
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+ int dumpable = ::prctl(PR_GET_DUMPABLE, NULL, NULL, NULL, NULL);
+ if (dumpable == -1)
+ LOG_ERROR(systemError(errno, ERROR_LOCATION));
diff --git a/devel/RStudio/files/patch-src_cpp_desktop_DesktopDownloadItemHelper.cpp b/devel/RStudio/files/patch-src_cpp_desktop_DesktopDownloadItemHelper.cpp
new file mode 100644
index 000000000000..3d716be9b79b
--- /dev/null
+++ b/devel/RStudio/files/patch-src_cpp_desktop_DesktopDownloadItemHelper.cpp
@@ -0,0 +1,15 @@
+--- src/cpp/desktop/DesktopDownloadItemHelper.cpp.orig 2018-05-30 17:56:35 UTC
++++ src/cpp/desktop/DesktopDownloadItemHelper.cpp
+@@ -37,9 +37,9 @@ DownloadHelper::DownloadHelper(QWebEngin
+
+ connect(item, &QWebEngineDownloadItem::finished,
+ this, &DownloadHelper::onFinished);
+-
+- connect(item, &QWebEngineDownloadItem::isPausedChanged,
+- this, &DownloadHelper::onPausedChanged);
++ // exists from 5.10, while FreeBSD kept qt5-webengine at 5.9.5, the handler is empty anyway
++ //connect(item, &QWebEngineDownloadItem::isPausedChanged,
++ // this, &DownloadHelper::onPausedChanged);
+
+ connect(item, &QWebEngineDownloadItem::stateChanged,
+ this, &DownloadHelper::onStateChanged);
diff --git a/devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp b/devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp
index 982acac63949..137c909e382d 100644
--- a/devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp
+++ b/devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp
@@ -1,14 +1,14 @@
---- src/cpp/desktop/DesktopMain.cpp.orig 2017-11-16 21:40:37 UTC
+--- src/cpp/desktop/DesktopMain.cpp.orig 2018-05-16 18:21:36 UTC
+++ src/cpp/desktop/DesktopMain.cpp
-@@ -42,6 +42,7 @@
- #include "DesktopSessionLauncher.hpp"
+@@ -40,6 +40,7 @@
#include "DesktopProgressActivator.hpp"
#include "DesktopNetworkProxyFactory.hpp"
+ #include "DesktopActivationOverlay.hpp"
+#include "global-setenv.h"
QProcess* pRSessionProcess;
QString sharedSecret;
-@@ -198,6 +199,7 @@ bool isNonProjectFilename(QString filena
+@@ -262,6 +263,7 @@ bool useChromiumDevtools()
int main(int argc, char* argv[])
{
diff --git a/devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt
new file mode 100644
index 000000000000..87ce7d04e529
--- /dev/null
+++ b/devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- src/cpp/diagnostics/CMakeLists.txt.orig 2018-05-30 06:20:49 UTC
++++ src/cpp/diagnostics/CMakeLists.txt
+@@ -62,6 +62,7 @@ endif()
+ # set link dependencies
+ target_link_libraries(diagnostics
+ rstudio-core
++ procstat
+ )
+ if(NOT RSTUDIO_SESSION_WIN64)
+ install(TARGETS diagnostics DESTINATION ${RSTUDIO_INSTALL_BIN})
diff --git a/devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt
index add2101d27a8..8a5fd7719f69 100644
--- a/devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt
+++ b/devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt
@@ -1,4 +1,4 @@
---- src/cpp/session/CMakeLists.txt.orig 2017-11-16 21:40:37 UTC
+--- src/cpp/session/CMakeLists.txt.orig 2018-05-16 18:21:36 UTC
+++ src/cpp/session/CMakeLists.txt
@@ -25,9 +25,9 @@ endif()
if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-26")
@@ -13,8 +13,8 @@
# we often install embedded versions of these packages but don't do so currently
-@@ -39,19 +39,19 @@ endif()
- # endif()
+@@ -42,19 +42,19 @@ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DI
+ endif()
# verify libclang is installed
-if(WIN32)
@@ -46,26 +46,26 @@
# include files
-@@ -360,6 +360,9 @@ endif()
+@@ -362,6 +362,9 @@ endif()
# define executable
add_executable(rsession ${SESSION_SOURCE_FILES} ${SESSION_HEADER_FILES})
+# additional libraries
-+target_link_libraries(rsession -L${FREEBSD_LIBDIR} -linotify)
++target_link_libraries(rsession -L${FREEBSD_LIBDIR} -linotify -lprocstat)
+
# skip libR RPATH at development time
if(RSTUDIO_DEVELOPMENT OR RSTUDIO_RUN_IN_PLACE)
set_target_properties(rsession PROPERTIES SKIP_BUILD_RPATH TRUE)
-@@ -466,11 +469,11 @@ if (NOT RSTUDIO_SESSION_WIN64)
+@@ -474,11 +477,11 @@ if (NOT RSTUDIO_SESSION_WIN64)
DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
# install pandoc
-- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/1.19.2.1")
+- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/2.2.1")
- file(GLOB PANDOC_FILES "${PANDOC_BIN}/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 "${}/common/pandoc/1.19.2.1")
++ #set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/2.2.1")
+ #file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+ #install(FILES ${PANDOC_FILES}
+ # PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
@@ -73,7 +73,7 @@
# install rmarkdown package
# file(GLOB RMARKDOWN_PACKAGE "${RSTUDIO_DEPENDENCIES_DIR}/common/rmarkdown*.tar.gz")
-@@ -511,14 +514,14 @@ if (NOT RSTUDIO_SESSION_WIN64)
+@@ -524,14 +527,14 @@ if (NOT RSTUDIO_SESSION_WIN64)
install(PROGRAMS ${LIBCLANG_64_FILES}
DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86_64)
else()
diff --git a/devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt b/devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt
new file mode 100644
index 000000000000..4489c4023b74
--- /dev/null
+++ b/devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- src/cpp/session/postback/CMakeLists.txt.orig 2018-05-30 18:06:27 UTC
++++ src/cpp/session/postback/CMakeLists.txt
+@@ -43,6 +43,7 @@ endif()
+ # set link dependencies
+ target_link_libraries(rpostback
+ rstudio-core
++ procstat
+ )
+
+ # configure postback scripts for development mode