diff -ru4NwbB libpng-1.5.10/configure.ac libpng-1.5.11rc04/configure.ac --- libpng-1.5.10/configure.ac 2012-03-29 00:07:02.320295264 -0500 +++ libpng-1.5.11rc04/configure.ac 2012-06-06 13:08:51.264780224 -0500 @@ -146,9 +146,9 @@ AC_MSG_CHECKING([for symbol prefix]) SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ | ${CPP-${CC-gcc} -E} - 2>&1 \ | ${EGREP-grep} "^PREFIX=" \ - | ${SED-sed} "s:^PREFIX=::"` + | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` AC_SUBST(SYMBOL_PREFIX) AC_MSG_RESULT($SYMBOL_PREFIX) fi Binary files libpng-1.5.10/contrib/gregbook/toucan.png and libpng-1.5.11rc04/contrib/gregbook/toucan.png differ diff -ru4NwbB libpng-1.5.10/contrib/libtests/pngvalid.c libpng-1.5.11rc04/contrib/libtests/pngvalid.c --- libpng-1.5.10/contrib/libtests/pngvalid.c 2012-01-01 14:49:28.273121000 -0600 +++ libpng-1.5.11rc04/contrib/libtests/pngvalid.c 2012-06-03 19:32:16.756035591 -0500 @@ -243,18 +243,18 @@ (((do_interlace)!=0)<<15) + ((width)<<16) + ((height)<<24))) #define COL_FROM_ID(id) ((png_byte)((id)& 0x7U)) #define DEPTH_FROM_ID(id) ((png_byte)(((id) >> 3) & 0x1fU)) -#define PALETTE_FROM_ID(id) ((int)(((id) >> 8) & 0x1f)) +#define PALETTE_FROM_ID(id) (((id) >> 8) & 0x1f) #define INTERLACE_FROM_ID(id) ((int)(((id) >> 13) & 0x3)) #define DO_INTERLACE_FROM_ID(id) ((int)(((id)>>15) & 1)) #define WIDTH_FROM_ID(id) (((id)>>16) & 0xff) #define HEIGHT_FROM_ID(id) (((id)>>24) & 0xff) /* Utility to construct a standard name for a standard image. */ static size_t standard_name(char *buffer, size_t bufsize, size_t pos, png_byte colour_type, - int bit_depth, int npalette, int interlace_type, + int bit_depth, unsigned int npalette, int interlace_type, png_uint_32 w, png_uint_32 h, int do_interlace) { pos = safecat(buffer, bufsize, pos, colour_types[colour_type]); if (npalette > 0) @@ -314,12 +314,13 @@ /* The following defines the number of different palettes to generate for * each log bit depth of a colour type 3 standard image. */ -#define PALETTE_COUNT(bit_depth) ((bit_depth) > 4 ? 1 : 16) +#define PALETTE_COUNT(bit_depth) ((bit_depth) > 4 ? 1U : 16U) static int -next_format(png_bytep colour_type, png_bytep bit_depth, int* palette_number) +next_format(png_bytep colour_type, png_bytep bit_depth, + unsigned int* palette_number) { if (*bit_depth == 0) { *colour_type = 0, *bit_depth = 1, *palette_number = 0; @@ -3255,10 +3256,10 @@ * that test odd sizes along with the libpng interlace handling. */ static void make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, - png_byte PNG_CONST bit_depth, int palette_number, int interlace_type, - png_const_charp name) + png_byte PNG_CONST bit_depth, unsigned int palette_number, + int interlace_type, png_const_charp name) { context(ps, fault); Try @@ -3383,9 +3384,9 @@ make_transform_images(png_store *ps) { png_byte colour_type = 0; png_byte bit_depth = 0; - int palette_number = 0; + unsigned int palette_number = 0; /* This is in case of errors. */ safecat(ps->test, sizeof ps->test, 0, "make standard images"); @@ -7068,9 +7069,9 @@ perform_transform_test(png_modifier *pm) { png_byte colour_type = 0; png_byte bit_depth = 0; - int palette_number = 0; + unsigned int palette_number = 0; while (next_format(&colour_type, &bit_depth, &palette_number)) { png_uint_32 counter = 0; @@ -8427,9 +8428,9 @@ perform_gamma_threshold_tests(png_modifier *pm) { png_byte colour_type = 0; png_byte bit_depth = 0; - int palette_number = 0; + unsigned int palette_number = 0; /* Don't test more than one instance of each palette - it's pointless, in * fact this test is somewhat excessive since libpng doesn't make this * decision based on colour type or bit depth! @@ -8492,9 +8493,9 @@ static void perform_gamma_transform_tests(png_modifier *pm) { png_byte colour_type = 0; png_byte bit_depth = 0; - int palette_number = 0; + unsigned int palette_number = 0; while (next_format(&colour_type, &bit_depth, &palette_number)) { unsigned int i, j; @@ -8521,13 +8522,10 @@ * are tested. */ for (sbit=pm->sbitlow; sbit<(1< # endif diff -ru4NwbB libpng-1.5.10/png.h libpng-1.5.11rc04/png.h --- libpng-1.5.10/png.h 2012-03-29 00:06:54.479097811 -0500 +++ libpng-1.5.11rc04/png.h 2012-06-06 13:08:46.736025048 -0500 @@ -173,8 +173,10 @@ * 1.5.9rc01 15 10509 15.so.15.9[.0] * 1.5.9 15 10509 15.so.15.9[.0] * 1.5.10beta01-05 15 10510 15.so.15.10[.0] * 1.5.10 15 10510 15.so.15.10[.0] + * 1.5.11beta01 15 10511 15.so.15.11[.0] + * 1.5.11rc01-04 15 10511 15.so.15.11[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be * used for changes in backward compatibility, as it is intended. The diff -ru4NwbB libpng-1.5.10/pngpread.c libpng-1.5.11rc04/pngpread.c --- libpng-1.5.10/pngpread.c 2012-03-29 00:06:54.567379144 -0500 +++ libpng-1.5.11rc04/pngpread.c 2012-06-06 13:08:46.820536100 -0500 @@ -1,8 +1,8 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.5.9 [February 18, 2012] + * Last changed in libpng 1.5.11 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff -ru4NwbB libpng-1.5.10/pngpriv.h libpng-1.5.11rc04/pngpriv.h --- libpng-1.5.10/pngpriv.h 2012-03-29 00:06:54.496932731 -0500 +++ libpng-1.5.11rc04/pngpriv.h 2012-06-06 13:08:46.750114161 -0500 @@ -1258,12 +1258,10 @@ PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); -#endif PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, png_uint_32 chunk_name)); diff -ru4NwbB libpng-1.5.10/pngrtran.c libpng-1.5.11rc04/pngrtran.c --- libpng-1.5.10/pngrtran.c 2012-03-29 00:06:54.612484275 -0500 +++ libpng-1.5.11rc04/pngrtran.c 2012-06-06 13:08:46.859946629 -0500 @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.5.10 [March 8, 2012] + * Last changed in libpng 1.5.11 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -2300,9 +2300,10 @@ #endif #ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED /* Added at libpng-1.5.10 */ - if (row_info->color_type == PNG_COLOR_TYPE_PALETTE) + if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max >= 0) png_do_check_palette_indexes(png_ptr, row_info); #endif #ifdef PNG_READ_BGR_SUPPORTED diff -ru4NwbB libpng-1.5.10/pngset.c libpng-1.5.11rc04/pngset.c --- libpng-1.5.10/pngset.c 2012-03-29 00:06:54.637034941 -0500 +++ libpng-1.5.11rc04/pngset.c 2012-06-06 13:08:46.884917975 -0500 @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.5.10 [(PENDING RELEASE)] + * Last changed in libpng 1.5.11 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -148,9 +148,9 @@ * occur. Since the fixed point representation is assymetrical it is * possible for 1/gamma to overflow the limit of 21474 and this means the * gamma value must be at least 5/100000 and hence at most 20000.0. For * safety the limits here are a little narrower. The values are 0.00016 to - * 6250.0, which are truly ridiculous gammma values (and will produce + * 6250.0, which are truly ridiculous gamma values (and will produce * displays that are all black or all white.) */ if (file_gamma < 16 || file_gamma > 625000000) png_warning(png_ptr, "Out of range gamma value ignored"); @@ -1290,10 +1290,12 @@ png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN; } #endif /* PNG_BENIGN_ERRORS_SUPPORTED */ -#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED - /* Do not report invalid palette index; added at libng-1.5.10 */ +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +/* Whether to report invalid palette index; added at libng-1.5.10 + * allowed - one of 0: disable; 1: enable + */ void PNGAPI png_set_check_for_invalid_index(png_structp png_ptr, int allowed) { png_debug(1, "in png_set_check_for_invalid_index"); diff -ru4NwbB libpng-1.5.10/pngtrans.c libpng-1.5.11rc04/pngtrans.c --- libpng-1.5.10/pngtrans.c 2012-03-29 00:06:54.654457660 -0500 +++ libpng-1.5.11rc04/pngtrans.c 2012-06-06 13:08:46.901376642 -0500 @@ -1,8 +1,8 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * Last changed in libpng 1.5.10 [March 8, 2012] + * Last changed in libpng 1.5.11 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -707,9 +707,9 @@ case 8: { for (; rp > png_ptr->row_buf; rp--) { - if (*rp >= png_ptr->num_palette_max) + if (*rp > png_ptr->num_palette_max) png_ptr->num_palette_max = (int) *rp; } break; diff -ru4NwbB libpng-1.5.10/pngwrite.c libpng-1.5.11rc04/pngwrite.c --- libpng-1.5.10/pngwrite.c 2012-03-29 00:06:54.669727590 -0500 +++ libpng-1.5.11rc04/pngwrite.c 2012-06-06 13:08:46.916215868 -0500 @@ -1,8 +1,8 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.5.10 [March 8, 2012] + * Last changed in libpng 1.5.11 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -805,9 +805,10 @@ /* Added at libpng-1.5.10 */ #ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED /* Check for out-of-range palette index */ - if(row_info.color_type == PNG_COLOR_TYPE_PALETTE) + if (row_info.color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max >= 0) png_do_check_palette_indexes(png_ptr, &row_info); #endif /* Find a filter if necessary, filter the row and write it out. */ diff -ru4NwbB libpng-1.5.10/scripts/makefile.darwin libpng-1.5.11rc04/scripts/makefile.darwin --- libpng-1.5.10/scripts/makefile.darwin 2012-03-29 00:06:56.508167982 -0500 +++ libpng-1.5.11rc04/scripts/makefile.darwin 2012-06-06 13:08:48.319803369 -0500 @@ -14,12 +14,10 @@ prefix=/usr/local exec_prefix=$(prefix) # Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include # Library name: LIBNAME = libpng%NN% PNGMAJ = %NN% @@ -36,9 +34,9 @@ MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=ranlib RM_F=/bin/rm -f -ARCH="-arch i386 -arch x86_64" +ARCH=-arch ppc -arch i386 -arch x86_64 # CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops $(ARCH) LDFLAGS=-L. -L$(ZLIBLIB) -lpng%NN% -lz $(ARCH) @@ -106,9 +104,9 @@ $(LIBSOMAJ): $(OBJSDLL) $(CC) -dynamiclib \ -install_name $(LIBPATH)/$(LIBSOMAJ) \ -current_version %SONUM% -compatibility_version %SONUM% \ - -o $(LIBSOMAJ) \ + $(ARCH) -o $(LIBSOMAJ) \ $(OBJSDLL) -L$(ZLIBLIB) -lz pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -135,12 +133,12 @@ install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(LIBSOMAJ) -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) + cp $(LIBSOMAJ) $(DL) + chmod 755 $(DL)/$(LIBSOMAJ) (cd $(DL); \ $(LN_SF) $(LIBSOREL) $(LIBSO); \ $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi diff -ru4NwbB libpng-1.5.10/scripts/makefile.freebsd libpng-1.5.11rc04/scripts/makefile.freebsd --- libpng-1.5.10/scripts/makefile.freebsd 2012-03-29 00:06:56.550848864 -0500 +++ libpng-1.5.11rc04/scripts/makefile.freebsd 2012-06-06 13:08:48.352982598 -0500 @@ -10,10 +10,10 @@ LIB= png SHLIB_MAJOR= ${SHLIB_VER} SHLIB_MINOR= 0 -NOPROFILE= YES -NOOBJ= YES +NO_PROFILE= YES +NO_OBJ= YES # where make install puts libpng.a and png.h DESTDIR= ${PREFIX} LIBDIR= /lib @@ -24,9 +24,12 @@ MANDIR= /man/man SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ libpng/pngconf.h ${INCSDIR}/../pngconf.h \ libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h + LDADD+= -lm -lz +#LDADD+= -lm -lz -lssp_nonshared # for OSVERSION >= 800000 ? + DPADD+= ${LIBM} ${LIBZ} CFLAGS+= -I.