Unverified Commit 1f3cdf42 authored by oddlama's avatar oddlama
Browse files

orca-slicer: 2.0.0 -> 2.1.1

parent af796de7
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
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);
+1 −2
Original line number Diff line number Diff line
@@ -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
+14 −0
Original line number Diff line number Diff line
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)
+26 −7
Original line number Diff line number Diff line
@@ -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; [