1 |
commit: 181f3f269ab319cae4dc05de70aab8b3765fd110 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 9 10:42:22 2017 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 9 11:04:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=181f3f26 |
7 |
|
8 |
media-gfx/aqsis: Fix gcc6 support (#594410 by Peter Levine) |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
media-gfx/aqsis/aqsis-1.8.2.ebuild | 4 +++- |
13 |
media-gfx/aqsis/files/aqsis-1.8.2-gcc6.patch | 23 +++++++++++++++++++++++ |
14 |
2 files changed, 26 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/media-gfx/aqsis/aqsis-1.8.2.ebuild b/media-gfx/aqsis/aqsis-1.8.2.ebuild |
17 |
index 6f5d01049af..18ee7fcbed1 100644 |
18 |
--- a/media-gfx/aqsis/aqsis-1.8.2.ebuild |
19 |
+++ b/media-gfx/aqsis/aqsis-1.8.2.ebuild |
20 |
@@ -1,4 +1,4 @@ |
21 |
-# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Copyright 1999-2017 Gentoo Foundation |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
EAPI=5 |
26 |
@@ -32,11 +32,13 @@ DEPEND="${RDEPEND} |
27 |
" |
28 |
|
29 |
DOCS=( AUTHORS INSTALL README ) |
30 |
+ |
31 |
PATCHES=( |
32 |
"${FILESDIR}/${P}-openexr-compat.patch" |
33 |
"${FILESDIR}/${P}-unbundle-tinyxml.patch" |
34 |
"${FILESDIR}/${P}-pfto-boost-1.59.patch" |
35 |
"${FILESDIR}/${P}-boost-join-moc.patch" |
36 |
+ "${FILESDIR}/${P}-gcc6.patch" |
37 |
) |
38 |
|
39 |
src_configure() { |
40 |
|
41 |
diff --git a/media-gfx/aqsis/files/aqsis-1.8.2-gcc6.patch b/media-gfx/aqsis/files/aqsis-1.8.2-gcc6.patch |
42 |
new file mode 100644 |
43 |
index 00000000000..c51f669c09b |
44 |
--- /dev/null |
45 |
+++ b/media-gfx/aqsis/files/aqsis-1.8.2-gcc6.patch |
46 |
@@ -0,0 +1,23 @@ |
47 |
+From d450f4aac8c107f82b18df7789afb52b502eaba0 Mon Sep 17 00:00:00 2001 |
48 |
+From: Hodorgasm <nsane457@×××××.com> |
49 |
+Date: Mon, 19 Sep 2016 22:58:44 -0400 |
50 |
+Subject: [PATCH] Use "!file.fail()" instead of "file != NULL" |
51 |
+ |
52 |
+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. |
53 |
+--- |
54 |
+ libs/core/texturing_old/shadowmap_old.cpp | 2 +- |
55 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
56 |
+ |
57 |
+diff --git a/libs/core/texturing_old/shadowmap_old.cpp b/libs/core/texturing_old/shadowmap_old.cpp |
58 |
+index 1a22491..fbcac59 100644 |
59 |
+--- a/libs/core/texturing_old/shadowmap_old.cpp |
60 |
++++ b/libs/core/texturing_old/shadowmap_old.cpp |
61 |
+@@ -176,7 +176,7 @@ void CqShadowMapOld::LoadZFile() |
62 |
+ { |
63 |
+ std::ifstream file( m_strName.c_str(), std::ios::in | std::ios::binary ); |
64 |
+ |
65 |
+- if ( file != NULL ) |
66 |
++ if ( !file.fail() ) |
67 |
+ { |
68 |
+ // Save a file type and version marker |
69 |
+ TqPchar origHeader = tokenCast(ZFILE_HEADER); |