Gentoo Archives: gentoo-commits

From: Amy Liffey <amynka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/curaengine/files/, media-gfx/curaengine/
Date: Fri, 11 May 2018 18:20:24
Message-Id: 1526062665.3c59fa24dc0ba2f2023a2fef48be9af986ace5bc.amynka@gentoo
1 commit: 3c59fa24dc0ba2f2023a2fef48be9af986ace5bc
2 Author: M. J. Everitt <m.j.everitt <AT> iee <DOT> org>
3 AuthorDate: Thu May 10 21:56:39 2018 +0000
4 Commit: Amy Liffey <amynka <AT> gentoo <DOT> org>
5 CommitDate: Fri May 11 18:17:45 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c59fa24
7
8 media-gfx/curaengine: Fix StringTest for 32-bit arches
9
10 Closes: https://bugs.gentoo.org/655116
11 Closes: https://github.com/gentoo/gentoo/pull/8339
12 Package-Manager: Portage-2.3.13, Repoman-2.3.3
13
14 media-gfx/curaengine/curaengine-2.3.1-r2.ebuild | 47 ++++++++++++++++++++++
15 ...curaengine-2.3.1-fix-stringtest-int-types.patch | 43 ++++++++++++++++++++
16 ...raengine-2.3.1-make-stringtest-64bit-safe.patch | 13 ++++++
17 3 files changed, 103 insertions(+)
18
19 diff --git a/media-gfx/curaengine/curaengine-2.3.1-r2.ebuild b/media-gfx/curaengine/curaengine-2.3.1-r2.ebuild
20 new file mode 100644
21 index 00000000000..caa04ad6c13
22 --- /dev/null
23 +++ b/media-gfx/curaengine/curaengine-2.3.1-r2.ebuild
24 @@ -0,0 +1,47 @@
25 +# Copyright 1999-2018 Gentoo Foundation
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI="6"
29 +
30 +inherit cmake-utils
31 +
32 +MY_PN=CuraEngine
33 +MY_PV=${PV/_beta}
34 +
35 +DESCRIPTION="A 3D model slicing engine for 3D printing"
36 +HOMEPAGE="https://github.com/Ultimaker/CuraEngine"
37 +SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
38 +KEYWORDS="~amd64 ~x86"
39 +
40 +LICENSE="AGPL-3"
41 +SLOT="0"
42 +IUSE="doc test"
43 +
44 +RDEPEND="${PYTHON_DEPS}
45 + dev-libs/libarcus:=
46 + >=dev-libs/protobuf-3"
47 +DEPEND="${RDEPEND}
48 + doc? ( app-doc/doxygen
49 + media-gfx/graphviz )
50 + test? ( dev-util/cppunit )"
51 +
52 +S="${WORKDIR}/${MY_PN}-${MY_PV}"
53 +DOCS=( "README.md" )
54 +PATCHES=( "${FILESDIR}/${P}-remove-gcodeplannertest.patch"
55 + "${FILESDIR}/${P}-make-stringtest-64bit-safe.patch"
56 + "${FILESDIR}/${P}-fix-stringtest-int-types.patch" )
57 +
58 +src_configure() {
59 + local mycmakeargs=( "-DBUILD_TESTS=$(usex test ON OFF)" )
60 + cmake-utils_src_configure
61 +}
62 +
63 +src_compile() {
64 + cmake-utils_src_make
65 + if use doc; then
66 + doxygen || die
67 + mv docs/html . || die
68 + find html -name '*.md5' -or -name '*.map' -delete || die
69 + HTML_DOCS=( html/. )
70 + fi
71 +}
72
73 diff --git a/media-gfx/curaengine/files/curaengine-2.3.1-fix-stringtest-int-types.patch b/media-gfx/curaengine/files/curaengine-2.3.1-fix-stringtest-int-types.patch
74 new file mode 100644
75 index 00000000000..e30bde4de45
76 --- /dev/null
77 +++ b/media-gfx/curaengine/files/curaengine-2.3.1-fix-stringtest-int-types.patch
78 @@ -0,0 +1,43 @@
79 +From fe45e504ace024d920fe18b4f55d6aa07b2f929b Mon Sep 17 00:00:00 2001
80 +From: Ghostkeeper <rubend@××××××××.com>
81 +Date: Mon, 20 Nov 2017 10:46:09 +0100
82 +Subject: [PATCH] Use ints instead of int64_t to test writing ints
83 +
84 +Because sprintf doesn't accept anything more.
85 +---
86 + tests/utils/StringTest.cpp | 4 ++--
87 + tests/utils/StringTest.h | 2 +-
88 + 2 files changed, 3 insertions(+), 3 deletions(-)
89 +
90 +diff --git a/tests/utils/StringTest.cpp b/tests/utils/StringTest.cpp
91 +index 5bd16c5d3..980d2145f 100644
92 +--- a/tests/utils/StringTest.cpp
93 ++++ b/tests/utils/StringTest.cpp
94 +@@ -71,12 +71,12 @@ void StringTest::writeInt2mmTestMax()
95 + }
96 +
97 +
98 +-void StringTest::writeInt2mmAssert(int64_t in)
99 ++void StringTest::writeInt2mmAssert(int in)
100 + {
101 + std::ostringstream ss;
102 + writeInt2mm(in, ss);
103 + std::string str = ss.str();
104 +- int64_t out = MM2INT(strtod(str.c_str(), nullptr));
105 ++ int out = MM2INT(strtod(str.c_str(), nullptr));
106 +
107 + char buffer[200];
108 + sprintf(buffer, "The integer %d was printed as '%s' which was interpreted as %d rather than %d!", in, str.c_str(), out, in);
109 +diff --git a/tests/utils/StringTest.h b/tests/utils/StringTest.h
110 +index 58be00642..da1da793a 100644
111 +--- a/tests/utils/StringTest.h
112 ++++ b/tests/utils/StringTest.h
113 +@@ -68,7 +68,7 @@ class StringTest : public CppUnit::TestFixture
114 + *
115 + * \param in the integer to check
116 + */
117 +- void writeInt2mmAssert(int64_t in);
118 ++ void writeInt2mmAssert(int in);
119 + };
120 +
121 + }
122
123 diff --git a/media-gfx/curaengine/files/curaengine-2.3.1-make-stringtest-64bit-safe.patch b/media-gfx/curaengine/files/curaengine-2.3.1-make-stringtest-64bit-safe.patch
124 new file mode 100644
125 index 00000000000..a9b447fe852
126 --- /dev/null
127 +++ b/media-gfx/curaengine/files/curaengine-2.3.1-make-stringtest-64bit-safe.patch
128 @@ -0,0 +1,13 @@
129 +diff --git a/tests/utils/StringTest.cpp b/tests/utils/StringTest.cpp
130 +index aa369f3da..b1a084587 100644
131 +--- a/tests/utils/StringTest.cpp
132 ++++ b/tests/utils/StringTest.cpp
133 +@@ -79,7 +79,7 @@ void StringTest::writeInt2mmAssert(int64_t in)
134 + int64_t out = MM2INT(strtod(str.c_str(), nullptr));
135 +
136 + char buffer[200];
137 +- sprintf(buffer, "The integer %ld was printed as '%s' which was interpreted as %ld rather than %ld!", in, str.c_str(), out, in);
138 ++ sprintf(buffer, "The integer %d was printed as '%s' which was interpreted as %d rather than %d!", in, str.c_str(), out, in);
139 + CPPUNIT_ASSERT_MESSAGE(std::string(buffer), in == out);
140 + }
141 +