Skip to content

Commit

Permalink
super-slicer: fix build with GCC 14 (#362194)
Browse files Browse the repository at this point in the history
  • Loading branch information
FliegendeWurst authored Dec 9, 2024
1 parent 83092be commit 1008102
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
3 changes: 2 additions & 1 deletion pkgs/applications/misc/prusa-slicer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ stdenv.mkDerivation (finalAttrs: {
};

# required for GCC 14
postPatch = ''
# (not applicable to super-slicer fork)
postPatch = lib.optionalString (finalAttrs.pname == "prusa-slicer") ''
substituteInPlace src/libslic3r/Arrange/Core/DataStoreTraits.hpp \
--replace-fail \
"WritableDataStoreTraits<ArrItem>::template set" \
Expand Down
19 changes: 0 additions & 19 deletions pkgs/applications/misc/prusa-slicer/meshboolean-const.patch

This file was deleted.

8 changes: 6 additions & 2 deletions pkgs/applications/misc/prusa-slicer/super-slicer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ let
];
hash = "sha256-v0q2MhySayij7+qBTE5q01IOq/DyUcWnjpbzB/AV34c=";
})
./meshboolean-const.patch
# Drop if this fix gets merged upstream
(fetchpatch {
url = "https://github.com/supermerill/SuperSlicer/commit/fa7c545efa5d1880cf24af32083094fc872d3692.patch";
Expand Down Expand Up @@ -55,13 +54,18 @@ let

# - wxScintilla is not used on macOS
# - Partially applied upstream changes cause a bug when trying to link against a nonexistent libexpat
prePatch = super.prePatch + ''
postPatch = super.postPatch + ''
substituteInPlace src/CMakeLists.txt \
--replace "scintilla" "" \
--replace "list(APPEND wxWidgets_LIBRARIES libexpat)" "list(APPEND wxWidgets_LIBRARIES EXPAT::EXPAT)"
substituteInPlace src/libslic3r/CMakeLists.txt \
--replace "libexpat" "EXPAT::EXPAT"
# fixes GCC 14 error
substituteInPlace src/libslic3r/MeshBoolean.cpp \
--replace-fail 'auto &face' 'auto face' \
--replace-fail 'auto &vi' 'auto vi'
'';

# We don't need PS overrides anymore, and gcode-viewer is embedded in the binary.
Expand Down

0 comments on commit 1008102

Please sign in to comment.