superslicer-2.5.59.10-boost-1.85.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. https://bugs.gentoo.org/936144
  2. https://github.com/supermerill/SuperSlicer/commit/75d4bee84740a8dcc9e4e2113795fd67107d03d1
  3. From 75d4bee84740a8dcc9e4e2113795fd67107d03d1 Mon Sep 17 00:00:00 2001
  4. From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= <hejl.lukas@gmail.com>
  5. Date: Wed, 3 Jan 2024 23:55:02 +0100
  6. Subject: [PATCH] Replace some deprecated boost functions.
  7. Actually, all those deprecated functions were internally called those new functions. So there isn't any risk to use them directly.
  8. ---
  9. src/libslic3r/PrintBase.cpp | 2 +-
  10. src/libslic3r/utils.cpp | 2 +-
  11. src/slic3r/GUI/RemovableDriveManager.cpp | 2 +-
  12. 3 files changed, 3 insertions(+), 3 deletions(-)
  13. diff --git a/src/libslic3r/PrintBase.cpp b/src/libslic3r/PrintBase.cpp
  14. index 29bdc1301d0..60e40644cb8 100644
  15. --- a/src/libslic3r/PrintBase.cpp
  16. +++ b/src/libslic3r/PrintBase.cpp
  17. @@ -123,7 +123,7 @@ std::string PrintBase::output_filename(const std::string &format, const std::str
  18. filepath = filename + extension;
  19. }
  20. if (filepath.extension().empty())
  21. - filepath = boost::filesystem::change_extension(filepath, default_ext);
  22. + filepath.replace_extension(default_ext);
  23. return filepath.string();
  24. } catch (std::runtime_error &err) {
  25. throw Slic3r::PlaceholderParserError(L("Failed processing of the output_filename_format template.") + "\n" + err.what());
  26. diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp
  27. index 71089ceea64..6eac962b20e 100644
  28. --- a/src/libslic3r/utils.cpp
  29. +++ b/src/libslic3r/utils.cpp
  30. @@ -836,7 +836,7 @@ CopyFileResult copy_file_inner(const boost::filesystem::path& source, const boos
  31. // That may happen when copying on some exotic file system, for example Linux on Chrome.
  32. copy_file_linux(source, target, ec);
  33. #else // __linux__
  34. - boost::filesystem::copy_file(source, target, boost::filesystem::copy_option::overwrite_if_exists, ec);
  35. + boost::filesystem::copy_file(source, target, boost::filesystem::copy_options::overwrite_existing, ec);
  36. #endif // __linux__
  37. if (ec) {
  38. error_message = ec.message();
  39. diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp
  40. index 5fb8b013210..2f8ac96a1a2 100644
  41. --- a/src/slic3r/GUI/RemovableDriveManager.cpp
  42. +++ b/src/slic3r/GUI/RemovableDriveManager.cpp
  43. @@ -202,7 +202,7 @@ namespace search_for_drives_internal
  44. stat(path.c_str(), &buf);
  45. uid_t uid = buf.st_uid;
  46. if (getuid() == uid)
  47. - out.emplace_back(DriveData{ boost::filesystem::basename(boost::filesystem::path(path)), path });
  48. + out.emplace_back(DriveData{ boost::filesystem::path(path).stem().string(), path });
  49. }
  50. }
  51. }