File fix-boost-1.66-build.patch of Package rstudio

--- rstudio-2024.04.0-735.orig/src/cpp/shared_core/FilePath.cpp
+++ rstudio-2024.04.0-735/src/cpp//shared_core/FilePath.cpp
@@ -50,6 +50,8 @@
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/algorithm/string/predicate.hpp>
 
+#include <boost/version.hpp>
+
 #include <shared_core/Logger.hpp>
 #include <shared_core/Error.hpp>
 #include <shared_core/SafeConvert.hpp>
@@ -806,11 +808,19 @@
 {
    try
    {
+#if BOOST_VERSION >= 107500
       using boost::filesystem::copy_options;
       boost::filesystem::copy_file(
                m_impl->Path,
                in_targetPath.m_impl->Path,
                overwrite ? copy_options::overwrite_existing : copy_options::none);
+#else
+      using boost::filesystem::copy_option;
+      boost::filesystem::copy_file(
+               m_impl->Path,
+               in_targetPath.m_impl->Path,
+               overwrite ? copy_option::overwrite_if_exists : copy_option::fail_if_exists);
+#endif
       return Success();
    }
    catch(const boost::filesystem::filesystem_error& e)
--- rstudio-2024.04.0-735.orig/src/cpp/session/modules/environment/SessionEnvironment.cpp
+++ rstudio-2024.04.0-735/src/cpp/session/modules/environment/SessionEnvironment.cpp
@@ -229,7 +229,7 @@
          if (!r::internal::isImmediateBinding(frameSEXP))
          {
             SEXP valueSEXP = CAR(frameSEXP);
-            bool canBeSerialized = s_serializationCache.contains(valueSEXP)
+            bool canBeSerialized = s_serializationCache.find(valueSEXP) != s_serializationCache.end()
                   ? s_serializationCache.at(valueSEXP)
                   : isSerializable(valueSEXP);
             newCache[valueSEXP] = canBeSerialized;
openSUSE Build Service is sponsored by