From 685d11bd3de29e07c216aebb8e947191f8da8f10 Mon Sep 17 00:00:00 2001 From: Thorsten Weber Date: Sat, 17 Nov 2018 21:13:28 +0100 Subject: [PATCH] slic3r: 1.2.9 -> 1.3.0 --- pkgs/applications/misc/slic3r/default.nix | 26 +++++++++------ pkgs/applications/misc/slic3r/gcc6.patch | 40 ----------------------- 2 files changed, 16 insertions(+), 50 deletions(-) delete mode 100644 pkgs/applications/misc/slic3r/gcc6.patch diff --git a/pkgs/applications/misc/slic3r/default.nix b/pkgs/applications/misc/slic3r/default.nix index 21b55e6e7a01..7b28462d5527 100644 --- a/pkgs/applications/misc/slic3r/default.nix +++ b/pkgs/applications/misc/slic3r/default.nix @@ -1,28 +1,27 @@ { stdenv, fetchgit, perl, makeWrapper, makeDesktopItem -, which, perlPackages +, which, perlPackages, boost }: stdenv.mkDerivation rec { - version = "1.2.9"; + version = "1.3.0"; name = "slic3r-${version}"; src = fetchgit { url = "git://github.com/alexrj/Slic3r"; - rev = "refs/tags/${version}"; - sha256 = "1z8h11k29b7z49z5k8ikyfiijyycy1q3krlzi8hfd0vdybvymw21"; + rev = version; + sha256 = "1pg4jxzb7f58ls5s8mygza8kqdap2c50kwlsdkf28bz1xi611zbi"; }; - patches = [ - ./gcc6.patch - ]; - - buildInputs = with perlPackages; [ perl makeWrapper which + buildInputs = + [boost] ++ + (with perlPackages; [ perl makeWrapper which EncodeLocale MathClipper ExtUtilsXSpp threads MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo IOStringy ClassXSAccessor Wx GrowlGNTP NetDBus ImportInto XMLSAX ExtUtilsMakeMaker OpenGL WxGLCanvas ModuleBuild LWP ExtUtilsCppGuess ModuleBuildWithXSpp ExtUtilsTypemapsDefault - ]; + DevelChecklib locallib + ]); desktopItem = makeDesktopItem { name = "slic3r"; @@ -34,6 +33,13 @@ stdenv.mkDerivation rec { categories = "Application;Development;"; }; + prePatch = '' + # In nix ioctls.h isn't available from the standard kernel-headers package + # on other distributions. As the copy in glibc seems to be identical to the + # one in the kernel, we use that one instead. + sed -i 's|"/usr/include/asm-generic/ioctls.h"||g' xs/src/libslic3r/GCodeSender.cpp + ''; + buildPhase = '' export SLIC3R_NO_AUTO=true export LD=$CXX diff --git a/pkgs/applications/misc/slic3r/gcc6.patch b/pkgs/applications/misc/slic3r/gcc6.patch deleted file mode 100644 index f382a252f0d0..000000000000 --- a/pkgs/applications/misc/slic3r/gcc6.patch +++ /dev/null @@ -1,40 +0,0 @@ -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); - }; - }; -