mirror of
https://github.com/archlinux/aur.git
synced 2026-03-14 23:16:48 +01:00
fix for Boost 1.89
This commit is contained in:
parent
799ce8f97e
commit
149b746cb1
3 changed files with 319 additions and 8 deletions
6
.SRCINFO
6
.SRCINFO
|
|
@ -1,7 +1,7 @@
|
|||
pkgbase = rstudio-desktop
|
||||
pkgdesc = A powerful and productive integrated development environment (IDE) for R programming language
|
||||
pkgver = 2025.09.1.401
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://github.com/rstudio/rstudio
|
||||
arch = x86_64
|
||||
license = AGPL-3.0-only
|
||||
|
|
@ -49,11 +49,13 @@ pkgbase = rstudio-desktop
|
|||
options = !strip
|
||||
source = rstudio-2025.09.1.401-20de356.tar.gz::https://github.com/rstudio/rstudio/archive/20de356561bd58a6d88927cce948bd076d06e4ca.tar.gz
|
||||
source = quarto::git+https://github.com/quarto-dev/quarto.git#branch=release/rstudio-cranberry-hibiscus
|
||||
source = 0001-steady_timer.patch
|
||||
source = https://rstudio-buildtools.s3.us-east-1.amazonaws.com/gwt/gwt-2.12.2.tar.gz
|
||||
source = soci-4.0.3.tar.gz::https://github.com/SOCI/soci/archive/refs/tags/v4.0.3.tar.gz
|
||||
source = https://github.com/github/copilot-language-server-release/releases/download/1.378.0/copilot-language-server-linux-x64-1.378.0.zip
|
||||
source = https://github.com/github/copilot-language-server-release/releases/download/1.381.0/copilot-language-server-linux-x64-1.381.0.zip
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
sha256sums = d192d1f7344fcf73bf7ffc404f0a385a1d4fbfd962b701689cd84099d97ab90a
|
||||
sha256sums = 27284accdad05ff8919a7ac6dc5f939a511a90842a35f6393517506d74809e76
|
||||
sha256sums = 4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928
|
||||
sha256sums = SKIP
|
||||
|
|
|
|||
301
0001-steady_timer.patch
Normal file
301
0001-steady_timer.patch
Normal file
|
|
@ -0,0 +1,301 @@
|
|||
diff --git a/src/cpp/core/ExponentialBackoff.cpp b/src/cpp/core/ExponentialBackoff.cpp
|
||||
index 8a42983..a29c5c5 100644
|
||||
--- a/src/cpp/core/ExponentialBackoff.cpp
|
||||
+++ b/src/cpp/core/ExponentialBackoff.cpp
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include <core/ExponentialBackoff.hpp>
|
||||
|
||||
+#include <chrono>
|
||||
+
|
||||
namespace rstudio {
|
||||
namespace core {
|
||||
|
||||
@@ -101,8 +103,8 @@ bool ExponentialBackoff::next()
|
||||
maxNumRetries_ = totalNumTries_ + 2;
|
||||
}
|
||||
|
||||
- boost::shared_ptr<boost::asio::deadline_timer> timer =
|
||||
- boost::make_shared<boost::asio::deadline_timer>(ioContext_, timeout);
|
||||
+ auto chronoTimeout = std::chrono::milliseconds(timeout.total_milliseconds());
|
||||
+ auto timer = boost::make_shared<boost::asio::steady_timer>(ioContext_, chronoTimeout);
|
||||
|
||||
timer->async_wait([=](const boost::system::error_code& error) mutable
|
||||
{
|
||||
diff --git a/src/cpp/core/Timer.cpp b/src/cpp/core/Timer.cpp
|
||||
index fadd933..35a36cd 100644
|
||||
--- a/src/cpp/core/Timer.cpp
|
||||
+++ b/src/cpp/core/Timer.cpp
|
||||
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <core/Timer.hpp>
|
||||
+#include <chrono>
|
||||
|
||||
namespace rstudio {
|
||||
namespace core {
|
||||
@@ -25,7 +26,7 @@ Timer::Timer(boost::asio::io_context& ioContext) :
|
||||
|
||||
void Timer::setExpiration(const boost::posix_time::time_duration& timeDuration)
|
||||
{
|
||||
- timer_.expires_from_now(timeDuration);
|
||||
+ timer_.expires_after(std::chrono::milliseconds(timeDuration.total_milliseconds()));
|
||||
}
|
||||
|
||||
void Timer::cancel()
|
||||
diff --git a/src/cpp/core/file_lock/FileLock.cpp b/src/cpp/core/file_lock/FileLock.cpp
|
||||
index 8f00d28..5dfaf8b 100644
|
||||
--- a/src/cpp/core/file_lock/FileLock.cpp
|
||||
+++ b/src/cpp/core/file_lock/FileLock.cpp
|
||||
@@ -276,9 +276,10 @@ void FileLock::cleanUp()
|
||||
|
||||
namespace {
|
||||
|
||||
+
|
||||
void schedulePeriodicExecution(
|
||||
const boost::system::error_code& ec,
|
||||
- boost::asio::deadline_timer& timer,
|
||||
+ boost::asio::steady_timer& timer,
|
||||
boost::posix_time::seconds interval,
|
||||
boost::function<void()> callback)
|
||||
{
|
||||
@@ -296,14 +297,8 @@ void schedulePeriodicExecution(
|
||||
callback();
|
||||
|
||||
// reschedule
|
||||
- boost::system::error_code errc;
|
||||
- timer.expires_at(timer.expires_at() + interval, errc);
|
||||
- if (errc)
|
||||
- {
|
||||
- LOG_ERROR(Error(errc, ERROR_LOCATION));
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
+ auto chronoInterval = std::chrono::seconds(interval.total_seconds());
|
||||
+ timer.expires_after(chronoInterval);
|
||||
timer.async_wait(boost::bind(
|
||||
schedulePeriodicExecution,
|
||||
boost::asio::placeholders::error,
|
||||
@@ -330,7 +325,7 @@ void FileLock::refreshPeriodically(boost::asio::io_context& service,
|
||||
|
||||
verifyInitialized();
|
||||
|
||||
- static boost::asio::deadline_timer timer(service, interval);
|
||||
+ static boost::asio::steady_timer timer(service, std::chrono::seconds(interval.total_seconds()));
|
||||
timer.async_wait(boost::bind(
|
||||
schedulePeriodicExecution,
|
||||
boost::asio::placeholders::error,
|
||||
diff --git a/src/cpp/core/include/core/FileLock.hpp b/src/cpp/core/include/core/FileLock.hpp
|
||||
index 769fb31..1f59e2f 100644
|
||||
--- a/src/cpp/core/include/core/FileLock.hpp
|
||||
+++ b/src/cpp/core/include/core/FileLock.hpp
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
+#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
|
||||
#include <core/Log.hpp>
|
||||
#include <core/Settings.hpp>
|
||||
diff --git a/src/cpp/core/include/core/Timer.hpp b/src/cpp/core/include/core/Timer.hpp
|
||||
index b1ba941..1248949 100644
|
||||
--- a/src/cpp/core/include/core/Timer.hpp
|
||||
+++ b/src/cpp/core/include/core/Timer.hpp
|
||||
@@ -18,7 +18,9 @@
|
||||
|
||||
#include <functional>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
-#include <boost/asio/deadline_timer.hpp>
|
||||
+#include <boost/asio/steady_timer.hpp>
|
||||
+#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
+#include <chrono>
|
||||
|
||||
namespace rstudio {
|
||||
namespace core {
|
||||
@@ -46,7 +48,7 @@ public:
|
||||
virtual void wait(const std::function<void(const boost::system::error_code& ec)>& callback) override;
|
||||
|
||||
private:
|
||||
- boost::asio::deadline_timer timer_;
|
||||
+ boost::asio::steady_timer timer_;
|
||||
};
|
||||
|
||||
using TimerPtr = boost::shared_ptr<ITimer>;
|
||||
diff --git a/src/cpp/core/include/core/http/AsyncClient.hpp b/src/cpp/core/include/core/http/AsyncClient.hpp
|
||||
index 521134c..71065d2 100644
|
||||
--- a/src/cpp/core/include/core/http/AsyncClient.hpp
|
||||
+++ b/src/cpp/core/include/core/http/AsyncClient.hpp
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
#include <boost/asio/read.hpp>
|
||||
#include <boost/asio/read_until.hpp>
|
||||
-#include <boost/asio/deadline_timer.hpp>
|
||||
+#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
@@ -420,28 +420,16 @@ private:
|
||||
|
||||
bool scheduleRetry()
|
||||
{
|
||||
- // set expiration
|
||||
- boost::system::error_code ec;
|
||||
- connectionRetryContext_.retryTimer.expires_from_now(
|
||||
- connectionRetryContext_.profile.retryInterval,
|
||||
- ec);
|
||||
+ auto chronoInterval = std::chrono::milliseconds(
|
||||
+ connectionRetryContext_.profile.retryInterval.total_milliseconds());
|
||||
+ connectionRetryContext_.retryTimer.expires_after(chronoInterval);
|
||||
|
||||
- // attempt to schedule retry timer (should always succeed but
|
||||
- // include error check to be paranoid/robust)
|
||||
- if (!ec)
|
||||
- {
|
||||
- connectionRetryContext_.retryTimer.async_wait(boost::asio::bind_executor(*pStrand_, boost::bind(
|
||||
- &AsyncClient<SocketService>::handleConnectionRetryTimer,
|
||||
- AsyncClient<SocketService>::shared_from_this(),
|
||||
- boost::asio::placeholders::error)));
|
||||
+ connectionRetryContext_.retryTimer.async_wait(boost::asio::bind_executor(*pStrand_, boost::bind(
|
||||
+ &AsyncClient<SocketService>::handleConnectionRetryTimer,
|
||||
+ AsyncClient<SocketService>::shared_from_this(),
|
||||
+ boost::asio::placeholders::error)));
|
||||
|
||||
- return true;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- logError(Error(ec, ERROR_LOCATION));
|
||||
- return false;
|
||||
- }
|
||||
+ return true;
|
||||
}
|
||||
|
||||
void handleConnectionRetryTimer(const boost::system::error_code& ec)
|
||||
@@ -792,7 +780,7 @@ private:
|
||||
|
||||
http::ConnectionRetryProfile profile;
|
||||
boost::posix_time::ptime stopTryingTime;
|
||||
- boost::asio::deadline_timer retryTimer;
|
||||
+ boost::asio::steady_timer retryTimer;
|
||||
};
|
||||
|
||||
struct ChunkState
|
||||
diff --git a/src/cpp/core/include/core/http/AsyncServerImpl.hpp b/src/cpp/core/include/core/http/AsyncServerImpl.hpp
|
||||
index 1027ec4..7228fb4 100644
|
||||
--- a/src/cpp/core/include/core/http/AsyncServerImpl.hpp
|
||||
+++ b/src/cpp/core/include/core/http/AsyncServerImpl.hpp
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/placeholders.hpp>
|
||||
-#include <boost/asio/deadline_timer.hpp>
|
||||
+#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <core/BoostThread.hpp>
|
||||
#include <shared_core/Error.hpp>
|
||||
@@ -975,7 +975,7 @@ private:
|
||||
AsyncUriHandlerFunction defaultHandler_;
|
||||
std::vector<boost::shared_ptr<boost::thread> > threads_;
|
||||
boost::posix_time::time_duration scheduledCommandInterval_;
|
||||
- boost::asio::deadline_timer scheduledCommandTimer_;
|
||||
+ boost::asio::steady_timer scheduledCommandTimer_;
|
||||
|
||||
boost::mutex scheduledCommandMutex_;
|
||||
std::vector<boost::shared_ptr<ScheduledCommand> > scheduledCommands_;
|
||||
diff --git a/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp b/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp
|
||||
index 63472e4..8c9d752 100644
|
||||
--- a/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp
|
||||
+++ b/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp
|
||||
@@ -20,13 +20,15 @@
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
||||
-#include <boost/asio/deadline_timer.hpp>
|
||||
+#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/placeholders.hpp>
|
||||
|
||||
#include <core/http/TcpIpSocketUtils.hpp>
|
||||
#include <core/Thread.hpp>
|
||||
|
||||
+#include <chrono>
|
||||
+
|
||||
// special version of unexpected exception handler which makes
|
||||
// sure to call the user's ErrorHandler
|
||||
#define CATCH_UNEXPECTED_ASYNC_CONNECTOR_EXCEPTION \
|
||||
@@ -82,7 +84,8 @@ public:
|
||||
{
|
||||
// start a timer that will cancel any outstanding asynchronous operations
|
||||
// when it elapses if the connection operation has not succeeded
|
||||
- pConnectionTimer_.reset(new boost::asio::deadline_timer(service_, timeout));
|
||||
+ auto chronoTimeout = std::chrono::milliseconds(timeout.total_milliseconds());
|
||||
+ pConnectionTimer_.reset(new boost::asio::steady_timer(service_, chronoTimeout));
|
||||
pConnectionTimer_->async_wait(boost::bind(&TcpIpAsyncConnector::onConnectionTimeout,
|
||||
TcpIpAsyncConnector::shared_from_this(),
|
||||
boost::asio::placeholders::error));
|
||||
@@ -267,7 +270,7 @@ private:
|
||||
bool isConnected_;
|
||||
bool hasFailed_;
|
||||
boost::mutex mutex_;
|
||||
- boost::shared_ptr<boost::asio::deadline_timer> pConnectionTimer_;
|
||||
+ boost::shared_ptr<boost::asio::steady_timer> pConnectionTimer_;
|
||||
};
|
||||
|
||||
} // namespace http
|
||||
diff --git a/src/cpp/core/system/PosixChildProcess.cpp b/src/cpp/core/system/PosixChildProcess.cpp
|
||||
index 4e28dd7..44dc2eb 100644
|
||||
--- a/src/cpp/core/system/PosixChildProcess.cpp
|
||||
+++ b/src/cpp/core/system/PosixChildProcess.cpp
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
+#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
+#include <chrono>
|
||||
|
||||
#include <shared_core/Error.hpp>
|
||||
|
||||
@@ -1560,7 +1562,7 @@ struct AsioAsyncChildProcess::Impl : public boost::enable_shared_from_this<AsioA
|
||||
// check again in 20 milliseconds - this is a short amount of time, but long enough
|
||||
// to play nice with the rest of the system. in terms of process cleanup time,
|
||||
// in most cases this should be a significant amount of time
|
||||
- exitTimer_.reset(new deadline_timer(ioContext_, milliseconds(20)));
|
||||
+ exitTimer_.reset(new boost::asio::steady_timer(ioContext_, std::chrono::milliseconds(20)));
|
||||
exitTimer_->async_wait(boost::bind(&Impl::checkExitedTimer,
|
||||
boost::weak_ptr<Impl>(shared_from_this()),
|
||||
boost::asio::placeholders::error,
|
||||
@@ -1662,7 +1664,7 @@ struct AsioAsyncChildProcess::Impl : public boost::enable_shared_from_this<AsioA
|
||||
std::atomic<bool> stderrFailure_;
|
||||
int exitCode_;
|
||||
|
||||
- boost::shared_ptr<boost::asio::deadline_timer> exitTimer_;
|
||||
+ boost::shared_ptr<boost::asio::steady_timer> exitTimer_;
|
||||
|
||||
ProcessCallbacks callbacks_;
|
||||
|
||||
diff --git a/src/cpp/session/SessionConsoleProcessSocketTests.cpp b/src/cpp/session/SessionConsoleProcessSocketTests.cpp
|
||||
index 146c5d4..6df0a33 100644
|
||||
--- a/src/cpp/session/SessionConsoleProcessSocketTests.cpp
|
||||
+++ b/src/cpp/session/SessionConsoleProcessSocketTests.cpp
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include <tests/TestThat.hpp>
|
||||
|
||||
+#include <chrono>
|
||||
+
|
||||
namespace rstudio {
|
||||
namespace session {
|
||||
namespace console_process {
|
||||
@@ -38,9 +40,9 @@ namespace {
|
||||
|
||||
void blockingwait(int ms)
|
||||
{
|
||||
- boost::asio::io_context io;
|
||||
- boost::asio::deadline_timer timer(io, boost::posix_time::milliseconds(ms));
|
||||
- timer.wait();
|
||||
+ boost::asio::io_context io;
|
||||
+ boost::asio::steady_timer timer(io, std::chrono::milliseconds(ms));
|
||||
+ timer.wait();
|
||||
}
|
||||
|
||||
// Wrapper for ConsoleProcessSocket, the class we're testing. Primarily
|
||||
20
PKGBUILD
20
PKGBUILD
|
|
@ -16,14 +16,14 @@
|
|||
: ${_quarto:=false}
|
||||
|
||||
# dependencies/common/install-copilot-language-server
|
||||
: ${_copilot_version:=1.378.0}
|
||||
: ${_copilot_version:=1.381.0}
|
||||
|
||||
: ${_commit:=20de356561bd58a6d88927cce948bd076d06e4ca}
|
||||
|
||||
_pkgname="rstudio-desktop"
|
||||
pkgname="$_pkgname"
|
||||
pkgver=2025.09.1.401
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A powerful and productive integrated development environment (IDE) for R programming language"
|
||||
url="https://github.com/rstudio/rstudio"
|
||||
license=('AGPL-3.0-only')
|
||||
|
|
@ -87,10 +87,12 @@ _source_main() {
|
|||
source=(
|
||||
"rstudio-$pkgver-${_commit::7}.$_pkgext"::"https://github.com/rstudio/rstudio/archive/$_commit.$_pkgext"
|
||||
"quarto"::"git+https://github.com/quarto-dev/quarto.git#branch=${_quarto_branch}"
|
||||
'0001-steady_timer.patch'
|
||||
)
|
||||
sha256sums=(
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'd192d1f7344fcf73bf7ffc404f0a385a1d4fbfd962b701689cd84099d97ab90a'
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -163,17 +165,23 @@ prepare() (
|
|||
|
||||
cd "$_pkgsrc"
|
||||
# Do not use outdated version name of pandoc
|
||||
sed -E -e '/PANDOC_VERSION/s/"[0-9\.]+"/"'${_pandocver}'"/' -i "cmake/globals.cmake"
|
||||
sed -E -e '/PANDOC_VERSION/s/"[0-9\.]+"/"'${_pandocver}'"/' -i cmake/globals.cmake
|
||||
|
||||
# Suppress _FORTIFY_SOURCE mismatch warnings
|
||||
sed -i 's/D_FORTIFY_SOURCE=2/D_FORTIFY_SOURCE=3/' "src/cpp/CMakeLists.txt"
|
||||
sed -e 's/D_FORTIFY_SOURCE=2/D_FORTIFY_SOURCE=3/' -i src/cpp/CMakeLists.txt
|
||||
|
||||
# fix for Boost 1.89
|
||||
sed -e 's/^\s*system$//' -i src/cpp/CMakeLists.txt
|
||||
|
||||
patch -Np1 -F100 -i ../0001-steady_timer.patch
|
||||
|
||||
# fix npm/node paths
|
||||
sed -E -e 's&set\(RSTUDIO_NODE_PATH .*\)&set(RSTUDIO_NODE_PATH "/usr/bin")&' \
|
||||
-i cmake/globals.cmake
|
||||
|
||||
install -dm755 "$srcdir/$_pkgsrc/dependencies/common/node"
|
||||
ln -sfT "$NVM_DIR/versions/node/v$RSTUDIO_NODE_VERSION" "$srcdir/$_pkgsrc/dependencies/common/node/${RSTUDIO_NODE_VERSION}-patched"
|
||||
install -dm755 dependencies/common/node
|
||||
ln -sfT "$NVM_DIR/versions/node/v$RSTUDIO_NODE_VERSION" \
|
||||
dependencies/common/node/"${RSTUDIO_NODE_VERSION}-patched"
|
||||
|
||||
sed -E -e 's&^external-node-path=.*$&external-node-path=/usr/bin/node&' \
|
||||
-i src/cpp/conf/rsession-dev.conf
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue