[packages/slic3r] - 1.2.7; builds but still needs ton of work
arekm
arekm at pld-linux.org
Wed Jun 10 00:14:01 CEST 2015
commit 1320a913a6abeb257f6caf0dfb60f15f12e49bdb
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Jun 10 00:13:55 2015 +0200
- 1.2.7; builds but still needs ton of work
slic3r-admesh.patch | 12 ++++++++++++
slic3r-linker.patch | 19 +++++++++++++++----
slic3r.spec | 38 +++++++++++++++++++++++---------------
3 files changed, 50 insertions(+), 19 deletions(-)
---
diff --git a/slic3r.spec b/slic3r.spec
index 3137b09..19e6461 100644
--- a/slic3r.spec
+++ b/slic3r.spec
@@ -1,15 +1,18 @@
+%bcond_without tests
+%bcond_with system_poly2tri
+#
Summary: G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
Name: slic3r
-Version: 1.2.6
+Version: 1.2.7
Release: 0.1
License: AGPLv3 and CC-BY
# Images are CC-BY, code is AGPLv3
Group: Applications/Engineering
URL: http://slic3r.org/
Source0: https://github.com/alexrj/Slic3r/archive/%{version}.tar.gz
-# Source0-md5: 85c27cdc16c7efabfd6a34755b7881c9
-Source1: %{name}.desktop
-Source2: %{name}.appdata.xml
+# Source0-md5: 98abf1fafa1578259f1624f25a97e4bc
+Source1: %{name}.desktop
+Source2: %{name}.appdata.xml
# Modify Build.PL so we are able to build this on Fedora
Patch0: %{name}-buildpl.patch
# Don't warn for Perl >= 5.16
@@ -21,6 +24,7 @@ Patch3: %{name}-linker.patch
Patch4: %{name}-clear-error.patch
Patch5: %{name}-test-out-of-memory.patch
Patch6: %{name}-clipper.patch
+Patch7: %{name}-admesh.patch
BuildRequires: perl(Class::XSAccessor)
BuildRequires: perl(Encode::Locale)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.80
@@ -54,7 +58,7 @@ BuildRequires: ImageMagick
BuildRequires: admesh-devel >= 0.98.1
BuildRequires: boost-devel
BuildRequires: desktop-file-utils
-BuildRequires: poly2tri-devel
+%{?with_system_poly2tri:BuildRequires: poly2tri-devel}
BuildRequires: polyclipping-devel >= 6.2.0
Requires: admesh-libs >= 0.97.5
@@ -73,7 +77,11 @@ more information.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%if %{with system_poly2tri}
%patch3 -p1
+%else
+%patch7 -p1
+%endif
#%patch4 -p1
#%patch5 -p1
%patch6 -p1
@@ -81,15 +89,22 @@ more information.
# Remove bundled admesh, clipper, poly2tri and boost
rm -rf xs/src/admesh
rm xs/src/clipper.*pp
-rm -rf xs/src/poly2tri
+%{?with_system_poly2tri:rm -rf xs/src/poly2tri}
rm -rf xs/src/boost
%build
cd xs
-perl ./Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
+%{__perl} ./Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
./Build
+cd ..
+
+%if %{with tests}
+cd xs
+./Build test verbose=1
cd -
-# Building non XS part only runs test, so skip it and run it in tests
+SLIC3R_NO_AUTO=1 perl Build.PL installdirs=vendor
+# the --gui runs no tests, it only checks requires
+%endif
# prepare pngs in mutliple sizes
for res in 16 32 48 128 256; do
@@ -136,13 +151,6 @@ cp %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
%{_fixperms} $RPM_BUILD_ROOT*
-%check
-cd xs
-./Build test verbose=1
-cd -
-SLIC3R_NO_AUTO=1 perl Build.PL installdirs=vendor
-# the --gui runs no tests, it only checks requires
-
%post
/sbin/ldconfig
/bin/%update_icon_cache_post hicolor &>/dev/null || :
diff --git a/slic3r-admesh.patch b/slic3r-admesh.patch
new file mode 100644
index 0000000..2144d87
--- /dev/null
+++ b/slic3r-admesh.patch
@@ -0,0 +1,12 @@
+--- Slic3r-1.2.7/xs/Build.PL~ 2015-05-24 17:39:27.000000000 +0200
++++ Slic3r-1.2.7/xs/Build.PL 2015-06-09 23:58:15.464105918 +0200
+@@ -41,6 +41,9 @@
+ Module::Build::WithXSpp 0.13
+ )},
+ extra_compiler_flags => \@cflags,
++ extra_linker_flags => [qw(
++ -ladmesh
++ -lpolyclipping)],
+
+ # Provides extra C typemaps that are auto-merged
+ extra_typemap_modules => {
diff --git a/slic3r-linker.patch b/slic3r-linker.patch
index 9af21ef..ebe52a0 100644
--- a/slic3r-linker.patch
+++ b/slic3r-linker.patch
@@ -2,15 +2,26 @@ diff --git a/xs/Build.PL b/xs/Build.PL
index 5a10ac0..18d0611 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_compiler_flags => \@cflags,
++ extra_compiler_flags => [ @cflags, scalar `pkg-config --cflags poly2tri-c` ],
+ extra_linker_flags => [qw(
+ -ladmesh
-+ -lpoly2tri
+ -lpolyclipping
-+ )],
++ ), `pkg-config --libs poly2tri-c`],
# Provides extra C typemaps that are auto-merged
extra_typemap_modules => {
+--- Slic3r-1.2.7/xs/src/libslic3r/ExPolygon.cpp~ 2015-05-24 17:39:27.000000000 +0200
++++ Slic3r-1.2.7/xs/src/libslic3r/ExPolygon.cpp 2015-06-09 23:27:31.805045989 +0200
+@@ -5,7 +5,7 @@
+ #include "Line.hpp"
+ #include "ClipperUtils.hpp"
+ #include "polypartition.h"
+-#include "poly2tri/poly2tri.h"
++#include "poly2tri-c/p2t/poly2tri.h"
+
+ #include <algorithm>
+ #include <list>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/slic3r.git/commitdiff/1320a913a6abeb257f6caf0dfb60f15f12e49bdb
More information about the pld-cvs-commit
mailing list