slic3r: Bump to 1.2.1
Also adds OpenGL and WxGLCanvas to perlPackages.. OpenGL currently contains some pretty ugly hacks regarding OpenGL feature-detection. Expect it to fail on different systems.
This commit is contained in:
@@ -3,21 +3,20 @@
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.1.7";
|
||||
version = "1.2.1";
|
||||
name = "slic3r-${version}";
|
||||
|
||||
# Slic3r doesn't put out tarballs, only a git repository is available
|
||||
src = fetchgit {
|
||||
url = "git://github.com/alexrj/Slic3r";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "0hss90iw4xwca08d03wrz0fds5nqwb9zjqii2n6rgpcl4km69fka";
|
||||
sha256 = "03xj2kv2d4j6nwmdd5cyghnvjyj4g7g9z0ynynbviyfiplmka2ph";
|
||||
};
|
||||
|
||||
buildInputs = with perlPackages; [ perl makeWrapper which
|
||||
EncodeLocale MathClipper ExtUtilsXSpp BoostGeometryUtils
|
||||
MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
|
||||
IOStringy ClassXSAccessor Wx GrowlGNTP NetDBus ImportInto XMLSAX
|
||||
ExtUtilsMakeMaker
|
||||
ExtUtilsMakeMaker OpenGL WxGLCanvas
|
||||
];
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
@@ -34,12 +33,16 @@ stdenv.mkDerivation rec {
|
||||
export SLIC3R_NO_AUTO=true
|
||||
export PERL5LIB="./xs/blib/arch/:./xs/blib/lib:$PERL5LIB"
|
||||
|
||||
substituteInPlace Build.PL \
|
||||
--replace "0.9918" "0.9923" \
|
||||
--replace "eval" ""
|
||||
|
||||
pushd xs
|
||||
perl Build.PL
|
||||
perl Build
|
||||
popd
|
||||
|
||||
perl Build.PL
|
||||
perl Build.PL --gui
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
diff --git a/Build.PL b/Build.PL
|
||||
index 8b21c15..fd3aff0 100644
|
||||
--- a/Build.PL
|
||||
+++ b/Build.PL
|
||||
@@ -33,9 +33,6 @@ my $sudo = grep { $_ eq '--sudo' } @ARGV;
|
||||
my $gui = grep { $_ eq '--gui' } @ARGV;
|
||||
my $xs_only = grep { $_ eq '--xs' } @ARGV;
|
||||
if ($gui) {
|
||||
- %prereqs = qw(
|
||||
- Wx 0.9918
|
||||
- );
|
||||
%recommends = qw(
|
||||
Growl::GNTP 0.15
|
||||
Wx::GLCanvas 0
|
||||
diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm
|
||||
index 842ff44..ea0af64 100644
|
||||
--- a/lib/Slic3r/GUI.pm
|
||||
+++ b/lib/Slic3r/GUI.pm
|
||||
@@ -26,7 +26,7 @@ use Slic3r::GUI::OptionsGroup::Field;
|
||||
use Slic3r::GUI::SimpleTab;
|
||||
use Slic3r::GUI::Tab;
|
||||
|
||||
-our $have_OpenGL = eval "use Slic3r::GUI::PreviewCanvas; 1";
|
||||
+our $have_OpenGL = 0;
|
||||
|
||||
use Wx 0.9901 qw(:bitmap :dialog :icon :id :misc :systemsettings :toplevelwindow
|
||||
:filedialog);
|
||||
diff --git a/lib/Slic3r/GUI/Plater/2DToolpaths.pm b/lib/Slic3r/GUI/Plater/2DToolpaths.pm
|
||||
index 8e48a72..7bed973 100644
|
||||
--- a/lib/Slic3r/GUI/Plater/2DToolpaths.pm
|
||||
+++ b/lib/Slic3r/GUI/Plater/2DToolpaths.pm
|
||||
@@ -90,18 +90,20 @@ sub set_z {
|
||||
package Slic3r::GUI::Plater::2DToolpaths::Canvas;
|
||||
|
||||
use Wx::Event qw(EVT_PAINT EVT_SIZE EVT_ERASE_BACKGROUND EVT_IDLE EVT_MOUSEWHEEL EVT_MOUSE_EVENTS);
|
||||
-use OpenGL qw(:glconstants :glfunctions :glufunctions);
|
||||
-use base qw(Wx::GLCanvas Class::Accessor);
|
||||
-use Wx::GLCanvas qw(:all);
|
||||
use List::Util qw(min first);
|
||||
use Slic3r::Geometry qw(scale unscale epsilon);
|
||||
|
||||
__PACKAGE__->mk_accessors(qw(print z layers color init dirty bb));
|
||||
|
||||
-# make OpenGL::Array thread-safe
|
||||
-{
|
||||
- no warnings 'redefine';
|
||||
- *OpenGL::Array::CLONE_SKIP = sub { 1 };
|
||||
+if ($Slic3r::GUI::have_OpenGL) {
|
||||
+ use OpenGL qw(:glconstants :glfunctions :glufunctions);
|
||||
+ use Wx::GLCanvas qw(:all);
|
||||
+ use base qw(Wx::GLCanvas Class::Accessor);
|
||||
+ # make OpenGL::Array thread-safe
|
||||
+ {
|
||||
+ no warnings 'redefine';
|
||||
+ *OpenGL::Array::CLONE_SKIP = sub { 1 };
|
||||
+ }
|
||||
}
|
||||
|
||||
sub new {
|
||||
Reference in New Issue
Block a user