Gentoo Archives: gentoo-commits

From: Slawek Lis <slis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-misc/repsnapper/files/, sci-misc/repsnapper/
Date: Wed, 21 Sep 2016 11:57:13
Message-Id: 1474459017.ee4a29effa2dc4c4d279dcfa57d4d8ff6574f6f0.slis@gentoo
1 commit: ee4a29effa2dc4c4d279dcfa57d4d8ff6574f6f0
2 Author: Slawomir Lis <slis <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 21 06:50:54 2016 +0000
4 Commit: Slawek Lis <slis <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 21 11:56:57 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee4a29ef
7
8 sci-misc/repsnapper: Added patch to fix compilation error with newer gcc
9
10 This bug is issued in newer gcc's because of abs() method is moved into
11 std namespace. Added a patch to fix the issue.
12 Reported in bug 594474
13
14 Reported-By: Toralf Förster <toralf.foerster <AT> gmx.de>
15
16 Package-Manager: portage-2.3.0
17
18 sci-misc/repsnapper/files/std_abs.patch | 11 +++++++++++
19 sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild | 1 +
20 sci-misc/repsnapper/repsnapper-9999.ebuild | 3 +++
21 3 files changed, 15 insertions(+)
22
23 diff --git a/sci-misc/repsnapper/files/std_abs.patch b/sci-misc/repsnapper/files/std_abs.patch
24 new file mode 100644
25 index 00000000..35aefe9
26 --- /dev/null
27 +++ b/sci-misc/repsnapper/files/std_abs.patch
28 @@ -0,0 +1,11 @@
29 +--- libraries/amf/amftools-code/include/STL_File.h.orig 2016-09-21 08:35:10.600313039 +0200
30 ++++ libraries/amf/amftools-code/include/STL_File.h 2016-09-21 08:35:58.303647256 +0200
31 +@@ -89,7 +89,7 @@
32 + Vec3D v;
33 + int OrigIndex;
34 +
35 +- static inline bool IsSoftLessThan(const aWeldVertex& v1, const aWeldVertex& v2){if(abs(v1.v.z - v2.v.z) <= WeldThresh){ if(abs(v1.v.y - v2.v.y) <= WeldThresh){ return v1.v.x < v2.v.x-WeldThresh;}else return (v1.v.y < v2.v.y-WeldThresh);} else return (v1.v.z < v2.v.z-WeldThresh); } //Is less then (generates a "hash" for sorting vertices by z for set
36 ++ static inline bool IsSoftLessThan(const aWeldVertex& v1, const aWeldVertex& v2){if(std::abs(v1.v.z - v2.v.z) <= WeldThresh){ if(std::abs(v1.v.y - v2.v.y) <= WeldThresh){ return v1.v.x < v2.v.x-WeldThresh;}else return (v1.v.y < v2.v.y-WeldThresh);} else return (v1.v.z < v2.v.z-WeldThresh); } //Is less then (generates a "hash" for sorting vertices by z for set
37 + static double WeldThresh; //weld threshold for importing from STL
38 + };
39 +
40
41 diff --git a/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild b/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
42 index a976a17..ce016a8 100644
43 --- a/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
44 +++ b/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
45 @@ -31,6 +31,7 @@ RDEPEND=${DEPEND}
46
47 src_prepare() {
48 epatch "${FILESDIR}/std-c11.patch"
49 + epatch "${FILESDIR}/std_abs.patch"
50 eautoreconf
51 append-cxxflags -std=c++11
52 }
53
54 diff --git a/sci-misc/repsnapper/repsnapper-9999.ebuild b/sci-misc/repsnapper/repsnapper-9999.ebuild
55 index c56bddd..34e7a93 100644
56 --- a/sci-misc/repsnapper/repsnapper-9999.ebuild
57 +++ b/sci-misc/repsnapper/repsnapper-9999.ebuild
58 @@ -25,5 +25,8 @@ DEPEND="
59 RDEPEND=${DEPEND}
60
61 src_prepare() {
62 + epatch "${FILESDIR}/std-c11.patch"
63 + epatch "${FILESDIR}/std_abs.patch"
64 eautoreconf
65 + append-cxxflags -std=c++11
66 }