Rebuilt and patched for Boost 1.73

This commit is contained in:
Jonathan Wakely 2020-06-02 23:18:42 +01:00
parent 02742889cf
commit 936cb29b1a
4 changed files with 148 additions and 1 deletions

View File

@ -0,0 +1,88 @@
--- Slic3r-1.3.0/xs/src/libslic3r/GCodeSender.hpp~ 2020-06-02 21:57:22.366027571 +0100
+++ Slic3r-1.3.0/xs/src/libslic3r/GCodeSender.hpp 2020-06-02 21:57:25.402028503 +0100
@@ -7,7 +7,7 @@
#include <string>
#include <vector>
#include <boost/asio.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <boost/thread.hpp>
#include <boost/core/noncopyable.hpp>
@@ -15,6 +15,9 @@
namespace asio = boost::asio;
+using boost::placeholders::_1;
+using boost::placeholders::_2;
+
class GCodeSender : private boost::noncopyable {
public:
GCodeSender();
--- Slic3r-1.3.0/xs/src/libslic3r/GCodeTimeEstimator.cpp~ 2020-06-02 22:32:22.480733519 +0100
+++ Slic3r-1.3.0/xs/src/libslic3r/GCodeTimeEstimator.cpp 2020-06-02 22:32:25.806734748 +0100
@@ -1,9 +1,12 @@
#include "GCodeTimeEstimator.hpp"
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <cmath>
namespace Slic3r {
+using boost::placeholders::_1;
+using boost::placeholders::_2;
+
void
GCodeTimeEstimator::parse(const std::string &gcode)
{
--- Slic3r-1.3.0/xs/src/libslic3r/PrintObject.cpp~ 2020-06-02 22:10:25.204272253 +0100
+++ Slic3r-1.3.0/xs/src/libslic3r/PrintObject.cpp 2020-06-02 22:11:39.803295580 +0100
@@ -2,11 +2,14 @@
#include "BoundingBox.hpp"
#include "ClipperUtils.hpp"
#include "Geometry.hpp"
+#include <boost/bind/bind.hpp>
#include <algorithm>
#include <vector>
namespace Slic3r {
+using boost::placeholders::_1;
+
PrintObject::PrintObject(Print* print, ModelObject* model_object, const BoundingBoxf3 &modobj_bbox)
: layer_height_spline(model_object->layer_height_spline),
typed_slices(false),
--- Slic3r-1.3.0/xs/src/libslic3r/SLAPrint.cpp~ 2020-06-02 22:25:43.439589772 +0100
+++ Slic3r-1.3.0/xs/src/libslic3r/SLAPrint.cpp 2020-06-02 22:26:00.324595850 +0100
@@ -7,9 +7,12 @@
#include <iostream>
#include <complex>
#include <cstdio>
+#include <boost/bind/bind.hpp>
namespace Slic3r {
+using boost::placeholders::_1;
+
void
SLAPrint::slice()
{
--- Slic3r-1.3.0/xs/src/libslic3r/TriangleMesh.cpp~ 2020-06-02 22:18:32.071434546 +0100
+++ Slic3r-1.3.0/xs/src/libslic3r/TriangleMesh.cpp 2020-06-02 22:19:16.409450504 +0100
@@ -14,6 +14,7 @@
#include <stdexcept>
#include <boost/config.hpp>
#include <boost/nowide/convert.hpp>
+#include <boost/bind/bind.hpp>
#ifdef SLIC3R_DEBUG
#include "SVG.hpp"
@@ -21,6 +22,8 @@
namespace Slic3r {
+using boost::placeholders::_1;
+
TriangleMesh::TriangleMesh()
: repaired(false)
{

33
slic3r-boost-nowide.patch Normal file
View File

@ -0,0 +1,33 @@
--- Slic3r-1.3.0/src/CMakeLists.txt~ 2020-06-02 23:18:23.296847282 +0100
+++ Slic3r-1.3.0/src/CMakeLists.txt 2020-06-02 23:18:25.377848192 +0100
@@ -22,7 +22,7 @@
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
-find_package(Boost COMPONENTS system thread filesystem)
+find_package(Boost COMPONENTS system thread filesystem nowide)
set(LIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/../xs/src/)
--- Slic3r-1.3.0/xs/Build.PL~ 2020-06-02 23:28:00.109099715 +0100
+++ Slic3r-1.3.0/xs/Build.PL 2020-06-02 23:28:04.078101452 +0100
@@ -147,7 +147,7 @@
}
# In order to generate the -l switches we need to know how Boost libraries are named
my $have_boost = 0;
-my @boost_libraries = qw(system thread filesystem); # we need these
+my @boost_libraries = qw(system thread filesystem nowide); # we need these
# check without explicit lib path (works on Linux)
if (! $mswin) {
$have_boost = 1
--- Slic3r-1.3.0/xs/src/libslic3r/Config.cpp~ 2020-06-02 22:39:49.772898701 +0100
+++ Slic3r-1.3.0/xs/src/libslic3r/Config.cpp 2020-06-02 22:39:53.419900049 +0100
@@ -13,7 +13,7 @@
#include <boost/config.hpp>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
-#include <boost/nowide/cenv.hpp>
+#include <boost/nowide/cstdlib.hpp>
#include <boost/nowide/fstream.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <boost/property_tree/ptree.hpp>

13
slic3r-endian.patch Normal file
View File

@ -0,0 +1,13 @@
--- Slic3r-1.3.0/xs/src/admesh/stl.h~ 2020-06-02 21:36:34.816574974 +0100
+++ Slic3r-1.3.0/xs/src/admesh/stl.h 2020-06-02 21:36:37.553576616 +0100
@@ -26,9 +26,8 @@
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
-#include <boost/detail/endian.hpp>
-#ifndef BOOST_LITTLE_ENDIAN
+#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
#error "admesh works correctly on little endian machines only!"
#endif

View File

@ -5,7 +5,7 @@
Name: slic3r
Version: 1.3.0
Release: 13%{?dist}
Release: 14%{?dist}
Summary: G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
License: AGPLv3 and CC-BY
# Images are CC-BY, code is AGPLv3
@ -24,6 +24,13 @@ Patch5: %{name}-1.3.0-fixtest.patch
Patch6: %{name}-wayland.patch
Patch7: %{name}-boost169.patch
# Use GCC predefined macros instead of deprecated Boost header
Patch8: %{name}-endian.patch
# Make boost::Placeholders::_1 visible
Patch9: %{name}-bind-placeholders.patch
# Use boost/nowide/cstdlib.hpp instead of boost/nowide/cenv.hpp
Patch10: %{name}-boost-nowide.patch
Source1: %{name}.desktop
Source2: %{name}.appdata.xml
@ -126,6 +133,9 @@ for more information.
%patch5 -p1 -b .fixtest
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
# Optional removals
%if %{use_system_admesh}
@ -241,6 +251,9 @@ SLIC3R_NO_AUTO=1 perl Build.PL installdirs=vendor
%{_datadir}/%{name}
%changelog
* Tue Jun 02 2020 Jonathan Wakely <jwakely@redhat.com> - 1.3.0-14
- Rebuilt and patched for Boost 1.73
* Wed May 13 2020 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-13
- Recommend optional dependencies to have background processing by default