Update to cura 4.1.0 finally. needed quite some build and runtime fixes. And this will break build on leap. But as long we don't have a parallel installable newer Qt there is no other way I suppose

OBS-URL: https://build.opensuse.org/package/show/science/cura-engine?expand=0&rev=37
This commit is contained in:
Adrian Schröter 2019-06-14 06:41:28 +00:00 committed by Git OBS Bridge
parent 47b7d19bfb
commit 494ae83706
9 changed files with 80 additions and 63 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:33e974262cc014633df469db48c8c93975298f3093df5d1e025b606582a35728
size 4328972

3
CuraEngine-4.1.0.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0517ca25cf3446a8dfc974698f69aa3fcb669abfa3654b9f36206ec7620fa44c
size 4433932

31
CuraEngine-gcc9.patch Normal file
View File

@ -0,0 +1,31 @@
--- src/layerPart.cpp.orig 2019-06-13 09:15:37.518080499 +0200
+++ src/layerPart.cpp 2019-06-13 09:16:33.375602117 +0200
@@ -52,7 +52,7 @@
{
const auto total_layers = slicer->layers.size();
assert(mesh.layers.size() == total_layers);
-#pragma omp parallel for default(none) shared(mesh, slicer) schedule(dynamic)
+#pragma omp parallel for default(none) shared(mesh, slicer, total_layers) schedule(dynamic)
// Use a signed type for the loop counter so MSVC compiles (because it uses OpenMP 2.0, an old version).
for (int layer_nr = 0; layer_nr < static_cast<int>(total_layers); layer_nr++)
{
--- ./src/support.cpp.orig 2019-06-13 09:15:37.518080499 +0200
+++ ./src/support.cpp 2019-06-13 09:18:54.823456474 +0200
@@ -868,7 +868,7 @@
constexpr bool no_prime_tower = false;
xy_disallowed_per_layer[0] = storage.getLayerOutlines(0, no_support, no_prime_tower).offset(xy_distance);
// for all other layers (of non support meshes) compute the overhang area and possibly use that when calculating the support disallowed area
- #pragma omp parallel for default(none) shared(xy_disallowed_per_layer, storage, mesh) schedule(dynamic)
+ #pragma omp parallel for default(none) shared(xy_disallowed_per_layer, storage, mesh, layer_count, is_support_mesh_place_holder, use_xy_distance_overhang, z_distance_top, tan_angle, xy_distance, xy_distance_overhang) schedule(dynamic)
// Use a signed type for the loop counter so MSVC compiles (because it uses OpenMP 2.0, an old version).
for (int layer_idx = 1; layer_idx < static_cast<int>(layer_count); layer_idx++)
{
@@ -1065,7 +1065,7 @@
const int max_checking_layer_idx = std::max(0,
std::min(static_cast<int>(storage.support.supportLayers.size()),
static_cast<int>(layer_count - (layer_z_distance_top - 1))));
-#pragma omp parallel for default(none) shared(support_areas, storage) schedule(dynamic)
+#pragma omp parallel for default(none) shared(support_areas, storage, max_checking_layer_idx, layer_z_distance_top) schedule(dynamic)
// Use a signed type for the loop counter so MSVC compiles (because it uses OpenMP 2.0, an old version).
for (int layer_idx = 0; layer_idx < max_checking_layer_idx; layer_idx++)
{

View File

@ -1,5 +1,5 @@
name: CuraEngine
version: 3.6.0
mtime: 1541499779
commit: ad5f91d432c7629bf29bd07817d45ee555b12a77
version: 4.1.0
mtime: 1558453724
commit: 354efa4a4507e46993021e5b5a690a5a3139d5ba

View File

@ -2,8 +2,8 @@
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/Ultimaker/CuraEngine.git</param>
<param name="scm">git</param>
<param name="revision">3.6.0</param>
<param name="version">3.6.0</param>
<param name="revision">4.1.0</param>
<param name="version">4.1.0</param>
</service>
<service mode="disabled" name="set_version" />

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Jun 13 06:53:55 UTC 2019 - Adrian Schröter <adrian@suse.de>
- update to version 4.1.0
* https://ultimaker.com/en/products/ultimaker-cura-software/release-notes
- enable tests
- some build fixes needed:
fix-build.patch
CuraEngine-gcc9.patch
-------------------------------------------------------------------
Thu Apr 18 07:40:39 UTC 2019 - Adrian Schröter <adrian@suse.de>

View File

@ -17,7 +17,7 @@
Name: cura-engine
Version: 3.6.0
Version: 4.1.0
Release: 0
Summary: 3D printer control software
License: AGPL-3.0-only
@ -25,8 +25,10 @@ Group: Hardware/Printing
Url: https://github.com/Ultimaker/CuraEngine
Source0: CuraEngine-%{version}.tar.xz
Source1: CuraEngine.1
# X-OPENSUSE-PATCH fix-build.patch follow openSUSE policies
Patch1: fix-build.patch
Patch2: fix-32bit-build.patch
# PATCH-FIX-OPENSUSE CuraEngine-gcc9.patch based on a patch from fedora, submitted upstream, but not merged yet
Patch2: CuraEngine-gcc9.patch
# On TW/Factory or Leap/SLE 15 use latest gcc, gcc6 otherwise
%if 0%{?suse_version} < 1500
BuildRequires: gcc6-c++
@ -35,7 +37,8 @@ BuildRequires: gcc6-c++
BuildRequires: gcc-c++
%endif
BuildRequires: cmake
BuildRequires: cppunit-devel
BuildRequires: gmock
BuildRequires: gtest
BuildRequires: libArcus-devel
BuildRequires: stb-devel
@ -47,7 +50,9 @@ It is part of the larger project called "Cura".
%prep
%setup -q -n CuraEngine-%version
%patch1 -p1
%patch2 -p1
%patch2 -p0
# the test is hardcoding the version number
sed -i -e 's,"master","%{version}",' tests/GCodeExportTest.cpp
%build
%if 0%{?suse_version} < 1500
@ -70,7 +75,8 @@ install -Dm0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/CuraEngine.1
%check
cd build
make test
# we don't use "make test" to get the output on failure
/usr/bin/ctest --force-new-ctest-process --output-on-failure
%files
%license LICENSE

View File

@ -1,13 +0,0 @@
diff --git a/tests/arcus/ArcusCommunicationPrivateTest.cpp b/tests/arcus/ArcusCommunicationPrivateTest.cpp
index e802d3e2..c63e191f 100644
--- a/tests/arcus/ArcusCommunicationPrivateTest.cpp
+++ b/tests/arcus/ArcusCommunicationPrivateTest.cpp
@@ -202,8 +202,6 @@ void ArcusCommunicationPrivateTest::readMeshGroupMessageTest()
auto& vertices = meshes[0].vertices;
CPPUNIT_ASSERT(! vertices.empty());
- CPPUNIT_ASSERT_EQUAL(vertices.size(), 8ul); //A cube should have 8 unique vertices.
- CPPUNIT_ASSERT_EQUAL(meshes[0].faces.size(), 12ul); // A cube should have 12 tri-s (2 for each 6 sides of the dice).
// Distances should be the same:

View File

@ -1,40 +1,23 @@
diff --git a/tests/arcus/MockSocket.cpp b/tests/arcus/MockSocket.cpp
index 73cbb867..a72780e1 100644
--- a/tests/arcus/MockSocket.cpp
+++ b/tests/arcus/MockSocket.cpp
@@ -20,7 +20,7 @@ void MockSocket::sendMessage(Arcus::MessagePtr message)
sent_messages.push_back(message);
}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2717e987..edd2a93c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,7 +54,6 @@ endif()
if(NOT DEFINED LIB_SUFFIX)
set(LIB_SUFFIX "")
endif()
-set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-Arcus::MessagePtr MockSocket::takeNextMessage()
+Arcus::MessagePtr MockSocket::takeNextMessage(bool)
{
Arcus::MessagePtr result = received_messages.front();
received_messages.pop_front();
@@ -39,4 +39,4 @@ Arcus::MessagePtr MockSocket::popMessageFromSendQueue()
return result;
}
set(CURA_ENGINE_VERSION "master" CACHE STRING "Version name of Cura")
-} //namespace cura
\ No newline at end of file
+} //namespace cura
diff --git a/tests/arcus/MockSocket.h b/tests/arcus/MockSocket.h
index 80370f49..f9e8050a 100644
--- a/tests/arcus/MockSocket.h
+++ b/tests/arcus/MockSocket.h
@@ -27,7 +27,7 @@ public:
@@ -101,10 +100,6 @@ if (ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS AND NOT (CMAKE_BUILD_TYPE_UPPER MATC
endif()
endif ()
//Catch these functions so that we can see whether they are called.
void sendMessage(Arcus::MessagePtr message) override;
- Arcus::MessagePtr takeNextMessage() override;
+ Arcus::MessagePtr takeNextMessage(bool) override;
//Helpers to store the sent and received messages.
void pushMessageToReceivedQueue(Arcus::MessagePtr message);
@@ -38,4 +38,4 @@ public:
} //namespace cura
-#endif //MOCKSOCKET_H
\ No newline at end of file
+#endif //MOCKSOCKET_H
-if(NOT APPLE AND NOT WIN32)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
-endif()
-
if (WIN32)
add_definitions(-DNOMINMAX)
endif()