From 0e6aea02a627fd8dd2dc9e255f88cb58317c0151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <m...@hroncok.cz> Date: Mon, 29 Jun 2015 14:38:50 +0200 Subject: Update to 1.2.9
diff --git a/slic3r-clear-error.patch b/slic3r-clear-error.patch deleted file mode 100644 index 57eb469..0000000 --- a/slic3r-clear-error.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/xs/src/TriangleMesh.cpp b/xs/src/TriangleMesh.cpp -index dc47832..14e9449 100644 ---- a/xs/src/TriangleMesh.cpp -+++ b/xs/src/TriangleMesh.cpp -@@ -29,6 +29,7 @@ TriangleMesh::TriangleMesh(const TriangleMesh &other) - { - this->stl.heads = NULL; - this->stl.tail = NULL; -+ this->stl.error = other.stl.error; - if (other.stl.facet_start != NULL) { - this->stl.facet_start = (stl_facet*)calloc(other.stl.stats.number_of_facets, sizeof(stl_facet)); - std::copy(other.stl.facet_start, other.stl.facet_start + other.stl.stats.number_of_facets, this->stl.facet_start); -@@ -125,6 +126,7 @@ TriangleMesh::repair() { - // fill_holes - if (stl.stats.connected_facets_3_edge < stl.stats.number_of_facets) { - stl_fill_holes(&stl); -+ stl_clear_error(&stl); - } - - // normal_directions -@@ -248,6 +250,7 @@ TriangleMesh::split() const - mesh->stl.stats.type = inmemory; - mesh->stl.stats.number_of_facets = facets.size(); - mesh->stl.stats.original_num_facets = mesh->stl.stats.number_of_facets; -+ stl_clear_error(&mesh->stl); - stl_allocate(&mesh->stl); - - int first = 1; -@@ -349,6 +352,7 @@ TriangleMesh::to_SV() { - - void TriangleMesh::ReadFromPerl(SV* vertices, SV* facets) - { -+ stl.error = 0; - stl.stats.type = inmemory; - - // count facets and allocate memory diff --git a/slic3r-clipper.patch b/slic3r-clipper.patch index 16bb790..820ef87 100644 --- a/slic3r-clipper.patch +++ b/slic3r-clipper.patch @@ -1,7 +1,7 @@ -diff --git a/xs/src/ClipperUtils.hpp b/xs/src/ClipperUtils.hpp -index 2ab3ff7..2058f82 100644 ---- a/xs/src/ClipperUtils.hpp -+++ b/xs/src/ClipperUtils.hpp +diff --git a/xs/src/libslic3r/ClipperUtils.hpp b/xs/src/libslic3r/ClipperUtils.hpp +index ab144f2..86331ac 100644 +--- a/xs/src/libslic3r/ClipperUtils.hpp ++++ b/xs/src/libslic3r/ClipperUtils.hpp @@ -2,7 +2,7 @@ #define slic3r_ClipperUtils_hpp_ @@ -11,12 +11,12 @@ index 2ab3ff7..2058f82 100644 #include "ExPolygon.hpp" #include "Polygon.hpp" #include "Surface.hpp" -diff --git a/xs/src/Geometry.cpp b/xs/src/Geometry.cpp -index 8e08336..606a8e7 100644 ---- a/xs/src/Geometry.cpp -+++ b/xs/src/Geometry.cpp -@@ -1,7 +1,7 @@ - #include "Geometry.hpp" +diff --git a/xs/src/libslic3r/Geometry.cpp b/xs/src/libslic3r/Geometry.cpp +index 827029a..e5b54bb 100644 +--- a/xs/src/libslic3r/Geometry.cpp ++++ b/xs/src/libslic3r/Geometry.cpp +@@ -3,7 +3,7 @@ + #include "ExPolygon.hpp" #include "Line.hpp" #include "PolylineCollection.hpp" -#include "clipper.hpp" @@ -25,7 +25,7 @@ index 8e08336..606a8e7 100644 #include <cmath> #include <list> diff --git a/xs/xsp/Clipper.xsp b/xs/xsp/Clipper.xsp -index 43a30a4..263c808 100644 +index d9530f7..3ba2448 100644 --- a/xs/xsp/Clipper.xsp +++ b/xs/xsp/Clipper.xsp @@ -2,7 +2,7 @@ @@ -34,6 +34,6 @@ index 43a30a4..263c808 100644 #include <myinit.h> -#include "clipper.hpp" +#include <polyclipping/clipper.hpp> - #include "ClipperUtils.hpp" + #include "libslic3r/ClipperUtils.hpp" %} diff --git a/slic3r-datadir.patch b/slic3r-datadir.patch new file mode 100644 index 0000000..f438564 --- /dev/null +++ b/slic3r-datadir.patch @@ -0,0 +1,13 @@ +diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm +index 154af90..ef8274c 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; + + use FindBin; +-our $var = decode_path($FindBin::Bin) . "/var"; ++our $var = "/usr/share/slic3r"; + + use Moo 1.003001; + diff --git a/slic3r-linker.patch b/slic3r-linker.patch index 9af21ef..91f9e60 100644 --- a/slic3r-linker.patch +++ b/slic3r-linker.patch @@ -1,15 +1,14 @@ diff --git a/xs/Build.PL b/xs/Build.PL -index 5a10ac0..18d0611 100644 +index bc18bc5..9e2ce40 100644 --- a/xs/Build.PL +++ b/xs/Build.PL -@@ -41,6 +41,11 @@ my $build = Module::Build::WithXSpp->new( +@@ -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 -+ -lpolyclipping + )], # Provides extra C typemaps that are auto-merged diff --git a/slic3r-nowarn-datadir.patch b/slic3r-nowarn-datadir.patch deleted file mode 100644 index a265398..0000000 --- a/slic3r-nowarn-datadir.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm -index d317f2e..3ff1f6d 100644 ---- a/lib/Slic3r.pm -+++ b/lib/Slic3r.pm -@@ -25,11 +25,7 @@ BEGIN { - $have_threads = 0 if $Moo::VERSION == 1.003000; - } - --warn "Running Slic3r under Perl >= 5.16 is not supported nor recommended\n" -- if $^V >= v5.16; -- --use FindBin; --our $var = "$FindBin::Bin/var"; -+our $var = "/usr/share/slic3r"; - - use Encode; - use Encode::Locale; diff --git a/slic3r-test-out-of-memory.patch b/slic3r-test-out-of-memory.patch deleted file mode 100644 index 63e83b6..0000000 --- a/slic3r-test-out-of-memory.patch +++ /dev/null @@ -1,138 +0,0 @@ -From: Alessandro Ranellucci <a...@cpan.org> -Date: Wed, 25 Jun 2014 14:57:06 +0200 -Subject: Fix compilation under 5.20 (untested). #2109 - -Bug-Debian: #757798 -Bug: https://github.com/alexrj/Slic3r/issues/2109 -Origin: commit:67bf99633e48f9c8a5863b88c2a03fddc1cc247f ---- - xs/Build.PL | 2 +- - xs/src/ClipperUtils.cpp | 2 +- - xs/src/MultiPoint.cpp | 4 ++-- - xs/xsp/TriangleMesh.xsp | 6 ++++-- - xs/xsp/my.map | 17 +++++++++++------ - 5 files changed, 19 insertions(+), 12 deletions(-) - -diff --git a/xs/Build.PL b/xs/Build.PL -index e21df5e..49195d7 100644 ---- a/xs/Build.PL -+++ b/xs/Build.PL -@@ -30,7 +30,7 @@ my $build = Module::Build::WithXSpp->new( - build_requires => {qw( - ExtUtils::ParseXS 3.18 - ExtUtils::Typemap 1.00 -- ExtUtils::Typemaps::Default 1.03 -+ ExtUtils::Typemaps::Default 1.05 - ExtUtils::XSpp 0.17 - Module::Build 0.3601 - Test::More 0 -diff --git a/xs/src/ClipperUtils.cpp b/xs/src/ClipperUtils.cpp -index 2989783..240cf3b 100644 ---- a/xs/src/ClipperUtils.cpp -+++ b/xs/src/ClipperUtils.cpp -@@ -542,7 +542,7 @@ polynode_children_2_perl(const ClipperLib::PolyNode& node) - { - AV* av = newAV(); - const unsigned int len = node.ChildCount(); -- av_extend(av, len-1); -+ if (len > 0) av_extend(av, len-1); - for (int i = 0; i < len; ++i) { - av_store(av, i, polynode2perl(*node.Childs[i])); - } -diff --git a/xs/src/MultiPoint.cpp b/xs/src/MultiPoint.cpp -index 47830ce..5da3cb4 100644 ---- a/xs/src/MultiPoint.cpp -+++ b/xs/src/MultiPoint.cpp -@@ -139,7 +139,7 @@ SV* - MultiPoint::to_AV() { - const unsigned int num_points = this->points.size(); - AV* av = newAV(); -- av_extend(av, num_points-1); -+ if (num_points > 0) av_extend(av, num_points-1); - for (unsigned int i = 0; i < num_points; i++) { - av_store(av, i, perl_to_SV_ref(this->points[i])); - } -@@ -150,7 +150,7 @@ SV* - MultiPoint::to_SV_pureperl() const { - const unsigned int num_points = this->points.size(); - AV* av = newAV(); -- av_extend(av, num_points-1); -+ if (num_points > 0) av_extend(av, num_points-1); - for (unsigned int i = 0; i < num_points; i++) { - av_store(av, i, this->points[i].to_SV_pureperl()); - } -diff --git a/xs/xsp/TriangleMesh.xsp b/xs/xsp/TriangleMesh.xsp -index 3338d97..be40543 100644 ---- a/xs/xsp/TriangleMesh.xsp -+++ b/xs/xsp/TriangleMesh.xsp -@@ -151,10 +151,12 @@ TriangleMesh::slice(z) - mslicer.slice(z_f, &layers); - - AV* layers_av = newAV(); -- av_extend(layers_av, layers.size()-1); -+ size_t len = layers.size(); -+ if (len > 0) av_extend(layers_av, len-1); - for (unsigned int i = 0; i < layers.size(); i++) { - AV* expolygons_av = newAV(); -- av_extend(expolygons_av, layers[i].size()-1); -+ len = layers[i].size(); -+ if (len > 0) av_extend(expolygons_av, len-1); - unsigned int j = 0; - for (ExPolygons::iterator it = layers[i].begin(); it != layers[i].end(); ++it) { - av_store(expolygons_av, j++, perl_to_SV_clone_ref(*it)); -diff --git a/xs/xsp/my.map b/xs/xsp/my.map -index e69ba04..994874d 100644 ---- a/xs/xsp/my.map -+++ b/xs/xsp/my.map -@@ -235,7 +235,8 @@ T_ARRAYREF - AV* av = newAV(); - $arg = newRV_noinc((SV*)av); - sv_2mortal($arg); -- av_extend(av, $var.size()-1); -+ const unsigned int len = $var.size(); -+ if (len > 0) av_extend(av, len-1); - int i = 0; - for (${type}::const_iterator it = $var.begin(); it != $var.end(); ++it) { - av_store(av, i++, perl_to_SV_clone_ref(*it)); -@@ -246,7 +247,8 @@ T_ARRAYREF_PTR - AV* av = newAV(); - $arg = newRV_noinc((SV*)av); - sv_2mortal($arg); -- av_extend(av, $var->size()-1); -+ const unsigned int len = $var->size(); -+ if (len > 0) av_extend(av, len-1); - int i = 0; - for (${ my $t = $type; $t =~ s/\*$//; \$t }::iterator it = $var->begin(); it != $var->end(); ++it) { - av_store(av, i++, perl_to_SV_ref(*it)); -@@ -256,7 +258,8 @@ T_PTR_ARRAYREF_PTR - AV* av = newAV(); - $arg = newRV_noinc((SV*)av); - sv_2mortal($arg); -- av_extend(av, $var->size()-1); -+ const unsigned int len = $var->size(); -+ if (len > 0) av_extend(av, len-1); - int i = 0; - for (${ my $t = $type; $t =~ s/\*$//; \$t }::iterator it = $var->begin(); it != $var->end(); ++it) { - av_store(av, i++, perl_to_SV_ref(**it)); -@@ -266,7 +269,8 @@ T_PTR_ARRAYREF - AV* av = newAV(); - $arg = newRV_noinc((SV*)av); - sv_2mortal($arg); -- av_extend(av, $var.size()-1); -+ const unsigned int len = $var.size(); -+ if (len > 0) av_extend(av, len-1); - int i = 0; - for (${type}::iterator it = $var.begin(); it != $var.end(); ++it) { - av_store(av, i++, (*it)->to_SV()); -@@ -275,8 +279,9 @@ T_PTR_ARRAYREF - T_LAYER_HEIGHT_RANGES - AV* av = newAV(); - $arg = newRV_noinc((SV*)av); -- sv_2mortal($arg); -- av_extend(av, $var.size() - 1); -+ sv_2mortal($arg); -+ const unsigned int len = $var.size(); -+ if (len > 0) av_extend(av, len-1); - // map is sorted, so we can just copy it in order - int i = 0; - for (${type}::iterator it = $var.begin(); it != $var.end(); ++it) { diff --git a/slic3r.spec b/slic3r.spec index d35a555..518e54d 100644 --- a/slic3r.spec +++ b/slic3r.spec @@ -1,6 +1,6 @@ Name: slic3r -Version: 1.1.7 -Release: 4%{?dist} +Version: 1.2.9 +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 @@ -11,15 +11,11 @@ Source0: https://github.com/alexrj/Slic3r/archive/%{version}.tar.gz # Modify Build.PL so we are able to build this on Fedora Patch0: %{name}-buildpl.patch -# Don't warn for Perl >= 5.16 # Use /usr/share/slic3r as datadir -# Those two are located at the same place at the code, so the patch is merged -Patch1: %{name}-nowarn-datadir.patch +Patch1: %{name}-datadir.patch Patch2: %{name}-english-locale.patch Patch3: %{name}-linker.patch -Patch4: %{name}-clear-error.patch -Patch5: %{name}-test-out-of-memory.patch -Patch6: %{name}-clipper.patch +#Patch4: %{name}-clipper.patch Source1: %{name}.desktop Source2: %{name}.appdata.xml @@ -28,27 +24,28 @@ BuildRequires: perl(Class::XSAccessor) BuildRequires: perl(Encode::Locale) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.80 BuildRequires: perl(ExtUtils::ParseXS) >= 3.22 -BuildRequires: perl(ExtUtils::Typemap) BuildRequires: perl(ExtUtils::Typemaps::Default) >= 1.05 +BuildRequires: perl(ExtUtils::Typemaps) >= 1.00 BuildRequires: perl(File::Basename) BuildRequires: perl(File::Spec) BuildRequires: perl(Getopt::Long) BuildRequires: perl(Growl::GNTP) >= 0.15 BuildRequires: perl(IO::Scalar) BuildRequires: perl(List::Util) -BuildRequires: perl(Math::ConvexHull::MonotoneChain) -BuildRequires: perl(Math::ConvexHull) >= 1.0.4 -BuildRequires: perl(Math::Geometry::Voronoi) >= 1.3 BuildRequires: perl(Math::PlanePath) >= 53 BuildRequires: perl(Module::Build::WithXSpp) >= 0.14 BuildRequires: perl(Moo) >= 1.003001 BuildRequires: perl(parent) +BuildRequires: perl(POSIX) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Storable) BuildRequires: perl(SVG) BuildRequires: perl(Test::Harness) BuildRequires: perl(Test::More) +BuildRequires: perl(Thread::Semaphore) +BuildRequires: perl(threads) >= 1.96 BuildRequires: perl(Time::HiRes) +BuildRequires: perl(Unicode::Normalize) BuildRequires: perl(Wx) BuildRequires: perl(XML::SAX) BuildRequires: perl(XML::SAX::ExpatXS) @@ -57,12 +54,12 @@ BuildRequires: admesh-devel >= 0.98.1 BuildRequires: boost-devel BuildRequires: desktop-file-utils BuildRequires: poly2tri-devel -BuildRequires: polyclipping-devel >= 6.2.0 +#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.97.5 +Requires: admesh-libs >= 0.98.1 %description Slic3r is a G-code generator for 3D printers. It's compatible with RepRaps, @@ -77,13 +74,11 @@ for more information. %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 +#%%patch4 -p1 # Remove bundled admesh, clipper, poly2tri and boost rm -rf xs/src/admesh -rm xs/src/clipper.*pp +#rm xs/src/clipper.*pp rm -rf xs/src/poly2tri rm -rf xs/src/boost @@ -174,6 +169,11 @@ fi %{_datadir}/%{name} %changelog +* Mon Jun 29 2015 Miro HronĨok <mhron...@redhat.com> - 1.2.9-1 +- New version 1.2.9 +- Removed already merged patches +- Removed unused BRs + * Mon Jun 08 2015 Jitka Plesnikova <jples...@redhat.com> - 1.1.7-4 - Perl 5.22 rebuild -- cgit v0.10.2 http://pkgs.fedoraproject.org/cgit/slic3r.git/commit/?h=master&id=0e6aea02a627fd8dd2dc9e255f88cb58317c0151 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/perl-devel