1 |
commit: 63b0597c1247c53fe09c20274b17d0a47c3c3d60 |
2 |
Author: Kacper KoĆodziej <kacper <AT> kolodziej <DOT> in> |
3 |
AuthorDate: Sat Nov 5 20:02:17 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 4 13:25:11 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63b0597c |
7 |
|
8 |
media-gfx/nvidia-texture-tools: fix cpp14 compilation errors; bug #594938 |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
.../files/nvidia-texture-tools-2.0.8-cpp14.patch | 58 ++++++++++++++++++++++ |
13 |
.../nvidia-texture-tools-2.0.8-r2.ebuild | 4 +- |
14 |
2 files changed, 61 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cpp14.patch b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cpp14.patch |
17 |
new file mode 100644 |
18 |
index 00000000..3130d2c |
19 |
--- /dev/null |
20 |
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cpp14.patch |
21 |
@@ -0,0 +1,58 @@ |
22 |
+This patch fixes cpp14 compilation errors. |
23 |
+Gentoo-bug: 594938 |
24 |
+ |
25 |
+--- a/src/nvimage/ImageIO.cpp |
26 |
++++ b/src/nvimage/ImageIO.cpp |
27 |
+@@ -135,7 +135,7 @@ |
28 |
+ StdInputStream stream(fileName); |
29 |
+ |
30 |
+ if (stream.isError()) { |
31 |
+- return false; |
32 |
++ return NULL; |
33 |
+ } |
34 |
+ |
35 |
+ return loadFloat(fileName, stream); |
36 |
+@@ -233,7 +233,7 @@ |
37 |
+ case TGA_TYPE_INDEXED: |
38 |
+ if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) { |
39 |
+ nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" ); |
40 |
+- return false; |
41 |
++ return NULL; |
42 |
+ } |
43 |
+ pal = true; |
44 |
+ break; |
45 |
+@@ -254,7 +254,7 @@ |
46 |
+ |
47 |
+ default: |
48 |
+ nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" ); |
49 |
+- return false; |
50 |
++ return NULL; |
51 |
+ } |
52 |
+ |
53 |
+ const uint pixel_size = (tga.pixel_size/8); |
54 |
+@@ -621,7 +621,7 @@ |
55 |
+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); |
56 |
+ if (png_ptr == NULL) { |
57 |
+ // nvDebug( "*** LoadPNG: Error allocating read buffer in file '%s'.\n", name ); |
58 |
+- return false; |
59 |
++ return NULL; |
60 |
+ } |
61 |
+ |
62 |
+ // Allocate/initialize a memory block for the image information |
63 |
+@@ -629,14 +629,14 @@ |
64 |
+ if (info_ptr == NULL) { |
65 |
+ png_destroy_read_struct(&png_ptr, NULL, NULL); |
66 |
+ // nvDebug( "*** LoadPNG: Error allocating image information for '%s'.\n", name ); |
67 |
+- return false; |
68 |
++ return NULL; |
69 |
+ } |
70 |
+ |
71 |
+ // Set up the error handling |
72 |
+ if (setjmp(png_jmpbuf(png_ptr))) { |
73 |
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); |
74 |
+ // nvDebug( "*** LoadPNG: Error reading png file '%s'.\n", name ); |
75 |
+- return false; |
76 |
++ return NULL; |
77 |
+ } |
78 |
+ |
79 |
+ // Set up the I/O functions. |
80 |
|
81 |
diff --git a/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild |
82 |
index 20b73dc..01690b8 100644 |
83 |
--- a/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild |
84 |
+++ b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild |
85 |
@@ -1,4 +1,4 @@ |
86 |
-# Copyright 1999-2013 Gentoo Foundation |
87 |
+# Copyright 1999-2016 Gentoo Foundation |
88 |
# Distributed under the terms of the GNU General Public License v2 |
89 |
# $Id$ |
90 |
|
91 |
@@ -53,6 +53,8 @@ src_prepare() { |
92 |
epatch "${FILESDIR}"/${P}-openexr.patch |
93 |
# fix clang build |
94 |
epatch "${FILESDIR}"/${P}-clang.patch |
95 |
+ # fix bug #594938 |
96 |
+ epatch "${FILESDIR}/${P}-cpp14.patch" |
97 |
} |
98 |
|
99 |
src_configure() { |