summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-05-25 00:41:09 -0400
committerDavid Seifert <soap@gentoo.org>2017-05-26 22:59:37 +0200
commit0d940d0376a6c8a7d0724db71d830138a2474c16 (patch)
tree546e97422cc77fdf8d2ecf51aee6b4afee13e128 /sci-misc
parentapp-shells/squirrelsh: Fix building with GCC-6 (diff)
downloadgentoo-0d940d0376a6c8a7d0724db71d830138a2474c16.tar.gz
gentoo-0d940d0376a6c8a7d0724db71d830138a2474c16.tar.bz2
gentoo-0d940d0376a6c8a7d0724db71d830138a2474c16.zip
sci-misc/repsnapper: Fix building with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=594474 Package-Manager: Portage-2.3.6, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/4753
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/repsnapper/files/repsnapper-2.4a_p0-gcc6.patch54
-rw-r--r--sci-misc/repsnapper/files/std_abs.patch11
-rw-r--r--sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild4
-rw-r--r--sci-misc/repsnapper/repsnapper-9999.ebuild4
4 files changed, 57 insertions, 16 deletions
diff --git a/sci-misc/repsnapper/files/repsnapper-2.4a_p0-gcc6.patch b/sci-misc/repsnapper/files/repsnapper-2.4a_p0-gcc6.patch
new file mode 100644
index 00000000000..80a3c56eb86
--- /dev/null
+++ b/sci-misc/repsnapper/files/repsnapper-2.4a_p0-gcc6.patch
@@ -0,0 +1,54 @@
+From f6a411fa829f144800d123c1256d7d7648736437 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiago=20St=C3=BCrmer=20Daitx?= <tdaitx@gmail.com>
+Date: Thu, 1 Sep 2016 00:02:48 -0300
+Subject: [PATCH 1/2] replace abs() with std::abs() for gcc6 compatibility
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Building with GCC 6 fails with "call of overloaded ‘abs(double)’ is
+ambiguous" - for some reason only on PowerPC and PPC64.
+---
+ libraries/amf/amftools-code/include/STL_File.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libraries/amf/amftools-code/include/STL_File.h b/libraries/amf/amftools-code/include/STL_File.h
+index 0bc01bed..2d9d656f 100644
+--- a/libraries/amf/amftools-code/include/STL_File.h
++++ b/libraries/amf/amftools-code/include/STL_File.h
+@@ -89,7 +89,7 @@ class aWeldVertex {
+ Vec3D v;
+ int OrigIndex;
+
+- 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
++ 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
+ static double WeldThresh; //weld threshold for importing from STL
+ };
+
+
+From 93c81e3794a3eb7c2b7c7611803a3107fb25027b Mon Sep 17 00:00:00 2001
+From: "Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
+Date: Wed, 4 Jan 2017 13:50:56 +0800
+Subject: [PATCH 2/2] Fix FTBFS for glibmm Glib::RefPtr
+
+Now we can use operator RefPtr::operator bool() to test if it is NULL.
+RefPtr::operator== can not work on int.
+
+Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
+---
+ src/model.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/model.cpp b/src/model.cpp
+index ee559c47..22f0bb39 100644
+--- a/src/model.cpp
++++ b/src/model.cpp
+@@ -181,7 +181,7 @@ vector<Shape*> Model::ReadShapes(Glib::RefPtr<Gio::File> file,
+ uint max_triangles)
+ {
+ vector<Shape*> shapes;
+- if (file==0) return shapes;
++ if (!file) return shapes;
+ File sfile(file);
+ vector< vector<Triangle> > triangles;
+ vector<ustring> shapenames;
diff --git a/sci-misc/repsnapper/files/std_abs.patch b/sci-misc/repsnapper/files/std_abs.patch
deleted file mode 100644
index 35aefe92700..00000000000
--- a/sci-misc/repsnapper/files/std_abs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libraries/amf/amftools-code/include/STL_File.h.orig 2016-09-21 08:35:10.600313039 +0200
-+++ libraries/amf/amftools-code/include/STL_File.h 2016-09-21 08:35:58.303647256 +0200
-@@ -89,7 +89,7 @@
- Vec3D v;
- int OrigIndex;
-
-- 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
-+ 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
- static double WeldThresh; //weld threshold for importing from STL
- };
-
diff --git a/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild b/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
index 330b26a5619..26bbc8eb54b 100644
--- a/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
+++ b/sci-misc/repsnapper/repsnapper-2.4a_p0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -30,7 +30,7 @@ RDEPEND=${DEPEND}
src_prepare() {
epatch "${FILESDIR}/std-c11.patch"
- epatch "${FILESDIR}/std_abs.patch"
+ epatch "${FILESDIR}/${P}-gcc6.patch"
eautoreconf
append-cxxflags -std=c++11
}
diff --git a/sci-misc/repsnapper/repsnapper-9999.ebuild b/sci-misc/repsnapper/repsnapper-9999.ebuild
index c4264c5a53e..43bd03528bb 100644
--- a/sci-misc/repsnapper/repsnapper-9999.ebuild
+++ b/sci-misc/repsnapper/repsnapper-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -24,8 +24,6 @@ DEPEND="
RDEPEND=${DEPEND}
src_prepare() {
- epatch "${FILESDIR}/std-c11.patch"
- epatch "${FILESDIR}/std_abs.patch"
eautoreconf
append-cxxflags -std=c++11
}