Date: Sunday, January 29, 2012 @ 14:58:36 Author: ibiru Revision: 148008
libpng 1.5 rebuild Added: thunderbird/trunk/libpng15.patch Modified: thunderbird/trunk/PKGBUILD ----------------+ PKGBUILD | 9 ++++++--- libpng15.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2012-01-29 19:28:03 UTC (rev 148007) +++ PKGBUILD 2012-01-29 19:58:36 UTC (rev 148008) @@ -5,7 +5,7 @@ pkgname=thunderbird pkgver=9.0.1 -pkgrel=1 +pkgrel=2 pkgdesc="Standalone Mail/News reader" arch=('i686' 'x86_64') license=('MPL' 'GPL') @@ -18,16 +18,19 @@ mozconfig thunderbird.desktop thunderbird-install-dir.patch - vendor.js) + vendor.js + libpng15.patch) md5sums=('a5904751dbd33074682b438b732fdbab' 'ca98c2bf1017b33e19dae22fdcef2e73' 'af3e5b344d2edf1c7d61bb0a5a96de9a' 'aea906acf72c43dd82ead2fabcc1c6db' - '5a53179d14ae9631b7afe5e4d0fc0b25') + '5a53179d14ae9631b7afe5e4d0fc0b25' + 'dc77000ddcbb6d9e17220c759fdcb94e') build() { cd "$srcdir/comm-release" patch -Np1 -i "$srcdir/thunderbird-install-dir.patch" + patch -Np1 -i "$srcdir/libpng15.patch" cp "$srcdir/mozconfig" .mozconfig Added: libpng15.patch =================================================================== --- libpng15.patch (rev 0) +++ libpng15.patch 2012-01-29 19:58:36 UTC (rev 148008) @@ -0,0 +1,52 @@ +diff -Nur comm-release.orig/mozilla/modules/libpr0n/decoders/nsICODecoder.cpp comm-release/mozilla/modules/libpr0n/decoders/nsICODecoder.cpp +--- comm-release.orig/mozilla/modules/libpr0n/decoders/nsICODecoder.cpp 2012-01-29 19:29:28.121217854 +0000 ++++ comm-release/mozilla/modules/libpr0n/decoders/nsICODecoder.cpp 2012-01-29 19:32:05.489944419 +0000 +@@ -385,8 +385,7 @@ + + // Raymond Chen says that 32bpp only are valid PNG ICOs + // http://blogs.msdn.com/b/oldnewthing/archive/2010/10/22/10079192.aspx +- if (static_cast<nsPNGDecoder*>(mContainedDecoder.get())->HasValidInfo() && +- static_cast<nsPNGDecoder*>(mContainedDecoder.get())->GetPixelDepth() != 32) { ++ if (!static_cast<nsPNGDecoder*>(mContainedDecoder.get())->IsValidICO()) { + PostDataError(); + } + return; +diff -Nur comm-release.orig/mozilla/modules/libpr0n/decoders/nsPNGDecoder.h comm-release/mozilla/modules/libpr0n/decoders/nsPNGDecoder.h +--- comm-release.orig/mozilla/modules/libpr0n/decoders/nsPNGDecoder.h 2012-01-29 19:29:28.121217854 +0000 ++++ comm-release/mozilla/modules/libpr0n/decoders/nsPNGDecoder.h 2012-01-29 19:32:05.489944419 +0000 +@@ -73,19 +73,25 @@ + + void EndImageFrame(); + +- // Checks if the info header contains valid information +- bool HasValidInfo() const ++ // Check if PNG is valid ICO (32bpp RGBA) ++ // http://blogs.msdn.com/b/oldnewthing/archive/2010/10/22/10079192.aspx ++ bool IsValidICO() const + { +- return mInfo && mInfo->valid; +- } ++ png_uint_32 ++ png_width, // Unused ++ png_height; // Unused + +- // Obtain the pixel depth if available or 0 otherwise +- PRInt32 GetPixelDepth() const +- { +- if (!mInfo) { +- return 0; ++ int png_bit_depth, ++ png_color_type; ++ ++ if (png_get_IHDR(mPNG, mInfo, &png_width, &png_height, &png_bit_depth, ++ &png_color_type, NULL, NULL, NULL)) { ++ ++ return (png_color_type == PNG_COLOR_TYPE_RGB_ALPHA && ++ png_bit_depth == 8); ++ } else { ++ return false; + } +- return mInfo->pixel_depth; + } + + public: