From 66de009e4e132b1f9e93aab31d11f4a712d0f806 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 30 May 2021 14:50:36 +0200 Subject: [PATCH] rstudio: update to 1.4.1106. --- ...ude-unistd.h-instead-of-sys-unistd.h.patch | 28 ++------ .../0004-unbundle-pandoc-mathjax.patch | 54 ++++++++++++++ .../0005-don-t-install-mathjax-pandoc.patch | 43 ++++++++++++ .../patches/0006-Fix-rstudio-exec-path.patch | 23 ++++++ .../patches/0006-use-system-node.patch | 36 ++++++++++ srcpkgs/rstudio/patches/boost173.patch | 70 ++++++++++++++++--- srcpkgs/rstudio/patches/boost176.patch | 20 ++++++ srcpkgs/rstudio/template | 42 +++++------ 8 files changed, 266 insertions(+), 50 deletions(-) create mode 100644 srcpkgs/rstudio/patches/0004-unbundle-pandoc-mathjax.patch create mode 100644 srcpkgs/rstudio/patches/0005-don-t-install-mathjax-pandoc.patch create mode 100644 srcpkgs/rstudio/patches/0006-Fix-rstudio-exec-path.patch create mode 100644 srcpkgs/rstudio/patches/0006-use-system-node.patch create mode 100644 srcpkgs/rstudio/patches/boost176.patch diff --git a/srcpkgs/rstudio/patches/0003-Include-unistd.h-instead-of-sys-unistd.h.patch b/srcpkgs/rstudio/patches/0003-Include-unistd.h-instead-of-sys-unistd.h.patch index 6873276983..4c73b0fb19 100644 --- a/srcpkgs/rstudio/patches/0003-Include-unistd.h-instead-of-sys-unistd.h.patch +++ b/srcpkgs/rstudio/patches/0003-Include-unistd.h-instead-of-sys-unistd.h.patch @@ -1,25 +1,11 @@ -From c51561dc858b1d2d47ea3a5b9039b69aa822a830 Mon Sep 17 00:00:00 2001 -From: John -Date: Fri, 29 Nov 2019 10:48:39 +0100 -Subject: [PATCH 3/3] Include instead of - ---- - 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 + #else #include -#include +#include - #include - #include --- -2.24.0 - + #include + #endif diff --git a/srcpkgs/rstudio/patches/0004-unbundle-pandoc-mathjax.patch b/srcpkgs/rstudio/patches/0004-unbundle-pandoc-mathjax.patch new file mode 100644 index 0000000000..466d06353e --- /dev/null +++ b/srcpkgs/rstudio/patches/0004-unbundle-pandoc-mathjax.patch @@ -0,0 +1,54 @@ +From 16da5903326d13ecc32794b4561967c15bbe8a50 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= +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 diff --git a/srcpkgs/rstudio/patches/0005-don-t-install-mathjax-pandoc.patch b/srcpkgs/rstudio/patches/0005-don-t-install-mathjax-pandoc.patch new file mode 100644 index 0000000000..9a08176db4 --- /dev/null +++ b/srcpkgs/rstudio/patches/0005-don-t-install-mathjax-pandoc.patch @@ -0,0 +1,43 @@ +From 4a54997e63577ce3161b8f86f729fe3951d730be Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= +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 diff --git a/srcpkgs/rstudio/patches/0006-Fix-rstudio-exec-path.patch b/srcpkgs/rstudio/patches/0006-Fix-rstudio-exec-path.patch new file mode 100644 index 0000000000..406c6d602f --- /dev/null +++ b/srcpkgs/rstudio/patches/0006-Fix-rstudio-exec-path.patch @@ -0,0 +1,23 @@ +From dec32816aee440573ade653d3b7de9bb606e1da6 Mon Sep 17 00:00:00 2001 +From: Marco Varlese +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 diff --git a/srcpkgs/rstudio/patches/0006-use-system-node.patch b/srcpkgs/rstudio/patches/0006-use-system-node.patch new file mode 100644 index 0000000000..00c2927320 --- /dev/null +++ b/srcpkgs/rstudio/patches/0006-use-system-node.patch @@ -0,0 +1,36 @@ +From 05f77b171f06b8a66619f4c00b12f521e87e5d1c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= +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 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- ++ + + + +-- +2.30.2 diff --git a/srcpkgs/rstudio/patches/boost173.patch b/srcpkgs/rstudio/patches/boost173.patch index cffe1cbaa1..ab3f301d80 100644 --- a/srcpkgs/rstudio/patches/boost173.patch +++ b/srcpkgs/rstudio/patches/boost173.patch @@ -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(wrapHandler, stdoutHandler, dupStdoutFd, _1); -+ outHandler = boost::bind(wrapHandler, stdoutHandler, dupStdoutFd, boost::placeholders::_1); + { + boost::shared_ptr pSkipStdoutWrite = boost::make_shared(false); +- outHandler = boost::bind(wrapHandler, stdoutHandler, dupStdoutFd, "Stdout", pSkipStdoutWrite, _1); ++ outHandler = boost::bind(wrapHandler, stdoutHandler, dupStdoutFd, "Stdout", pSkipStdoutWrite, boost::placeholders::_1); + } if (dupStderrFd != -1) -- errHandler = boost::bind(wrapHandler, stderrHandler, dupStderrFd, _1); -+ errHandler = boost::bind(wrapHandler, stderrHandler, dupStderrFd, boost::placeholders::_1); + { + boost::shared_ptr pSkipStderrWrite = boost::make_shared(false); +- errHandler = boost::bind(wrapHandler, stderrHandler, dupStderrFd, "Stderr", pSkipStderrWrite, _1); ++ errHandler = boost::bind(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) { diff --git a/srcpkgs/rstudio/patches/boost176.patch b/srcpkgs/rstudio/patches/boost176.patch new file mode 100644 index 0000000000..13d2384d64 --- /dev/null +++ b/srcpkgs/rstudio/patches/boost176.patch @@ -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 + ++#include + #include + #include + +--- 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 + #include + ++#include + #include + + // borrowed from SessionConstants.hpp diff --git a/srcpkgs/rstudio/template b/srcpkgs/rstudio/template index 904bec8ca9..dcd1f12553 100644 --- a/srcpkgs/rstudio/template +++ b/srcpkgs/rstudio/template @@ -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 " 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() {