Files
macports-ports/graphics/pbrt2/files/null-conversion.patch
Ryan Carsten Schmidt c6f459d0e9 pbrt2: Fix build; also build exrtotiff
Fix build by requiring C++11, required by OpenEXR headers now, and
using pkg-config to get the right flags for OpenEXR, and tiff while
we're at it.

Closes: https://trac.macports.org/ticket/70618

Also build exrtotiff, thereby actually using libtiff.

Disable silent rules.

Add a patch to silence null-conversion warnings.

Move zlib dependency to platform darwin block because the Makefile only
adds -lz on Darwin.
2026-03-29 04:53:43 -05:00

26 lines
808 B
Diff

Fix:
warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
--- src/tools/exravg.cpp.orig 2019-01-04 18:22:30.000000000 -0600
+++ src/tools/exravg.cpp 2026-03-29 04:40:17.000000000 -0500
@@ -75,7 +75,7 @@
delete[] hrgba;
} catch (const std::exception &e) {
fprintf(stderr, "Unable to read image file \"%s\": %s", name, e.what());
- return NULL;
+ return false;
}
return rgba;
--- src/tools/exrdiff.cpp.orig 2019-01-04 18:22:30.000000000 -0600
+++ src/tools/exrdiff.cpp 2026-03-29 04:40:23.000000000 -0500
@@ -145,7 +145,7 @@
delete[] hrgba;
} catch (const std::exception &e) {
fprintf(stderr, "Unable to read image file \"%s\": %s", name, e.what());
- return NULL;
+ return false;
}
return rgba;