slic3r: fix build with gcc6
This commit is contained in:
parent
f93a019816
commit
707ee76522
|
@ -12,6 +12,10 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1z8h11k29b7z49z5k8ikyfiijyycy1q3krlzi8hfd0vdybvymw21";
|
sha256 = "1z8h11k29b7z49z5k8ikyfiijyycy1q3krlzi8hfd0vdybvymw21";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./gcc6.patch
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = with perlPackages; [ perl makeWrapper which
|
buildInputs = with perlPackages; [ perl makeWrapper which
|
||||||
EncodeLocale MathClipper ExtUtilsXSpp threads
|
EncodeLocale MathClipper ExtUtilsXSpp threads
|
||||||
MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
|
MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
|
||||||
|
@ -31,6 +35,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export SLIC3R_NO_AUTO=true
|
export SLIC3R_NO_AUTO=true
|
||||||
|
export LD=$CXX
|
||||||
export PERL5LIB="./xs/blib/arch/:./xs/blib/lib:$PERL5LIB"
|
export PERL5LIB="./xs/blib/arch/:./xs/blib/lib:$PERL5LIB"
|
||||||
|
|
||||||
substituteInPlace Build.PL \
|
substituteInPlace Build.PL \
|
||||||
|
|
40
pkgs/applications/misc/slic3r/gcc6.patch
Normal file
40
pkgs/applications/misc/slic3r/gcc6.patch
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
diff --git i/xs/src/libslic3r/Config.hpp w/xs/src/libslic3r/Config.hpp
|
||||||
|
index 49e999b..d9b65d8 100644
|
||||||
|
--- i/xs/src/libslic3r/Config.hpp
|
||||||
|
+++ w/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 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 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 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 bool(iss >> this->value);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in a new issue