rstudio: update to 1.4.1106.

This commit is contained in:
John 2021-05-30 14:50:36 +02:00
parent efb94e5e00
commit 66de009e4e
8 changed files with 266 additions and 50 deletions

View file

@ -1,25 +1,11 @@
From c51561dc858b1d2d47ea3a5b9039b69aa822a830 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 29 Nov 2019 10:48:39 +0100
Subject: [PATCH 3/3] Include <unistd.h> instead of <sys/unistd.h>
---
src/cpp/core/include/core/system/FileMode.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/cpp/core/include/core/system/FileMode.hpp src/cpp/core/include/core/system/FileMode.hpp
index 8677a4d209..2f12064b66 100644
--- src/cpp/core/include/core/system/FileMode.hpp
+++ src/cpp/core/include/core/system/FileMode.hpp
@@ -22,7 +22,7 @@
#endif
--- src/cpp/shared_core/FilePath.cpp 2021-02-11 00:26:02.000000000 +0100
+++ - 2021-05-30 14:54:08.125365587 +0200
@@ -36,7 +36,7 @@
#include <shared_core/system/Win32StringUtils.hpp>
#else
#include <sys/stat.h>
-#include <sys/unistd.h>
+#include <unistd.h>
#include <shared_core/Error.hpp>
#include <shared_core/FilePath.hpp>
--
2.24.0
#include <shared_core/system/PosixSystem.hpp>
#endif

View file

@ -0,0 +1,54 @@
From 16da5903326d13ecc32794b4561967c15bbe8a50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Mon, 13 Jan 2020 11:27:06 +0100
Subject: [PATCH 1/8] Unbundle mathjax and pandoc
Use find_file() & find_program() functions to find the dependencies in the
dependencies/ subdirectory first. If they are not there, use the system paths
instead.
---
src/cpp/session/CMakeLists.txt | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/cpp/session/CMakeLists.txt b/src/cpp/session/CMakeLists.txt
index cb45b35ecc..d0b41b13d2 100644
--- src/cpp/session/CMakeLists.txt
+++ src/cpp/session/CMakeLists.txt
@@ -22,13 +22,13 @@ add_subdirectory(workers)
if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/dictionaries")
message(FATAL_ERROR "Dictionaries not found (re-run install-dependencies script to install)")
endif()
-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27")
+
+find_file(MATHJAX_JS_LOCATION
+ NAMES MathJax.js
+ PATHS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27" /usr/share/mathjax/)
+if("${MATHJAX_JS_LOCATION}" STREQUAL "MATHJAX_JS_LOCATION-NOTFOUND")
message(FATAL_ERROR "Mathjax 2.7 not found (re-run install-dependencies script to install)")
endif()
-set(PANDOC_VERSION "2.11.4" CACHE INTERNAL "Pandoc version")
-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
- message(FATAL_ERROR "pandoc ${PANDOC_VERSION} not found (re-run install-dependencies script to install)")
-endif()
# verify embedded packages are available
foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES})
@@ -535,7 +535,7 @@ if (NOT RSTUDIO_SESSION_WIN32)
DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
# install mathjax for local html preview
- install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27"
+ install(DIRECTORY "${MATHJAX_PATH}"
DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
# icons for database connections
@@ -553,6 +553,7 @@ if (NOT RSTUDIO_SESSION_WIN32)
# install pandoc
set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+ set(PANDOC_FILES ${PANDOC_CITEPROC_BIN_LOCATION} ${PANDOC_BIN_LOCATION})
install(FILES ${PANDOC_FILES}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
--
2.30.2

View file

@ -0,0 +1,43 @@
From 4a54997e63577ce3161b8f86f729fe3951d730be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Tue, 14 Jan 2020 14:20:40 +0100
Subject: [PATCH 2/8] Don't install pandoc and mathjax
Because we use the system wide version, there's no need to waste time installing
the files.
---
src/cpp/session/CMakeLists.txt | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/src/cpp/session/CMakeLists.txt b/src/cpp/session/CMakeLists.txt
index d0b41b13d2..69d6cb2b2b 100644
--- src/cpp/session/CMakeLists.txt
+++ src/cpp/session/CMakeLists.txt
@@ -534,10 +534,6 @@ if (NOT RSTUDIO_SESSION_WIN32)
install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/dictionaries"
DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
- # install mathjax for local html preview
- install(DIRECTORY "${MATHJAX_PATH}"
- DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
-
# icons for database connections
install(DIRECTORY "resources/connections"
DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
@@ -550,14 +546,6 @@ if (NOT RSTUDIO_SESSION_WIN32)
install(DIRECTORY "resources/dependencies"
DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
- # install pandoc
- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
- set(PANDOC_FILES ${PANDOC_CITEPROC_BIN_LOCATION} ${PANDOC_BIN_LOCATION})
- install(FILES ${PANDOC_FILES}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
-
# install embedded packages
foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES})
file(GLOB PKG_FILES "${RSTUDIO_DEPENDENCIES_DIR}/common/${PKG}*.tar.gz")
--
2.30.2

View file

@ -0,0 +1,23 @@
From dec32816aee440573ade653d3b7de9bb606e1da6 Mon Sep 17 00:00:00 2001
From: Marco Varlese <marco.varlese@suse.com>
Date: Mon, 27 Jan 2020 14:29:40 +0100
Subject: [PATCH 3/8] Fix rstudio exec path
Fix the path to the rstudio executable in the rstudio.desktop file.
---
src/cpp/desktop/resources/freedesktop/rstudio.desktop.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpp/desktop/resources/freedesktop/rstudio.desktop.in b/src/cpp/desktop/resources/freedesktop/rstudio.desktop.in
index ddd96ad34b..99b207ba7c 100644
--- src/cpp/desktop/resources/freedesktop/rstudio.desktop.in
+++ src/cpp/desktop/resources/freedesktop/rstudio.desktop.in
@@ -1,5 +1,5 @@
[Desktop Entry]
-Exec=${CMAKE_INSTALL_PREFIX}/${RSTUDIO_INSTALL_BIN}/rstudio %F
+Exec=rstudio %F
Icon=rstudio
Type=Application
Terminal=false
--
2.30.2

View file

@ -0,0 +1,36 @@
From 05f77b171f06b8a66619f4c00b12f521e87e5d1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= <iucar@fedoraproject.org>
Date: Sat, 16 Jan 2021 19:11:23 +0100
Subject: [PATCH 7/8] use system node
---
src/gwt/build.xml | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/src/gwt/build.xml b/src/gwt/build.xml
index 899ae7fecd..ac90566667 100644
--- src/gwt/build.xml
+++ src/gwt/build.xml
@@ -82,19 +82,7 @@
</target>
<!-- panmirror typescript library -->
- <property name="node.version" value="10.19.0"/>
- <property name="node.dir" value="../../dependencies/common/node/${node.version}"/>
- <condition property="node.bin" value="../../../${node.dir}/bin/node">
- <not>
- <os family="windows" />
- </not>
- </condition>
- <condition property="node.bin" value="${node.dir}/node.exe">
- <os family="windows" />
- </condition>
-
- <!-- use node from /opt/rstudio-tools if installed (typical for Docker) -->
- <available property="node.bin" value="/opt/rstudio-tools/dependencies/common/node/${node.version}/bin/node" file="/opt/rstudio-tools/dependencies/common/node/${node.version}/bin/node"/>
+ <property name="node.bin" value="/usr/bin/node"/>
<property name="panmirror.dir" value="./panmirror/src/editor"/>
<property name="panmirror.build.dir" value="./www/js/panmirror"/>
--
2.30.2

View file

@ -9,18 +9,70 @@
}
void ChildProcessTracker::attemptToReapProcess(
--- src/cpp/core/system/PosixOutputCapture.cpp 2020-04-01 18:16:24.000000000 +0200
+++ - 2020-05-01 18:30:02.132088380 +0200
@@ -80,10 +80,10 @@
};
--- src/cpp/core/system/PosixOutputCapture.cpp 2021-02-11 00:26:02.000000000 +0100
+++ - 2021-05-30 14:55:58.926536572 +0200
@@ -104,13 +104,13 @@
if (dupStdoutFd != -1)
- outHandler = boost::bind<void>(wrapHandler, stdoutHandler, dupStdoutFd, _1);
+ outHandler = boost::bind<void>(wrapHandler, stdoutHandler, dupStdoutFd, boost::placeholders::_1);
{
boost::shared_ptr<bool> pSkipStdoutWrite = boost::make_shared<bool>(false);
- outHandler = boost::bind<void>(wrapHandler, stdoutHandler, dupStdoutFd, "Stdout", pSkipStdoutWrite, _1);
+ outHandler = boost::bind<void>(wrapHandler, stdoutHandler, dupStdoutFd, "Stdout", pSkipStdoutWrite, boost::placeholders::_1);
}
if (dupStderrFd != -1)
- errHandler = boost::bind<void>(wrapHandler, stderrHandler, dupStderrFd, _1);
+ errHandler = boost::bind<void>(wrapHandler, stderrHandler, dupStderrFd, boost::placeholders::_1);
{
boost::shared_ptr<bool> pSkipStderrWrite = boost::make_shared<bool>(false);
- errHandler = boost::bind<void>(wrapHandler, stderrHandler, dupStderrFd, "Stderr", pSkipStderrWrite, _1);
+ errHandler = boost::bind<void>(wrapHandler, stderrHandler, dupStderrFd, "Stderr", pSkipStderrWrite, boost::placeholders::_1);
}
try
--- src/cpp/core/HtmlUtils.cpp 2021-05-30 15:23:37.948407527 +0200
+++ - 2021-05-30 15:28:55.005591660 +0200
@@ -56,7 +56,7 @@
: boost::iostreams::regex_filter(
boost::regex(
R"((<\s*[Ii][Mm][Gg] [^\>]*[Ss][Rr][Cc]\s*=\s*)(["'])(.*?)(\2))"),
- boost::bind(&Base64ImageFilter::toBase64Image, this, _1)),
+ boost::bind(&Base64ImageFilter::toBase64Image, this, boost::placeholders::_1)),
basePath_(basePath)
{
}
@@ -98,7 +98,7 @@
CssUrlFilter::CssUrlFilter(const FilePath& basePath)
: boost::iostreams::regex_filter(
boost::regex("url\\('([^'']+)'\\)"),
- boost::bind(&CssUrlFilter::toBase64Url, this, _1)),
+ boost::bind(&CssUrlFilter::toBase64Url, this, boost::placeholders::_1)),
basePath_(basePath)
{
}
--- src/cpp/r/session/RStdCallbacks.cpp 2021-02-11 00:26:02.000000000 +0100
+++ - 2021-05-30 15:38:43.302067745 +0200
@@ -577,7 +577,7 @@
try
{
doHistoryFileOperation(args, boost::bind(&ConsoleHistory::loadFromFile,
- &consoleHistory(), _1, true));
+ &consoleHistory(), boost::placeholders::_1, true));
s_callbacks.consoleHistoryReset();
}
@@ -592,7 +592,7 @@
try
{
doHistoryFileOperation(args, boost::bind(&ConsoleHistory::saveToFile,
- &consoleHistory(), _1));
+ &consoleHistory(), boost::placeholders::_1));
}
catch(r::exec::RErrorException& e)
{
@@ -614,7 +614,7 @@
ConsoleHistory& history = consoleHistory();
std::for_each(commands.begin(),
commands.end(),
- boost::bind(&ConsoleHistory::add, &history, _1));
+ boost::bind(&ConsoleHistory::add, &history, boost::placeholders::_1));
}
catch(r::exec::RErrorException& e)
{

View file

@ -0,0 +1,20 @@
--- src/cpp/core/HtmlUtils.cpp 2021-02-11 00:26:02.000000000 +0100
+++ - 2021-05-30 15:22:51.562342921 +0200
@@ -17,6 +17,7 @@
#include <core/system/System.hpp>
+#include <boost/bind/bind.hpp>
#include <boost/format.hpp>
#include <boost/algorithm/string/predicate.hpp>
--- src/cpp/core/file_lock/FileLock.cpp 2021-02-11 00:26:02.000000000 +0100
+++ - 2021-05-30 15:31:26.292309685 +0200
@@ -26,6 +26,7 @@
#include <core/system/Environment.hpp>
#include <core/system/Xdg.hpp>
+#include <boost/bind/bind.hpp>
#include <boost/algorithm/string.hpp>
// borrowed from SessionConstants.hpp

View file

@ -1,50 +1,52 @@
# Template file for 'rstudio'
pkgname=rstudio
version=1.3.1093
revision=2
version=1.4.1106
revision=1
build_style=cmake
configure_args="-DRSTUDIO_TARGET=Desktop
-DRSTUDIO_USE_SYSTEM_BOOST=ON
-DRSTUDIO_USE_SYSTEM_SOCI=TRUE
-DRSTUDIO_BOOST_SIGNALS_VERSION=2
-DQT_QMAKE_EXECUTABLE=/usr/lib/qt5/bin/qmake
-DCMAKE_INSTALL_PREFIX=/usr/lib/rstudio"
hostmakedepends="unzip pandoc openjdk apache-ant qt5-qmake R mathjax which"
makedepends="zlib-devel libuuid-devel openssl-devel pam-devel
hostmakedepends="unzip pandoc openjdk apache-ant R qt5-qmake
qt5-host-tools which nodejs-lts-10"
makedepends="zlib-devel libuuid-devel openssl-devel pam-devel R mathjax
boost-devel pango-devel hunspell-devel qt5-devel qt5-webkit-devel
qt5-declarative-devel qt5-location-devel qt5-sensors-devel qt5-svg-devel
qt5-xmlpatterns-devel qt5-webchannel-devel qt5-webengine-devel
qt5-plugin-pgsql qt5-plugin-mysql qt5-plugin-sqlite qt5-plugin-tds qt5-plugin-odbc"
depends="R"
qt5-xmlpatterns-devel qt5-webchannel-devel qt5-webengine-devel sqlite-devel
qt5-plugin-pgsql qt5-plugin-mysql qt5-plugin-sqlite qt5-plugin-tds qt5-plugin-odbc
soci-devel"
depends="R mathjax"
short_desc="Integrated development environment (IDE) for R"
maintainer="John <me@johnnynator.dev>"
license="AGPL-3.0-only"
homepage="https://www.rstudio.com"
_aws="https://s3.amazonaws.com"
_gwt_version=2.8.1
distfiles="https://github.com/rstudio/rstudio/archive/v${version}.tar.gz
${_aws}/rstudio-dictionaries/core-dictionaries.zip
${_aws}/rstudio-buildtools/gwt-${_gwt_version}.zip"
checksum="af8dc5e71ee934043856938af2e2065d1f1efef08aba37962ed03f6ccb8201bb
https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip"
checksum="ac84f77529501ea13f0708f0e8726b0bdfb592cd9217e869a0099031f9a888b8
4341a9630efb9dcf7f215c324136407f3b3d6003e1c96f2e5e1f9f14d5787494
0b7af89fdadb4ec51cdb400ace94637d6fe9ffa401b168e2c3d372392a00a0a7"
skip_extraction="core-dictionaries.zip
gwt-${_gwt_version}.zip"
skip_extraction="core-dictionaries.zip"
LDFLAGS="-Wl,-z,stack-size=2097152"
post_extract() {
_srcdir="${XBPS_SRCDISTDIR}/${pkgname}-${version}"
mkdir -p src/gwt/lib/gwt
unzip -qd src/gwt/lib ${_srcdir}/gwt-${_gwt_version}.zip
mv src/gwt/lib/gwt-${_gwt_version} src/gwt/lib/gwt/${_gwt_version}
unzip -qd ${wrksrc}/dependencies/common/dictionaries ${_srcdir}/core-dictionaries.zip
}
pre_configure() {
ln -sfT /usr/share/mathjax dependencies/common/mathjax-27
ln -sfT /usr/bin dependencies/common/pandoc
_node_ver="10.19.0"
_pandoc_ver="2.11.4"
ln -s /usr/share/mathjax dependencies/common/mathjax-27
mkdir -p dependencies/common/pandoc/$_pandoc_ver/bin
ln -s /usr/bin/pandoc dependencies/common/pandoc/$_pandoc_ver/bin
mkdir -p dependencies/common/node/$_node_ver/bin
ln -s /usr/bin/node dependencies/common/node/$_node_ver/bin/node
cd src/gwt
ant draft
}
post_install() {