update to 2.3.1

include upstream patch fixing build with gcc 11

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
Dennis Gilmore 2021-05-15 21:43:42 -05:00
parent ddada69453
commit 65694a84d7
5 changed files with 31 additions and 88 deletions

View File

@ -1,25 +0,0 @@
From 19d28524e76ff9c5b7fa4ff1a8373bfbacad9775 Mon Sep 17 00:00:00 2001
From: Yuri D'Elia <wavexx@thregr.org>
Date: Sun, 13 Dec 2020 19:41:47 +0100
Subject: [PATCH] Include <atomic> for std::atomic where needed
Fixes build on linux using clang 11
---
src/slic3r/GUI/Mouse3DController.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/slic3r/GUI/Mouse3DController.hpp b/src/slic3r/GUI/Mouse3DController.hpp
index eb1425b..4e0c8e6 100644
--- a/src/slic3r/GUI/Mouse3DController.hpp
+++ b/src/slic3r/GUI/Mouse3DController.hpp
@@ -8,6 +8,7 @@
#include "hidapi.h"
+#include <atomic>
#include <queue>
#include <thread>
#include <vector>
--
2.30.0

View File

@ -1,50 +0,0 @@
diff --git a/src/admesh/stlinit.cpp b/src/admesh/stlinit.cpp
index 390fe56..7ac2704 100644
--- a/src/admesh/stlinit.cpp
+++ b/src/admesh/stlinit.cpp
@@ -28,7 +28,6 @@
#include <boost/log/trivial.hpp>
#include <boost/nowide/cstdio.hpp>
-#include <boost/detail/endian.hpp>
#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

21
optional.patch Normal file
View File

@ -0,0 +1,21 @@
From 62592cab48cfb6a20d84041b1992aecc6a2b659c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= <hejl.lukas@gmail.com>
Date: Sat, 1 May 2021 22:33:59 +0200
Subject: [PATCH] Added missing include (GCC 11.1)
---
src/libslic3r/Optimize/Optimizer.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libslic3r/Optimize/Optimizer.hpp b/src/libslic3r/Optimize/Optimizer.hpp
index 05191eba26..8ae55c61c5 100644
--- a/src/libslic3r/Optimize/Optimizer.hpp
+++ b/src/libslic3r/Optimize/Optimizer.hpp
@@ -8,6 +8,7 @@
#include <functional>
#include <limits>
#include <cassert>
+#include <optional>
namespace Slic3r { namespace opt {

View File

@ -7,8 +7,8 @@
%endif %endif
Name: prusa-slicer Name: prusa-slicer
Version: 2.2.0 Version: 2.3.1
Release: 12%{?dist} Release: 1%{?dist}
Summary: 3D printing slicer optimized for Prusa printers Summary: 3D printing slicer optimized for Prusa printers
# The main PrusaSlicer code and resources are AGPLv3, with small parts as # The main PrusaSlicer code and resources are AGPLv3, with small parts as
@ -25,16 +25,9 @@ Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_%version.
Source1: %name.desktop Source1: %name.desktop
Source2: %name.appdata.xml Source2: %name.appdata.xml
# Boost 1.73 support # Added missing include (GCC 11.1)
# https://bugzilla.redhat.com/show_bug.cgi?id=1842011 # https://github.com/prusa3d/PrusaSlicer/commit/62592cab48cfb6a20d84041b1992aecc6a2b659c
# https://github.com/prusa3d/PrusaSlicer/issues/4264 Patch1: optional.patch
# https://github.com/prusa3d/PrusaSlicer/pull/4340
Patch1: endian.patch
# Include <atomic> for std::atomic where needed
# Fixes build with Boost 1.75
# https://github.com/prusa3d/PrusaSlicer/commit/44f71f0ed1
Patch2: atomic.patch
# Highly-parallel uild can run out of memory on PPC64le # Highly-parallel uild can run out of memory on PPC64le
%ifarch ppc64le %ifarch ppc64le
@ -410,6 +403,10 @@ find %buildroot%_datadir/PrusaSlicer/localization -type d | sed '
%changelog %changelog
* Sat May 15 2021 Dennis Gilmore <dennis@ausil.us> - 2.3.1-1
- update to 2.3.1
- include upstream patch fixing build with gcc 11
* Mon May 10 2021 Jonathan Wakely <jwakely@redhat.com> - 2.2.0-12 * Mon May 10 2021 Jonathan Wakely <jwakely@redhat.com> - 2.2.0-12
- Rebuilt for removed libstdc++ symbols (#1937698) - Rebuilt for removed libstdc++ symbols (#1937698)

View File

@ -1 +1 @@
SHA512 (version_2.2.0.tar.gz) = 5c8dc5b581e04208a1ae53771ef2607da189ee85aadf501ce1480008f5a6ddb10bb528ddc2608d3f04acd26c583ff895ad4148d6a1397f002292e20098971e1d SHA512 (version_2.3.1.tar.gz) = 2722ee9d5331fe03423ce179cec68196320b48c65bd3c6795b93469268956fb309609462cc62bf3e2b4f30d2fe720d0a28a16c010993737c045d82956493a1e3