1 |
ssuominen 10/05/10 12:35:49 |
2 |
|
3 |
Added: xbmc-9.11-libpng14.patch |
4 |
Log: |
5 |
Fix building with libpng14 wrt #319113 by Manuel Nickschas. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-tv/xbmc/files/xbmc-9.11-libpng14.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-9.11-libpng14.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-9.11-libpng14.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: xbmc-9.11-libpng14.patch |
15 |
=================================================================== |
16 |
http://repos.archlinux.org/wsvn/community/xbmc/trunk/libpng14.patch |
17 |
|
18 |
diff -Nur xbmc-9.11.orig/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp xbmc-9.11/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp |
19 |
--- xbmc-9.11.orig/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp 2008-07-18 23:40:53.000000000 +0300 |
20 |
+++ xbmc-9.11/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp 2010-01-20 21:55:11.000000000 +0200 |
21 |
@@ -142,9 +142,9 @@ |
22 |
if (info_ptr->num_trans!=0){ //palette transparency |
23 |
if (info_ptr->num_trans==1){ |
24 |
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){ |
25 |
- info.nBkgndIndex = info_ptr->trans_values.index; |
26 |
+ info.nBkgndIndex = info_ptr->trans_color.index; |
27 |
} else{ |
28 |
- info.nBkgndIndex = info_ptr->trans_values.gray>>nshift; |
29 |
+ info.nBkgndIndex = info_ptr->trans_color.gray>>nshift; |
30 |
} |
31 |
} |
32 |
if (info_ptr->num_trans>1){ |
33 |
@@ -152,7 +152,7 @@ |
34 |
if (pal){ |
35 |
DWORD ip; |
36 |
for (ip=0;ip<min(head.biClrUsed,(unsigned long)info_ptr->num_trans);ip++) |
37 |
- pal[ip].rgbReserved=info_ptr->trans[ip]; |
38 |
+ pal[ip].rgbReserved=info_ptr->trans_alpha[ip]; |
39 |
for (ip=info_ptr->num_trans;ip<head.biClrUsed;ip++){ |
40 |
pal[ip].rgbReserved=255; |
41 |
} |
42 |
@@ -166,9 +166,9 @@ |
43 |
int num_trans; |
44 |
png_color_16 *image_background; |
45 |
if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &image_background)){ |
46 |
- info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_values.red>>nshift); |
47 |
- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_values.green>>nshift); |
48 |
- info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_values.blue>>nshift); |
49 |
+ info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_color.red>>nshift); |
50 |
+ info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_color.green>>nshift); |
51 |
+ info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_color.blue>>nshift); |
52 |
info.nBkgndColor.rgbReserved = 0; |
53 |
info.nBkgndIndex = 0; |
54 |
} |
55 |
@@ -417,12 +417,12 @@ |
56 |
if (info.nBkgndIndex >= 0){ |
57 |
info_ptr->num_trans = 1; |
58 |
info_ptr->valid |= PNG_INFO_tRNS; |
59 |
- info_ptr->trans = trans; |
60 |
- info_ptr->trans_values.index = (BYTE)info.nBkgndIndex; |
61 |
- info_ptr->trans_values.red = tc.rgbRed; |
62 |
- info_ptr->trans_values.green = tc.rgbGreen; |
63 |
- info_ptr->trans_values.blue = tc.rgbBlue; |
64 |
- info_ptr->trans_values.gray = info_ptr->trans_values.index; |
65 |
+ info_ptr->trans_alpha = trans; |
66 |
+ info_ptr->trans_color.index = (BYTE)info.nBkgndIndex; |
67 |
+ info_ptr->trans_color.red = tc.rgbRed; |
68 |
+ info_ptr->trans_color.green = tc.rgbGreen; |
69 |
+ info_ptr->trans_color.blue = tc.rgbBlue; |
70 |
+ info_ptr->trans_color.gray = info_ptr->trans_color.index; |
71 |
|
72 |
// the transparency indexes start from 0 for non grayscale palette |
73 |
if (!bGrayScale && head.biClrUsed && info.nBkgndIndex) |
74 |
@@ -443,7 +443,7 @@ |
75 |
trans[ip]=GetPaletteColor((BYTE)ip).rgbReserved; |
76 |
info_ptr->num_trans = (WORD)nc; |
77 |
info_ptr->valid |= PNG_INFO_tRNS; |
78 |
- info_ptr->trans = trans; |
79 |
+ info_ptr->trans_alpha = trans; |
80 |
} |
81 |
|
82 |
// copy the palette colors |
83 |
diff -Nur xbmc-9.11.orig/xbmc/screensavers/rsxs-0.9/src/pngimage.cc xbmc-9.11/xbmc/screensavers/rsxs-0.9/src/pngimage.cc |
84 |
--- xbmc-9.11.orig/xbmc/screensavers/rsxs-0.9/src/pngimage.cc 2008-07-30 23:35:38.000000000 +0300 |
85 |
+++ xbmc-9.11/xbmc/screensavers/rsxs-0.9/src/pngimage.cc 2010-01-20 22:21:01.000000000 +0200 |
86 |
@@ -65,7 +65,7 @@ |
87 |
(png_get_color_type(png, pngInfo) == PNG_COLOR_TYPE_GRAY) && |
88 |
png_get_bit_depth(png, pngInfo) < 8 |
89 |
) |
90 |
- png_set_gray_1_2_4_to_8(png); |
91 |
+ png_set_expand_gray_1_2_4_to_8(png); |
92 |
if (png_get_valid(png, pngInfo, PNG_INFO_tRNS)) |
93 |
png_set_tRNS_to_alpha(png); |
94 |
if (fullColor) |
95 |
diff -Nur xbmc-9.11.orig/xbmc/visualizations/Goom/goom2k4-0/src/pngload.c xbmc-9.11/xbmc/visualizations/Goom/goom2k4-0/src/pngload.c |
96 |
--- xbmc-9.11.orig/xbmc/visualizations/Goom/goom2k4-0/src/pngload.c 2008-08-04 05:05:51.000000000 +0300 |
97 |
+++ xbmc-9.11/xbmc/visualizations/Goom/goom2k4-0/src/pngload.c 2010-01-20 22:16:23.000000000 +0200 |
98 |
@@ -94,7 +94,7 @@ |
99 |
png_set_palette_to_rgb (png_ptr); |
100 |
|
101 |
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) |
102 |
- png_set_gray_1_2_4_to_8 (png_ptr); |
103 |
+ png_set_expand_gray_1_2_4_to_8 (png_ptr); |
104 |
else if (color_type == PNG_COLOR_TYPE_GRAY || |
105 |
color_type == PNG_COLOR_TYPE_GRAY_ALPHA) |
106 |
png_set_gray_to_rgb (png_ptr); |