[med-svn] r10770 - in trunk/packages/insighttoolkit/branches/3.20.1/debian: . patches
Mathieu Malaterre
malat at alioth.debian.org
Tue May 8 20:38:21 UTC 2012
Author: malat
Date: 2012-05-08 20:38:20 +0000 (Tue, 08 May 2012)
New Revision: 10770
Added:
trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/ftbfs-gcc-4.7.diff
trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/png15support.patch
Modified:
trunk/packages/insighttoolkit/branches/3.20.1/debian/changelog
trunk/packages/insighttoolkit/branches/3.20.1/debian/control
trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/series
Log:
Fix itk vs png 1.5
Modified: trunk/packages/insighttoolkit/branches/3.20.1/debian/changelog
===================================================================
--- trunk/packages/insighttoolkit/branches/3.20.1/debian/changelog 2012-05-08 20:01:57 UTC (rev 10769)
+++ trunk/packages/insighttoolkit/branches/3.20.1/debian/changelog 2012-05-08 20:38:20 UTC (rev 10770)
@@ -1,3 +1,16 @@
+insighttoolkit (3.20.1-6) unstable; urgency=low
+
+ [ Matthias Klose ]
+ * Fix build failure with GCC 4.7.
+
+ [ Mathieu Malaterre ]
+ * Use my @d.o alias
+ * Use libpng-dev. Closes: #662379
+ * Fix compilation with png1.5. Closes: #648136
+ * Bump Std-Vers to 3.9.3, no changes needed
+
+ -- Matthias Klose <doko at debian.org> Thu, 03 May 2012 22:49:16 +0200
+
insighttoolkit (3.20.1-5) unstable; urgency=low
* patches/gzgetc.patch: New. Former function ::gzgetc() is now a macro,
Modified: trunk/packages/insighttoolkit/branches/3.20.1/debian/control
===================================================================
--- trunk/packages/insighttoolkit/branches/3.20.1/debian/control 2012-05-08 20:01:57 UTC (rev 10769)
+++ trunk/packages/insighttoolkit/branches/3.20.1/debian/control 2012-05-08 20:38:20 UTC (rev 10770)
@@ -4,14 +4,14 @@
Priority: optional
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
DM-Upload-Allowed: yes
-Uploaders: Steve M. Robbins <smr at debian.org>, Mathieu Malaterre <mathieu.malaterre at gmail.com>
+Uploaders: Steve M. Robbins <smr at debian.org>, Mathieu Malaterre <malat at debian.org>
Build-Depends: debhelper (>= 8),
cmake, cableswig (>= 0.1.0+cvs20110226), gccxml (>= 0.9.0+cvs20110723),
- zlib1g-dev (>= 1.2.2), libpng12-dev, libtiff4-dev,
+ zlib1g-dev (>= 1.2.2), libpng-dev, libtiff5-dev | libtiff-dev,
libfftw3-dev,
uuid-dev, libgdcm2-dev,
libvtk5-dev, python-vtk
-Standards-Version: 3.9.2
+Standards-Version: 3.9.3
Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/insighttoolkit/trunk/
Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/insighttoolkit/trunk/
Added: trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/ftbfs-gcc-4.7.diff
===================================================================
--- trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/ftbfs-gcc-4.7.diff (rev 0)
+++ trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/ftbfs-gcc-4.7.diff 2012-05-08 20:38:20 UTC (rev 10770)
@@ -0,0 +1,40 @@
+Index: insighttoolkit-3.20.1/Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx
+===================================================================
+--- insighttoolkit-3.20.1.orig/Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx 2011-10-25 16:37:23.000000000 +0000
++++ insighttoolkit-3.20.1/Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx 2012-05-03 20:26:07.942400611 +0000
+@@ -117,13 +117,13 @@
+ upperBound[partitionDimension] = partitionValue;
+ const unsigned int beginLeftIndex = beginIndex;
+ const unsigned int endLeftIndex = medianIndex;
+- KdTreeNodeType* left = GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1);
++ KdTreeNodeType* left = this->GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1);
+ upperBound[partitionDimension] = dimensionUpperBound;
+
+ lowerBound[partitionDimension] = partitionValue;
+ const unsigned int beginRightIndex = medianIndex+1;
+ const unsigned int endRighIndex = endIndex;
+- KdTreeNodeType* right = GenerateTreeLoop(beginRightIndex, endRighIndex, lowerBound, upperBound, level + 1);
++ KdTreeNodeType* right = this->GenerateTreeLoop(beginRightIndex, endRighIndex, lowerBound, upperBound, level + 1);
+ lowerBound[partitionDimension] = dimensionLowerBound;
+
+
+Index: insighttoolkit-3.20.1/Code/Review/Statistics/itkWeightedCentroidKdTreeGenerator.txx
+===================================================================
+--- insighttoolkit-3.20.1.orig/Code/Review/Statistics/itkWeightedCentroidKdTreeGenerator.txx 2011-10-25 16:37:23.000000000 +0000
++++ insighttoolkit-3.20.1/Code/Review/Statistics/itkWeightedCentroidKdTreeGenerator.txx 2012-05-03 20:25:56.758400196 +0000
+@@ -117,13 +117,13 @@
+ upperBound[partitionDimension] = partitionValue;
+ const unsigned int beginLeftIndex = beginIndex;
+ const unsigned int endLeftIndex = medianIndex;
+- KdTreeNodeType* left = GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1);
++ KdTreeNodeType* left = this->GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1);
+ upperBound[partitionDimension] = dimensionUpperBound;
+
+ lowerBound[partitionDimension] = partitionValue;
+ const unsigned int beginRightIndex = medianIndex+1;
+ const unsigned int endRighIndex = endIndex;
+- KdTreeNodeType* right = GenerateTreeLoop(beginRightIndex, endRighIndex, lowerBound, upperBound, level + 1);
++ KdTreeNodeType* right = this->GenerateTreeLoop(beginRightIndex, endRighIndex, lowerBound, upperBound, level + 1);
+ lowerBound[partitionDimension] = dimensionLowerBound;
+
+
Added: trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/png15support.patch
===================================================================
--- trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/png15support.patch (rev 0)
+++ trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/png15support.patch 2012-05-08 20:38:20 UTC (rev 10770)
@@ -0,0 +1,106 @@
+Description: Add support for png 1.5
+ This patch was made using git show 682f2e4 in the vtk tree
+ as well as example.c from libpng 1.5
+Author: Mathieu Malaterre <malat at debian.org>
+Bug-Debian: http://bugs.debian.org/648136
+
+--- insighttoolkit-3.20.1.orig/Code/IO/itkPNGImageIO.cxx
++++ insighttoolkit-3.20.1/Code/IO/itkPNGImageIO.cxx
+@@ -25,22 +25,34 @@ namespace itk
+
+ extern "C"
+ {
++ void itkPNGWriteWarningFunction(png_structp png_ptr,
++ png_const_charp warning_msg)
++ {
++ PNG_CONST char *name = "UNKNOWN (ERROR!)";
++ char *test;
++ test = static_cast<char *>(png_get_error_ptr(png_ptr));
++
++ if (test == NULL)
++ fprintf(stderr, "%s: libpng warning: %s\n", name, warning_msg);
++
++ else
++ fprintf(stderr, "%s: libpng warning: %s\n", test, warning_msg);
++ }
++}
++
++extern "C"
++{
+ #include <setjmp.h>
+ /* The PNG library does not expect the error function to return.
+ Therefore we must use this ugly longjmp call. */
+ void itkPNGWriteErrorFunction(png_structp png_ptr,
+- png_const_charp itkNotUsed(error_msg))
++ png_const_charp error_msg)
+ {
++#if PNG_LIBPNG_VER >= 10400
++ itkPNGWriteWarningFunction(png_ptr, error_msg);
++#else
+ longjmp(png_ptr->jmpbuf, 1);
+- }
+-}
+-
+-
+-extern "C"
+-{
+- void itkPNGWriteWarningFunction(png_structp itkNotUsed(png_ptr),
+- png_const_charp itkNotUsed(warning_msg))
+- {
++#endif
+ }
+ }
+
+@@ -211,7 +223,11 @@ void PNGImageIO::Read(void* buffer)
+ // minimum of a byte per pixel
+ if (colorType == PNG_COLOR_TYPE_GRAY && bitDepth < 8)
+ {
++#if PNG_LIBPNG_VER >= 10400
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
++#else
+ png_set_gray_1_2_4_to_8(png_ptr);
++#endif
+ }
+
+ // add alpha if any alpha found
+@@ -227,9 +243,19 @@ void PNGImageIO::Read(void* buffer)
+ #endif
+ }
+
++#if PNG_LIBPNG_VER >= 10400
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT))
++#else
+ if (info_ptr->valid & PNG_INFO_sBIT)
++#endif
+ {
++#if PNG_LIBPNG_VER >= 10400
++ png_color_8p sig_bit_p;
++ png_get_sBIT(png_ptr, info_ptr, &sig_bit_p);
++ png_set_shift(png_ptr, sig_bit_p);
++#else
+ png_set_shift(png_ptr, &(info_ptr->sig_bit));
++#endif
+ }
+ // have libpng handle interlacing
+ //int number_of_passes = png_set_interlace_handling(png_ptr);
+@@ -346,7 +372,11 @@ void PNGImageIO::ReadImageInformation()
+ // minimum of a byte per pixel
+ if (colorType == PNG_COLOR_TYPE_GRAY && bitDepth < 8)
+ {
++#if PNG_LIBPNG_VER >= 10400
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
++#else
+ png_set_gray_1_2_4_to_8(png_ptr);
++#endif
+ }
+
+ // add alpha if any alpha found
+@@ -496,7 +526,7 @@ void PNGImageIO::WriteSlice(const std::s
+ #if !defined(_MSC_VER) || _MSC_VER != 1310
+ png_set_error_fn(png_ptr, png_ptr,
+ itkPNGWriteErrorFunction, itkPNGWriteWarningFunction);
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf((png_ptr))))
+ {
+ fclose(fp);
+ itkExceptionMacro("Error while writing Slice to file: "
Modified: trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/series
===================================================================
--- trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/series 2012-05-08 20:01:57 UTC (rev 10769)
+++ trunk/packages/insighttoolkit/branches/3.20.1/debian/patches/series 2012-05-08 20:38:20 UTC (rev 10770)
@@ -9,3 +9,5 @@
wrap-iifilter-split.patch
itkvtkglue-vtk58.patch
gzgetc.patch
+ftbfs-gcc-4.7.diff
+png15support.patch
More information about the debian-med-commit
mailing list