[packages/CuraEngine] - updated to 2.5.0

baggins baggins at pld-linux.org
Sat May 13 20:45:12 CEST 2017


commit 913bfb509954f33b2c9584942a38cd48b741ac16
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat May 13 20:45:01 2017 +0200

    - updated to 2.5.0

 CuraEngine-rpath.patch            | 25 ++++++++++++++++++++++
 CuraEngine-static-libstdcpp.patch | 27 +++++++++++++++++++++++
 CuraEngine-system-libs.patch      | 36 +++++++++++++++++++++++++++++++
 CuraEngine.spec                   | 45 +++++++++++++++++++++++++--------------
 4 files changed, 117 insertions(+), 16 deletions(-)
---
diff --git a/CuraEngine.spec b/CuraEngine.spec
index 0082a2b..9f3646d 100644
--- a/CuraEngine.spec
+++ b/CuraEngine.spec
@@ -4,16 +4,24 @@
 
 Summary:	Engine for processing 3D models into G-code instructions for 3D printers
 Name:		CuraEngine
-Version:	15.04
+Version:	2.5.0
 Release:	1
+Epoch:		1
 License:	AGPLv3
 Group:		Applications/Engineering
-Source0:	https://github.com/Ultimaker/CuraEngine/archive/%{version}.tar.gz
-# Source0-md5:	75d34492ca18358aa554a56afb2de440
+Source0:	https://github.com/Ultimaker/CuraEngine/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	8d8de8f56fd5831b3b74e8946a26681e
+Patch0:		%{name}-rpath.patch
+Patch1:		%{name}-static-libstdcpp.patch
+Patch2:		%{name}-system-libs.patch
 URL:		https://github.com/Ultimaker/CuraEngine
+BuildRequires:	cmake
+BuildRequires:	libArcus-devel = %{version}
 BuildRequires:	libstdc++-devel
 BuildRequires:	polyclipping-devel >= 6.1.2
+BuildRequires:	protobuf-devel
 %{?with_tests:BuildRequires:  python}
+BuildRequires:	rapidjson-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -27,28 +35,33 @@ graphical application look at cura with is the graphical frontend for
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
-# bundled clipper
-rm -r clipper
-sed -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h
-sed -i 's|-lclipper|-lpolyclipping|g' Makefile
-sed -i 's| $(BUILD_DIR)/libclipper.a||g' Makefile
+# bundled libraries
+rm -rf libs
+sed -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h src/*.cpp
 
-# allow redefinition of CFLAGS and do not build it static
-sed -i 's|CFLAGS +=|CFLAGS?=|' Makefile
-sed -i 's|--static||g' Makefile
+# The -DCURA_ENGINE_VERSION does not work, so we sed-change the default value
+sed -i 's/"DEV"/"%{version}"/' src/settings/settings.h
 
 %build
-CXX="%{__cxx}" \
-CFLAGS="-I. -Ilibs -c %{rpmcflags} %{rpmcppflags} -std=c++11 -fomit-frame-pointer" \
-	%{__make}
+mkdir build
+cd build
+%{cmake} .. \
+	-DBUILD_SHARED_LIBS:BOOL=OFF \
+	-DCURA_ENGINE_VERSION:STRING=%{version}
+
+%{__make}
 
 %{?with_tests:%{__make} test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}/%{name}
-install -p build/%{name} $RPM_BUILD_ROOT%{_bindir}
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/CuraEngine-rpath.patch b/CuraEngine-rpath.patch
new file mode 100644
index 0000000..0b58acb
--- /dev/null
+++ b/CuraEngine-rpath.patch
@@ -0,0 +1,25 @@
+From c9ee5ceb2fb3e25c7c58e2f988f66f91e6fdad37 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Wed, 3 May 2017 14:00:36 +0200
+Subject: [PATCH 1/3] Do not RPATH
+
+---
+ CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2316d6..1ec537d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,8 +21,6 @@ if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
+ endif()
+ 
+-set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+-
+ set(CURA_ENGINE_VERSION "master" CACHE STRING "Version name of Cura")
+ 
+ option(BUILD_TESTS OFF)
+-- 
+2.11.0
+
diff --git a/CuraEngine-static-libstdcpp.patch b/CuraEngine-static-libstdcpp.patch
new file mode 100644
index 0000000..273016f
--- /dev/null
+++ b/CuraEngine-static-libstdcpp.patch
@@ -0,0 +1,27 @@
+From d79be0eb0e0e27e70b709b043b4085cda007beed Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Wed, 3 May 2017 14:02:04 +0200
+Subject: [PATCH 2/3] Don't use -static-libstdc++
+
+---
+ CMakeLists.txt | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1ec537d..bc5cf85 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -36,10 +36,6 @@ endif()
+ # Add warnings
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+ 
+-if(NOT APPLE AND NOT WIN32)
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
+-endif()
+-
+ option (ENABLE_OPENMP
+     "Use OpenMP for parallel code" ON)
+ 
+-- 
+2.11.0
+
diff --git a/CuraEngine-system-libs.patch b/CuraEngine-system-libs.patch
new file mode 100644
index 0000000..eb2d986
--- /dev/null
+++ b/CuraEngine-system-libs.patch
@@ -0,0 +1,36 @@
+From 62ce7cbc96a52723e11adfda848211e03f6733ba Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Wed, 3 May 2017 14:04:17 +0200
+Subject: [PATCH 3/3] System libs
+
+---
+ CMakeLists.txt | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bc5cf85..07e4c41 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,9 +46,7 @@ if (ENABLE_OPENMP)
+     endif()
+ endif()
+ 
+-include_directories(${CMAKE_CURRENT_BINARY_DIR} libs)
+-
+-add_library(clipper STATIC libs/clipper/clipper.cpp)
++include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ 
+ set(engine_SRCS # Except main.cpp.
+     src/bridge.cpp
+@@ -136,7 +134,7 @@ endif ()
+ 
+ # Compiling CuraEngine itself.
+ add_library(_CuraEngine ${engine_SRCS} ${engine_PB_SRCS}) #First compile all of CuraEngine as library, allowing this to be re-used for tests.
+-target_link_libraries(_CuraEngine clipper)
++target_link_libraries(_CuraEngine polyclipping)
+ if (ENABLE_ARCUS)
+     target_link_libraries(_CuraEngine Arcus)
+ endif ()
+-- 
+2.11.0
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/CuraEngine.git/commitdiff/913bfb509954f33b2c9584942a38cd48b741ac16



More information about the pld-cvs-commit mailing list