From 3274ee789b75529b8cad7e779d9ca01d36875b24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <m...@hroncok.cz>
Date: Tue, 23 Feb 2016 18:32:28 +0100
Subject: Fix FTBFS

 * Add patch to fix FTBFS with Boost 1.60 (#1306668)
 * Add patch to manually cast too bool, fix other FTBFS
---
 slic3r-boolcast.patch | 40 ++++++++++++++++++++++++++++++++++++++++
 slic3r-boost160.patch | 21 +++++++++++++++++++++
 slic3r.spec           | 16 +++++++++++++++-
 3 files changed, 76 insertions(+), 1 deletion(-)
 create mode 100644 slic3r-boolcast.patch
 create mode 100644 slic3r-boost160.patch

diff --git a/slic3r-boolcast.patch b/slic3r-boolcast.patch
new file mode 100644
index 0000000..8fb6c98
--- /dev/null
+++ b/slic3r-boolcast.patch
@@ -0,0 +1,40 @@
+diff --git a/xs/src/libslic3r/Config.hpp b/xs/src/libslic3r/Config.hpp
+index 49e999b..e3344e7 100644
+--- a/xs/src/libslic3r/Config.hpp
++++ b/xs/src/libslic3r/Config.hpp
+@@ -65,7 +65,7 @@ class ConfigOptionFloat : public ConfigOption
+     
+     bool deserialize(std::string str) {
+         std::istringstream iss(str);
+-        return iss >> this->value;
++        return static_cast<bool>(iss >> this->value);
+     };
+ };
+ 
+@@ -124,7 +124,7 @@ class ConfigOptionInt : public ConfigOption
+     
+     bool deserialize(std::string str) {
+         std::istringstream iss(str);
+-        return iss >> this->value;
++        return static_cast<bool>(iss >> this->value);
+     };
+ };
+ 
+@@ -249,7 +249,7 @@ class ConfigOptionPercent : public ConfigOption
+     bool deserialize(std::string str) {
+         // don't try to parse the trailing % since it's optional
+         std::istringstream iss(str);
+-        return iss >> this->value;
++        return static_cast<bool>(iss >> this->value);
+     };
+ };
+ 
+@@ -279,7 +279,7 @@ class ConfigOptionFloatOrPercent : public ConfigOption
+     bool deserialize(std::string str) {
+         this->percent = str.find_first_of("%") != std::string::npos;
+         std::istringstream iss(str);
+-        return iss >> this->value;
++        return static_cast<bool>(iss >> this->value);
+     };
+ };
+ 
diff --git a/slic3r-boost160.patch b/slic3r-boost160.patch
new file mode 100644
index 0000000..b71af38
--- /dev/null
+++ b/slic3r-boost160.patch
@@ -0,0 +1,21 @@
+diff --git a/xs/src/libslic3r/Point.hpp b/xs/src/libslic3r/Point.hpp
+index f9850c7..9a52f3f 100644
+--- a/xs/src/libslic3r/Point.hpp
++++ b/xs/src/libslic3r/Point.hpp
+@@ -128,16 +128,6 @@ class Pointf3 : public Pointf
+ namespace boost { namespace polygon {
+     template <>
+     struct geometry_concept<coord_t> { typedef coordinate_concept type; };
+-    
+-    template <>
+-    struct coordinate_traits<coord_t> {
+-        typedef coord_t coordinate_type;
+-        typedef long double area_type;
+-        typedef long long manhattan_area_type;
+-        typedef unsigned long long unsigned_area_type;
+-        typedef long long coordinate_difference;
+-        typedef long double coordinate_distance;
+-    };
+ 
+     template <>
+     struct geometry_concept<Point> { typedef point_concept type; };
diff --git a/slic3r.spec b/slic3r.spec
index 2ccbda1..295883b 100644
--- a/slic3r.spec
+++ b/slic3r.spec
@@ -1,6 +1,6 @@
 Name:           slic3r
 Version:        1.2.9
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        G-code generator for 3D printers (RepRap, Makerbot, Ultimaker 
etc.)
 License:        AGPLv3 and CC-BY
 # Images are CC-BY, code is AGPLv3
@@ -17,6 +17,14 @@ Patch2:         %{name}-english-locale.patch
 Patch3:         %{name}-linker.patch
 #Patch4:         %{name}-clipper.patch
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=1306668
+# https://github.com/alexrj/Slic3r/issues/3117#issuecomment-187767676
+Patch5:         %{name}-boost160.patch
+
+# Patch to manually cast too bool, fix FTBFS
+# Will report upstream
+Patch6:         %{name}-boolcast.patch
+
 Source1:        %{name}.desktop
 Source2:        %{name}.appdata.xml
 
@@ -75,6 +83,8 @@ for more information.
 %patch2 -p1
 %patch3 -p1
 #%%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 # Remove bundled admesh, clipper, poly2tri and boost
 rm -rf xs/src/admesh
@@ -169,6 +179,10 @@ fi
 %{_datadir}/%{name}
 
 %changelog
+* Tue Feb 23 2016 Miro HronĨok <mhron...@redhat.com> - 1.2.9-6
+- Add patch to fix FTBFS with Boost 1.60 (#1306668)
+- Add patch to manually cast too bool, fix other FTBFS
+
 * Fri Feb 05 2016 Fedora Release Engineering <rel...@fedoraproject.org> - 
1.2.9-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/slic3r.git/commit/?h=master&id=3274ee789b75529b8cad7e779d9ca01d36875b24
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to