commit:     9a0ef3c029aee6faebcf704731cc058cf26cc309
Author:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 14 05:27:59 2020 +0000
Commit:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
CommitDate: Mon Sep 14 18:12:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a0ef3c0

media-gfx/curaengine: bump 4.7.0, remove bundled rapidjson and clipper, also 
fix failing tests

Closes: https://bugs.gentoo.org/693176

Closes: https://bugs.gentoo.org/693170

Closes: https://bugs.gentoo.org/732226

Bug: https://bugs.gentoo.org/739692

Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/16719
Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>

 media-gfx/curaengine/Manifest                      |  1 +
 media-gfx/curaengine/curaengine-4.7.0.ebuild       | 86 ++++++++++++++++++++++
 .../files/curaengine-4.7.0-fix-tests.patch         | 13 ++++
 media-gfx/curaengine/metadata.xml                  | 12 +++
 4 files changed, 112 insertions(+)

diff --git a/media-gfx/curaengine/Manifest b/media-gfx/curaengine/Manifest
index 78c5b9f6880..5ad33f8d3c6 100644
--- a/media-gfx/curaengine/Manifest
+++ b/media-gfx/curaengine/Manifest
@@ -3,3 +3,4 @@ DIST curaengine-3.6.0.tar.gz 1390109 BLAKE2B 
a0a6b8016bb5fa2f772634a671fc391df45
 DIST curaengine-4.2.0.tar.gz 1654657 BLAKE2B 
c11f77a126e49c1c63550accd42c3616ab647d2575de0f11e64cb2188e7c565a54f3613e296c3f19e8534a7a758162fe29cdd62e8d62d691a7d9c9e6430545ce
 SHA512 
6c3edac5a21068b50a31d3ab37dac58b986e18be2d24711d77cf210da62b521d62dc92a1b4e8865a26e5c394119349f03b3816d19d67ebee670424cc4a7b2500
 DIST curaengine-4.3.0.tar.gz 1656780 BLAKE2B 
9b93e3f294a8a67c2cd4f2d4462a4047e6860e0c391e7ff550b24c498faa82fd2af4fd044845f00f93fb01d38ca3fa1511bfe65a7456b5a6e0b919821be5ab8f
 SHA512 
60ca0ce586c0cf5f1516f803b2a05a20299ef8193f065acd6e11a0054903189225f9c60be1b536ffe5a9a22652097acd3a4aae2833920a468071b78f213f7572
 DIST curaengine-4.6.1.tar.gz 1685119 BLAKE2B 
352c5b4b98866ebe6f90dc095960d2417ccf9c023334b4006b604da45aed1e3b6066700b08be3727214433fd505de87cad4da8e17d9067571d91dd0ec7660ebe
 SHA512 
8b3a65fb00bebc37acd24a6d4277c1f09849c0318fca00867479d62c0f64b8628064a898128e1ffc5fb99eed2c1d45a310df2f97fde9c37a9ccc311f5ba4d057
+DIST curaengine-4.7.0.tar.gz 1684860 BLAKE2B 
da25da5656eb2c2d9cd9bd1c8ea0f633284a6d300f2b5ab7a916be262d20106d07a17a5c5ac63b854b32e98f616ecadbc05a912146f4f6d396c646ca69637116
 SHA512 
4c5f2eb70912315595e7f090ba9a34196ecb740eb25b5b2da2decf6485260999e8a87f7c2619c6efab9b46280e9eecf11f7e6bb021359c3b72da9fb900b0c1c3

diff --git a/media-gfx/curaengine/curaengine-4.7.0.ebuild 
b/media-gfx/curaengine/curaengine-4.7.0.ebuild
new file mode 100644
index 00000000000..a644aeef81b
--- /dev/null
+++ b/media-gfx/curaengine/curaengine-4.7.0.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake toolchain-funcs
+
+MY_PN="CuraEngine"
+
+DESCRIPTION="A 3D model slicing engine for 3D printing"
+HOMEPAGE="https://github.com/Ultimaker/CuraEngine";
+SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+arcus doc openmp test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       ${PYTHON_DEPS}
+       arcus? (
+               ~dev-libs/libarcus-${PV}:*
+               dev-libs/protobuf:=
+       )
+       dev-libs/clipper
+       dev-libs/rapidjson
+       dev-libs/stb"
+
+DEPEND="${RDEPEND}
+       test? ( dev-cpp/gtest )"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+DOCS=( README.md )
+PATCHES=( "${FILESDIR}/${PN}-4.7.0-fix-tests.patch" )
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+       rm -r "${S}"/libs || die
+
+       # remove static linking
+       # respect cflags
+       sed -i \
+               -e "s/-static-libstdc++//g" \
+               -e 's/set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")//g' \
+               -e 's/set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} 
${CMAKE_CXX_FLAGS_RELEASE_INIT}")//g' \
+               CMakeLists.txt || die
+
+       if use test; then
+               find "${S}"/tests/arcus "${S}"/tests/integration 
"${S}"/tests/settings "${S}"/tests/utils \
+                -type f -name '*.cpp' | xargs sed -i \
+                       -e 's <../src/utils/AABB.h> "../../src/utils/AABB.h" g'\
+                       -e 's <../src/utils/IntPoint.h> 
"../../src/utils/IntPoint.h" g' \
+                       -e 's <../src/utils/polygon.h> 
"../../src/utils/polygon.h" g'\
+                       -e 's <../src/utils/PolygonConnector.h> 
"../../src/utils/PolygonConnector.h" g'\
+                       -e 's <../src/utils/polygonUtils.h> 
"../../src/utils/polygonUtils.h" g'\
+                       -e 's <../src/utils/string.h> 
"../../src/utils/string.h" g' \
+                       -e 's <../src/utils/SVG.h> "../../src/utils/SVG.h" g' \
+                       -e 's#include "../src#include "../../src#g'|| die
+       fi
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTS=$(usex test ON OFF)
+               -DENABLE_ARCUS=$(usex arcus ON OFF)
+               -DENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS=OFF
+               -DENABLE_OPENMP=$(usex openmp ON OFF)
+               -DUSE_SYSTEM_LIBS=ON
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+
+       if use doc; then
+               doxygen || die "generating docs failed"
+               mv docs/html . || die
+               find html -type f \(-name '*.md5' -o -name '*.map'\) -delete || 
die
+               HTML_DOCS=( html/. )
+       fi
+}

diff --git a/media-gfx/curaengine/files/curaengine-4.7.0-fix-tests.patch 
b/media-gfx/curaengine/files/curaengine-4.7.0-fix-tests.patch
new file mode 100644
index 00000000000..33feab3d394
--- /dev/null
+++ b/media-gfx/curaengine/files/curaengine-4.7.0-fix-tests.patch
@@ -0,0 +1,13 @@
+Upstream issue: https://github.com/Ultimaker/CuraEngine/issues/1318
+
+--- a/tests/utils/SparseGridTest.cpp
++++ b/tests/utils/SparseGridTest.cpp
+@@ -1,6 +1,7 @@
+ //Copyright (c) 2019 Ultimaker B.V.
+ //CuraEngine is released under the terms of the AGPLv3 or higher.
+ 
++#include <algorithm>
+ #include <gtest/gtest.h>
+ #include <unordered_set>
+ #include <vector>
+

diff --git a/media-gfx/curaengine/metadata.xml 
b/media-gfx/curaengine/metadata.xml
index 58e8297dc74..45587a19e8c 100644
--- a/media-gfx/curaengine/metadata.xml
+++ b/media-gfx/curaengine/metadata.xml
@@ -21,6 +21,18 @@
                <email>perlo...@gmail.com</email>
                <name>Michael Perlov</name>
        </maintainer>
+       <longdescription>
+               The CuraEngine is a C++ console application for 3D printing 
GCode generation.
+               It has been made as a better and faster alternative to the old 
Skeinforge engine.
+
+               This is just a console application for GCode generation.
+               For a full graphical application look at Cura which is the 
graphical frontend for CuraEngine.
+
+               The CuraEngine can be used seperately or in other applications. 
Feel free to add it to your application.
+       </longdescription>
+       <use>
+               <flag name="arcus">Build with support for communication library 
between internal components for Ultimaker software</flag>
+       </use>
        <slots>
                <subslots>soname major version number</subslots>
        </slots>

Reply via email to