Control: tags -1 patch
Hi Maintainer
Please find patches from upstream attached, fixing the build issues with
GCC6 and Boost 1.60.
Regards
Graham
Description: Fixed return value for deserialize() implementations
This fixes a FTBFS with GCC 6.
Origin: upstream, https://github.com/alexrj/Slic3r/commit/6e5938c8330b5bdb6b85c3ca8dc188605ee56b98
Bug-Debian: https://bugs.debian.org/811700
Author: Alessandro Ranellucci <a...@cpan.org>
Last-Update: 2016-03-13
--- a/xs/src/libslic3r/Config.cpp
+++ b/xs/src/libslic3r/Config.cpp
@@ -23,7 +23,10 @@
// not the most efficient way, but easier than casting pointers to subclasses
bool res = my_opt->deserialize( other.option(*it)->serialize() );
- if (!res) CONFESS("Unexpected failure when deserializing serialized value");
+ if (!res) {
+ std::string error = "Unexpected failure when deserializing serialized value for " + *it;
+ CONFESS(error.c_str());
+ }
}
}
--- a/xs/src/libslic3r/Config.hpp
+++ b/xs/src/libslic3r/Config.hpp
@@ -65,7 +65,8 @@
bool deserialize(std::string str) {
std::istringstream iss(str);
- return iss >> this->value;
+ iss >> this->value;
+ return !iss.fail();
};
};
@@ -124,7 +125,8 @@
bool deserialize(std::string str) {
std::istringstream iss(str);
- return iss >> this->value;
+ iss >> this->value;
+ return !iss.fail();
};
};
@@ -249,7 +251,8 @@
bool deserialize(std::string str) {
// don't try to parse the trailing % since it's optional
std::istringstream iss(str);
- return iss >> this->value;
+ iss >> this->value;
+ return !iss.fail();
};
};
@@ -279,7 +282,8 @@
bool deserialize(std::string str) {
this->percent = str.find_first_of("%") != std::string::npos;
std::istringstream iss(str);
- return iss >> this->value;
+ iss >> this->value;
+ return !iss.fail();
};
};
Description: Support incompatible change in Boost 1.60
Origin: upstream, https://github.com/alexrj/Slic3r/commit/f4a9fa6569722ef530fac995dc66ec8b6a3179ce
Author: Alessandro Ranellucci <a...@cpan.org>
Last-Update: 2016-03-14
--- a/xs/src/libslic3r/Point.hpp
+++ b/xs/src/libslic3r/Point.hpp
@@ -124,11 +124,15 @@
}
// start Boost
+#include <boost/version.hpp>
#include <boost/polygon/polygon.hpp>
namespace boost { namespace polygon {
template <>
struct geometry_concept<coord_t> { typedef coordinate_concept type; };
+/* Boost.Polygon already defines a specialization for coordinate_traits<long> as of 1.60:
+ https://github.com/boostorg/polygon/commit/0ac7230dd1f8f34cb12b86c8bb121ae86d3d9b97 */
+#if BOOST_VERSION < 106000
template <>
struct coordinate_traits<coord_t> {
typedef coord_t coordinate_type;
@@ -138,6 +142,7 @@
typedef long long coordinate_difference;
typedef long double coordinate_distance;
};
+#endif
template <>
struct geometry_concept<Point> { typedef point_concept type; };