From 23cd57662afff4eeed5e7d441aa3f34d5ff2ed35893c00a5008f9e1e2ab4dd48 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Tue, 1 Sep 2020 21:21:51 +0000 Subject: [PATCH 1/3] - support boost >= 1.73 PrusaSlicer-pr4340-boots-1-73.patch OBS-URL: https://build.opensuse.org/package/show/science/PrusaSlicer?expand=0&rev=19 --- PrusaSlicer-pr4340-boost-1-73.patch | 63 +++++++++++++++++++++++++++++ PrusaSlicer.changes | 5 +++ PrusaSlicer.spec | 3 ++ 3 files changed, 71 insertions(+) create mode 100644 PrusaSlicer-pr4340-boost-1-73.patch diff --git a/PrusaSlicer-pr4340-boost-1-73.patch b/PrusaSlicer-pr4340-boost-1-73.patch new file mode 100644 index 0000000..c7cc3a6 --- /dev/null +++ b/PrusaSlicer-pr4340-boost-1-73.patch @@ -0,0 +1,63 @@ +From 13abc305a1344cde55e5616cc877f4a3e2f8a2cc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Wed, 3 Jun 2020 01:32:44 +0200 +Subject: [PATCH] Remove deprecated boost/detail/endian.hpp usage + +boost/detail/endian.hpp is removed in Boost 1.73 +boost/endian/endian.hpp is deprecated in Boost 1.73 + +Fixes https://github.com/prusa3d/PrusaSlicer/issues/4264 +--- + src/admesh/stlinit.cpp | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/src/admesh/stlinit.cpp b/src/admesh/stlinit.cpp +index 390fe56a40..7ac27044b1 100644 +--- a/src/admesh/stlinit.cpp ++++ b/src/admesh/stlinit.cpp +@@ -28,7 +28,6 @@ + + #include + #include +-#include + + #include "stl.h" + +@@ -36,9 +35,9 @@ + #error "SEEK_SET not defined" + #endif + +-#ifndef BOOST_LITTLE_ENDIAN ++#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ + extern void stl_internal_reverse_quads(char *buf, size_t cnt); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */ + + static FILE* stl_open_count_facets(stl_file *stl, const char *file) + { +@@ -89,10 +88,10 @@ static FILE* stl_open_count_facets(stl_file *stl, const char *file) + // Read the int following the header. This should contain # of facets. + uint32_t header_num_facets; + bool header_num_faces_read = fread(&header_num_facets, sizeof(uint32_t), 1, fp) != 0; +-#ifndef BOOST_LITTLE_ENDIAN ++#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ + // Convert from little endian to big endian. + stl_internal_reverse_quads((char*)&header_num_facets, 4); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */ + if (! header_num_faces_read || num_facets != header_num_facets) + BOOST_LOG_TRIVIAL(info) << "stl_open_count_facets: Warning: File size doesn't match number of facets in the header: " << file; + } +@@ -158,10 +157,10 @@ static bool stl_read(stl_file *stl, FILE *fp, int first_facet, bool first) + // Read a single facet from a binary .STL file. We assume little-endian architecture! + if (fread(&facet, 1, SIZEOF_STL_FACET, fp) != SIZEOF_STL_FACET) + return false; +-#ifndef BOOST_LITTLE_ENDIAN ++#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ + // Convert the loaded little endian data to big endian. + stl_internal_reverse_quads((char*)&facet, 48); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */ + } else { + // Read a single facet from an ASCII .STL file + // skip solid/endsolid diff --git a/PrusaSlicer.changes b/PrusaSlicer.changes index b7060d2..6aec1f4 100644 --- a/PrusaSlicer.changes +++ b/PrusaSlicer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 1 21:20:26 UTC 2020 - Benjamin Greiner + +- support boost >= 1.73 PrusaSlicer-pr4340-boots-1-73.patch + ------------------------------------------------------------------- Tue Sep 1 11:46:30 UTC 2020 - Benjamin Greiner diff --git a/PrusaSlicer.spec b/PrusaSlicer.spec index 1b71880..aee77dc 100644 --- a/PrusaSlicer.spec +++ b/PrusaSlicer.spec @@ -25,6 +25,8 @@ Group: Hardware/Printing URL: https://www.prusa3d.com/prusaslicer/ Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: %{name}.desktop +# PATCH-FIX-UPSTREAM https://github.com/prusa3d/PrusaSlicer/pull/4340 +Patch0: PrusaSlicer-pr4340-boost-1-73.patch BuildRequires: cereal-devel BuildRequires: cgal-devel >= 4.13.2 BuildRequires: cmake @@ -64,6 +66,7 @@ It also works with Mach3, LinuxCNC and Machinekit controllers. %prep %setup -q -n %{name}-version_%{version} +%patch0 -p1 sed -i 's/UNKNOWN/%{release}-%{?is_opensuse:open}SUSE-%{suse_version}/' version.inc %build From b3bffad84c06960d421a7d86e81c3a27bce380d886a9bd0b483009df3611efc7 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Tue, 1 Sep 2020 21:26:50 +0000 Subject: [PATCH 2/3] - support boost >= 1.73 PrusaSlicer-pr4340-boost-1-73.patch OBS-URL: https://build.opensuse.org/package/show/science/PrusaSlicer?expand=0&rev=20 --- PrusaSlicer.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PrusaSlicer.changes b/PrusaSlicer.changes index 6aec1f4..444e685 100644 --- a/PrusaSlicer.changes +++ b/PrusaSlicer.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Tue Sep 1 21:20:26 UTC 2020 - Benjamin Greiner -- support boost >= 1.73 PrusaSlicer-pr4340-boots-1-73.patch +- support boost >= 1.73 PrusaSlicer-pr4340-boost-1-73.patch ------------------------------------------------------------------- Tue Sep 1 11:46:30 UTC 2020 - Benjamin Greiner From 1c5d4050cab3faaa127c5df5774a3768323d2ff54f2467b6d5e629d479699f5a Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Tue, 1 Sep 2020 21:32:42 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/science/PrusaSlicer?expand=0&rev=21 --- PrusaSlicer.changes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PrusaSlicer.changes b/PrusaSlicer.changes index 444e685..8e57903 100644 --- a/PrusaSlicer.changes +++ b/PrusaSlicer.changes @@ -1,7 +1,9 @@ ------------------------------------------------------------------- Tue Sep 1 21:20:26 UTC 2020 - Benjamin Greiner -- support boost >= 1.73 PrusaSlicer-pr4340-boost-1-73.patch +- support boost >= 1.73 + * PrusaSlicer-pr4340-boost-1-73.patch gh#prusa3d/PrusaSlicer#4340 + * fixes gh#prusa3d/PrusaSlicer#4264 ------------------------------------------------------------------- Tue Sep 1 11:46:30 UTC 2020 - Benjamin Greiner