Alexander Jacocks 2020-03-31 10:13:12 +02:00 committed by Miro Hrončok
parent 2d45c29d8b
commit 573698ee14
3 changed files with 12 additions and 63 deletions

View File

@ -1,25 +0,0 @@
From 94212fa2a92b5d01be5da8235f02423249dd7b2a Mon Sep 17 00:00:00 2001
From: bubnikv <bubnikv@gmail.com>
Date: Thu, 19 Sep 2019 08:56:47 +0200
Subject: [PATCH] Another fix of admesh on big endian architectures, fixes
#2879
---
src/admesh/stl_io.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/admesh/stl_io.cpp b/src/admesh/stl_io.cpp
index af9bb4f98..ddf377c78 100644
--- a/src/admesh/stl_io.cpp
+++ b/src/admesh/stl_io.cpp
@@ -151,8 +151,8 @@ bool stl_write_binary(stl_file *stl, const char *file, const char *label)
memcpy(buffer, &stl->stats.number_of_facets, 4);
stl_internal_reverse_quads(buffer, 4);
fwrite(buffer, 4, 1, fp);
- for (size_t i = 0; i < stl->stats.number_of_facets; ++ i) {
- memcpy(buffer, stl->facet_start + i, 50);
+ for (const stl_facet &facet : stl->facet_start) {
+ memcpy(buffer, &facet, 50);
// Convert to little endian.
stl_internal_reverse_quads(buffer, 48);
fwrite(buffer, SIZEOF_STL_FACET, 1, fp);

View File

@ -1,26 +0,0 @@
diff --git a/src/admesh/stlinit.cpp b/src/admesh/stlinit.cpp
index 693aad0..390fe56 100644
--- a/src/admesh/stlinit.cpp
+++ b/src/admesh/stlinit.cpp
@@ -36,6 +36,10 @@
#error "SEEK_SET not defined"
#endif
+#ifndef BOOST_LITTLE_ENDIAN
+extern void stl_internal_reverse_quads(char *buf, size_t cnt);
+#endif /* BOOST_LITTLE_ENDIAN */
+
static FILE* stl_open_count_facets(stl_file *stl, const char *file)
{
// Open the file in binary mode first.
@@ -238,10 +242,6 @@ bool stl_open(stl_file *stl, const char *file)
return result;
}
-#ifndef BOOST_LITTLE_ENDIAN
-extern void stl_internal_reverse_quads(char *buf, size_t cnt);
-#endif /* BOOST_LITTLE_ENDIAN */
-
void stl_allocate(stl_file *stl)
{
// Allocate memory for the entire .STL file.

View File

@ -2,8 +2,8 @@
%bcond_without perltests
Name: prusa-slicer
Version: 2.1.1
Release: 2%{?dist}
Version: 2.2.0
Release: 1%{?dist}
Summary: 3D printing slicer optimized for Prusa printers
# The main PrusaSlicer code and resources are AGPLv3, with small parts as
@ -20,15 +20,6 @@ Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_%version.
Source1: %name.desktop
Source2: %name.appdata.xml
# Fix building on s390x
# https://github.com/prusa3d/PrusaSlicer/issues/2879
Patch0: https://github.com/prusa3d/PrusaSlicer/commit/94212fa2a92b5d01be5da8235f02423249dd7b2a.patch
# Try to fix more endian-related compilation errors
# https://github.com/prusa3d/PrusaSlicer/issues/2879
# https://github.com/prusa3d/PrusaSlicer/pull/2981
Patch1: patch-endianness
# Highly-parallel uild can run out of memory on PPC64le
%ifarch ppc64le
%global _smp_ncpus_max 8
@ -37,6 +28,7 @@ Patch1: patch-endianness
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: cereal-devel
BuildRequires: CGAL-devel
BuildRequires: curl-devel
BuildRequires: desktop-file-utils
BuildRequires: eigen3-devel
@ -46,9 +38,14 @@ BuildRequires: gettext
BuildRequires: git-core
BuildRequires: glew-devel
BuildRequires: gtest-devel
BuildRequires: ilmbase-devel
BuildRequires: ImageMagick
BuildRequires: libgudev
BuildRequires: miniz-devel
BuildRequires: NLopt-devel
BuildRequires: openvdb
BuildRequires: openvdb-devel
BuildRequires: systemd-devel
BuildRequires: tbb-devel
BuildRequires: wxBase3-devel
BuildRequires: wxGTK3-devel
@ -396,10 +393,13 @@ make test ARGS=-V
%_datadir/applications/%name.desktop
%_datadir/appdata/%name.appdata.xml
%dir %_datadir/PrusaSlicer
%_datadir/PrusaSlicer/{icons,models,profiles,shaders}/
%_datadir/PrusaSlicer/{icons,models,profiles,shaders,udev}/
%changelog
* Thu Mar 30 2020 Alexander Jacocks <alexander@redhat.com> - 2.2.0-1
- Update to 2.2.0.
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild