--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: flam3: FTBFS with libpng 1.5
- From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
- Date: Sat, 30 Jul 2011 03:20:54 +0900
- Message-id: <CABMQnV++2gdd5gAZBT8i6Efy3SwkFWQ498djZwjCYtqhVF+Ppw@mail.gmail.com>
Package: flam3
Version: 3.0.1-2
Severity: important
Tags: patch
User: libpng@packages.debian.org
Usertags: libpng15-transition
Hi,
I uploaded libpng 1.5.2 to experimental.
libpng maintainers plan to transition from libpng 1.2 to 1.5.
I am checking build it the package depend to libpng.
I noticed your package FTBFS by libpng 1.5.
I created the patch that revise this problem.
Could you check and apply this patch?
Best regards,
Nobuhiro
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
diff -Nru flam3-3.0.1/debian/changelog flam3-3.0.1/debian/changelog
--- flam3-3.0.1/debian/changelog 2011-04-08 22:36:15.000000000 +0900
+++ flam3-3.0.1/debian/changelog 2011-05-30 14:31:08.000000000 +0900
@@ -1,3 +1,10 @@
+flam3 (3.0.1-2.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * libpng transition.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Mon, 30 May 2011 14:31:00 +0900
+
flam3 (3.0.1-2) unstable; urgency=low
* Update to Standards-Version 3.9.2 (no changes required)
diff -Nru flam3-3.0.1/debian/control flam3-3.0.1/debian/control
--- flam3-3.0.1/debian/control 2011-04-08 22:36:15.000000000 +0900
+++ flam3-3.0.1/debian/control 2011-05-30 14:31:46.000000000 +0900
@@ -2,7 +2,7 @@
Section: graphics
Priority: optional
Maintainer: Roberto C. Sanchez <roberto@connexer.com>
-Build-Depends: debhelper (>= 5), quilt, autotools-dev, autoconf, zlib1g-dev, libpng12-dev, libxml2-dev, libjpeg62-dev
+Build-Depends: debhelper (>= 5), quilt, autotools-dev, autoconf, zlib1g-dev, libpng15-dev, libxml2-dev, libjpeg62-dev
Standards-Version: 3.9.2
Homepage: http://flam3.com/
diff -Nru flam3-3.0.1/debian/patches/debian-changes-3.0.1-2.1 flam3-3.0.1/debian/patches/debian-changes-3.0.1-2.1
--- flam3-3.0.1/debian/patches/debian-changes-3.0.1-2.1 1970-01-01 09:00:00.000000000 +0900
+++ flam3-3.0.1/debian/patches/debian-changes-3.0.1-2.1 2011-05-30 14:44:20.000000000 +0900
@@ -0,0 +1,111 @@
+Description: Upstream changes introduced in version 3.0.1-2.1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ flam3 (3.0.1-2.1) unstable; urgency=low
+ .
+ * Non-maintainer upload.
+ * libpng transition.
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- flam3-3.0.1.orig/src/png.c
++++ flam3-3.0.1/src/png.c
+@@ -125,6 +125,7 @@ unsigned char *read_png(FILE *ifp, int *
+ png_byte **png_image = NULL;
+ unsigned int linesize, x, y;
+ unsigned char *p, *q;
++ int bit_depth, color_type;
+
+ if (fread (sig_buf, 1, SIG_CHECK_SIZE, ifp) != SIG_CHECK_SIZE) {
+ fprintf (stderr, "input file empty or too short\n");
+@@ -141,8 +142,9 @@ unsigned char *read_png(FILE *ifp, int *
+ return 0;
+ }
+ if (setjmp(png_jmpbuf(png_ptr))) {
++ int height_temp = png_get_image_height(png_ptr, info_ptr);
+ if (png_image) {
+- for (y = 0 ; y < info_ptr->height ; y++)
++ for (y = 0 ; y < height_temp ; y++)
+ free (png_image[y]);
+ free (png_image);
+ }
+@@ -161,19 +163,20 @@ unsigned char *read_png(FILE *ifp, int *
+ png_set_sig_bytes (png_ptr, SIG_CHECK_SIZE);
+ png_read_info (png_ptr, info_ptr);
+
+- if (8 != info_ptr->bit_depth) {
++ bit_depth = png_get_bit_depth(png_ptr, info_ptr);
++ if (8 != bit_depth) {
+ fprintf(stderr, "bit depth type must be 8, not %d.\n",
+- info_ptr->bit_depth);
++ bit_depth);
+ return 0;
+ }
+
+- *width = info_ptr->width;
+- *height = info_ptr->height;
++ *width = png_get_image_width(png_ptr, info_ptr);
++ linesize = *height = png_get_image_height(png_ptr, info_ptr);
+ p = q = malloc(4 * *width * *height);
+- png_image = (png_byte **)malloc (info_ptr->height * sizeof (png_byte*));
++ png_image = (png_byte **)malloc (*height * sizeof (png_byte*));
+
+- linesize = info_ptr->width;
+- switch (info_ptr->color_type) {
++ color_type = png_get_color_type(png_ptr, info_ptr);
++ switch (color_type) {
+ case PNG_COLOR_TYPE_RGB:
+ linesize *= 3;
+ break;
+@@ -182,21 +185,21 @@ unsigned char *read_png(FILE *ifp, int *
+ break;
+ default:
+ fprintf(stderr, "color type must be RGB or RGBA not %d.\n",
+- info_ptr->color_type);
++ color_type);
+ return 0;
+ }
+
+- for (y = 0 ; y < info_ptr->height ; y++) {
++ for (y = 0 ; y < *height ; y++) {
+ png_image[y] = malloc (linesize);
+ }
+ png_read_image (png_ptr, png_image);
+ png_read_end (png_ptr, info_ptr);
+
+- for (y = 0 ; y < info_ptr->height ; y++) {
++ for (y = 0 ; y < *height ; y++) {
+ unsigned char *s = png_image[y];
+- for (x = 0 ; x < info_ptr->width ; x++) {
++ for (x = 0 ; x < *width ; x++) {
+
+- switch (info_ptr->color_type) {
++ switch (color_type) {
+ case PNG_COLOR_TYPE_RGB:
+ p[0] = s[0];
+ p[1] = s[1];
+@@ -217,7 +220,7 @@ unsigned char *read_png(FILE *ifp, int *
+ }
+ }
+
+- for (y = 0 ; y < info_ptr->height ; y++)
++ for (y = 0 ; y < *height ; y++)
+ free (png_image[y]);
+ free (png_image);
+ png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp)NULL);
diff -Nru flam3-3.0.1/debian/patches/series flam3-3.0.1/debian/patches/series
--- flam3-3.0.1/debian/patches/series 2009-08-26 09:16:03.000000000 +0900
+++ flam3-3.0.1/debian/patches/series 2011-05-30 14:31:49.000000000 +0900
@@ -1 +1,2 @@
manpage_whatis_fix.patch
+debian-changes-3.0.1-2.1
--- End Message ---