summaryrefslogtreecommitdiff
path: root/libraries/qt3/qt3-libpng14.diff
blob: c568dd0c4d1fbccd4b4cf8b8d53a8074facf3d4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
http://groups.google.com/group/lucky.freebsd.ports.bugs/browse_thread/thread/a4a95255567dedfc

System: FreeBSD elch.exwg.net 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #8: Sat Feb 20 21:36:50 CET 2010 c...@elch.exwg.net:/usr/obj/usr/src/sys/CMT amd64

        png-1.4.1
        qt-3.3.8_11 (upgrading to qt-3.3.8_12)

>Description:

        Build of x11-toolkits/qt33 fails due to the changed struct png_info
        in libpng-1.4:
        kernel/qpngio.cpp:162: error: 'struct png_info_struct' has no member named 'trans_values'

>How-To-Repeat:
        run portupgrade
>Fix:

        Add x11-toolkits/qt33/files/patch-src-kernel-qpngio.cpp
        (also available at http://burggraben.net/hacks/patch-src-kernel-qpngio.cpp )

--- src/kernel/qpngio.cpp.orig  2010-03-28 12:55:28.000000000 +0200
+++ src/kernel/qpngio.cpp       2010-03-28 12:56:44.000000000 +0200
@@ -159,7 +159,7 @@
                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;
+               const int g = info_ptr->trans_color.gray;
                if (g < ncols) {
                    image.setAlphaBuffer(TRUE);
                    image.setColor(g, image.color(g) & RGB_MASK);
@@ -187,7 +187,7 @@
                    info_ptr->palette[i].red,
                    info_ptr->palette[i].green,
                    info_ptr->palette[i].blue,
-                   info_ptr->trans[i]
+                   info_ptr->trans_alpha[i]
                    )
                );
                i++;