Rebuilt and fix for Boost 1.73.0 (second attempt)
This commit is contained in:
parent
393c0474b3
commit
998832ef5e
|
@ -0,0 +1,50 @@
|
||||||
|
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
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
Name: prusa-slicer
|
Name: prusa-slicer
|
||||||
Version: 2.2.0
|
Version: 2.2.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?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
|
||||||
|
@ -20,6 +20,12 @@ 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
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1842011
|
||||||
|
# https://github.com/prusa3d/PrusaSlicer/issues/4264
|
||||||
|
# https://github.com/prusa3d/PrusaSlicer/pull/4340
|
||||||
|
Patch1: endian.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
|
||||||
%global _smp_ncpus_max 8
|
%global _smp_ncpus_max 8
|
||||||
|
@ -397,6 +403,9 @@ make test ARGS=-V
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 02 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
|
* Tue Mar 31 2020 Alexander Jacocks <alexander@redhat.com> - 2.2.0-1
|
||||||
- Update to 2.2.0.
|
- Update to 2.2.0.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue