Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 286455 Details for
Bug 378521
media-radio/tucnak2 fails to build with libpng-1.5
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Unworking patch
tucnak2-2.43-libpng15.patch (text/plain), 2.68 KB, created by
Samuli Suominen (RETIRED)
on 2011-09-14 18:42:23 UTC
(
hide
)
Description:
Unworking patch
Filename:
MIME Type:
Creator:
Samuli Suominen (RETIRED)
Created:
2011-09-14 18:42:23 UTC
Size:
2.68 KB
patch
obsolete
>diff -ur tucnak2-2.43.orig/src/gfx_png.c tucnak2-2.43/src/gfx_png.c >--- tucnak2-2.43.orig/src/gfx_png.c 2011-05-26 09:48:14.000000000 +0300 >+++ tucnak2-2.43/src/gfx_png.c 2011-09-14 21:29:51.000000000 +0300 >@@ -56,12 +56,7 @@ > > png_init_io(png_ptr, fi); > >- info_ptr->width = surf->w; >- info_ptr->height = surf->h; >- info_ptr->bit_depth = 8; >- info_ptr->color_type = PNG_COLOR_TYPE_RGB; >- info_ptr->interlace_type = 1; >- info_ptr->valid = 0; >+ png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8, PNG_COLOR_TYPE_RGB, 1, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); > > /* Set headers */ > >diff -ur tucnak2-2.43.orig/src/img_png.c tucnak2-2.43/src/img_png.c >--- tucnak2-2.43.orig/src/img_png.c 2011-05-26 09:48:14.000000000 +0300 >+++ tucnak2-2.43/src/img_png.c 2011-09-14 21:39:12.000000000 +0300 >@@ -144,7 +144,7 @@ > * the normal method of doing things with libpng). REQUIRED unless you > * set up your own error handlers in png_create_read_struct() earlier. > */ >- if ( setjmp(png_ptr->jmpbuf) ) { >+ if ( setjmp(png_jmpbuf(png_ptr)) ) { > IMG_SetError("Error reading the PNG file."); > goto done; > } >@@ -213,9 +213,9 @@ > Rmask = 0x000000FF; > Gmask = 0x0000FF00; > Bmask = 0x00FF0000; >- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0; >+ Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0; > } else { >- int s = (info_ptr->channels == 4) ? 0 : 8; >+ int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8; > Rmask = 0xFF000000 >> s; > Gmask = 0x00FF0000 >> s; > Bmask = 0x0000FF00 >> s; >@@ -223,7 +223,7 @@ > } > } > surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, >- bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask); >+ bit_depth*png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask); > if ( surface == NULL ) { > IMG_SetError("Out of memory"); > goto done; >@@ -264,6 +264,7 @@ > */ > > /* Load the palette, if any */ >+ int num_palette; > palette = surface->format->palette; > if ( palette ) { > if(color_type == PNG_COLOR_TYPE_GRAY) { >@@ -273,12 +274,12 @@ > palette->colors[i].g = i; > palette->colors[i].b = i; > } >- } else if (info_ptr->num_palette > 0 ) { >- palette->ncolors = info_ptr->num_palette; >- for( i=0; i<info_ptr->num_palette; ++i ) { >- palette->colors[i].b = info_ptr->palette[i].blue; >- palette->colors[i].g = info_ptr->palette[i].green; >- palette->colors[i].r = info_ptr->palette[i].red; >+ } else if (num_palette > 0 ) { >+ palette->ncolors = num_palette; >+ for( i=0; i<num_palette; ++i ) { >+ palette->colors[i].b = palette[i].blue; >+ palette->colors[i].g = palette[i].green; >+ palette->colors[i].r = palette[i].red; > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 378521
:
282709
| 286455