gwenview-1.4.2-r3 doesn't compile with libpng-1.4.2 (patch included)
Hi all,
apparently the gwenview code includes some copied source files from qt3. At least compiling it against libpng-1.4.2 fails with the same errors as qt3 did. Parts of the patch for qt3 from the kde-sunset overlay can be applied to gwenview as well. I modified it a bit and attached it to this email. Place it in the files dir and change the "PATCHES" variable in the ebuild as follows and gwenview should compile again. PATCHES=( "${FILESDIR}/gwenview-1.4.2-exiv2.patch" "${FILESDIR}/gwenview-1.4.2-desktop-file.diff" "${FILESDIR}/gwenview-libpng14.patch" ) Best regards, Jens --- src/gvcore/pngformattype.cpp 2007-09-15 15:46:13.000000000 +0200 +++ src/gvcore/pngformattype.cpp 2010-05-16 23:40:09.057829081 +0200 @@ -245,7 +245,11 @@ image.setColor( i, qRgba(c,c,c,0xff) ); } if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { - const int g = info_ptr->trans_values.gray; +#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 ) + const int g = info_ptr->trans_color.gray; +#else + const int g = info_ptr->trans_values.gray; +#endif if (g < ncols) { image.setAlphaBuffer(TRUE); image.setColor(g, image.color(g) & RGB_MASK); @@ -273,7 +277,11 @@ info_ptr->palette[i].red, info_ptr->palette[i].green, info_ptr->palette[i].blue, - info_ptr->trans[i] +#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 ) + info_ptr->trans_alpha[i] +#else + info_ptr->trans[i] +#endif ) ); i++; |
| All times are GMT. The time now is 11:38 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.