Rebuilt and fix for Boost 1.73.0

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1842011
This commit is contained in:
Miro Hrončok 2020-06-01 16:25:16 +02:00
parent 2fd6939398
commit a8cfa9157e
2 changed files with 69 additions and 1 deletions

60
boost-1.73.patch Normal file
View File

@ -0,0 +1,60 @@
From d982345f52b6afbcc30c532828e161b2c956acf4 Mon Sep 17 00:00:00 2001
From: Christophe Lermytte <gentoo@lermytte.be>
Date: Mon, 18 May 2020 22:41:58 +0200
Subject: [PATCH] Replace deprecated Boost endianness headers (#4264)
---
src/admesh/stlinit.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/admesh/stlinit.cpp b/src/admesh/stlinit.cpp
index 390fe56a4..792e60ae6 100644
--- a/src/admesh/stlinit.cpp
+++ b/src/admesh/stlinit.cpp
@@ -28,7 +28,7 @@
#include <boost/log/trivial.hpp>
#include <boost/nowide/cstdio.hpp>
-#include <boost/detail/endian.hpp>
+#include <boost/predef/other/endian.h>
#include "stl.h"
@@ -36,9 +36,9 @@
#error "SEEK_SET not defined"
#endif
-#ifndef BOOST_LITTLE_ENDIAN
+#ifndef BOOST_ENDIAN_LITTLE_BYTE
extern void stl_internal_reverse_quads(char *buf, size_t cnt);
-#endif /* BOOST_LITTLE_ENDIAN */
+#endif /* BOOST_ENDIAN_LITTLE_BYTE */
static FILE* stl_open_count_facets(stl_file *stl, const char *file)
{
@@ -89,10 +89,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
+#ifndef BOOST_ENDIAN_LITTLE_BYTE
// Convert from little endian to big endian.
stl_internal_reverse_quads((char*)&header_num_facets, 4);
-#endif /* BOOST_LITTLE_ENDIAN */
+#endif /* BOOST_ENDIAN_LITTLE_BYTE */
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 +158,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
+#ifndef BOOST_ENDIAN_LITTLE_BYTE
// Convert the loaded little endian data to big endian.
stl_internal_reverse_quads((char*)&facet, 48);
-#endif /* BOOST_LITTLE_ENDIAN */
+#endif /* BOOST_ENDIAN_LITTLE_BYTE */
} else {
// Read a single facet from an ASCII .STL file
// skip solid/endsolid

View File

@ -3,7 +3,7 @@
Name: prusa-slicer
Version: 2.2.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: 3D printing slicer optimized for Prusa printers
# The main PrusaSlicer code and resources are AGPLv3, with small parts as
@ -20,6 +20,11 @@ Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_%version.
Source1: %name.desktop
Source2: %name.appdata.xml
# Boost 1.73 support
# https://bugzilla.redhat.com/show_bug.cgi?id=1842011
# https://github.com/prusa3d/PrusaSlicer/issues/4264
Patch1: https://github.com/kobboi/PrusaSlicer/commit/d982345f.patch#/boost-1.73.patch
# Highly-parallel uild can run out of memory on PPC64le
%ifarch ppc64le
%global _smp_ncpus_max 8
@ -397,6 +402,9 @@ make test ARGS=-V
%changelog
* Mon Jun 01 2020 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-2
- Rebuilt and fix for Boost 1.73.0 (#1842011)
* Tue Mar 31 2020 Alexander Jacocks <alexander@redhat.com> - 2.2.0-1
- Update to 2.2.0.