dev-python/shiboken: Fix building with GCC-6
authorPeter Levine <plevine457@gmail.com>
Fri, 7 Jul 2017 06:23:35 +0000 (02:23 -0400)
committerMichael Palimaka <kensington@gentoo.org>
Sat, 8 Jul 2017 02:36:59 +0000 (12:36 +1000)
Bug: https://bugs.gentoo.org/show_bug.cgi?id=619332
Package-Manager: Portage-2.3.6, Repoman-2.3.2

dev-python/shiboken/files/shiboken-1.2.2-gcc6.patch [new file with mode: 0644]
dev-python/shiboken/shiboken-1.2.2.ebuild

diff --git a/dev-python/shiboken/files/shiboken-1.2.2-gcc6.patch b/dev-python/shiboken/files/shiboken-1.2.2-gcc6.patch
new file mode 100644 (file)
index 0000000..6573423
--- /dev/null
@@ -0,0 +1,20 @@
+Bug: https://bugs.gentoo.org/619332
+PR: https://github.com/pyside/Shiboken/pull/84
+
+--- a/tests/libsample/simplefile.cpp
++++ b/tests/libsample/simplefile.cpp
+@@ -90,13 +90,13 @@ bool
+ SimpleFile::exists() const
+ {
+     std::ifstream ifile(p->m_filename);
+-    return ifile;
++    return static_cast<bool>(ifile);
+ }
+
+ bool
+ SimpleFile::exists(const char* filename)
+ {
+     std::ifstream ifile(filename);
+-    return ifile;
++    return static_cast<bool>(ifile);
+ }
index 89119cb728f282d4b6e93fb2e6183f83a6c333e6..65d6d0be4d163471443e4269a818bcd7ab65bb3b 100644 (file)
@@ -34,6 +34,7 @@ DEPEND="${RDEPEND}
 DOCS=( AUTHORS ChangeLog )
 PATCHES=(
        "${FILESDIR}/${PV}-Fix-tests-with-Python-3.patch"
+       "${FILESDIR}/${P}-gcc6.patch"
 )
 
 src_prepare() {