[xmedcon] * Sat Jul 28 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.10.7-9 - Use Tom's patch to fi

Ankur Sinha ankursinha at fedoraproject.org
Sat Jul 28 01:58:14 UTC 2012


commit ba5662ec763ff432d0d5a2fd7fd3855afc21ba20
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur at gmail.com>
Date:   Sat Jul 28 11:57:34 2012 +1000

    * Sat Jul 28 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.10.7-9
    - Use Tom's patch to fix FTBFS because of libpng 1.5
    - Details here: rhbz#843662

 xmedcon-libpng-1.5.patch |   51 ++++++++++++++++++++++++++++++++++++++++++++++
 xmedcon.spec             |   10 ++++++++-
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/xmedcon-libpng-1.5.patch b/xmedcon-libpng-1.5.patch
new file mode 100644
index 0000000..56a199e
--- /dev/null
+++ b/xmedcon-libpng-1.5.patch
@@ -0,0 +1,51 @@
+--- xmedcon-0.10.7.orig/source/m-png.c  2010-08-28 19:44:23.000000000 -0400
++++ xmedcon-0.10.7.orig/source/m-png.c  2012-07-26 19:23:14.569230330 -0400
+@@ -65,7 +65,7 @@ 
+ 
+   if (!png_ptr) return; 
+ 
+-  longjmp(png_ptr->jmpbuf, 1);
++  longjmp(png_jmpbuf(png_ptr), 1);
+ }
+ 
+ static void MdcPngWarn(png_structp png_ptr, png_const_charp warning_msg)
+@@ -98,6 +98,8 @@ 
+   png_uint_32 width, height, rowbytes;
+   png_colorp palette;
+   png_bytepp row_pointers;
++  png_textp text_ptr;
++  int num_text;
+   Uint32 i, commentsize;
+   int bit_depth, color_type, transform, num_palette;
+   Uint8 *imgRGB, *pbuf;
+@@ -161,21 +163,22 @@ 
+   }
+ 
+   /* get comment */
+-  if(info_ptr->num_text > 0) {
++  if(png_get_text(png_ptr, info_ptr, &text_ptr, &num_text) &&
++     num_text > 0) {
+     commentsize = 1;
+ 
+-    for(i = 0; i < info_ptr->num_text; i++)
+-      commentsize += strlen(info_ptr->text[i].key) + 1 +
+-                     info_ptr->text[i].text_length + 2;
++    for(i = 0; i < num_text; i++)
++      commentsize += strlen(text_ptr[i].key) + 1 +
++                     text_ptr[i].text_length + 2;
+     
+     if ((fi->comment = malloc(commentsize)) == NULL) {
+       MdcPngWarn(png_ptr,"PNG  Can't malloc comment string");
+     }else{ 
+       fi->comment[0] = '\0';
+-      for (i = 0; i < info_ptr->num_text; i++) {
+-        strcat(fi->comment, info_ptr->text[i].key);
++      for (i = 0; i < num_text; i++) {
++        strcat(fi->comment, text_ptr[i].key);
+         strcat(fi->comment, "::");
+-        strcat(fi->comment, info_ptr->text[i].text);
++        strcat(fi->comment, text_ptr[i].text);
+         strcat(fi->comment, "\n");
+       }
+     }
+
diff --git a/xmedcon.spec b/xmedcon.spec
index 18d92a6..8b4032c 100644
--- a/xmedcon.spec
+++ b/xmedcon.spec
@@ -1,6 +1,6 @@
 Name:           xmedcon
 Version:        0.10.7
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        A medical image conversion utility and library
 
 # Please refer to http://xmedcon.sourceforge.net/pub/readme/README for details
@@ -12,6 +12,9 @@ URL:            http://xmedcon.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
 Source1:        %{name}.desktop
 Patch0:         xmedcon-fix-includes.patch
+# Patch for libpng provided by Tom Lane in rhbz#843662
+# Thanks Tom!
+Patch1:         xmedcon-libpng-1.5.patch
 
 BuildRequires:  gtk2-devel nifticlib-devel
 BuildRequires:  libtpcimgio-devel libtpcmisc-devel
@@ -42,6 +45,7 @@ necessary for developing programs that make use of the (X)MedCon library
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 # Remove the sources of the nifti, since we're using fedora nifti here
 rm -rvf ./libs/nifti/ 
@@ -116,6 +120,10 @@ fi
 %{_datadir}/aclocal/*
 
 %changelog
+* Sat Jul 28 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.10.7-9
+- Use Tom's patch to fix FTBFS because of libpng 1.5
+- Details here: rhbz#843662 
+
 * Sun Jul 22 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.7-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list