Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 600629 Details for
Bug 843658
tucnak2 FTBFS with libpng 1.5
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
libpng 1.5 fixes
tucnak2-libpng15.patch (text/plain), 6.30 KB, created by
Tom Lane
on 2012-07-26 22:57:03 UTC
(
hide
)
Description:
libpng 1.5 fixes
Filename:
MIME Type:
Creator:
Tom Lane
Created:
2012-07-26 22:57:03 UTC
Size:
6.30 KB
patch
obsolete
>diff -Naur tucnak2-2.31.orig/configure tucnak2-2.31/configure >--- tucnak2-2.31.orig/configure 2010-01-01 15:22:31.000000000 -0500 >+++ tucnak2-2.31/configure 2012-07-26 18:34:21.013036806 -0400 >@@ -5711,12 +5711,12 @@ > pkg_cv_LIBPNG_CFLAGS="$LIBPNG_CFLAGS" > else > if test -n "$PKG_CONFIG" && \ >- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng12 > 1.2.0\"") >&5 >- ($PKG_CONFIG --exists --print-errors "libpng12 > 1.2.0") 2>&5 >+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng > 1.2.0\"") >&5 >+ ($PKG_CONFIG --exists --print-errors "libpng > 1.2.0") 2>&5 > ac_status=$? > echo "$as_me:$LINENO: \$? = $ac_status" >&5 > (exit $ac_status); }; then >- pkg_cv_LIBPNG_CFLAGS=`$PKG_CONFIG --cflags "libpng12 > 1.2.0" 2>/dev/null` >+ pkg_cv_LIBPNG_CFLAGS=`$PKG_CONFIG --cflags "libpng > 1.2.0" 2>/dev/null` > else > pkg_failed=yes > fi >@@ -5729,12 +5729,12 @@ > pkg_cv_LIBPNG_LIBS="$LIBPNG_LIBS" > else > if test -n "$PKG_CONFIG" && \ >- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng12 > 1.2.0\"") >&5 >- ($PKG_CONFIG --exists --print-errors "libpng12 > 1.2.0") 2>&5 >+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng > 1.2.0\"") >&5 >+ ($PKG_CONFIG --exists --print-errors "libpng > 1.2.0") 2>&5 > ac_status=$? > echo "$as_me:$LINENO: \$? = $ac_status" >&5 > (exit $ac_status); }; then >- pkg_cv_LIBPNG_LIBS=`$PKG_CONFIG --libs "libpng12 > 1.2.0" 2>/dev/null` >+ pkg_cv_LIBPNG_LIBS=`$PKG_CONFIG --libs "libpng > 1.2.0" 2>/dev/null` > else > pkg_failed=yes > fi >@@ -5753,9 +5753,9 @@ > _pkg_short_errors_supported=no > fi > if test $_pkg_short_errors_supported = yes; then >- LIBPNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng12 > 1.2.0"` >+ LIBPNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng > 1.2.0"` > else >- LIBPNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng12 > 1.2.0"` >+ LIBPNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng > 1.2.0"` > fi > # Put the nasty error message in config.log where it belongs > echo "$LIBPNG_PKG_ERRORS" >&5 >@@ -5777,7 +5777,7 @@ > #define HAVE_LIBPNG > _ACEOF > >- tucnak_libpng_ver=`$PKG_CONFIG --modversion 'libpng12 > 1.2.0'` >+ tucnak_libpng_ver=`$PKG_CONFIG --modversion 'libpng > 1.2.0'` > fi > fi > >diff -Naur tucnak2-2.31.orig/configure.in tucnak2-2.31/configure.in >--- tucnak2-2.31.orig/configure.in 2010-01-01 15:21:52.000000000 -0500 >+++ tucnak2-2.31/configure.in 2012-07-26 18:33:01.088534579 -0400 >@@ -151,9 +151,9 @@ > if test "x$with_png" != "xno"; then > # check for libpng > tucnak_libpng_ver="" >-PKG_CHECK_MODULES(LIBPNG, libpng12 > 1.2.0, >+PKG_CHECK_MODULES(LIBPNG, libpng > 1.2.0, > [ AC_DEFINE([HAVE_LIBPNG], [], [libpng]) >- tucnak_libpng_ver=`$PKG_CONFIG --modversion 'libpng12 > 1.2.0'` ], >+ tucnak_libpng_ver=`$PKG_CONFIG --modversion 'libpng > 1.2.0'` ], > [ tucnak_olibs="$tucnak_olibs libpng" > tucnak_odebs="$tucnak_odebs libpng-dev"]) > fi >diff -Naur tucnak2-2.31.orig/src/gfx_png.c tucnak2-2.31/src/gfx_png.c >--- tucnak2-2.31.orig/src/gfx_png.c 2009-09-28 12:58:40.000000000 -0400 >+++ tucnak2-2.31/src/gfx_png.c 2012-07-26 18:42:44.263216141 -0400 >@@ -55,12 +55,13 @@ > > 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, >+ PNG_INTERLACE_ADAM7, >+ PNG_COMPRESSION_TYPE_DEFAULT, >+ PNG_FILTER_TYPE_DEFAULT); > > /* Set headers */ > >diff -Naur tucnak2-2.31.orig/src/img_png.c tucnak2-2.31/src/img_png.c >--- tucnak2-2.31.orig/src/img_png.c 2009-09-28 12:58:40.000000000 -0400 >+++ tucnak2-2.31/src/img_png.c 2012-07-26 18:31:11.931639101 -0400 >@@ -104,7 +104,7 @@ > png_structp png_ptr; > png_infop info_ptr; > png_uint_32 width, height; >- int bit_depth, color_type, interlace_type; >+ int bit_depth, color_type, interlace_type, channels; > Uint32 Rmask; > Uint32 Gmask; > Uint32 Bmask; >@@ -142,7 +142,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; > } >@@ -154,6 +154,7 @@ > png_read_info(png_ptr, info_ptr); > png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, > &color_type, &interlace_type, NULL, NULL); >+ channels = png_get_channels(png_ptr, info_ptr); > > /* tell libpng to strip 16 bit/color files down to 8 bits/color */ > png_set_strip_16(png_ptr) ; >@@ -211,9 +212,9 @@ > Rmask = 0x000000FF; > Gmask = 0x0000FF00; > Bmask = 0x00FF0000; >- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0; >+ Amask = (channels == 4) ? 0xFF000000 : 0; > } else { >- int s = (info_ptr->channels == 4) ? 0 : 8; >+ int s = (channels == 4) ? 0 : 8; > Rmask = 0xFF000000 >> s; > Gmask = 0x00FF0000 >> s; > Bmask = 0x0000FF00 >> s; >@@ -221,7 +222,7 @@ > } > } > surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, >- bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask); >+ bit_depth*channels, Rmask,Gmask,Bmask,Amask); > if ( surface == NULL ) { > IMG_SetError("Out of memory"); > goto done; >@@ -271,12 +272,18 @@ > 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 (color_type == PNG_COLOR_TYPE_PALETTE) { >+ png_colorp png_palette; >+ int num_palette; >+ >+ if (png_get_PLTE(png_ptr, info_ptr, >+ &png_palette, &num_palette)) { >+ palette->ncolors = num_palette; >+ for( i=0; i<num_palette; ++i ) { >+ palette->colors[i].b = png_palette[i].blue; >+ palette->colors[i].g = png_palette[i].green; >+ palette->colors[i].r = png_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 843658
: 600629