[75234] trunk/dports/x11/qt3

michaelld at macports.org michaelld at macports.org
Tue Jan 18 10:26:17 PST 2011


Revision: 75234
          http://trac.macports.org/changeset/75234
Author:   michaelld at macports.org
Date:     2011-01-18 10:25:58 -0800 (Tue, 18 Jan 2011)
Log Message:
-----------
qt3: Add patch for libpng 1.4; fixes ticket #28023.

Modified Paths:
--------------
    trunk/dports/x11/qt3/Portfile

Added Paths:
-----------
    trunk/dports/x11/qt3/files/qt3-png14.patch

Modified: trunk/dports/x11/qt3/Portfile
===================================================================
--- trunk/dports/x11/qt3/Portfile	2011-01-18 16:46:19 UTC (rev 75233)
+++ trunk/dports/x11/qt3/Portfile	2011-01-18 18:25:58 UTC (rev 75234)
@@ -37,7 +37,9 @@
     eval copy [glob ${filespath}/qt-copy/*] ${workpath}/patches/
 }
 
-patchfiles      qt3-tiger.patch dp01.patch macports-x11.patch
+patchfiles      qt3-tiger.patch dp01.patch macports-x11.patch \
+		qt3-png14.patch
+
 patch {
     foreach p ${patchfiles} {
         system "cd ${worksrcpath} && sed -e 's|@PREFIX@|${prefix}|g' < ${portpath}/${filesdir}/${p} | patch -p1"

Added: trunk/dports/x11/qt3/files/qt3-png14.patch
===================================================================
--- trunk/dports/x11/qt3/files/qt3-png14.patch	                        (rev 0)
+++ trunk/dports/x11/qt3/files/qt3-png14.patch	2011-01-18 18:25:58 UTC (rev 75234)
@@ -0,0 +1,27 @@
+diff -ru qt-x11-free-3.3.8b-orig//src/kernel/qpngio.cpp qt-x11-free-3.3.8b/src/kernel/qpngio.cpp
+--- qt-x11-free-3.3.8b-orig//src/kernel/qpngio.cpp	2008-01-15 14:09:13.000000000 -0500
++++ qt-x11-free-3.3.8b/src/kernel/qpngio.cpp	2010-05-13 01:22:17.295436061 -0400
+@@ -162,7 +162,11 @@
+ 		image.setColor( i, qRgba(c,c,c,0xff) );
+ 	    }
+ 	    if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
++#if PNG_LIBPNG_VER < 10400
+ 		const int g = info_ptr->trans_values.gray;
++#else
++		const int g = info_ptr->trans_color.gray;
++#endif
+ 		if (g < ncols) {
+ 		    image.setAlphaBuffer(TRUE);
+ 		    image.setColor(g, image.color(g) & RGB_MASK);
+@@ -190,7 +194,11 @@
+ 		    info_ptr->palette[i].red,
+ 		    info_ptr->palette[i].green,
+ 		    info_ptr->palette[i].blue,
++#if PNG_LIBPNG_VER < 10400
+ 		    info_ptr->trans[i]
++#else
++		    info_ptr->trans_alpha[i]
++#endif
+ 		    )
+ 		);
+ 		i++;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110118/fcb42a50/attachment.html>


More information about the macports-changes mailing list