[arch-commits] Commit in seamonkey/trunk (PKGBUILD libpng15.patch)
Ionut Biru
ibiru at archlinux.org
Sun Jan 29 22:44:18 UTC 2012
Date: Sunday, January 29, 2012 @ 17:44:18
Author: ibiru
Revision: 148015
libpng 1.5 rebuild
Added:
seamonkey/trunk/libpng15.patch
Modified:
seamonkey/trunk/PKGBUILD
----------------+
PKGBUILD | 9 ++++++---
libpng15.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-01-29 21:53:25 UTC (rev 148014)
+++ PKGBUILD 2012-01-29 22:44:18 UTC (rev 148015)
@@ -2,7 +2,7 @@
# Maintainer: Jan de Groot <jgc at archlinux.org>
pkgname=seamonkey
pkgver=2.6.1
-pkgrel=1
+pkgrel=2
pkgdesc="SeaMonkey internet suite"
arch=('i686' 'x86_64')
license=('MPL')
@@ -13,15 +13,18 @@
source=(ftp://releases.mozilla.org/pub/mozilla.org/$pkgname/releases/$pkgver/source/$pkgname-$pkgver.source.tar.bz2
mozconfig
seamonkey.desktop
- seamonkey-2.0-lang.patch)
+ seamonkey-2.0-lang.patch
+ libpng15.patch)
md5sums=('69a43877107f97cfc7504829405ba319'
'd02b5f002a7cdf8d15dccd2548d09256'
'6119a2254716752c9d08e366f8d4c048'
- '25b6fe16ac24cd5c852213e5c1adb272')
+ '25b6fe16ac24cd5c852213e5c1adb272'
+ 'dc77000ddcbb6d9e17220c759fdcb94e')
build() {
cd "$srcdir/comm-release"
patch -Np1 -i "$srcdir/seamonkey-2.0-lang.patch"
+ patch -Np1 -i "$srcdir/libpng15.patch"
cp "$srcdir/mozconfig" .mozconfig
export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/seamonkey-$pkgver"
Added: libpng15.patch
===================================================================
--- libpng15.patch (rev 0)
+++ libpng15.patch 2012-01-29 22:44:18 UTC (rev 148015)
@@ -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:
More information about the arch-commits
mailing list