summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Rounce <me@samuelrounce.co.uk>2024-12-28 11:01:56 +0000
committerCabia Rangris <me+gh@cab.moe>2024-12-29 20:54:33 +0400
commit8530b99e3c05e6c65e15d197168ef289e9f7bde7 (patch)
tree291037f91a6f8dff95e8135e7eaa3d8dc8b107f5
parenthackgen-font: 2.9.1 -> 2.10.0 (#369088) (diff)
downloadnixpkgs-8530b99e3c05e6c65e15d197168ef289e9f7bde7.tar.gz
super-slicer: 2.3.57.12 -> 2.5.59.13, super-slicer-latest: 2.4.58.5 -> 2.5.59.13, super-slicer-beta: 2.5.59.6 -> 2.5.60.0
* Update all super-slicer packages to latest stable verison or pre-release where applicable * Add patches for boost 1.86 support * Remove patches for boost 1.79
-rw-r--r--pkgs/applications/misc/prusa-slicer/super-slicer-use-boost186.patch60
-rw-r--r--pkgs/applications/misc/prusa-slicer/super-slicer.nix26
2 files changed, 68 insertions, 18 deletions
diff --git a/pkgs/applications/misc/prusa-slicer/super-slicer-use-boost186.patch b/pkgs/applications/misc/prusa-slicer/super-slicer-use-boost186.patch
new file mode 100644
index 000000000000..9a8c84e141cf
--- /dev/null
+++ b/pkgs/applications/misc/prusa-slicer/super-slicer-use-boost186.patch
@@ -0,0 +1,60 @@
+diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp
+index 7c8029cdeb..4791f0612f 100644
+--- a/src/hints/HintsToPot.cpp
++++ b/src/hints/HintsToPot.cpp
+@@ -9,7 +9,7 @@
+
+ bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data)
+ {
+- boost::filesystem::ofstream file(std::move(path), std::ios_base::app);
++ boost::nowide::ofstream file(path.string(), std::ios_base::app);
+ for (const auto& element : data)
+ {
+ //Example of .pot element
+diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp
+index 2f8ac96a1a..f0f95c9459 100644
+--- a/src/slic3r/GUI/RemovableDriveManager.cpp
++++ b/src/slic3r/GUI/RemovableDriveManager.cpp
+@@ -22,7 +22,8 @@
+ #include <pwd.h>
+ #include <boost/filesystem.hpp>
+ #include <boost/system/error_code.hpp>
+-#include <boost/filesystem/convenience.hpp>
++#include <boost/filesystem/path.hpp>
++#include <boost/filesystem/operations.hpp>
+ #include <boost/process.hpp>
+ #endif
+
+diff --git a/src/slic3r/GUI/ScriptExecutor.cpp b/src/slic3r/GUI/ScriptExecutor.cpp
+index 3e10680e46..374915ee34 100644
+--- a/src/slic3r/GUI/ScriptExecutor.cpp
++++ b/src/slic3r/GUI/ScriptExecutor.cpp
+@@ -825,6 +825,19 @@ void as_back_custom_initial_value(int preset_type, std::string& key) {
+ set_custom_option(preset_type, serialized_vars);
+ }
+
++inline void load_string_file(boost::filesystem::path const& p, std::string& str)
++{
++ boost::filesystem::ifstream file;
++ file.exceptions(std::ios_base::failbit | std::ios_base::badbit);
++ file.open(p, std::ios_base::binary);
++ const boost::uintmax_t sz = boost::filesystem::file_size(p);
++ if (BOOST_UNLIKELY(sz > static_cast< boost::uintmax_t >((std::numeric_limits< std::streamsize >::max)())))
++ BOOST_FILESYSTEM_THROW(std::length_error("File size exceeds max read size"));
++ str.resize(static_cast< std::size_t >(sz), '\0');
++ if (sz > 0u)
++ file.read(&str[0], static_cast< std::streamsize >(sz));
++}
++
+ /////// main script fucntions //////
+
+ //TODO: add "unset" function, that revert to last value (befoer a scripted set) if a set has been made since last not-scripted change.
+@@ -960,7 +973,7 @@ void ScriptContainer::init(const std::string& tab_key, Tab* tab)
+ //res = builder.AddSectionFromFile(ui_script_file.string().c_str()); //seems to be problematic on cyrillic locale
+ {
+ std::string all_file;
+- boost::filesystem::load_string_file(ui_script_file, all_file);
++ load_string_file(ui_script_file, all_file);
+ res = builder.AddSectionFromMemory(ui_script_file.string().c_str(), all_file.c_str(), (unsigned int)(all_file.length()), 0);
+ }
+ if (res < 0) throw CompileErrorException("Error, can't build the script for tab " + tab_key);
diff --git a/pkgs/applications/misc/prusa-slicer/super-slicer.nix b/pkgs/applications/misc/prusa-slicer/super-slicer.nix
index 5d137f557fef..c33513356f3a 100644
--- a/pkgs/applications/misc/prusa-slicer/super-slicer.nix
+++ b/pkgs/applications/misc/prusa-slicer/super-slicer.nix
@@ -13,38 +13,28 @@ let
description = "PrusaSlicer fork with more features and faster development cycle";
patches = [
- # Fix compile error with boost 1.79. See https://github.com/supermerill/SuperSlicer/issues/2823
- (fetchpatch {
- url = "https://raw.githubusercontent.com/gentoo/gentoo/81e3ca3b7c131e8345aede89e3bbcd700e1ad567/media-gfx/superslicer/files/superslicer-2.4.58.3-boost-1.79-port-v2.patch";
- # Excludes Linux-only patches
- excludes = [
- "src/slic3r/GUI/FreeCADDialog.cpp"
- "src/slic3r/GUI/Tab.cpp"
- "src/slic3r/Utils/Http.cpp"
- ];
- hash = "sha256-v0q2MhySayij7+qBTE5q01IOq/DyUcWnjpbzB/AV34c=";
- })
# Drop if this fix gets merged upstream
(fetchpatch {
url = "https://github.com/supermerill/SuperSlicer/commit/fa7c545efa5d1880cf24af32083094fc872d3692.patch";
hash = "sha256-fh31qrqjQiRQL03pQl4KJAEtbKMwG8/nJroqIDOIePw=";
})
+ ./super-slicer-use-boost186.patch
];
versions = {
stable = {
- version = "2.3.57.12";
- hash = "sha256-lePhDRHI++9zs54bTt2/Lu6ZQ7egjJCWb752aI0s7Mw==";
- patches = null;
+ version = "2.5.59.13";
+ hash = "sha256-FkoGcgVoBeHSZC3W5y30TBPmPrWnZSlO66TgwskgqAU=";
+ inherit patches;
};
latest = {
- version = "2.4.58.5";
- hash = "sha256-UywxEGedXaBUTKojEkbkuejI6SdPSkPxTJMwUDNW6W0=";
+ version = "2.5.59.13";
+ hash = "sha256-FkoGcgVoBeHSZC3W5y30TBPmPrWnZSlO66TgwskgqAU=";
inherit patches;
};
beta = {
- version = "2.5.59.6";
- hash = "sha256-4ivhkcvVw5NlPsDz3J840aWc0qnp/XzCnTTCICwi3/c=";
+ version = "2.5.60.0";
+ hash = "sha256-dDRK07SatLLhuoc2fJKbHUwAofRRvBUoXWO61W2blFM=";
inherit patches;
};
};