#1 WIP: Slic3r 1.3.0
Closed a year ago by churchyard. Opened a year ago by churchyard.
rpms/ churchyard/slic3r 130  into  master

file modified
+19 -6

@@ -1,18 +1,18 @@ 

  diff --git a/xs/src/libslic3r/ClipperUtils.hpp b/xs/src/libslic3r/ClipperUtils.hpp

- index ab144f2..86331ac 100644

+ index ddd551c..8149366 100644

  --- a/xs/src/libslic3r/ClipperUtils.hpp

  +++ b/xs/src/libslic3r/ClipperUtils.hpp

  @@ -2,7 +2,7 @@

   #define slic3r_ClipperUtils_hpp_

   

-  #include <myinit.h>

+  #include <libslic3r.h>

  -#include "clipper.hpp"

  +#include <polyclipping/clipper.hpp>

   #include "ExPolygon.hpp"

   #include "Polygon.hpp"

   #include "Surface.hpp"

  diff --git a/xs/src/libslic3r/Geometry.cpp b/xs/src/libslic3r/Geometry.cpp

- index 827029a..e5b54bb 100644

+ index 7bcb644..5258485 100644

  --- a/xs/src/libslic3r/Geometry.cpp

  +++ b/xs/src/libslic3r/Geometry.cpp

  @@ -3,7 +3,7 @@

@@ -22,16 +22,29 @@ 

  -#include "clipper.hpp"

  +#include <polyclipping/clipper.hpp>

   #include <algorithm>

+  #include <cassert>

   #include <cmath>

-  #include <list>

+ diff --git a/xs/src/libslic3r/SVG.hpp b/xs/src/libslic3r/SVG.hpp

+ index fbb5e37..bb9f4cc 100644

+ --- a/xs/src/libslic3r/SVG.hpp

+ +++ b/xs/src/libslic3r/SVG.hpp

+ @@ -2,7 +2,7 @@

+  #define slic3r_SVG_hpp_

+  

+  #include "libslic3r.h"

+ -#include "clipper.hpp"

+ +#include <polyclipping/clipper.hpp>

+  #include "ExPolygon.hpp"

+  #include "Line.hpp"

+  #include "TriangleMesh.hpp"

  diff --git a/xs/xsp/Clipper.xsp b/xs/xsp/Clipper.xsp

- index d9530f7..3ba2448 100644

+ index 7bbbdb8..8b52133 100644

  --- a/xs/xsp/Clipper.xsp

  +++ b/xs/xsp/Clipper.xsp

  @@ -2,7 +2,7 @@

   

   %{

-  #include <myinit.h>

+  #include <xsinit.h>

  -#include "clipper.hpp"

  +#include <polyclipping/clipper.hpp>

   #include "libslic3r/ClipperUtils.hpp"

file modified
+8 -8

@@ -1,13 +1,13 @@ 

  diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm

- index 154af90..ef8274c 100644

+ index 47ed095..c019b68 100644

  --- a/lib/Slic3r.pm

  +++ b/lib/Slic3r.pm

- @@ -30,7 +30,7 @@ warn "Running Slic3r under Perl 5.16 is not supported nor recommended\n"

-      if $^V == v5.16;

+ @@ -42,7 +42,7 @@ warn "Running Slic3r under Perl 5.16 is neither supported nor recommended\n"

   

   use FindBin;

- -our $var = decode_path($FindBin::Bin) . "/var";

- +our $var = "/usr/share/slic3r";

-  

-  use Moo 1.003001;

-  

+  # Path to the images.

+ -my $varpath = decode_path($FindBin::Bin) . "/var";

+ +my $varpath = "/usr/share/slic3r";

+  if ($^O eq 'darwin' && !-d $varpath) {

+      $varpath = decode_path($FindBin::Bin) . "/../Resources/var";

+  }

file modified
+4 -4

@@ -1,12 +1,12 @@ 

  diff --git a/slic3r.pl b/slic3r.pl

- index a533250..814d8b7 100755

+ index 11dc2fa..80e6dc7 100755

  --- a/slic3r.pl

  +++ b/slic3r.pl

- @@ -11,6 +11,7 @@ BEGIN {

+ @@ -13,6 +13,7 @@ use File::Basename qw(basename);

   use Getopt::Long qw(:config no_auto_abbrev);

   use List::Util qw(first);

-  use POSIX qw(setlocale LC_NUMERIC);

+  use POSIX qw(setlocale LC_NUMERIC ceil);

  +$ENV{LC_NUMERIC} = 'en_US.UTF-8';

   use Slic3r;

+  use Slic3r::Geometry qw(epsilon X Y Z deg2rad);

   use Time::HiRes qw(gettimeofday tv_interval);

-  $|++;

file modified
+9 -12

@@ -1,15 +1,12 @@ 

  diff --git a/xs/Build.PL b/xs/Build.PL

- index bc18bc5..9e2ce40 100644

+ index a4d00cd..0e4ab3c 100644

  --- a/xs/Build.PL

  +++ b/xs/Build.PL

- @@ -41,6 +41,10 @@ my $build = Module::Build::WithXSpp->new(

-          Module::Build::WithXSpp     0.13

-      )},

-      extra_compiler_flags => \@cflags,

- +    extra_linker_flags => [qw(

- +        -ladmesh

- +        -lpoly2tri

- +    )],

-      

-      # Provides extra C typemaps that are auto-merged

-      extra_typemap_modules => {

+ @@ -29,6 +29,7 @@ if ($cpp_guess->is_gcc)	{

+  push @cflags, qw(-std=c++11);

+  

+  my @ldflags = ();

+ +push @ldflags, qw(-ladmesh -lpoly2tri);

+  

+  if ($linux && (defined $ENV{SLIC3R_STATIC} && $ENV{SLIC3R_STATIC})) {

+      push @ldflags, qw(-static-libgcc -static-libstdc++);

file modified
+30 -33

@@ -1,6 +1,6 @@ 

  Name:           slic3r

- Version:        1.2.9

- Release:        18%{?dist}

+ Version:        1.3.0

+ Release:        1%{?dist}

  Summary:        G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)

  License:        AGPLv3 and CC-BY

  # Images are CC-BY, code is AGPLv3

@@ -14,31 +14,19 @@ 

  # Use /usr/share/slic3r as datadir

  Patch1:         %{name}-datadir.patch

  Patch2:         %{name}-english-locale.patch

- Patch3:         %{name}-linker.patch

+ #Patch3:         %{name}-linker.patch

  #Patch4:         %{name}-clipper.patch

  

- # https://bugzilla.redhat.com/show_bug.cgi?id=1306668

- # https://github.com/alexrj/Slic3r/issues/3117#issuecomment-187767676

- Patch5:         %{name}-boost160.patch

- 

- # Patch to manually cast too bool, fix FTBFS

- # Will report upstream

- Patch6:         %{name}-boolcast.patch

- 

- # https://bugzilla.redhat.com/show_bug.cgi?id=1285807

- # https://github.com/alexrj/Slic3r/commit/1a09ae81db06602050ae83620268efa33ed14da1

- Patch7:         %{name}-wxclose.patch

- 

- # https://github.com/alexrj/Slic3r/pull/3575

- Patch8:         %{name}-opengl070.patch

- 

  Source1:        %{name}.desktop

  Source2:        %{name}.appdata.xml

  

+ # TODO check what can be removed

  BuildRequires:  gcc-c++

  BuildRequires:  perl-devel

  BuildRequires:  perl-generators

  BuildRequires:  perl(Class::XSAccessor)

+ BuildRequires:  perl(Devel::CheckLib)

+ BuildRequires:  perl(Devel::Peek)

  BuildRequires:  perl(Encode::Locale) >= 1.05

  BuildRequires:  perl(ExtUtils::CBuilder)

  BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.80

@@ -51,6 +39,7 @@ 

  BuildRequires:  perl(Growl::GNTP) >= 0.15

  BuildRequires:  perl(IO::Scalar)

  BuildRequires:  perl(List::Util)

+ BuildRequires:  perl(local::lib)

  BuildRequires:  perl(Math::PlanePath) >= 53

  BuildRequires:  perl(Module::Build::WithXSpp) >= 0.14

  BuildRequires:  perl(Moo) >= 1.003001

@@ -62,6 +51,7 @@ 

  BuildRequires:  perl(Test::Harness)

  BuildRequires:  perl(Test::More)

  BuildRequires:  perl(Thread::Semaphore)

+ BuildRequires:  perl(Thread::Queue)

  BuildRequires:  perl(threads) >= 1.96

  BuildRequires:  perl(Time::HiRes)

  BuildRequires:  perl(Unicode::Normalize)

@@ -69,17 +59,29 @@ 

  BuildRequires:  perl(XML::SAX)

  BuildRequires:  perl(XML::SAX::ExpatXS)

  

- BuildRequires:  admesh-devel >= 0.98.1

+ #BuildRequires:  admesh-devel >= 0.98.1

  BuildRequires:  boost-devel

+ BuildRequires:  boost-nowide-devel

  BuildRequires:  desktop-file-utils

- BuildRequires:  poly2tri-devel

+ #BuildRequires:  poly2tri-devel

  #BuildRequires:  polyclipping-devel >= 6.2.0

  BuildRequires:  ImageMagick

  

  Requires:       perl(XML::SAX)

  Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

- Requires:       admesh-libs >= 0.98.1

- Provides:       bundled(polyclipping) = 6.2.9

+ #Requires:       admesh-libs >= 0.98.1

+ 

+ # TODO check for recommends that are not automatically added

+ # Growl::GNTP

+ # Wx::GLCanvas

+ # OpenGL

+ # LWP::UserAgent

+ # Net::Bonjour

+ 

+ # TODO check what can be unbundled, one by one

+ Provides:       bundled(admesh) = 0.98

+ Provides:       bundled(polyclipping) = 6.4.2

+ Provides:       bundled(poly2tri) = 0.0

  

  

  %description

@@ -94,17 +96,13 @@ 

  %patch0 -p1

  %patch1 -p1

  %patch2 -p1

- %patch3 -p1

+ #%%patch3 -p1

  #%%patch4 -p1

- %patch5 -p1

- %patch6 -p1

- %patch7 -p1

- %patch8 -p1

  

  # Remove bundled admesh, clipper, poly2tri and boost

- rm -rf xs/src/admesh

+ #rm -rf xs/src/admesh

  #rm xs/src/clipper.*pp

- rm -rf xs/src/poly2tri

+ #rm -rf xs/src/poly2tri

  rm -rf xs/src/boost

  

  %build

@@ -165,10 +163,6 @@ 

  SLIC3R_NO_AUTO=1 perl Build.PL installdirs=vendor

  # the --gui runs no tests, it only checks requires

  

- %post -p /sbin/ldconfig

- 

- %postun -p /sbin/ldconfig

- 

  %files

  %doc README.md

  %{_bindir}/%{name}

@@ -184,6 +178,9 @@ 

  %{_datadir}/%{name}

  

  %changelog

+ * Thu May 31 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-1

+ - Update to 1.3.0

+ 

  * Tue Mar 06 2018 Petr Pisar <ppisar@redhat.com> - 1.2.9-18

  - Adapt to removing GCC from a build root (bug #1547165)