From 1da03e08b5224d845b8e8f75aac8ae0e0a6946ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Date: Fri, 24 Jun 2022 20:47:47 +0200 Subject: [PATCH] cad/PrusaSlicer: Fix build and remove BROKEN This applies a patch from upstream to fix compilation with recent boost versions. --- cad/PrusaSlicer/Makefile | 2 -- .../files/patch-tests_fff_print_test_data.cpp | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 cad/PrusaSlicer/files/patch-tests_fff_print_test_data.cpp diff --git a/cad/PrusaSlicer/Makefile b/cad/PrusaSlicer/Makefile index d3e015812ddf..14c5daef8b89 100644 --- a/cad/PrusaSlicer/Makefile +++ b/cad/PrusaSlicer/Makefile @@ -24,8 +24,6 @@ LIB_DEPENDS= libtbb.so:devel/onetbb \ BUILD_DEPENDS= cereal>=1.3.0.10:devel/cereal \ cgal>=5.0.2:math/cgal -BROKEN= Fails to compile: implicit instantiation of undefined template 'std::basic_ifstream' - USES= cmake cpe desktop-file-utils eigen:3 gettext gl iconv pkgconfig CPE_VENDOR= prusa3d CMAKE_ARGS+= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ diff --git a/cad/PrusaSlicer/files/patch-tests_fff_print_test_data.cpp b/cad/PrusaSlicer/files/patch-tests_fff_print_test_data.cpp new file mode 100644 index 000000000000..ee3f0c0fccd4 --- /dev/null +++ b/cad/PrusaSlicer/files/patch-tests_fff_print_test_data.cpp @@ -0,0 +1,28 @@ +commit 926ae0471800abd1e5335e251a5934570eb8f6ff +Author: Vojtech Bubnik +Date: 2022-04-25 11:32:03 +0200 + + Follow-up to 408e56f0390f20aaf793e0aa0c70c4d9544401d4 + Fixing compilation of tests on latest GCC/boost + +diff --git tests/fff_print/test_data.cpp tests/fff_print/test_data.cpp +index 32e31c264..f7077007d 100644 +--- tests/fff_print/test_data.cpp ++++ tests/fff_print/test_data.cpp +@@ -11,6 +11,7 @@ + #include + + #include ++#include + #include + #include + +@@ -286,7 +287,7 @@ std::string gcode(Print & print) + print.set_status_silent(); + print.process(); + print.export_gcode(temp.string(), nullptr, nullptr); +- std::ifstream t(temp.string()); ++ boost::nowide::ifstream t(temp.string()); + std::string str((std::istreambuf_iterator(t)), std::istreambuf_iterator()); + boost::nowide::remove(temp.string().c_str()); + return str;