From 936cb29b1a703310cceb51e4c77993c27c8dae75 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 2 Jun 2020 23:18:42 +0100 Subject: [PATCH] Rebuilt and patched for Boost 1.73 --- slic3r-bind-placeholders.patch | 88 ++++++++++++++++++++++++++++++++++ slic3r-boost-nowide.patch | 33 +++++++++++++ slic3r-endian.patch | 13 +++++ slic3r.spec | 15 +++++- 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 slic3r-bind-placeholders.patch create mode 100644 slic3r-boost-nowide.patch create mode 100644 slic3r-endian.patch diff --git a/slic3r-bind-placeholders.patch b/slic3r-bind-placeholders.patch new file mode 100644 index 0000000..889cc29 --- /dev/null +++ b/slic3r-bind-placeholders.patch @@ -0,0 +1,88 @@ +--- Slic3r-1.3.0/xs/src/libslic3r/GCodeSender.hpp~ 2020-06-02 21:57:22.366027571 +0100 ++++ Slic3r-1.3.0/xs/src/libslic3r/GCodeSender.hpp 2020-06-02 21:57:25.402028503 +0100 +@@ -7,7 +7,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +@@ -15,6 +15,9 @@ + + namespace asio = boost::asio; + ++using boost::placeholders::_1; ++using boost::placeholders::_2; ++ + class GCodeSender : private boost::noncopyable { + public: + GCodeSender(); +--- Slic3r-1.3.0/xs/src/libslic3r/GCodeTimeEstimator.cpp~ 2020-06-02 22:32:22.480733519 +0100 ++++ Slic3r-1.3.0/xs/src/libslic3r/GCodeTimeEstimator.cpp 2020-06-02 22:32:25.806734748 +0100 +@@ -1,9 +1,12 @@ + #include "GCodeTimeEstimator.hpp" +-#include ++#include + #include + + namespace Slic3r { + ++using boost::placeholders::_1; ++using boost::placeholders::_2; ++ + void + GCodeTimeEstimator::parse(const std::string &gcode) + { +--- Slic3r-1.3.0/xs/src/libslic3r/PrintObject.cpp~ 2020-06-02 22:10:25.204272253 +0100 ++++ Slic3r-1.3.0/xs/src/libslic3r/PrintObject.cpp 2020-06-02 22:11:39.803295580 +0100 +@@ -2,11 +2,14 @@ + #include "BoundingBox.hpp" + #include "ClipperUtils.hpp" + #include "Geometry.hpp" ++#include + #include + #include + + namespace Slic3r { + ++using boost::placeholders::_1; ++ + PrintObject::PrintObject(Print* print, ModelObject* model_object, const BoundingBoxf3 &modobj_bbox) + : layer_height_spline(model_object->layer_height_spline), + typed_slices(false), +--- Slic3r-1.3.0/xs/src/libslic3r/SLAPrint.cpp~ 2020-06-02 22:25:43.439589772 +0100 ++++ Slic3r-1.3.0/xs/src/libslic3r/SLAPrint.cpp 2020-06-02 22:26:00.324595850 +0100 +@@ -7,9 +7,12 @@ + #include + #include + #include ++#include + + namespace Slic3r { + ++using boost::placeholders::_1; ++ + void + SLAPrint::slice() + { +--- Slic3r-1.3.0/xs/src/libslic3r/TriangleMesh.cpp~ 2020-06-02 22:18:32.071434546 +0100 ++++ Slic3r-1.3.0/xs/src/libslic3r/TriangleMesh.cpp 2020-06-02 22:19:16.409450504 +0100 +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #ifdef SLIC3R_DEBUG + #include "SVG.hpp" +@@ -21,6 +22,8 @@ + + namespace Slic3r { + ++using boost::placeholders::_1; ++ + TriangleMesh::TriangleMesh() + : repaired(false) + { diff --git a/slic3r-boost-nowide.patch b/slic3r-boost-nowide.patch new file mode 100644 index 0000000..4d1db9e --- /dev/null +++ b/slic3r-boost-nowide.patch @@ -0,0 +1,33 @@ +--- Slic3r-1.3.0/src/CMakeLists.txt~ 2020-06-02 23:18:23.296847282 +0100 ++++ Slic3r-1.3.0/src/CMakeLists.txt 2020-06-02 23:18:25.377848192 +0100 +@@ -22,7 +22,7 @@ + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_STATIC_RUNTIME ON) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") +-find_package(Boost COMPONENTS system thread filesystem) ++find_package(Boost COMPONENTS system thread filesystem nowide) + + set(LIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/../xs/src/) + +--- Slic3r-1.3.0/xs/Build.PL~ 2020-06-02 23:28:00.109099715 +0100 ++++ Slic3r-1.3.0/xs/Build.PL 2020-06-02 23:28:04.078101452 +0100 +@@ -147,7 +147,7 @@ + } + # In order to generate the -l switches we need to know how Boost libraries are named + my $have_boost = 0; +-my @boost_libraries = qw(system thread filesystem); # we need these ++my @boost_libraries = qw(system thread filesystem nowide); # we need these + # check without explicit lib path (works on Linux) + if (! $mswin) { + $have_boost = 1 +--- Slic3r-1.3.0/xs/src/libslic3r/Config.cpp~ 2020-06-02 22:39:49.772898701 +0100 ++++ Slic3r-1.3.0/xs/src/libslic3r/Config.cpp 2020-06-02 22:39:53.419900049 +0100 +@@ -13,7 +13,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include diff --git a/slic3r-endian.patch b/slic3r-endian.patch new file mode 100644 index 0000000..34ed11b --- /dev/null +++ b/slic3r-endian.patch @@ -0,0 +1,13 @@ +--- Slic3r-1.3.0/xs/src/admesh/stl.h~ 2020-06-02 21:36:34.816574974 +0100 ++++ Slic3r-1.3.0/xs/src/admesh/stl.h 2020-06-02 21:36:37.553576616 +0100 +@@ -26,9 +26,8 @@ + #include + #include + #include +-#include + +-#ifndef BOOST_LITTLE_ENDIAN ++#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ + #error "admesh works correctly on little endian machines only!" + #endif + diff --git a/slic3r.spec b/slic3r.spec index 065abc0..813dd60 100644 --- a/slic3r.spec +++ b/slic3r.spec @@ -5,7 +5,7 @@ Name: slic3r Version: 1.3.0 -Release: 13%{?dist} +Release: 14%{?dist} Summary: G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.) License: AGPLv3 and CC-BY # Images are CC-BY, code is AGPLv3 @@ -24,6 +24,13 @@ Patch5: %{name}-1.3.0-fixtest.patch Patch6: %{name}-wayland.patch Patch7: %{name}-boost169.patch +# Use GCC predefined macros instead of deprecated Boost header +Patch8: %{name}-endian.patch +# Make boost::Placeholders::_1 visible +Patch9: %{name}-bind-placeholders.patch +# Use boost/nowide/cstdlib.hpp instead of boost/nowide/cenv.hpp +Patch10: %{name}-boost-nowide.patch + Source1: %{name}.desktop Source2: %{name}.appdata.xml @@ -126,6 +133,9 @@ for more information. %patch5 -p1 -b .fixtest %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 # Optional removals %if %{use_system_admesh} @@ -241,6 +251,9 @@ SLIC3R_NO_AUTO=1 perl Build.PL installdirs=vendor %{_datadir}/%{name} %changelog +* Tue Jun 02 2020 Jonathan Wakely - 1.3.0-14 +- Rebuilt and patched for Boost 1.73 + * Wed May 13 2020 Miro HronĨok - 1.3.0-13 - Recommend optional dependencies to have background processing by default