summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2017-04-09 12:42:22 +0200
committerPacho Ramos <pacho@gentoo.org>2017-04-09 13:04:24 +0200
commit181f3f269ab319cae4dc05de70aab8b3765fd110 (patch)
tree54edaca0b01e3850a7e081ca5abd989960adae3d /media-gfx
parentsci-visualization/nonolith-connect: Fix gcc6 support (#594330 by Peter Levine) (diff)
downloadgentoo-181f3f269ab319cae4dc05de70aab8b3765fd110.tar.gz
gentoo-181f3f269ab319cae4dc05de70aab8b3765fd110.tar.bz2
gentoo-181f3f269ab319cae4dc05de70aab8b3765fd110.zip
media-gfx/aqsis: Fix gcc6 support (#594410 by Peter Levine)
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/aqsis/aqsis-1.8.2.ebuild4
-rw-r--r--media-gfx/aqsis/files/aqsis-1.8.2-gcc6.patch23
2 files changed, 26 insertions, 1 deletions
diff --git a/media-gfx/aqsis/aqsis-1.8.2.ebuild b/media-gfx/aqsis/aqsis-1.8.2.ebuild
index 6f5d01049afa..18ee7fcbed1d 100644
--- a/media-gfx/aqsis/aqsis-1.8.2.ebuild
+++ b/media-gfx/aqsis/aqsis-1.8.2.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
@@ -32,11 +32,13 @@ DEPEND="${RDEPEND}
"
DOCS=( AUTHORS INSTALL README )
+
PATCHES=(
"${FILESDIR}/${P}-openexr-compat.patch"
"${FILESDIR}/${P}-unbundle-tinyxml.patch"
"${FILESDIR}/${P}-pfto-boost-1.59.patch"
"${FILESDIR}/${P}-boost-join-moc.patch"
+ "${FILESDIR}/${P}-gcc6.patch"
)
src_configure() {
diff --git a/media-gfx/aqsis/files/aqsis-1.8.2-gcc6.patch b/media-gfx/aqsis/files/aqsis-1.8.2-gcc6.patch
new file mode 100644
index 000000000000..c51f669c09b5
--- /dev/null
+++ b/media-gfx/aqsis/files/aqsis-1.8.2-gcc6.patch
@@ -0,0 +1,23 @@
+From d450f4aac8c107f82b18df7789afb52b502eaba0 Mon Sep 17 00:00:00 2001
+From: Hodorgasm <nsane457@gmail.com>
+Date: Mon, 19 Sep 2016 22:58:44 -0400
+Subject: [PATCH] Use "!file.fail()" instead of "file != NULL"
+
+Pre-C++11 defined an implicit cast from ifstream to "void *" and post C++11 replaced it with an explicit cast of ifstream to "bool". Testing an ifstream with "!ifstream.fail()" should work regardless of the C++ dialect.
+---
+ libs/core/texturing_old/shadowmap_old.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/core/texturing_old/shadowmap_old.cpp b/libs/core/texturing_old/shadowmap_old.cpp
+index 1a22491..fbcac59 100644
+--- a/libs/core/texturing_old/shadowmap_old.cpp
++++ b/libs/core/texturing_old/shadowmap_old.cpp
+@@ -176,7 +176,7 @@ void CqShadowMapOld::LoadZFile()
+ {
+ std::ifstream file( m_strName.c_str(), std::ios::in | std::ios::binary );
+
+- if ( file != NULL )
++ if ( !file.fail() )
+ {
+ // Save a file type and version marker
+ TqPchar origHeader = tokenCast(ZFILE_HEADER);