Skip to content

Commit b2e2295

Browse files
authored
Merge pull request #324086 from oddlama/update-orcaslicer
orca-slicer: 2.0.0 -> 2.1.1
2 parents 9012866 + 1f3cdf4 commit b2e2295

File tree

4 files changed

+79
-9
lines changed

4 files changed

+79
-9
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp
2+
index 11a36dfabc..77a44e699b 100644
3+
--- a/src/slic3r/Utils/Http.cpp
4+
+++ b/src/slic3r/Utils/Http.cpp
5+
@@ -88,9 +88,13 @@ std::mutex g_mutex;
6+
7+
struct form_file
8+
{
9+
- fs::ifstream ifs;
10+
+ fs::ifstream ifs;
11+
boost::filesystem::ifstream::off_type init_offset;
12+
size_t content_length;
13+
+
14+
+ form_file(fs::path const& p, const boost::filesystem::ifstream::off_type offset, const size_t content_length)
15+
+ : ifs(p, std::ios::in | std::ios::binary), init_offset(offset), content_length(content_length)
16+
+ {}
17+
};
18+
19+
struct Http::priv
20+
@@ -314,7 +318,7 @@ void Http::priv::form_add_file(const char *name, const fs::path &path, const cha
21+
filename = path.string().c_str();
22+
}
23+
24+
- form_files.emplace_back(form_file{{path, std::ios::in | std::ios::binary}, offset, length});
25+
+ form_files.emplace_back(path, offset, length);
26+
auto &f = form_files.back();
27+
size_t size = length;
28+
if (length == 0) {
29+
@@ -381,7 +385,7 @@ void Http::priv::set_put_body(const fs::path &path)
30+
boost::system::error_code ec;
31+
boost::uintmax_t filesize = file_size(path, ec);
32+
if (!ec) {
33+
- putFile = std::make_unique<form_file>(form_file{{path, std::ios_base::binary | std::ios_base::in}, 0, 0});
34+
+ putFile = std::make_unique<form_file>(path, 0, 0);
35+
::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
36+
::curl_easy_setopt(curl, CURLOPT_READDATA, (void *) (putFile.get()));
37+
::curl_easy_setopt(curl, CURLOPT_INFILESIZE, filesize);
38+

pkgs/applications/misc/bambu-studio/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
opencascade-occt_7_6,
3838
openvdb,
3939
pcre,
40-
qhull,
4140
systemd,
4241
tbb_2021_11,
4342
webkitgtk,
@@ -53,7 +52,7 @@ let
5352
"--enable-debug=no"
5453
];
5554
});
56-
openvdb_tbb_2021_8 = openvdb.overrideAttrs (old: rec {
55+
openvdb_tbb_2021_8 = openvdb.overrideAttrs (old: {
5756
buildInputs = [
5857
openexr
5958
boost179
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt
2+
index 38a1b2499..00c9060b3 100644
3+
--- a/src/libslic3r/CMakeLists.txt
4+
+++ b/src/libslic3r/CMakeLists.txt
5+
@@ -573,7 +573,8 @@ target_link_libraries(libslic3r
6+
mcut
7+
JPEG::JPEG
8+
qoi
9+
- opencv_world
10+
+ opencv_core
11+
+ opencv_imgproc
12+
)
13+
14+
if(NOT WIN32)

pkgs/applications/misc/bambu-studio/orca-slicer.nix

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,50 @@
22
lib,
33
fetchFromGitHub,
44
bambu-studio,
5+
opencv2,
56
}:
6-
77
bambu-studio.overrideAttrs (
88
finalAttrs: previousAttrs: {
9-
version = "2.0.0";
9+
version = "2.1.1";
1010
pname = "orca-slicer";
1111

12-
# Don't inherit patches from bambu-studio
13-
patches = [ ./0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch ];
14-
1512
src = fetchFromGitHub {
1613
owner = "SoftFever";
1714
repo = "OrcaSlicer";
1815
rev = "v${finalAttrs.version}";
19-
hash = "sha256-YlLDUH3ODIfax5QwnsVJi1JjZ9WtxP3ssqRP1C4d4bw=";
16+
hash = "sha256-7fusdSYpZb4sYl5L/+81PzMd42Nsejj+kCZsq0f7eIk=";
2017
};
2118

19+
patches =
20+
previousAttrs.patches
21+
++ [
22+
# FIXME: only required for 2.1.1, can be removed in the next version
23+
./0002-fix-build-for-gcc-13.diff
24+
25+
./dont-link-opencv-world.patch
26+
];
27+
28+
buildInputs =
29+
previousAttrs.buildInputs
30+
++ [
31+
opencv2
32+
];
33+
34+
preFixup = ''
35+
gappsWrapperArgs+=(
36+
# Fixes blackscreen dialogs
37+
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
38+
)
39+
'';
40+
2241
# needed to prevent collisions between the LICENSE.txt files of
2342
# bambu-studio and orca-slicer.
2443
postInstall = ''
2544
mv $out/LICENSE.txt $out/share/OrcaSlicer/LICENSE.txt
2645
'';
2746

2847
meta = with lib; {
29-
description = "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc";
48+
description = "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)";
3049
homepage = "https://github.com/SoftFever/OrcaSlicer";
3150
license = licenses.agpl3Only;
3251
maintainers = with maintainers; [

0 commit comments

Comments
 (0)