Bug#636003: libvigraimpex: FTBFS with libpng 1.5
Hi Ralf,
you could apply the upstream patch instead: https://github.com/ukoethe/vigra/commit/7f7b24
That uses #ifdef to build with both 1.2 and 1.5 png versions.
Best regards
Joachim
commit 7f7b24e78ff56d66239e4a34ca66a85bdd2f44fb
Author: Ullrich Koethe <ullrich.koethe@iwr.uni-heidelberg.de>
Date: Fri Mar 11 14:55:42 2011 +0100
update for libpng 1.5 (fix by Mark Brand, mingw-cross-env)
diff --git a/src/impex/png.cxx b/src/impex/png.cxx
index e525fc6..5b7e84a 100644
--- a/src/impex/png.cxx
+++ b/src/impex/png.cxx
@@ -320,7 +320,11 @@ namespace vigra {
#if (PNG_LIBPNG_VER > 10008) && defined(PNG_READ_iCCP_SUPPORTED)
char * dummyName;
int dummyCompType;
+#if (PNG_LIBPNG_VER < 10500)
char * profilePtr;
+#else
+ png_byte * profilePtr;
+#endif
png_uint_32 profileLen;
if (png_get_valid( png, info, PNG_INFO_iCCP )) {
png_get_iCCP(png, info, &dummyName, &dummyCompType, &profilePtr, &profileLen) ;
@@ -593,7 +597,11 @@ namespace vigra {
// set icc profile
if (iccProfile.size() > 0) {
png_set_iCCP(png, info, (png_charp)("icc"), 0,
+#if (PNG_LIBPNG_VER < 10500)
(png_charp)iccProfile.begin(), (png_uint_32)iccProfile.size());
+#else
+ (png_byte*)iccProfile.begin(), (png_uint_32)iccProfile.size());
+#endif
}
#endif
Reply to: