aboutsummaryrefslogtreecommitdiff
path: root/graphics/nvidia-texture-tools
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-01-26 14:39:00 +0000
committerJan Beich <jbeich@FreeBSD.org>2018-01-26 14:39:00 +0000
commit1d02b8c8d10b309b2cf8011324b93d3932551d52 (patch)
tree04d6853ccb17c1ab52d7c06b09a7f12fa8fb2996 /graphics/nvidia-texture-tools
parent9d27eeb029c8a567999eacce5ff0ec67abb79c35 (diff)
downloadports-1d02b8c8d10b309b2cf8011324b93d3932551d52.tar.gz
ports-1d02b8c8d10b309b2cf8011324b93d3932551d52.zip
graphics/nvidia-texture-tools: unbreak build with Clang 6 (C++14 by default)
src/nvimage/ImageIO.cpp:138:10: error: cannot initialize return object of type 'nv::FloatImage *' with an rvalue of type 'bool' return false; ^~~~~ src/nvimage/ImageIO.cpp:236:12: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool' return false; ^~~~~ src/nvimage/ImageIO.cpp:257:11: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool' return false; ^~~~~ src/nvimage/ImageIO.cpp:624:10: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool' return false; ^~~~~ src/nvimage/ImageIO.cpp:632:10: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool' return false; ^~~~~ src/nvimage/ImageIO.cpp:639:10: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool' return false; ^~~~~ Reported by: pkg-fallout (blocks 9 ports) Obtained from: upstream Approved by: portmgr blanket
Notes
Notes: svn path=/head/; revision=459996
Diffstat (limited to 'graphics/nvidia-texture-tools')
-rw-r--r--graphics/nvidia-texture-tools/files/patch-c++1176
1 files changed, 76 insertions, 0 deletions
diff --git a/graphics/nvidia-texture-tools/files/patch-c++11 b/graphics/nvidia-texture-tools/files/patch-c++11
new file mode 100644
index 000000000000..f33c4dd03485
--- /dev/null
+++ b/graphics/nvidia-texture-tools/files/patch-c++11
@@ -0,0 +1,76 @@
+https://github.com/castano/nvidia-texture-tools/commit/65b3dfa4a6eb
+
+src/nvimage/ImageIO.cpp:138:10: error: cannot initialize return object of type 'nv::FloatImage *' with an rvalue of type 'bool'
+ return false;
+ ^~~~~
+src/nvimage/ImageIO.cpp:236:12: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool'
+ return false;
+ ^~~~~
+src/nvimage/ImageIO.cpp:257:11: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool'
+ return false;
+ ^~~~~
+src/nvimage/ImageIO.cpp:624:10: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool'
+ return false;
+ ^~~~~
+src/nvimage/ImageIO.cpp:632:10: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool'
+ return false;
+ ^~~~~
+src/nvimage/ImageIO.cpp:639:10: error: cannot initialize return object of type 'nv::Image *' with an rvalue of type 'bool'
+ return false;
+ ^~~~~
+
+--- src/nvimage/ImageIO.cpp.orig 2010-05-15 09:12:05 UTC
++++ src/nvimage/ImageIO.cpp
+@@ -135,7 +135,7 @@ FloatImage * nv::ImageIO::loadFloat(const char * fileN
+ StdInputStream stream(fileName);
+
+ if (stream.isError()) {
+- return false;
++ return NULL;
+ }
+
+ return loadFloat(fileName, stream);
+@@ -233,7 +233,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
+ 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 @@ Image * nv::ImageIO::loadTGA(Stream & s)
+
+ 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 @@ Image * nv::ImageIO::loadPNG(Stream & s)
+ 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 @@ Image * nv::ImageIO::loadPNG(Stream & s)
+ 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.