From f08a0e2544c4778942164aaee5ddb1fcf0e566767b5734dd3b1e6683f36c92e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Sat, 9 Mar 2019 15:01:51 +0000 Subject: [PATCH 1/4] Accepting request 683020 from home:StefanBruens:3dPrinting - Update URL to use https OBS-URL: https://build.opensuse.org/request/show/683020 OBS-URL: https://build.opensuse.org/package/show/science/cura-engine?expand=0&rev=35 --- cura-engine.changes | 5 +++++ cura-engine.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cura-engine.changes b/cura-engine.changes index 37fac03..f563339 100644 --- a/cura-engine.changes +++ b/cura-engine.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 9 14:58:16 UTC 2019 - Stefan Brüns + +- Update URL to use https + ------------------------------------------------------------------- Fri Jan 18 09:48:08 UTC 2019 - Adrian Schröter diff --git a/cura-engine.spec b/cura-engine.spec index 29263ce..21c443b 100644 --- a/cura-engine.spec +++ b/cura-engine.spec @@ -22,7 +22,7 @@ Release: 0 Summary: 3D printer control software License: AGPL-3.0-only Group: Hardware/Printing -Url: http://github.com/Ultimaker/CuraEngine +Url: https://github.com/Ultimaker/CuraEngine Source0: CuraEngine-%{version}.tar.xz Source1: CuraEngine.1 # On TW/Factory or Leap/SLE 15 use latest gcc, gcc6 otherwise From 47b7d19bfb4cdb66972232fbdeb819f64f06283a10119fc1d9fc012908bc015c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 18 Apr 2019 07:41:56 +0000 Subject: [PATCH 2/4] enable test suite OBS-URL: https://build.opensuse.org/package/show/science/cura-engine?expand=0&rev=36 --- CuraEngine-3.6.0.obscpio | 4 ++-- cura-engine.changes | 6 ++++++ cura-engine.spec | 22 ++++++++++++++++++---- fix-32bit-build.patch | 13 +++++++++++++ fix-build.patch | 40 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 fix-32bit-build.patch create mode 100644 fix-build.patch diff --git a/CuraEngine-3.6.0.obscpio b/CuraEngine-3.6.0.obscpio index 9de117f..eae8cb9 100644 --- a/CuraEngine-3.6.0.obscpio +++ b/CuraEngine-3.6.0.obscpio @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:628ad9e229cfe43a26069e8aa9ccc9c0e1673bdcfd4eab8418b6e46677f9dbfb -size 4328973 +oid sha256:33e974262cc014633df469db48c8c93975298f3093df5d1e025b606582a35728 +size 4328972 diff --git a/cura-engine.changes b/cura-engine.changes index f563339..de0e8e6 100644 --- a/cura-engine.changes +++ b/cura-engine.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 18 07:40:39 UTC 2019 - Adrian Schröter + +- sync spec file with -lulzbot variant +- enable test suite (requires fix-build.patch for libArcus interface) + ------------------------------------------------------------------- Sat Mar 9 14:58:16 UTC 2019 - Stefan Brüns diff --git a/cura-engine.spec b/cura-engine.spec index 21c443b..6e8945b 100644 --- a/cura-engine.spec +++ b/cura-engine.spec @@ -25,13 +25,17 @@ Group: Hardware/Printing Url: https://github.com/Ultimaker/CuraEngine Source0: CuraEngine-%{version}.tar.xz Source1: CuraEngine.1 +Patch1: fix-build.patch +Patch2: fix-32bit-build.patch # On TW/Factory or Leap/SLE 15 use latest gcc, gcc6 otherwise -%if 0%{?suse_version} >= 1500 -BuildRequires: gcc-c++ >= 5 -%else +%if 0%{?suse_version} < 1500 BuildRequires: gcc6-c++ +#!BuildIgnore: libgcc_s1 +%else +BuildRequires: gcc-c++ %endif BuildRequires: cmake +BuildRequires: cppunit-devel BuildRequires: libArcus-devel BuildRequires: stb-devel @@ -42,6 +46,8 @@ It is part of the larger project called "Cura". %prep %setup -q -n CuraEngine-%version +%patch1 -p1 +%patch2 -p1 %build %if 0%{?suse_version} < 1500 @@ -49,7 +55,11 @@ export CC=gcc-6 export CXX=g++-6 %endif # make sure lib_CuraEngine is statically build and linked -%cmake -DCURA_ENGINE_VERSION=%version -DCMAKE_POSITION_INDEPENDENT_CODE="true" -DBUILD_SHARED_LIBS="false" +%cmake -DCURA_ENGINE_VERSION=%version \ + -DCMAKE_POSITION_INDEPENDENT_CODE="true" \ + -DBUILD_SHARED_LIBS="false" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTS=ON %make_jobs %install @@ -58,6 +68,10 @@ cd build install -Dm0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/CuraEngine.1 +%check +cd build +make test + %files %license LICENSE %doc README.md diff --git a/fix-32bit-build.patch b/fix-32bit-build.patch new file mode 100644 index 0000000..f88ecae --- /dev/null +++ b/fix-32bit-build.patch @@ -0,0 +1,13 @@ +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: + diff --git a/fix-build.patch b/fix-build.patch new file mode 100644 index 0000000..941b52b --- /dev/null +++ b/fix-build.patch @@ -0,0 +1,40 @@ +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); + } + +-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; + } + +-} //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: + + //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 From 494ae837067cb70412ae8b4029e418abfc36860da7338d1b9a24841fa2aa9614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 14 Jun 2019 06:41:28 +0000 Subject: [PATCH 3/4] 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 --- CuraEngine-3.6.0.obscpio | 3 --- CuraEngine-4.1.0.obscpio | 3 +++ CuraEngine-gcc9.patch | 31 ++++++++++++++++++++++ CuraEngine.obsinfo | 6 ++--- _service | 4 +-- cura-engine.changes | 10 +++++++ cura-engine.spec | 16 +++++++---- fix-32bit-build.patch | 13 --------- fix-build.patch | 57 ++++++++++++++-------------------------- 9 files changed, 80 insertions(+), 63 deletions(-) delete mode 100644 CuraEngine-3.6.0.obscpio create mode 100644 CuraEngine-4.1.0.obscpio create mode 100644 CuraEngine-gcc9.patch delete mode 100644 fix-32bit-build.patch diff --git a/CuraEngine-3.6.0.obscpio b/CuraEngine-3.6.0.obscpio deleted file mode 100644 index eae8cb9..0000000 --- a/CuraEngine-3.6.0.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:33e974262cc014633df469db48c8c93975298f3093df5d1e025b606582a35728 -size 4328972 diff --git a/CuraEngine-4.1.0.obscpio b/CuraEngine-4.1.0.obscpio new file mode 100644 index 0000000..e066bb5 --- /dev/null +++ b/CuraEngine-4.1.0.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0517ca25cf3446a8dfc974698f69aa3fcb669abfa3654b9f36206ec7620fa44c +size 4433932 diff --git a/CuraEngine-gcc9.patch b/CuraEngine-gcc9.patch new file mode 100644 index 0000000..4bedfdb --- /dev/null +++ b/CuraEngine-gcc9.patch @@ -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(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(layer_count); layer_idx++) + { +@@ -1065,7 +1065,7 @@ + const int max_checking_layer_idx = std::max(0, + std::min(static_cast(storage.support.supportLayers.size()), + static_cast(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++) + { diff --git a/CuraEngine.obsinfo b/CuraEngine.obsinfo index 8d1310d..513e501 100644 --- a/CuraEngine.obsinfo +++ b/CuraEngine.obsinfo @@ -1,5 +1,5 @@ name: CuraEngine -version: 3.6.0 -mtime: 1541499779 -commit: ad5f91d432c7629bf29bd07817d45ee555b12a77 +version: 4.1.0 +mtime: 1558453724 +commit: 354efa4a4507e46993021e5b5a690a5a3139d5ba diff --git a/_service b/_service index 131d40d..e827290 100644 --- a/_service +++ b/_service @@ -2,8 +2,8 @@ https://github.com/Ultimaker/CuraEngine.git git - 3.6.0 - 3.6.0 + 4.1.0 + 4.1.0 diff --git a/cura-engine.changes b/cura-engine.changes index de0e8e6..cb3a7f0 100644 --- a/cura-engine.changes +++ b/cura-engine.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Jun 13 06:53:55 UTC 2019 - Adrian Schröter + +- 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 diff --git a/cura-engine.spec b/cura-engine.spec index 6e8945b..00ca153 100644 --- a/cura-engine.spec +++ b/cura-engine.spec @@ -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 diff --git a/fix-32bit-build.patch b/fix-32bit-build.patch deleted file mode 100644 index f88ecae..0000000 --- a/fix-32bit-build.patch +++ /dev/null @@ -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: - diff --git a/fix-build.patch b/fix-build.patch index 941b52b..10c5a2f 100644 --- a/fix-build.patch +++ b/fix-build.patch @@ -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() From ddfdedf0aa138c43e224d3af0ac43ee1eb6c597ddf375231e67065863a0050fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 26 Jun 2019 06:38:33 +0000 Subject: [PATCH 4/4] fix OBS-URL: https://build.opensuse.org/package/show/science/cura-engine?expand=0&rev=38 --- cura-engine.changes | 2 ++ cura-engine.spec | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cura-engine.changes b/cura-engine.changes index cb3a7f0..e9570bd 100644 --- a/cura-engine.changes +++ b/cura-engine.changes @@ -7,6 +7,8 @@ Thu Jun 13 06:53:55 UTC 2019 - Adrian Schröter - some build fixes needed: fix-build.patch CuraEngine-gcc9.patch +- 32bit platform is unsupported on Linux + (builds, but testcases are failing) ------------------------------------------------------------------- Thu Apr 18 07:40:39 UTC 2019 - Adrian Schröter diff --git a/cura-engine.spec b/cura-engine.spec index 00ca153..77b7fa8 100644 --- a/cura-engine.spec +++ b/cura-engine.spec @@ -41,6 +41,8 @@ BuildRequires: gmock BuildRequires: gtest BuildRequires: libArcus-devel BuildRequires: stb-devel +# No 32bit support anymore +ExcludeArch: %ix86 %arm %description CuraEngine is an engine for processing 3D models into 3D printing