Bug#887359: stretch-pu: package slic3r/1.2.9+dfsg-9~deb9u1
Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu
Next round for slic3r ... more searchpath fixes to find Slic3r.pm in the
private library directory, #886125.
Since all the additional fixes from unstable looked sane and worthwile
to have in stable, I just rebuilt the sid package, like last time.
Andreas
diff -Nru slic3r-1.2.9+dfsg/debian/changelog slic3r-1.2.9+dfsg/debian/changelog
--- slic3r-1.2.9+dfsg/debian/changelog 2017-11-27 04:09:35.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/changelog 2018-01-15 13:39:54.000000000 +0100
@@ -1,3 +1,32 @@
+slic3r (1.2.9+dfsg-9~deb9u1) stretch; urgency=medium
+
+ * Non-maintainer upload.
+ * Rebuild for stretch.
+
+ -- Andreas Beckmann <anbe@debian.org> Mon, 15 Jan 2018 13:39:54 +0100
+
+slic3r (1.2.9+dfsg-9) unstable; urgency=medium
+
+ * [1ae29f4] Patch "use lib" line in all installed binaries (Closes: #886125)
+
+ -- Chow Loong Jin <hyperair@debian.org> Fri, 05 Jan 2018 17:30:58 +0800
+
+slic3r (1.2.9+dfsg-8) unstable; urgency=medium
+
+ * [c1b29a0] Acknowledge NMU (Closes: #869360)
+
+ -- Chow Loong Jin <hyperair@debian.org> Mon, 09 Oct 2017 23:00:52 +0800
+
+slic3r (1.2.9+dfsg-7) unstable; urgency=medium
+
+ * [e77c05d] Fill up slic3r.desktop so that it can be used to open stl files
+ * [9438384] Import patches to fix bugs.
+ - Workaround missing GL_MULTISAMPLE macro (Closes: #872273)
+ - Fix importing binary STLs on big-endian architectures
+ * [99cbb39] Bump Standards-Version
+
+ -- Chow Loong Jin <hyperair@debian.org> Tue, 03 Oct 2017 01:52:16 +0800
+
slic3r (1.2.9+dfsg-6.1~deb9u1) stretch; urgency=medium
* Non-maintainer upload.
diff -Nru slic3r-1.2.9+dfsg/debian/control slic3r-1.2.9+dfsg/debian/control
--- slic3r-1.2.9+dfsg/debian/control 2016-11-03 03:23:40.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/control 2018-01-05 10:30:58.000000000 +0100
@@ -27,7 +27,7 @@
xfonts-base,
xvfb,
xauth
-Standards-Version: 3.9.8
+Standards-Version: 4.1.0
Homepage: http://slic3r.org/
Vcs-Git: https://anonscm.debian.org/git/3dprinter/packages/slic3r.git
Vcs-Browser: https://anonscm.debian.org/git/3dprinter/packages/slic3r.git
diff -Nru slic3r-1.2.9+dfsg/debian/patches/Add-usr-lib-slic3r-to-lib-search-path.patch slic3r-1.2.9+dfsg/debian/patches/Add-usr-lib-slic3r-to-lib-search-path.patch
--- slic3r-1.2.9+dfsg/debian/patches/Add-usr-lib-slic3r-to-lib-search-path.patch 2016-11-03 03:23:40.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/patches/Add-usr-lib-slic3r-to-lib-search-path.patch 2018-01-05 10:30:58.000000000 +0100
@@ -3,8 +3,18 @@
Subject: Add /usr/lib/slic3r to lib search path
---
- slic3r.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ slic3r.pl | 2 +-
+ utils/amf-to-stl.pl | 2 +-
+ utils/config-bundle-to-config.pl | 2 +-
+ utils/dump-stl.pl | 2 +-
+ utils/gcode_sectioncut.pl | 2 +-
+ utils/pdf-slices.pl | 2 +-
+ utils/split_stl.pl | 2 +-
+ utils/stl-to-amf.pl | 2 +-
+ utils/view-mesh.pl | 2 +-
+ utils/view-toolpaths.pl | 2 +-
+ utils/wireframe.pl | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/slic3r.pl b/slic3r.pl
index 0fbd3bb..6d63f30 100755
@@ -19,3 +29,133 @@
}
use File::Basename qw(basename);
+diff --git a/utils/amf-to-stl.pl b/utils/amf-to-stl.pl
+index b421dd3..6e1127d 100755
+--- a/utils/amf-to-stl.pl
++++ b/utils/amf-to-stl.pl
+@@ -6,7 +6,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use File::Basename qw(basename);
+diff --git a/utils/config-bundle-to-config.pl b/utils/config-bundle-to-config.pl
+index beecd66..1c5d6a6 100755
+--- a/utils/config-bundle-to-config.pl
++++ b/utils/config-bundle-to-config.pl
+@@ -8,7 +8,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use Getopt::Long qw(:config no_auto_abbrev);
+diff --git a/utils/dump-stl.pl b/utils/dump-stl.pl
+index 08b4d75..aa08c4f 100644
+--- a/utils/dump-stl.pl
++++ b/utils/dump-stl.pl
+@@ -7,7 +7,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use Slic3r;
+diff --git a/utils/gcode_sectioncut.pl b/utils/gcode_sectioncut.pl
+index 4d9619e..dffeed1 100644
+--- a/utils/gcode_sectioncut.pl
++++ b/utils/gcode_sectioncut.pl
+@@ -6,7 +6,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use Getopt::Long qw(:config no_auto_abbrev);
+diff --git a/utils/pdf-slices.pl b/utils/pdf-slices.pl
+index fa7612b..123073d 100755
+--- a/utils/pdf-slices.pl
++++ b/utils/pdf-slices.pl
+@@ -6,7 +6,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use Getopt::Long qw(:config no_auto_abbrev);
+diff --git a/utils/split_stl.pl b/utils/split_stl.pl
+index 8e7d957..e379da4 100755
+--- a/utils/split_stl.pl
++++ b/utils/split_stl.pl
+@@ -6,7 +6,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use File::Basename qw(basename);
+diff --git a/utils/stl-to-amf.pl b/utils/stl-to-amf.pl
+index e1adec7..2175973 100755
+--- a/utils/stl-to-amf.pl
++++ b/utils/stl-to-amf.pl
+@@ -6,7 +6,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use File::Basename qw(basename);
+diff --git a/utils/view-mesh.pl b/utils/view-mesh.pl
+index 687a562..d69ec6f 100644
+--- a/utils/view-mesh.pl
++++ b/utils/view-mesh.pl
+@@ -6,7 +6,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use Getopt::Long qw(:config no_auto_abbrev);
+diff --git a/utils/view-toolpaths.pl b/utils/view-toolpaths.pl
+index 4bbbaab..bacc2ab 100755
+--- a/utils/view-toolpaths.pl
++++ b/utils/view-toolpaths.pl
+@@ -6,7 +6,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use Getopt::Long qw(:config no_auto_abbrev);
+diff --git a/utils/wireframe.pl b/utils/wireframe.pl
+index 053581d..ada846e 100644
+--- a/utils/wireframe.pl
++++ b/utils/wireframe.pl
+@@ -7,7 +7,7 @@ use warnings;
+
+ BEGIN {
+ use FindBin;
+- use lib "$FindBin::Bin/../lib";
++ use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
+ }
+
+ use Getopt::Long qw(:config no_auto_abbrev);
diff -Nru slic3r-1.2.9+dfsg/debian/patches/Fix-importing-of-binary-STLs-in-big-endian-architectures-.patch slic3r-1.2.9+dfsg/debian/patches/Fix-importing-of-binary-STLs-in-big-endian-architectures-.patch
--- slic3r-1.2.9+dfsg/debian/patches/Fix-importing-of-binary-STLs-in-big-endian-architectures-.patch 1970-01-01 01:00:00.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/patches/Fix-importing-of-binary-STLs-in-big-endian-architectures-.patch 2018-01-05 10:30:58.000000000 +0100
@@ -0,0 +1,229 @@
+From: Chow Loong Jin <hyperair@debian.org>
+Date: Tue, 3 Oct 2017 01:28:08 +0800
+Subject: Fix importing of binary STLs in big-endian architectures (#4143)
+
+Fix from https://github.com/admesh/admesh/pull/26
+Ported to Slic3r at https://github.com/alexrj/Slic3r/pull/4143
+
+Forwarded: commit:b9592961fa7ad89bdb9a2b044934df2082a75400
+---
+ xs/src/admesh/portable_endian.h | 123 ++++++++++++++++++++++++++++++++++++++++
+ xs/src/admesh/stlinit.c | 38 ++++++++++---
+ 2 files changed, 154 insertions(+), 7 deletions(-)
+ create mode 100644 xs/src/admesh/portable_endian.h
+
+diff --git a/xs/src/admesh/portable_endian.h b/xs/src/admesh/portable_endian.h
+new file mode 100644
+index 0000000..f980de8
+--- /dev/null
++++ b/xs/src/admesh/portable_endian.h
+@@ -0,0 +1,123 @@
++/* portable_endian.h
++ * from https://gist.github.com/panzi/6856583
++ * "License": Public Domain
++ * I, Mathias Panzenböck, place this file hereby into the public domain. Use it
++ * at your own risk for whatever you like. In case there are jurisdictions
++ * that don't support putting things in the public domain you can also consider
++ * it to be "dual licensed" under the BSD, MIT and Apache licenses, if you want
++ * to. This code is trivial anyway. Consider it an example on how to get the
++ * endian conversion functions on different platforms.
++ */
++
++#ifndef PORTABLE_ENDIAN_H__
++#define PORTABLE_ENDIAN_H__
++
++#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
++
++# define __WINDOWS__
++
++#endif
++
++#if defined(__linux__) || defined(__CYGWIN__)
++
++# include <endian.h>
++
++#elif defined(__APPLE__)
++
++# include <libkern/OSByteOrder.h>
++
++# define htobe16(x) OSSwapHostToBigInt16(x)
++# define htole16(x) OSSwapHostToLittleInt16(x)
++# define be16toh(x) OSSwapBigToHostInt16(x)
++# define le16toh(x) OSSwapLittleToHostInt16(x)
++
++# define htobe32(x) OSSwapHostToBigInt32(x)
++# define htole32(x) OSSwapHostToLittleInt32(x)
++# define be32toh(x) OSSwapBigToHostInt32(x)
++# define le32toh(x) OSSwapLittleToHostInt32(x)
++
++# define htobe64(x) OSSwapHostToBigInt64(x)
++# define htole64(x) OSSwapHostToLittleInt64(x)
++# define be64toh(x) OSSwapBigToHostInt64(x)
++# define le64toh(x) OSSwapLittleToHostInt64(x)
++
++# define __BYTE_ORDER BYTE_ORDER
++# define __BIG_ENDIAN BIG_ENDIAN
++# define __LITTLE_ENDIAN LITTLE_ENDIAN
++# define __PDP_ENDIAN PDP_ENDIAN
++
++#elif defined(__OpenBSD__)
++
++# include <sys/endian.h>
++
++#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
++
++# include <sys/endian.h>
++
++# define be16toh(x) betoh16(x)
++# define le16toh(x) letoh16(x)
++
++# define be32toh(x) betoh32(x)
++# define le32toh(x) letoh32(x)
++
++# define be64toh(x) betoh64(x)
++# define le64toh(x) letoh64(x)
++
++#elif defined(__WINDOWS__)
++
++/* # include <winsock2.h> */
++# include <sys/param.h>
++
++# if BYTE_ORDER == LITTLE_ENDIAN
++
++# define htobe16(x) htons(x)
++# define htole16(x) (x)
++# define be16toh(x) ntohs(x)
++# define le16toh(x) (x)
++
++# define htobe32(x) htonl(x)
++# define htole32(x) (x)
++# define be32toh(x) ntohl(x)
++# define le32toh(x) (x)
++
++# define htobe64(x) htonll(x)
++# define htole64(x) (x)
++# define be64toh(x) ntohll(x)
++# define le64toh(x) (x)
++
++# elif BYTE_ORDER == BIG_ENDIAN
++
++ /* that would be xbox 360 */
++# define htobe16(x) (x)
++# define htole16(x) __builtin_bswap16(x)
++# define be16toh(x) (x)
++# define le16toh(x) __builtin_bswap16(x)
++
++# define htobe32(x) (x)
++# define htole32(x) __builtin_bswap32(x)
++# define be32toh(x) (x)
++# define le32toh(x) __builtin_bswap32(x)
++
++# define htobe64(x) (x)
++# define htole64(x) __builtin_bswap64(x)
++# define be64toh(x) (x)
++# define le64toh(x) __builtin_bswap64(x)
++
++# else
++
++# error byte order not supported
++
++# endif
++
++# define __BYTE_ORDER BYTE_ORDER
++# define __BIG_ENDIAN BIG_ENDIAN
++# define __LITTLE_ENDIAN LITTLE_ENDIAN
++# define __PDP_ENDIAN PDP_ENDIAN
++
++#else
++
++# error platform not supported
++
++#endif
++
++#endif
+diff --git a/xs/src/admesh/stlinit.c b/xs/src/admesh/stlinit.c
+index e6f3556..ac30cad 100644
+--- a/xs/src/admesh/stlinit.c
++++ b/xs/src/admesh/stlinit.c
+@@ -20,11 +20,13 @@
+ * https://github.com/admesh/admesh/issues
+ */
+
++#include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+
++#include "portable_endian.h"
+ #include "stl.h"
+
+ #if !defined(SEEK_SET)
+@@ -67,7 +69,7 @@ stl_initialize(stl_file *stl) {
+ void
+ stl_count_facets(stl_file *stl, char *file) {
+ long file_size;
+- int header_num_facets;
++ uint32_t header_num_facets;
+ int num_facets;
+ int i, j;
+ size_t s;
+@@ -127,7 +129,7 @@ stl_count_facets(stl_file *stl, char *file) {
+ }
+
+ /* Read the int following the header. This should contain # of facets */
+- if((!fread(&header_num_facets, sizeof(int), 1, stl->fp)) || (num_facets != header_num_facets)) {
++ if((!fread(&header_num_facets, sizeof(uint32_t), 1, stl->fp)) || (uint32_t)num_facets != le32toh(header_num_facets)) {
+ fprintf(stderr,
+ "Warning: File size doesn't match number of facets in the header\n");
+ }
+@@ -262,7 +264,24 @@ stl_reallocate(stl_file *stl) {
+ void
+ stl_read(stl_file *stl, int first_facet, int first) {
+ stl_facet facet;
+- int i;
++ int i, j;
++ const int facet_float_length = 12;
++ float *facet_floats[12];
++ char facet_buffer[12 * sizeof(float)];
++ uint32_t endianswap_buffer; /* for byteswapping operations */
++
++ facet_floats[0] = &facet.normal.x;
++ facet_floats[1] = &facet.normal.y;
++ facet_floats[2] = &facet.normal.z;
++ facet_floats[3] = &facet.vertex[0].x;
++ facet_floats[4] = &facet.vertex[0].y;
++ facet_floats[5] = &facet.vertex[0].z;
++ facet_floats[6] = &facet.vertex[1].x;
++ facet_floats[7] = &facet.vertex[1].y;
++ facet_floats[8] = &facet.vertex[1].z;
++ facet_floats[9] = &facet.vertex[2].x;
++ facet_floats[10] = &facet.vertex[2].y;
++ facet_floats[11] = &facet.vertex[2].z;
+
+ if (stl->error) return;
+
+@@ -276,14 +295,19 @@ stl_read(stl_file *stl, int first_facet, int first) {
+ if(stl->stats.type == binary)
+ /* Read a single facet from a binary .STL file */
+ {
+- /* we assume little-endian architecture! */
+- if (fread(&facet.normal, sizeof(stl_normal), 1, stl->fp) \
+- + fread(&facet.vertex, sizeof(stl_vertex), 3, stl->fp) \
+- + fread(&facet.extra, sizeof(char), 2, stl->fp) != 6) {
++ if(fread(facet_buffer, sizeof(facet_buffer), 1, stl->fp)
++ + fread(&facet.extra, sizeof(char), 2, stl->fp) != 3) {
+ perror("Cannot read facet");
+ stl->error = 1;
+ return;
+ }
++
++ for(j = 0; j < facet_float_length; j++) {
++ /* convert LE float to host byte order */
++ memcpy(&endianswap_buffer, facet_buffer + j * sizeof(float), 4);
++ endianswap_buffer = le32toh(endianswap_buffer);
++ memcpy(facet_floats[j], &endianswap_buffer, 4);
++ }
+ } else
+ /* Read a single facet from an ASCII .STL file */
+ {
diff -Nru slic3r-1.2.9+dfsg/debian/patches/Fix-incompatibility-with-boost160.patch slic3r-1.2.9+dfsg/debian/patches/Fix-incompatibility-with-boost160.patch
--- slic3r-1.2.9+dfsg/debian/patches/Fix-incompatibility-with-boost160.patch 2016-11-03 03:23:40.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/patches/Fix-incompatibility-with-boost160.patch 2018-01-05 10:30:58.000000000 +0100
@@ -1,10 +1,18 @@
-Description: Support incompatible change in Boost 1.60
+From: Alessandro Ranellucci <aar@cpan.org>
+Date: Sun, 3 Dec 2017 03:39:33 -0800
+Subject: Support incompatible change in Boost 1.60
+
Origin: upstream, https://github.com/alexrj/Slic3r/commit/f4a9fa6569722ef530fac995dc66ec8b6a3179ce
-Author: Alessandro Ranellucci <aar@cpan.org>
Last-Update: 2016-03-14
+---
+ xs/src/libslic3r/Point.hpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/xs/src/libslic3r/Point.hpp b/xs/src/libslic3r/Point.hpp
+index f9850c7..04e2fc2 100644
--- a/xs/src/libslic3r/Point.hpp
+++ b/xs/src/libslic3r/Point.hpp
-@@ -124,11 +124,15 @@
+@@ -124,11 +124,15 @@ class Pointf3 : public Pointf
}
// start Boost
@@ -20,7 +28,7 @@
template <>
struct coordinate_traits<coord_t> {
typedef coord_t coordinate_type;
-@@ -138,6 +142,7 @@
+@@ -138,6 +142,7 @@ namespace boost { namespace polygon {
typedef long long coordinate_difference;
typedef long double coordinate_distance;
};
@@ -28,4 +36,3 @@
template <>
struct geometry_concept<Point> { typedef point_concept type; };
-
diff -Nru slic3r-1.2.9+dfsg/debian/patches/Fix-return-value-for-deserialize.patch slic3r-1.2.9+dfsg/debian/patches/Fix-return-value-for-deserialize.patch
--- slic3r-1.2.9+dfsg/debian/patches/Fix-return-value-for-deserialize.patch 2016-11-03 03:23:40.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/patches/Fix-return-value-for-deserialize.patch 2018-01-05 10:30:58.000000000 +0100
@@ -1,12 +1,22 @@
-Description: Fixed return value for deserialize() implementations
- This fixes a FTBFS with GCC 6.
+From: Alessandro Ranellucci <aar@cpan.org>
+Date: Sun, 3 Dec 2017 03:39:33 -0800
+Subject: 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 <aar@cpan.org>
Last-Update: 2016-03-13
+---
+ xs/src/libslic3r/Config.cpp | 5 ++++-
+ xs/src/libslic3r/Config.hpp | 12 ++++++++----
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/xs/src/libslic3r/Config.cpp b/xs/src/libslic3r/Config.cpp
+index d1c51ac..6ffd9c9 100644
--- a/xs/src/libslic3r/Config.cpp
+++ b/xs/src/libslic3r/Config.cpp
-@@ -23,7 +23,10 @@
+@@ -23,7 +23,10 @@ ConfigBase::apply(const ConfigBase &other, bool ignore_nonexistent) {
// not the most efficient way, but easier than casting pointers to subclasses
bool res = my_opt->deserialize( other.option(*it)->serialize() );
@@ -18,9 +28,11 @@
}
}
+diff --git a/xs/src/libslic3r/Config.hpp b/xs/src/libslic3r/Config.hpp
+index 49e999b..b8769a1 100644
--- a/xs/src/libslic3r/Config.hpp
+++ b/xs/src/libslic3r/Config.hpp
-@@ -65,7 +65,8 @@
+@@ -65,7 +65,8 @@ class ConfigOptionFloat : public ConfigOption
bool deserialize(std::string str) {
std::istringstream iss(str);
@@ -30,7 +42,7 @@
};
};
-@@ -124,7 +125,8 @@
+@@ -124,7 +125,8 @@ class ConfigOptionInt : public ConfigOption
bool deserialize(std::string str) {
std::istringstream iss(str);
@@ -40,7 +52,7 @@
};
};
-@@ -249,7 +251,8 @@
+@@ -249,7 +251,8 @@ class ConfigOptionPercent : public ConfigOption
bool deserialize(std::string str) {
// don't try to parse the trailing % since it's optional
std::istringstream iss(str);
@@ -50,7 +62,7 @@
};
};
-@@ -279,7 +282,8 @@
+@@ -279,7 +282,8 @@ class ConfigOptionFloatOrPercent : public ConfigOption
bool deserialize(std::string str) {
this->percent = str.find_first_of("%") != std::string::npos;
std::istringstream iss(str);
@@ -60,4 +72,3 @@
};
};
-
diff -Nru slic3r-1.2.9+dfsg/debian/patches/Workaround-missing-GL_MULTISAMPLE-macro.patch slic3r-1.2.9+dfsg/debian/patches/Workaround-missing-GL_MULTISAMPLE-macro.patch
--- slic3r-1.2.9+dfsg/debian/patches/Workaround-missing-GL_MULTISAMPLE-macro.patch 1970-01-01 01:00:00.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/patches/Workaround-missing-GL_MULTISAMPLE-macro.patch 2018-01-05 10:30:58.000000000 +0100
@@ -0,0 +1,38 @@
+From: Chow Loong Jin <hyperair@debian.org>
+Date: Tue, 3 Oct 2017 01:20:40 +0800
+Subject: Workaround missing GL_MULTISAMPLE macro
+
+Bug-Debian: https://bugs.debian.org/bugreport.cgi?bug=872273
+Bug: https://github.com/alexrj/Slic3r/issues/4085
+Forwarded: https://github.com/prusa3d/Slic3r/commit/888a904c9b484289318737ec583ac0794dfa84f7
+ https://github.com/prusa3d/Slic3r/commit/6d4ec5c989851e442d58f896d4b0324129e7514a
+From: Vojtech Bubnik <bubnikv@gmail.com>
+---
+ lib/Slic3r/GUI/3DScene.pm | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm
+index 7628a6c..d3aa461 100644
+--- a/lib/Slic3r/GUI/3DScene.pm
++++ b/lib/Slic3r/GUI/3DScene.pm
+@@ -616,7 +616,10 @@ sub InitGL {
+ # Set antialiasing/multisampling
+ glDisable(GL_LINE_SMOOTH);
+ glDisable(GL_POLYGON_SMOOTH);
+- glEnable(GL_MULTISAMPLE);
++ eval {
++ glEnable(GL_MULTISAMPLE);
++ };
++ my $have_multisample = !$@;
+
+ # ambient lighting
+ glLightModelfv_p(GL_LIGHT_MODEL_AMBIENT, 0.3, 0.3, 0.3, 1);
+@@ -641,7 +644,7 @@ sub InitGL {
+ # A handy trick -- have surface material mirror the color.
+ glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
+ glEnable(GL_COLOR_MATERIAL);
+- glEnable(GL_MULTISAMPLE);
++ glEnable(GL_MULTISAMPLE) if $have_multisample;
+ }
+
+ sub Render {
diff -Nru slic3r-1.2.9+dfsg/debian/patches/series slic3r-1.2.9+dfsg/debian/patches/series
--- slic3r-1.2.9+dfsg/debian/patches/series 2016-11-03 03:23:40.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/patches/series 2018-01-05 10:30:58.000000000 +0100
@@ -3,3 +3,5 @@
Fix-incompatibility-with-boost160.patch
Fix-return-value-for-deserialize.patch
Add-usr-lib-slic3r-to-lib-search-path.patch
+Workaround-missing-GL_MULTISAMPLE-macro.patch
+Fix-importing-of-binary-STLs-in-big-endian-architectures-.patch
diff -Nru slic3r-1.2.9+dfsg/debian/slic3r.desktop slic3r-1.2.9+dfsg/debian/slic3r.desktop
--- slic3r-1.2.9+dfsg/debian/slic3r.desktop 2016-11-03 03:23:40.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/slic3r.desktop 2018-01-05 10:30:58.000000000 +0100
@@ -3,7 +3,9 @@
Type=Application
Name=Slic3r
Icon=slic3r
-Exec=slic3r
+Exec=slic3r --gui %F
Keywords=perl;slice;3D;printer;convert;gcode;stl;obj;amf;
StartupNotify=false
-StartupWMClass=Slic3r.pl
+StartupWMClass=slic3r
+MimeType=application/sla;model/x-wavefront-obj;model/x-geomview-off;application/x-amf;
+Categories=Development;Engineering;
diff -Nru slic3r-1.2.9+dfsg/debian/slic3r.sharedmimeinfo slic3r-1.2.9+dfsg/debian/slic3r.sharedmimeinfo
--- slic3r-1.2.9+dfsg/debian/slic3r.sharedmimeinfo 1970-01-01 01:00:00.000000000 +0100
+++ slic3r-1.2.9+dfsg/debian/slic3r.sharedmimeinfo 2018-01-05 10:30:58.000000000 +0100
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/sla">
+ <comment>Stereolithography File Format</comment>
+ <glob pattern="*.stl"/>
+ </mime-type>
+ <mime-type type="model/x-wavefront-obj">
+ <comment>Wavefront Object File</comment>
+ <glob pattern="*.obj"/>
+ </mime-type>
+ <mime-type type="model/x-geomview-off">
+ <comment>Geomview Object File Format</comment>
+ <glob pattern="*.off"/>
+ <magic priority="50">
+ <match value="OFF" type="string" offset="0"/>
+ </magic>
+ </mime-type>
+ <mime-type type="application/x-amf">
+ <comment>Additive Manufacturing File Format</comment>
+ <glob pattern="*.amf"/>
+ </mime-type>
+</mime-info>
Reply to: