r36247 - in /packages/libmatio/trunk/debian: changelog patches/ patches/read-size-issue.diff patches/sparsecomplexmatrices.diff rules

sylvestre at users.alioth.debian.org sylvestre at users.alioth.debian.org
Tue Mar 2 06:23:09 UTC 2010


Author: sylvestre
Date: Tue Mar  2 06:23:03 2010
New Revision: 36247

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=36247
Log:
  * Fix a compression read size issues. Thanks to Vincent Couvert from Scilab
    for the patch read-size-issue.diff (Closes: #556652)
  * Fix a bug in the sparse complex matrices handling. Patch
    sparsecomplexmatrices.diff

Added:
    packages/libmatio/trunk/debian/patches/
    packages/libmatio/trunk/debian/patches/read-size-issue.diff
    packages/libmatio/trunk/debian/patches/sparsecomplexmatrices.diff
Modified:
    packages/libmatio/trunk/debian/changelog
    packages/libmatio/trunk/debian/rules

Modified: packages/libmatio/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/libmatio/trunk/debian/changelog?rev=36247&op=diff
==============================================================================
--- packages/libmatio/trunk/debian/changelog (original)
+++ packages/libmatio/trunk/debian/changelog Tue Mar  2 06:23:03 2010
@@ -1,8 +1,12 @@
 libmatio (1.3.3-7) UNRELEASED; urgency=low
 
   * Uses ghostscript-x instead of gs-gpl
+  * Fix a compression read size issues. Thanks to Vincent Couvert from Scilab
+    for the patch read-size-issue.diff (Closes: #556652)
+  * Fix a bug in the sparse complex matrices handling. Patch 
+    sparsecomplexmatrices.diff
 
- -- Sylvestre Ledru <sylvestre at debian.org>  Sun, 14 Feb 2010 18:02:51 +0100
+ -- Sylvestre Ledru <sylvestre at debian.org>  Mon, 01 Mar 2010 23:20:07 +0100
 
 libmatio (1.3.3-6) unstable; urgency=low
 

Added: packages/libmatio/trunk/debian/patches/read-size-issue.diff
URL: http://svn.debian.org/wsvn/debian-science/packages/libmatio/trunk/debian/patches/read-size-issue.diff?rev=36247&op=file
==============================================================================
--- packages/libmatio/trunk/debian/patches/read-size-issue.diff (added)
+++ packages/libmatio/trunk/debian/patches/read-size-issue.diff Tue Mar  2 06:23:03 2010
@@ -1,0 +1,53 @@
+--- libmatio-1.3.3.orig/src/mat5.c	2010-03-01 23:11:21.000000000 +0100
++++ libmatio-1.3.3/src/mat5.c	2010-03-01 23:15:06.000000000 +0100
+@@ -129,8 +129,15 @@
+             nBytes += tag_size + sparse->ndata*Mat_SizeOf(matvar->data_type);
+     } else {
+         nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
+-        if ( matvar->isComplex )
++        if (nmemb*Mat_SizeOf(matvar->data_type) % 8) {
++            nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++          }
++        if ( matvar->isComplex ) {
+             nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
++            if (nmemb*Mat_SizeOf(matvar->data_type) % 8) {
++                nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++              }
++          }
+     }
+     
+     return nBytes;
+@@ -218,8 +225,15 @@
+             nBytes += tag_size + sparse->ndata*Mat_SizeOf(matvar->data_type);
+     } else {
+         nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
+-        if ( matvar->isComplex )
++        if ( nmemb*Mat_SizeOf(matvar->data_type) % 8 ) {
++            nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++          }
++        if ( matvar->isComplex ) {
+             nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
++            if ( nmemb*Mat_SizeOf(matvar->data_type) % 8 ) {
++                nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++              }
++          }
+     }
+     
+     return nBytes;
+@@ -305,8 +319,15 @@
+             nBytes += tag_size + sparse->ndata*Mat_SizeOf(matvar->data_type);
+     } else {
+         nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
+-        if ( matvar->isComplex )
++        if ( nmemb*Mat_SizeOf(matvar->data_type) % 8 ) {
++            nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++          }
++        if ( matvar->isComplex ) {
+             nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
++            if ( nmemb*Mat_SizeOf(matvar->data_type) % 8 ) {
++                nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++              }
++          }
+     }
+     
+     return nBytes;

Added: packages/libmatio/trunk/debian/patches/sparsecomplexmatrices.diff
URL: http://svn.debian.org/wsvn/debian-science/packages/libmatio/trunk/debian/patches/sparsecomplexmatrices.diff?rev=36247&op=file
==============================================================================
--- packages/libmatio/trunk/debian/patches/sparsecomplexmatrices.diff (added)
+++ packages/libmatio/trunk/debian/patches/sparsecomplexmatrices.diff Tue Mar  2 06:23:03 2010
@@ -1,0 +1,13 @@
+--- libmatio-1.3.3.orig/src/mat5.c	2010-03-01 23:11:21.000000000 +0100
++++ libmatio-1.3.3/src/mat5.c	2010-03-01 23:15:06.000000000 +0100
+@@ -4793,8 +4814,8 @@
+                                           Mat_SizeOf(matvar->data_type));
+                 complex_data->Im = malloc(data->ndata*
+                                           Mat_SizeOf(matvar->data_type));
+-                if ( NULL == complex_data || NULL == complex_data->Re ||
+-                     NULL == complex_data->Im ) {
++                if ( NULL != complex_data && NULL != complex_data->Re &&
++                     NULL != complex_data->Im ) {
+                     if ( matvar->compression == COMPRESSION_NONE) {
+ #if defined(EXTENDED_SPARSE)
+                         switch ( matvar->data_type ) {

Modified: packages/libmatio/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debian-science/packages/libmatio/trunk/debian/rules?rev=36247&op=diff
==============================================================================
--- packages/libmatio/trunk/debian/rules (original)
+++ packages/libmatio/trunk/debian/rules Tue Mar  2 06:23:03 2010
@@ -2,6 +2,7 @@
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
 DEB_CONFIGURE_NORMAL_ARGS += --enable-shared
 DEB_MAKE_BUILD_TARGET     := libmatio_la_LIBADD=-lz




More information about the debian-science-commits mailing list