Control: tags 809833 + patch Dear maintainer,
I've prepared a patch for the libpng16. Please check and apply if you're happy with it. Thanks! Regards. -- tobi diff -Nru xaos-3.5+ds1/debian/changelog xaos-3.5+ds1/debian/changelog --- xaos-3.5+ds1/debian/changelog 2015-12-08 10:09:59.000000000 +0100 +++ xaos-3.5+ds1/debian/changelog 2016-01-06 14:52:06.000000000 +0100 @@ -1,3 +1,10 @@ +xaos (3.5+ds1-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Update B-D from libpng3-dev to libpng-dev (Closes: 809833) + + -- Tobias Frost <t...@debian.org> Wed, 06 Jan 2016 14:51:30 +0100 + xaos (3.5+ds1-3) unstable; urgency=medium * Build-Depend on libgsl-dev instead of libgsl0-dev. (Closes: #807230) diff -Nru xaos-3.5+ds1/debian/control xaos-3.5+ds1/debian/control --- xaos-3.5+ds1/debian/control 2015-12-08 10:09:59.000000000 +0100 +++ xaos-3.5+ds1/debian/control 2016-01-06 14:52:22.000000000 +0100 @@ -1,7 +1,7 @@ Source: xaos Section: graphics Priority: optional -Build-Depends: debhelper (>= 7.0.50~), libaa1-dev, libx11-dev, libpng3-dev, zlib1g-dev, libxext-dev, x11proto-core-dev, autoconf (>= 2.63), autotools-dev, libtool, libgsl-dev +Build-Depends: debhelper (>= 7.0.50~), libaa1-dev, libx11-dev, libpng-dev, zlib1g-dev, libxext-dev, x11proto-core-dev, autoconf (>= 2.63), autotools-dev, libtool, libgsl-dev Maintainer: Debian Games Team <pkg-games-de...@lists.alioth.debian.org> Uploaders: Ansgar Burchardt <ans...@debian.org> Standards-Version: 3.8.4 diff -Nru xaos-3.5+ds1/debian/patches/libpng16.patch xaos-3.5+ds1/debian/patches/libpng16.patch --- xaos-3.5+ds1/debian/patches/libpng16.patch 1970-01-01 01:00:00.000000000 +0100 +++ xaos-3.5+ds1/debian/patches/libpng16.patch 2016-01-06 17:16:17.000000000 +0100 @@ -0,0 +1,146 @@ +--- a/src/util/png.c ++++ b/src/util/png.c +@@ -2,6 +2,8 @@ + #ifndef _plan9_ + #include <aconfig.h> + #ifdef USE_PNG ++#include <string.h> ++#include <zlib.h> + #include <png.h> + #endif + #include <stdlib.h> +@@ -59,15 +61,48 @@ + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return "No memory to create png info structure"; + } +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(file); + return strerror(errno); + } + png_init_io(png_ptr, file); ++ ++ int bit_depth, color_type; ++ ++ /*info_ptr->gamma=1.0; */ ++ // GONE info_ptr->gamma = 0.5; ++ // ??? GONE info_ptr->valid |= PNG_INFO_gAMA | PNG_INFO_pHYs; ++ /// GONE info_ptr->x_pixels_per_unit = (png_uint_32) (100 / image->pixelwidth); ++ // GONE info_ptr->y_pixels_per_unit = (png_uint_32) (100 / image->pixelheight); ++ ++ switch (image->palette->type) { ++ case C256: ++ color_type = PNG_COLOR_TYPE_PALETTE; ++ bit_depth = image->bytesperpixel * 8; ++ break; ++ case SMALLITER: ++ case LARGEITER: ++ case GRAYSCALE: ++ color_type = PNG_COLOR_TYPE_GRAY; ++ bit_depth = image->bytesperpixel * 8; ++ break; ++ case TRUECOLOR: ++ case TRUECOLOR24: ++ case TRUECOLOR16: ++ color_type = PNG_COLOR_TYPE_RGB; ++ bit_depth = 8; ++ break; ++ } ++ ++ /* png_set_IDHR must be set before calling the setters */ ++ png_set_IHDR(png_ptr, info_ptr, image->width, image->height, bit_depth, color_type, ++ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); ++ + png_set_filter(png_ptr, 0, + PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_PAETH | + PNG_FILTER_UP | PNG_FILTER_AVG); ++ + /* set the zlib compression level */ + /*png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); */ + png_set_compression_level(png_ptr, Z_DEFAULT_COMPRESSION); +@@ -78,47 +113,39 @@ + png_set_compression_window_bits(png_ptr, 15); + png_set_compression_method(png_ptr, 8); + +- info_ptr->width = image->width; +- info_ptr->height = image->height; +- /*info_ptr->gamma=1.0; */ +- info_ptr->gamma = 0.5; +- info_ptr->valid |= PNG_INFO_gAMA | PNG_INFO_pHYs; +- info_ptr->x_pixels_per_unit = (png_uint_32) (100 / image->pixelwidth); +- info_ptr->y_pixels_per_unit = (png_uint_32) (100 / image->pixelheight); + ++ png_set_gAMA(png_ptr, info_ptr, 0.5); ++ png_set_pHYs(png_ptr, info_ptr, (100 / image->pixelwidth), ++ (100 / image->pixelheight), PNG_RESOLUTION_UNKNOWN); + + switch (image->palette->type) { + case C256: + { + int i; +- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; +- info_ptr->bit_depth = image->bytesperpixel * 8; +- info_ptr->palette = palette; +- info_ptr->valid |= PNG_INFO_PLTE; + for (i = 0; i < image->palette->end; i++) +- info_ptr->palette[i].red = image->palette->rgb[i][0], +- info_ptr->palette[i].green = image->palette->rgb[i][1], +- info_ptr->palette[i].blue = image->palette->rgb[i][2], +- info_ptr->num_palette = image->palette->end; ++ palette[i].red = image->palette->rgb[i][0], ++ palette[i].green = image->palette->rgb[i][1], ++ palette[i].blue = image->palette->rgb[i][2]; ++ png_set_PLTE(png_ptr, info_ptr, palette, image->palette->end); + } + break; + case SMALLITER: + case LARGEITER: + case GRAYSCALE: +- info_ptr->color_type = PNG_COLOR_TYPE_GRAY; +- info_ptr->bit_depth = image->bytesperpixel * 8; + break; + case TRUECOLOR: + case TRUECOLOR24: + case TRUECOLOR16: +- info_ptr->color_type = PNG_COLOR_TYPE_RGB; +- info_ptr->bit_depth = 8; +- info_ptr->sig_bit.red = 8 - image->palette->info.truec.rprec; +- info_ptr->sig_bit.green = 8 - image->palette->info.truec.gprec; +- info_ptr->sig_bit.blue = 8 - image->palette->info.truec.bprec; ++ { ++ png_color_8 sigbits; ++ sigbits.red = 8 - image->palette->info.truec.rprec; ++ sigbits.green = 8 - image->palette->info.truec.gprec; ++ sigbits.blue = 8 - image->palette->info.truec.bprec; ++ png_set_sBIT(png_ptr, info_ptr, &sigbits); + break; ++ } + } +- info_ptr->interlace_type = 0; ++ + #ifdef _undefined_ + png_set_text(png_ptr, info_ptr, comments, + sizeof(comments) / sizeof(png_text)); +@@ -127,8 +154,11 @@ + png_write_info(png_ptr, info_ptr); + /*png_set_filler(png_ptr,0,PNG_FILLER_AFTER); */ + png_set_packing(png_ptr); +- if (image->palette->type & (TRUECOLOR | TRUECOLOR24 | TRUECOLOR16)) +- png_set_shift(png_ptr, &(info_ptr->sig_bit)); ++ if (image->palette->type & (TRUECOLOR | TRUECOLOR24 | TRUECOLOR16)) { ++ png_color_8 *sigbits; ++ png_get_sBIT(png_ptr, info_ptr, &sigbits); ++ png_set_shift(png_ptr, sigbits); ++ } + if (*b == 255) + png_set_swap(png_ptr); + png_set_bgr(png_ptr); +@@ -192,7 +222,6 @@ + #endif + } + png_write_end(png_ptr, info_ptr); +- info_ptr->text = NULL; /* Do not try to free a static string */ + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(file); + return NULL; diff -Nru xaos-3.5+ds1/debian/patches/series xaos-3.5+ds1/debian/patches/series --- xaos-3.5+ds1/debian/patches/series 2014-11-12 13:55:31.000000000 +0100 +++ xaos-3.5+ds1/debian/patches/series 2016-01-06 14:56:04.000000000 +0100 @@ -4,3 +4,4 @@ window-size.patch spelling.patch engine-registers.patch +libpng16.patch