summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kołodziej <kacper@kolodziej.in>2016-11-05 21:02:17 +0100
committerDavid Seifert <soap@gentoo.org>2017-01-04 15:25:11 +0200
commit63b0597c1247c53fe09c20274b17d0a47c3c3d60 (patch)
tree0b8d46dc5b828d42ce94956b2aef9917921bbf81 /media-gfx/nvidia-texture-tools
parentnet-analyzer/hexinject: new package (diff)
downloadgentoo-63b0597c1247c53fe09c20274b17d0a47c3c3d60.tar.gz
gentoo-63b0597c1247c53fe09c20274b17d0a47c3c3d60.tar.bz2
gentoo-63b0597c1247c53fe09c20274b17d0a47c3c3d60.zip
media-gfx/nvidia-texture-tools: fix cpp14 compilation errors; bug #594938
Package-Manager: portage-2.3.2
Diffstat (limited to 'media-gfx/nvidia-texture-tools')
-rw-r--r--media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cpp14.patch58
-rw-r--r--media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild4
2 files changed, 61 insertions, 1 deletions
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
new file mode 100644
index 000000000000..3130d2c60bb1
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cpp14.patch
@@ -0,0 +1,58 @@
+This patch fixes cpp14 compilation errors.
+Gentoo-bug: 594938
+
+--- a/src/nvimage/ImageIO.cpp
++++ b/src/nvimage/ImageIO.cpp
+@@ -135,7 +135,7 @@
+ StdInputStream stream(fileName);
+
+ if (stream.isError()) {
+- return false;
++ return NULL;
+ }
+
+ return loadFloat(fileName, stream);
+@@ -233,7 +233,7 @@
+ case TGA_TYPE_INDEXED:
+ if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) {
+ nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" );
+- return false;
++ return NULL;
+ }
+ pal = true;
+ break;
+@@ -254,7 +254,7 @@
+
+ default:
+ nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" );
+- return false;
++ return NULL;
+ }
+
+ const uint pixel_size = (tga.pixel_size/8);
+@@ -621,7 +621,7 @@
+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ if (png_ptr == NULL) {
+ // nvDebug( "*** LoadPNG: Error allocating read buffer in file '%s'.\n", name );
+- return false;
++ return NULL;
+ }
+
+ // Allocate/initialize a memory block for the image information
+@@ -629,14 +629,14 @@
+ if (info_ptr == NULL) {
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ // nvDebug( "*** LoadPNG: Error allocating image information for '%s'.\n", name );
+- return false;
++ return NULL;
+ }
+
+ // Set up the error handling
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ // nvDebug( "*** LoadPNG: Error reading png file '%s'.\n", name );
+- return false;
++ return NULL;
+ }
+
+ // Set up the I/O functions.
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
index 20b73dc989d5..01690b880923 100644
--- 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
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -53,6 +53,8 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-openexr.patch
# fix clang build
epatch "${FILESDIR}"/${P}-clang.patch
+ # fix bug #594938
+ epatch "${FILESDIR}/${P}-cpp14.patch"
}
src_configure() {