3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/slic3r/fix-no-display.patch
Moritz Ulrich 0fc8d92e53 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.
2014-11-15 19:22:59 +01:00

60 lines
1.9 KiB
Diff

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 {