[Pkg-octave-commit] [SCM] octave-integration branch, master, updated. 07777046daed37e3b90e9e02b50707eeb3b60a2b

Rafael Laboissiere rafael at debian.org
Fri May 22 19:10:50 UTC 2009


The following commit has been merged in the master branch:
commit 6e9d06ee68a79d07ddab03b89717268b8da594af
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Fri May 22 20:55:45 2009 +0200

    Add patch to fix global var problems in quadc.
    
    Also, build-depend on quilt and include patchsys-quilt.mk in debian/rules.

diff --git a/debian/control b/debian/control
index 6f4cbca..1072a63 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Ólafur Jens Sigurðsson <ojsbug at gmail.com>,
  Rafael Laboissiere <rafael at debian.org>,
  Thomas Weber <thomas.weber.mail at gmail.com>
 DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 6), cdbs, octave-pkg-dev (>= 0.6.4)
+Build-Depends: debhelper (>= 6), cdbs, octave-pkg-dev (>= 0.6.4), quilt
 Standards-Version: 3.8.1
 Homepage: http://octave.sourceforge.net/integration
 Vcs-Git: git://git.debian.org/git/pkg-octave/octave-integration.git
diff --git a/debian/patches/quadc-global-vars.diff b/debian/patches/quadc-global-vars.diff
new file mode 100644
index 0000000..5f4b7b1
--- /dev/null
+++ b/debian/patches/quadc-global-vars.diff
@@ -0,0 +1,33 @@
+The "global" statement in Octave 3.0.5 initializes the variable with
+an empty vector.  Hence, the exist() will always succeed for variables
+declared global.  Also, global statements should always come before
+the variables are assigned values.
+
+This patch fixes both problems in function quadc.
+
+ -- Rafael Laboissiere <rafael at debian.org>  Fri, 22 May 2009 20:49:52 +0200
+
+--- a/inst/quadc.m
++++ b/inst/quadc.m
+@@ -45,7 +45,7 @@
+ jacob=(xhigh-xlow)/2;
+ 
+ %generate the first two sets of integration points and weights
+-if ( exist('cb2') != 1 )
++if ( exist('cb2') != 1 || isempty (cb2) )
+   [cb2,cw2]=crule(2);
+ endif
+ 
+@@ -62,10 +62,10 @@
+   gnum=int2str(2^(i+1));
+   vname = ['cb',gnum];
+   if ( exist(vname) == 0 )
+-    estr =['[cb',gnum,',cw',gnum,']=crule(',gnum,');'];
+-    eval(estr);
+     estr =['global cb' gnum,' cw',gnum,';'];
+     eval(estr);
++    estr =['[cb',gnum,',cw',gnum,']=crule(',gnum,');'];
++    eval(estr);
+   endif
+   estr = ['x=(cb',gnum,'+1)*jacob+xlow;'];
+   eval(estr);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a7ada60
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+quadc-global-vars.diff
diff --git a/debian/rules b/debian/rules
index 71fb86c..038c30c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,3 +2,4 @@
 # -*- makefile -*-
 
 include /usr/share/cdbs/1/class/octave-pkg.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk

-- 
octave-integration



More information about the Pkg-octave-commit mailing list