[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-desktop
Subject: [gentoo-desktop] [kde-sunset] gwenview-1.4.2-r3 doesn't compile with libpng-1.4.2
From: Jens Rutschmann <Jens.Rutschmann () gmx ! info>
Date: 2010-05-16 21:58:07
Message-ID: 4BF06A6F.4000807 () gmx ! info
[Download RAW message or body]
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
["gwenview-libpng-14.patch" (text/plain)]
--- 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++;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic