summaryrefslogtreecommitdiff
path: root/package/DirectFB/patches
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-03-31 22:27:39 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-03-31 22:27:39 +0200
commitbd015df1e472968ad28099544740f7b7e514312e (patch)
treeb535754145b5dfac8d9267a098795f7f2a2c276c /package/DirectFB/patches
parentf4e50548b0d41f5b4e6faae3ddc7283dd1a5dd6c (diff)
add lxde components, update libpng and firefox
Diffstat (limited to 'package/DirectFB/patches')
-rw-r--r--package/DirectFB/patches/patch-include_directfb_build_h11
-rw-r--r--package/DirectFB/patches/patch-interfaces_IDirectFBImageProvider_idirectfbimageprovider_png_c138
-rw-r--r--package/DirectFB/patches/patch-tools_directfb-csource_c48
-rw-r--r--package/DirectFB/patches/patch-tools_mkdfiff_c11
-rw-r--r--package/DirectFB/patches/patch-tools_mkdgifft_cpp11
5 files changed, 219 insertions, 0 deletions
diff --git a/package/DirectFB/patches/patch-include_directfb_build_h b/package/DirectFB/patches/patch-include_directfb_build_h
new file mode 100644
index 000000000..87eca8617
--- /dev/null
+++ b/package/DirectFB/patches/patch-include_directfb_build_h
@@ -0,0 +1,11 @@
+--- DirectFB-1.4.11.orig/include/directfb_build.h 2010-11-15 22:35:45.000000000 +0100
++++ DirectFB-1.4.11/include/directfb_build.h 2011-03-28 22:30:51.451811000 +0200
+@@ -29,7 +29,7 @@
+ #ifndef __DIRECTFB_BUILD_H__
+ #define __DIRECTFB_BUILD_H__
+
+-#define DIRECTFB_BUILD_VOODOO (1)
++#define DIRECTFB_BUILD_VOODOO (0)
+ #define DIRECTFB_BUILD_PURE_VOODOO (0)
+
+ #endif /* __DIRECTFB_BUILD_H__ */
diff --git a/package/DirectFB/patches/patch-interfaces_IDirectFBImageProvider_idirectfbimageprovider_png_c b/package/DirectFB/patches/patch-interfaces_IDirectFBImageProvider_idirectfbimageprovider_png_c
new file mode 100644
index 000000000..b35c6137e
--- /dev/null
+++ b/package/DirectFB/patches/patch-interfaces_IDirectFBImageProvider_idirectfbimageprovider_png_c
@@ -0,0 +1,138 @@
+--- DirectFB-1.4.11.orig/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c 2010-10-31 09:49:49.000000000 +0100
++++ DirectFB-1.4.11/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c 2011-03-29 10:57:18.433069010 +0200
+@@ -207,7 +207,7 @@ Construct( IDirectFBImageProvider *thiz,
+ if (!data->png_ptr)
+ goto error;
+
+- if (setjmp( data->png_ptr->jmpbuf )) {
++ if (png_jmpbuf( data->png_ptr )) {
+ D_ERROR( "ImageProvider/PNG: Error reading header!\n" );
+ goto error;
+ }
+@@ -292,7 +292,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi
+ rect = dst_data->area.wanted;
+ }
+
+- if (setjmp( data->png_ptr->jmpbuf )) {
++ if (png_jmpbuf( data->png_ptr )) {
+ D_ERROR( "ImageProvider/PNG: Error during decoding!\n" );
+
+ if (data->stage < STAGE_IMAGE)
+@@ -327,6 +327,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi
+ }
+ else {
+ CoreSurfaceBufferLock lock;
++ png_byte bit_depth = png_get_bit_depth( data->png_ptr, data->info_ptr );
+
+ ret = dfb_surface_lock_buffer( dst_surface, CSBR_BACK, CSAID_CPU, CSAF_WRITE, &lock );
+ if (ret)
+@@ -334,7 +335,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi
+
+ switch (data->color_type) {
+ case PNG_COLOR_TYPE_PALETTE:
+- if (dst_surface->config.format == DSPF_LUT8 && data->info_ptr->bit_depth == 8) {
++ if (dst_surface->config.format == DSPF_LUT8 && bit_depth == 8) {
+ /*
+ * Special indexed PNG to LUT8 loading.
+ */
+@@ -377,7 +378,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi
+ }
+ else {
+ if (data->color_type == PNG_COLOR_TYPE_GRAY) {
+- int num = 1 << data->info_ptr->bit_depth;
++ int num = 1 << bit_depth;
+
+ for (x=0; x<num; x++) {
+ int value = x * 255 / (num - 1);
+@@ -386,7 +387,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi
+ }
+ }
+
+- switch (data->info_ptr->bit_depth) {
++ switch (bit_depth) {
+ case 8:
+ for (y=0; y<data->height; y++) {
+ u8 *S = data->image + data->pitch * y;
+@@ -441,7 +442,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi
+
+ default:
+ D_ERROR( "ImageProvider/PNG: Unsupported indexed bit depth %d!\n",
+- data->info_ptr->bit_depth );
++ bit_depth );
+ }
+
+ dfb_scale_linear_32( image_argb, data->width, data->height,
+@@ -594,16 +595,26 @@ png_info_callback( png_structp png_read_
+ NULL, NULL, NULL );
+
+ if (png_get_valid( data->png_ptr, data->info_ptr, PNG_INFO_tRNS )) {
++ png_bytep trans;
++ png_color_16p trans_color;
++ int num_trans;
++
++ png_get_tRNS( data->png_ptr, data->info_ptr, &trans, &num_trans, &trans_color );
++
+ data->color_keyed = true;
+
+ /* generate color key based on palette... */
+ if (data->color_type == PNG_COLOR_TYPE_PALETTE) {
+ u32 key;
+- png_colorp palette = data->info_ptr->palette;
+- png_bytep trans = data->info_ptr->trans_alpha;
+- int num_colors = MIN( MAXCOLORMAPSIZE,
+- data->info_ptr->num_palette );
+- u8 cmap[3][num_colors];
++ png_colorp palette;
++ int num_colors;
++ u8 *cmap[3];
++
++ png_get_PLTE( data->png_ptr, data->info_ptr, &palette, &num_colors );
++ num_colors = MIN( MAXCOLORMAPSIZE, num_colors );
++ cmap[0] = alloca (num_colors);
++ cmap[1] = alloca (num_colors);
++ cmap[2] = alloca (num_colors);
+
+ for (i=0; i<num_colors; i++) {
+ cmap[0][i] = palette[i].red;
+@@ -613,7 +624,7 @@ png_info_callback( png_structp png_read_
+
+ key = FindColorKey( num_colors, &cmap[0][0] );
+
+- for (i=0; i<data->info_ptr->num_trans; i++) {
++ for (i=0; i<num_trans; i++) {
+ if (!trans[i]) {
+ palette[i].red = (key & 0xff0000) >> 16;
+ palette[i].green = (key & 0x00ff00) >> 8;
+@@ -625,20 +636,23 @@ png_info_callback( png_structp png_read_
+ }
+ else {
+ /* ...or based on trans rgb value */
+- png_color_16p trans = &data->info_ptr->trans_color;
+-
+- data->color_key = (((trans->red & 0xff00) << 8) |
+- ((trans->green & 0xff00)) |
+- ((trans->blue & 0xff00) >> 8));
++ data->color_key = (((trans_color->red & 0xff00) << 8) |
++ ((trans_color->green & 0xff00)) |
++ ((trans_color->blue & 0xff00) >> 8));
+ }
+ }
+
+ switch (data->color_type) {
+ case PNG_COLOR_TYPE_PALETTE: {
+- png_colorp palette = data->info_ptr->palette;
+- png_bytep trans = data->info_ptr->trans_alpha;
+- int num_trans = data->info_ptr->num_trans;
+- int num_colors = MIN( MAXCOLORMAPSIZE, data->info_ptr->num_palette );
++ png_colorp palette;
++ png_bytep trans;
++ png_color_16p trans_color;
++ int num_trans;
++ int num_colors;
++
++ png_get_PLTE( data->png_ptr, data->info_ptr, &palette, &num_colors );
++ num_colors = MIN( MAXCOLORMAPSIZE, num_colors );
++ png_get_tRNS( data->png_ptr, data->info_ptr, &trans, &num_trans, &trans_color );
+
+ for (i=0; i<num_colors; i++) {
+ data->colors[i].a = (i < num_trans) ? trans[i] : 0xff;
diff --git a/package/DirectFB/patches/patch-tools_directfb-csource_c b/package/DirectFB/patches/patch-tools_directfb-csource_c
new file mode 100644
index 000000000..84711d86f
--- /dev/null
+++ b/package/DirectFB/patches/patch-tools_directfb-csource_c
@@ -0,0 +1,48 @@
+--- DirectFB-1.4.11.orig/tools/directfb-csource.c 2010-10-31 09:49:49.000000000 +0100
++++ DirectFB-1.4.11/tools/directfb-csource.c 2011-03-29 10:57:18.453068981 +0200
+@@ -338,7 +338,7 @@ static DFBResult load_image (const char
+ if (!png_ptr)
+ goto cleanup;
+
+- if (setjmp (png_ptr->jmpbuf)) {
++ if (setjmp (png_jmpbuf (png_ptr))) {
+ if (desc->preallocated[0].data) {
+ free (desc->preallocated[0].data);
+ desc->preallocated[0].data = NULL;
+@@ -405,17 +405,22 @@ static DFBResult load_image (const char
+ }
+
+ switch (src_format) {
+- case DSPF_LUT8:
+- if (info_ptr->num_palette) {
++ case DSPF_LUT8: {
++ png_colorp png_palette;
++ int num_palette;
++
++ png_get_PLTE( png_ptr, info_ptr, &png_palette, &num_palette );
++
++ if (num_palette) {
+ png_byte *alpha;
+ int i, num;
+
+- *palette_size = MIN (info_ptr->num_palette, 256);
++ *palette_size = MIN (num_palette, 256);
+ for (i = 0; i < *palette_size; i++) {
+ palette[i].a = 0xFF;
+- palette[i].r = info_ptr->palette[i].red;
+- palette[i].g = info_ptr->palette[i].green;
+- palette[i].b = info_ptr->palette[i].blue;
++ palette[i].r = png_palette[i].red;
++ palette[i].g = png_palette[i].green;
++ palette[i].b = png_palette[i].blue;
+ }
+ if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) {
+ png_get_tRNS (png_ptr, info_ptr, &alpha, &num, NULL);
+@@ -424,6 +429,7 @@ static DFBResult load_image (const char
+ }
+ }
+ break;
++ }
+ case DSPF_RGB32:
+ png_set_filler (png_ptr, 0xFF,
+ #ifdef WORDS_BIGENDIAN
diff --git a/package/DirectFB/patches/patch-tools_mkdfiff_c b/package/DirectFB/patches/patch-tools_mkdfiff_c
new file mode 100644
index 000000000..f321f8a84
--- /dev/null
+++ b/package/DirectFB/patches/patch-tools_mkdfiff_c
@@ -0,0 +1,11 @@
+--- DirectFB-1.4.11.orig/tools/mkdfiff.c 2010-10-31 09:49:49.000000000 +0100
++++ DirectFB-1.4.11/tools/mkdfiff.c 2011-03-29 10:57:18.503068913 +0200
+@@ -97,7 +97,7 @@ load_image (const char *filen
+ if (!png_ptr)
+ goto cleanup;
+
+- if (setjmp (png_ptr->jmpbuf)) {
++ if (setjmp (png_jmpbuf (png_ptr))) {
+ if (desc->preallocated[0].data) {
+ free (desc->preallocated[0].data);
+ desc->preallocated[0].data = NULL;
diff --git a/package/DirectFB/patches/patch-tools_mkdgifft_cpp b/package/DirectFB/patches/patch-tools_mkdgifft_cpp
new file mode 100644
index 000000000..33e8285e9
--- /dev/null
+++ b/package/DirectFB/patches/patch-tools_mkdgifft_cpp
@@ -0,0 +1,11 @@
+--- DirectFB-1.4.11.orig/tools/mkdgifft.cpp 2010-10-31 09:52:08.000000000 +0100
++++ DirectFB-1.4.11/tools/mkdgifft.cpp 2011-03-29 10:57:18.581810094 +0200
+@@ -595,7 +595,7 @@ load_image (const char *filen
+ if (!png_ptr)
+ goto cleanup;
+
+- if (setjmp (png_ptr->jmpbuf)) {
++ if (setjmp (png_jmpbuf (png_ptr))) {
+ if (desc->preallocated[0].data) {
+ free (desc->preallocated[0].data);
+ desc->preallocated[0].data = NULL;