Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-misc/repsnapper/, sci-misc/repsnapper/files/
Date: Fri, 26 May 2017 21:01:28
Message-Id: 1495832377.0d940d0376a6c8a7d0724db71d830138a2474c16.soap@gentoo
1 commit: 0d940d0376a6c8a7d0724db71d830138a2474c16
2 Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
3 AuthorDate: Thu May 25 04:41:09 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri May 26 20:59:37 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d940d03
7
8 sci-misc/repsnapper: Fix building with GCC-6
9
10 Bug: https://bugs.gentoo.org/show_bug.cgi?id=594474
11 Package-Manager: Portage-2.3.6, Repoman-2.3.2
12 Closes: https://github.com/gentoo/gentoo/pull/4753
13
14 .../repsnapper/files/repsnapper-2.4a_p0-gcc6.patch | 54 ++++++++++++++++++++++
15 sci-misc/repsnapper/files/std_abs.patch | 11 -----
16 sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild | 4 +-
17 sci-misc/repsnapper/repsnapper-9999.ebuild | 4 +-
18 4 files changed, 57 insertions(+), 16 deletions(-)
19
20 diff --git a/sci-misc/repsnapper/files/repsnapper-2.4a_p0-gcc6.patch b/sci-misc/repsnapper/files/repsnapper-2.4a_p0-gcc6.patch
21 new file mode 100644
22 index 00000000000..80a3c56eb86
23 --- /dev/null
24 +++ b/sci-misc/repsnapper/files/repsnapper-2.4a_p0-gcc6.patch
25 @@ -0,0 +1,54 @@
26 +From f6a411fa829f144800d123c1256d7d7648736437 Mon Sep 17 00:00:00 2001
27 +From: =?UTF-8?q?Tiago=20St=C3=BCrmer=20Daitx?= <tdaitx@×××××.com>
28 +Date: Thu, 1 Sep 2016 00:02:48 -0300
29 +Subject: [PATCH 1/2] replace abs() with std::abs() for gcc6 compatibility
30 +MIME-Version: 1.0
31 +Content-Type: text/plain; charset=UTF-8
32 +Content-Transfer-Encoding: 8bit
33 +
34 +Building with GCC 6 fails with "call of overloaded ‘abs(double)’ is
35 +ambiguous" - for some reason only on PowerPC and PPC64.
36 +---
37 + libraries/amf/amftools-code/include/STL_File.h | 2 +-
38 + 1 file changed, 1 insertion(+), 1 deletion(-)
39 +
40 +diff --git a/libraries/amf/amftools-code/include/STL_File.h b/libraries/amf/amftools-code/include/STL_File.h
41 +index 0bc01bed..2d9d656f 100644
42 +--- a/libraries/amf/amftools-code/include/STL_File.h
43 ++++ b/libraries/amf/amftools-code/include/STL_File.h
44 +@@ -89,7 +89,7 @@ class aWeldVertex {
45 + Vec3D v;
46 + int OrigIndex;
47 +
48 +- 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
49 ++ 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
50 + static double WeldThresh; //weld threshold for importing from STL
51 + };
52 +
53 +
54 +From 93c81e3794a3eb7c2b7c7611803a3107fb25027b Mon Sep 17 00:00:00 2001
55 +From: "Ying-Chun Liu (PaulLiu)" <paulliu@××××××.org>
56 +Date: Wed, 4 Jan 2017 13:50:56 +0800
57 +Subject: [PATCH 2/2] Fix FTBFS for glibmm Glib::RefPtr
58 +
59 +Now we can use operator RefPtr::operator bool() to test if it is NULL.
60 +RefPtr::operator== can not work on int.
61 +
62 +Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@××××××.org>
63 +---
64 + src/model.cpp | 2 +-
65 + 1 file changed, 1 insertion(+), 1 deletion(-)
66 +
67 +diff --git a/src/model.cpp b/src/model.cpp
68 +index ee559c47..22f0bb39 100644
69 +--- a/src/model.cpp
70 ++++ b/src/model.cpp
71 +@@ -181,7 +181,7 @@ vector<Shape*> Model::ReadShapes(Glib::RefPtr<Gio::File> file,
72 + uint max_triangles)
73 + {
74 + vector<Shape*> shapes;
75 +- if (file==0) return shapes;
76 ++ if (!file) return shapes;
77 + File sfile(file);
78 + vector< vector<Triangle> > triangles;
79 + vector<ustring> shapenames;
80
81 diff --git a/sci-misc/repsnapper/files/std_abs.patch b/sci-misc/repsnapper/files/std_abs.patch
82 deleted file mode 100644
83 index 35aefe92700..00000000000
84 --- a/sci-misc/repsnapper/files/std_abs.patch
85 +++ /dev/null
86 @@ -1,11 +0,0 @@
87 ---- libraries/amf/amftools-code/include/STL_File.h.orig 2016-09-21 08:35:10.600313039 +0200
88 -+++ libraries/amf/amftools-code/include/STL_File.h 2016-09-21 08:35:58.303647256 +0200
89 -@@ -89,7 +89,7 @@
90 - Vec3D v;
91 - int OrigIndex;
92 -
93 -- 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
94 -+ 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
95 - static double WeldThresh; //weld threshold for importing from STL
96 - };
97 -
98
99 diff --git a/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild b/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
100 index 330b26a5619..26bbc8eb54b 100644
101 --- a/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
102 +++ b/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
103 @@ -1,4 +1,4 @@
104 -# Copyright 1999-2016 Gentoo Foundation
105 +# Copyright 1999-2017 Gentoo Foundation
106 # Distributed under the terms of the GNU General Public License v2
107
108 EAPI=5
109 @@ -30,7 +30,7 @@ RDEPEND=${DEPEND}
110
111 src_prepare() {
112 epatch "${FILESDIR}/std-c11.patch"
113 - epatch "${FILESDIR}/std_abs.patch"
114 + epatch "${FILESDIR}/${P}-gcc6.patch"
115 eautoreconf
116 append-cxxflags -std=c++11
117 }
118
119 diff --git a/sci-misc/repsnapper/repsnapper-9999.ebuild b/sci-misc/repsnapper/repsnapper-9999.ebuild
120 index c4264c5a53e..43bd03528bb 100644
121 --- a/sci-misc/repsnapper/repsnapper-9999.ebuild
122 +++ b/sci-misc/repsnapper/repsnapper-9999.ebuild
123 @@ -1,4 +1,4 @@
124 -# Copyright 1999-2016 Gentoo Foundation
125 +# Copyright 1999-2017 Gentoo Foundation
126 # Distributed under the terms of the GNU General Public License v2
127
128 EAPI=5
129 @@ -24,8 +24,6 @@ DEPEND="
130 RDEPEND=${DEPEND}
131
132 src_prepare() {
133 - epatch "${FILESDIR}/std-c11.patch"
134 - epatch "${FILESDIR}/std_abs.patch"
135 eautoreconf
136 append-cxxflags -std=c++11
137 }