forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-gfx/curaengine: bump 4.7.0, remove bundled rapidjson and clippe…
…r, 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 <[email protected]> Closes: gentoo#16719 Signed-off-by: Dennis Lamm <[email protected]>
- Loading branch information
1 parent
a567e09
commit 9a0ef3c
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
13 changes: 13 additions & 0 deletions
13
media-gfx/curaengine/files/curaengine-4.7.0-fix-tests.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,18 @@ | |
<email>[email protected]</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> | ||
|