Bug#635943: fbi: FTBFS with libpng 1.5.2

2011-07-30 Thread Moritz Mühlenhoff
Nobuhiro Iwamatsu wrote:

 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?

Hi Nobuhiro,
thanks for filing the report. But I'm wondering, whether the
patch is actually correct:

 +@@ -68,8 +68,11 @@ png_init(FILE *fp, char *filename, unsig
 + png_set_strip_16(h-png);
 + if (h-color_type == PNG_COLOR_TYPE_PALETTE)
 + png_set_palette_to_rgb(h-png);
 +-if (h-color_type == PNG_COLOR_TYPE_GRAY  bit_depth  8)
 ++#if PNG_LIBPNG_VER_MAJOR = 1  PNG_LIBPNG_VER_MINOR = 4
 ++png_set_expand_gray_1_2_4_to_8(h-png);
 ++#else
 + png_set_gray_1_2_4_to_8(h-png);
 ++#endif
 + 
 + if (png_get_bKGD(h-png, h-info, file_bg)) {
 + png_set_background(h-png,file_bg,PNG_BACKGROUND_GAMMA_FILE,1,1.0);

You're removing the if (h-color_type == PNG_COLOR_TYPE_GRAY  bit_depth  8)
test, but I suppose this should rather be:


@@ -69,7 +69,11 @@
 if (h-color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(h-png);
 if (h-color_type == PNG_COLOR_TYPE_GRAY  bit_depth  8)
+#if PNG_LIBPNG_VER_MAJOR = 1  PNG_LIBPNG_VER_MINOR = 4
+   png_set_expand_gray_1_2_4_to_8(h-png);
+#else
png_set_gray_1_2_4_to_8(h-png);
+#endif

 if (png_get_bKGD(h-png, h-info, file_bg)) {
png_set_background(h-png,file_bg,PNG_BACKGROUND_GAMMA_FILE,1,1.0);


Cheers,
Moritz












-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#635943: fbi: FTBFS with libpng 1.5.2

2011-07-30 Thread Nobuhiro Iwamatsu
Hi, Moritz.

2011/7/30 Moritz Mühlenhoff j...@inutil.org:
 Nobuhiro Iwamatsu wrote:

 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?

 Hi Nobuhiro,
 thanks for filing the report. But I'm wondering, whether the
 patch is actually correct:

 +@@ -68,8 +68,11 @@ png_init(FILE *fp, char *filename, unsig
 +     png_set_strip_16(h-png);
 +     if (h-color_type == PNG_COLOR_TYPE_PALETTE)
 +     png_set_palette_to_rgb(h-png);
 +-    if (h-color_type == PNG_COLOR_TYPE_GRAY  bit_depth  8)
 ++#if PNG_LIBPNG_VER_MAJOR = 1  PNG_LIBPNG_VER_MINOR = 4
 ++    png_set_expand_gray_1_2_4_to_8(h-png);
 ++#else
 +     png_set_gray_1_2_4_to_8(h-png);
 ++#endif
 +
 +     if (png_get_bKGD(h-png, h-info, file_bg)) {
 +     png_set_background(h-png,file_bg,PNG_BACKGROUND_GAMMA_FILE,1,1.0);

 You're removing the if (h-color_type == PNG_COLOR_TYPE_GRAY  bit_depth  
 8)
 test, but I suppose this should rather be:

Oh, sorry, you are right.
I mistook.


 
 @@ -69,7 +69,11 @@
     if (h-color_type == PNG_COLOR_TYPE_PALETTE)
        png_set_palette_to_rgb(h-png);
     if (h-color_type == PNG_COLOR_TYPE_GRAY  bit_depth  8)
 +#if PNG_LIBPNG_VER_MAJOR = 1  PNG_LIBPNG_VER_MINOR = 4
 +       png_set_expand_gray_1_2_4_to_8(h-png);
 +#else
        png_set_gray_1_2_4_to_8(h-png);
 +#endif

     if (png_get_bKGD(h-png, h-info, file_bg)) {
        png_set_background(h-png,file_bg,PNG_BACKGROUND_GAMMA_FILE,1,1.0);
 


Your patch is correct.
Thank you review my patch!

Best regards,
  Nobuhiro
-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#635943: fbi: FTBFS with libpng 1.5.2

2011-07-29 Thread Nobuhiro Iwamatsu
Package: fbi
Version: 2.07-7
Severity: important
Tags: patch
User: lib...@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
diff -Nru fbi-2.07/debian/changelog fbi-2.07/debian/changelog
--- fbi-2.07/debian/changelog	2011-02-15 03:29:21.0 +0900
+++ fbi-2.07/debian/changelog	2011-05-30 14:58:43.0 +0900
@@ -1,3 +1,10 @@
+fbi (2.07-7.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * libpng transition.
+
+ -- Nobuhiro Iwamatsu iwama...@nigauri.org  Mon, 30 May 2011 14:58:34 +0900
+
 fbi (2.07-7) unstable; urgency=low
 
   * _Really_ switch to linux-any (Closes: #604657)
diff -Nru fbi-2.07/debian/patches/debian-changes-2.07-7.1 fbi-2.07/debian/patches/debian-changes-2.07-7.1
--- fbi-2.07/debian/patches/debian-changes-2.07-7.1	1970-01-01 09:00:00.0 +0900
+++ fbi-2.07/debian/patches/debian-changes-2.07-7.1	2011-05-30 15:06:22.0 +0900
@@ -0,0 +1,41 @@
+Description: Upstream changes introduced in version 2.07-7.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:
+ .
+ fbi (2.07-7.1) unstable; urgency=low
+ .
+   * Non-maintainer upload.
+   * libpng transition.
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Nobuhiro Iwamatsu iwama...@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: -MM-DD
+
+--- fbi-2.07.orig/rd/read-png.c
 fbi-2.07/rd/read-png.c
+@@ -68,8 +68,11 @@ png_init(FILE *fp, char *filename, unsig
+ 	png_set_strip_16(h-png);
+ if (h-color_type == PNG_COLOR_TYPE_PALETTE)
+ 	png_set_palette_to_rgb(h-png);
+-if (h-color_type == PNG_COLOR_TYPE_GRAY  bit_depth  8)
++#if PNG_LIBPNG_VER_MAJOR = 1  PNG_LIBPNG_VER_MINOR = 4
++	png_set_expand_gray_1_2_4_to_8(h-png);
++#else
+ 	png_set_gray_1_2_4_to_8(h-png);
++#endif
+ 
+ if (png_get_bKGD(h-png, h-info, file_bg)) {
+ 	png_set_background(h-png,file_bg,PNG_BACKGROUND_GAMMA_FILE,1,1.0);
diff -Nru fbi-2.07/debian/patches/series fbi-2.07/debian/patches/series
--- fbi-2.07/debian/patches/series	2010-09-01 07:06:41.0 +0900
+++ fbi-2.07/debian/patches/series	2011-05-30 15:06:22.0 +0900
@@ -6,3 +6,4 @@
 fbgs-pass-more-args.diff
 debian-changes-2.07-3
 debian-changes-2.07-6
+debian-changes-2.07-7.1