diff -u xmedcon-0.10.7/debian/changelog xmedcon-0.10.7/debian/changelog --- xmedcon-0.10.7/debian/changelog +++ xmedcon-0.10.7/debian/changelog @@ -1,3 +1,10 @@ +xmedcon (0.10.7-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTBFS with libpng 1.5. + + -- Nobuhiro Iwamatsu Fri, 25 Nov 2011 00:21:29 +0900 + xmedcon (0.10.7-1) unstable; urgency=low * New upstream release diff -u xmedcon-0.10.7/debian/control xmedcon-0.10.7/debian/control --- xmedcon-0.10.7/debian/control +++ xmedcon-0.10.7/debian/control @@ -2,7 +2,7 @@ Section: graphics Priority: optional Maintainer: Roland Marcus Rutschmann -Build-Depends: debhelper (>= 5.0.51~), libgtk2.0-dev, zlib1g-dev, libpng12-dev, libnifti-dev +Build-Depends: debhelper (>= 5.0.51~), libgtk2.0-dev, zlib1g-dev, libpng-dev (>= 1.5), libnifti-dev Standards-Version: 3.9.1 Package: libmdc2 only in patch2: unchanged: --- xmedcon-0.10.7.orig/source/m-png.c +++ xmedcon-0.10.7/source/m-png.c @@ -50,6 +50,10 @@ #include "medcon.h" +#if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR < 4) +#define LIBPNG_VERSION_12 +#endif + /**************************************************************************** D E F I N E S ****************************************************************************/ @@ -64,8 +68,11 @@ MdcPrntWarn("PNG %s\n",error_msg); if (!png_ptr) return; - +#if defined(LIBPNG_VERSION_12) longjmp(png_ptr->jmpbuf, 1); +#else + longjmp(png_jmpbuf((png_ptr)),1); +#endif } static void MdcPngWarn(png_structp png_ptr, png_const_charp warning_msg) @@ -95,9 +102,10 @@ { png_structp png_ptr; png_infop info_ptr; - png_uint_32 width, height, rowbytes; + png_uint_32 width, height, rowbytes, num_text; png_colorp palette; png_bytepp row_pointers; + png_textp text_ptr; Uint32 i, commentsize; int bit_depth, color_type, transform, num_palette; Uint8 *imgRGB, *pbuf; @@ -161,21 +169,21 @@ } /* get comment */ - if(info_ptr->num_text > 0) { + if (png_get_text(png_ptr, info_ptr, &text_ptr, num_text) > 0) { commentsize = 1; - for(i = 0; i < info_ptr->num_text; i++) - commentsize += strlen(info_ptr->text[i].key) + 1 + - info_ptr->text[i].text_length + 2; + for(i = 0; i < num_text; i++) + commentsize += strlen(text_ptr[i].key) + 1 + + text_ptr[i].text_length + 2; if ((fi->comment = malloc(commentsize)) == NULL) { MdcPngWarn(png_ptr,"PNG Can't malloc comment string"); }else{ fi->comment[0] = '\0'; - for (i = 0; i < info_ptr->num_text; i++) { - strcat(fi->comment, info_ptr->text[i].key); + for (i = 0; i < num_text; i++) { + strcat(fi->comment, text_ptr[i].key); strcat(fi->comment, "::"); - strcat(fi->comment, info_ptr->text[i].text); + strcat(fi->comment, text_ptr[i].text); strcat(fi->comment, "\n"); } }