diff options
author | adisbladis <adisbladis@gmail.com> | 2024-07-04 18:02:48 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-04 18:02:48 +1200 |
commit | b2e2295fad0ecaf206d9998acb498e7189c38a7b (patch) | |
tree | 2e43884d7e22f7722fc7c3f1b4f4ebeb6130fb29 | |
parent | 9012866f410282914fee41519b999eec6eaabc33 (diff) | |
parent | 1f3cdf424b8e3a0554443af2bf627c70849ca5e9 (diff) |
Merge pull request #324086 from oddlama/update-orcaslicer
orca-slicer: 2.0.0 -> 2.1.1
4 files changed, 79 insertions, 9 deletions
diff --git a/pkgs/applications/misc/bambu-studio/0002-fix-build-for-gcc-13.diff b/pkgs/applications/misc/bambu-studio/0002-fix-build-for-gcc-13.diff new file mode 100644 index 0000000000000..cc832bb107291 --- /dev/null +++ b/pkgs/applications/misc/bambu-studio/0002-fix-build-for-gcc-13.diff @@ -0,0 +1,38 @@ +diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp +index 11a36dfabc..77a44e699b 100644 +--- a/src/slic3r/Utils/Http.cpp ++++ b/src/slic3r/Utils/Http.cpp +@@ -88,9 +88,13 @@ std::mutex g_mutex; + + struct form_file + { +- fs::ifstream ifs; ++ fs::ifstream ifs; + boost::filesystem::ifstream::off_type init_offset; + size_t content_length; ++ ++ form_file(fs::path const& p, const boost::filesystem::ifstream::off_type offset, const size_t content_length) ++ : ifs(p, std::ios::in | std::ios::binary), init_offset(offset), content_length(content_length) ++ {} + }; + + struct Http::priv +@@ -314,7 +318,7 @@ void Http::priv::form_add_file(const char *name, const fs::path &path, const cha + filename = path.string().c_str(); + } + +- form_files.emplace_back(form_file{{path, std::ios::in | std::ios::binary}, offset, length}); ++ form_files.emplace_back(path, offset, length); + auto &f = form_files.back(); + size_t size = length; + if (length == 0) { +@@ -381,7 +385,7 @@ void Http::priv::set_put_body(const fs::path &path) + boost::system::error_code ec; + boost::uintmax_t filesize = file_size(path, ec); + if (!ec) { +- putFile = std::make_unique<form_file>(form_file{{path, std::ios_base::binary | std::ios_base::in}, 0, 0}); ++ putFile = std::make_unique<form_file>(path, 0, 0); + ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); + ::curl_easy_setopt(curl, CURLOPT_READDATA, (void *) (putFile.get())); + ::curl_easy_setopt(curl, CURLOPT_INFILESIZE, filesize); + diff --git a/pkgs/applications/misc/bambu-studio/default.nix b/pkgs/applications/misc/bambu-studio/default.nix index 57ad17ea48774..70812441d3484 100644 --- a/pkgs/applications/misc/bambu-studio/default.nix +++ b/pkgs/applications/misc/bambu-studio/default.nix @@ -37,7 +37,6 @@ opencascade-occt_7_6, openvdb, pcre, - qhull, systemd, tbb_2021_11, webkitgtk, @@ -53,7 +52,7 @@ let "--enable-debug=no" ]; }); - openvdb_tbb_2021_8 = openvdb.overrideAttrs (old: rec { + openvdb_tbb_2021_8 = openvdb.overrideAttrs (old: { buildInputs = [ openexr boost179 diff --git a/pkgs/applications/misc/bambu-studio/dont-link-opencv-world.patch b/pkgs/applications/misc/bambu-studio/dont-link-opencv-world.patch new file mode 100644 index 0000000000000..f558b3099ac3b --- /dev/null +++ b/pkgs/applications/misc/bambu-studio/dont-link-opencv-world.patch @@ -0,0 +1,14 @@ +diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt +index 38a1b2499..00c9060b3 100644 +--- a/src/libslic3r/CMakeLists.txt ++++ b/src/libslic3r/CMakeLists.txt +@@ -573,7 +573,8 @@ target_link_libraries(libslic3r + mcut + JPEG::JPEG + qoi +- opencv_world ++ opencv_core ++ opencv_imgproc + ) + + if(NOT WIN32) diff --git a/pkgs/applications/misc/bambu-studio/orca-slicer.nix b/pkgs/applications/misc/bambu-studio/orca-slicer.nix index af89be65246d3..7428453a20ccb 100644 --- a/pkgs/applications/misc/bambu-studio/orca-slicer.nix +++ b/pkgs/applications/misc/bambu-studio/orca-slicer.nix @@ -2,23 +2,42 @@ lib, fetchFromGitHub, bambu-studio, + opencv2, }: - bambu-studio.overrideAttrs ( finalAttrs: previousAttrs: { - version = "2.0.0"; + version = "2.1.1"; pname = "orca-slicer"; - # Don't inherit patches from bambu-studio - patches = [ ./0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch ]; - src = fetchFromGitHub { owner = "SoftFever"; repo = "OrcaSlicer"; rev = "v${finalAttrs.version}"; - hash = "sha256-YlLDUH3ODIfax5QwnsVJi1JjZ9WtxP3ssqRP1C4d4bw="; + hash = "sha256-7fusdSYpZb4sYl5L/+81PzMd42Nsejj+kCZsq0f7eIk="; }; + patches = + previousAttrs.patches + ++ [ + # FIXME: only required for 2.1.1, can be removed in the next version + ./0002-fix-build-for-gcc-13.diff + + ./dont-link-opencv-world.patch + ]; + + buildInputs = + previousAttrs.buildInputs + ++ [ + opencv2 + ]; + + preFixup = '' + gappsWrapperArgs+=( + # Fixes blackscreen dialogs + --set WEBKIT_DISABLE_COMPOSITING_MODE 1 + ) + ''; + # needed to prevent collisions between the LICENSE.txt files of # bambu-studio and orca-slicer. postInstall = '' @@ -26,7 +45,7 @@ bambu-studio.overrideAttrs ( ''; meta = with lib; { - description = "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc"; + description = "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)"; homepage = "https://github.com/SoftFever/OrcaSlicer"; license = licenses.agpl3Only; maintainers = with maintainers; [ |