[Pkg-octave-commit] [SCM] octave-time branch, master, updated. fe122aaa49bc1dcffb32b942660af2f0a7ed2b9e

Rafael Laboissiere rafael at debian.org
Sun May 24 20:41:55 UTC 2009


The following commit has been merged in the master branch:
commit 591a5dd88b0ab563f952556462c6ddd1cb7f2e2f
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Sun May 24 22:31:07 2009 +0200

    Add patch for fixing the calls to datenum()
    
    In octave3.0, datenum does not accept the month and the day argument having
    different sizes.
    
    Also, add the Policy-required file README.source, build-depends on quilt,
    include patchsys-quilt.mk in debian/rules, and adjust the list of exclusions
    in .gitignore accordingly.

diff --git a/.gitignore b/.gitignore
index 6beb917..58a8e2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.pc/
 COPYING
 ChangeLog
 DESCRIPTION
@@ -5,6 +6,7 @@ Makefile
 configure
 debian/files
 debian/octave-time*
+debian/stamp-patched
 global-list
 inst/
 local-list
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..056f3df
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,9 @@
+README.source for octave-time
+=============================
+
+This package uses quilt to manage all modifications to the upstream sources.
+See `/usr/share/doc/quilt/README.source' to get more information on how to
+use it.
+
+ -- Rafael Laboissiere <rafael at debian.org>, Sun, 24 May 2009 22:28:24 +0200
+
diff --git a/debian/changelog b/debian/changelog
index 5750845..13950c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,11 @@
 octave-time (1.0.9-1) UNRELEASED; urgency=low
 
   * New upstream release
+  * debian/patches/datenum-month-vector.diff: New patch for fixing the
+    calls to datenum() such that the month argument is passed as a vector
+    when needed.  This make the package work correctly with octave3.0.
   * debian/control:
+    + (Build-Depends): Add quilt
     + (Standards-Version): Bump to 3.8.1 (no changes needed)
     + (Depends): Add ${misc:Depends}
     + (Vcs-Git, Vcs-Browser): Adjust to new Git repository
@@ -11,6 +15,7 @@ octave-time (1.0.9-1) UNRELEASED; urgency=low
     + Use DEP5 URL in Format-Specification
     + Use separate License stanzas for instructing about the location of
       the different licenses used in the package
+  * debian/rules: Include patchsys-quilt.mk
 
  -- Rafael Laboissiere <rafael at debian.org>  Sun, 12 Apr 2009 17:51:05 +0200
 
diff --git a/debian/control b/debian/control
index f889628..7d83bba 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Ólafur Jens Sigurðsson <ojsbug at gmail.com>,
  Thomas Weber <thomas.weber.mail at gmail.com>,
  Rafael Laboissiere <rafael at debian.org>
 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/time
 Vcs-Git: git://git.debian.org/git/pkg-octave/octave-time.git
diff --git a/debian/patches/datenum-month-vector.diff b/debian/patches/datenum-month-vector.diff
new file mode 100644
index 0000000..81c25b3
--- /dev/null
+++ b/debian/patches/datenum-month-vector.diff
@@ -0,0 +1,56 @@
+Fix the calls to datenum() such that the month argument is passed
+vectors when needed.
+
+ -- Rafael Laboissiere <rafael at debian.org>  Sun, 24 May 2009 21:20:19 +0200
+
+--- a/inst/busdays.m
++++ b/inst/busdays.m
+@@ -119,9 +119,9 @@
+ endfunction
+ 
+ ## Tests
+-%!assert (busdays (datenum (2008, 1, 1), datenum (2008, 1, 12)), datenum (2008, 1, [2;3;4;7;8;9;10;11]))
+-%!assert (busdays (datenum (2008, 1, 1), datenum (2008, 1, 12), "d"), datenum (2008, 1, [2;3;4;7;8;9;10;11]))
+-%!assert (busdays (datenum (2001, 1, 2), datenum (2001, 1, 9), "w"), datenum (2001, 1, [5;12]))
++%!assert (busdays (datenum (2008, 1, 1), datenum (2008, 1, 12)), datenum (2008, ones (8, 1), [2;3;4;7;8;9;10;11]))
++%!assert (busdays (datenum (2008, 1, 1), datenum (2008, 1, 12), "d"), datenum (2008, ones (8, 1), [2;3;4;7;8;9;10;11]))
++%!assert (busdays (datenum (2001, 1, 2), datenum (2001, 1, 9), "w"), datenum (2001, [1;1], [5;12]))
+ %!assert (busdays (datenum (2008, 1, 1), datenum (2008, 1, 2), "m"), datenum (2008, 1, 31))
+ %!assert (busdays (datenum (2008, 1, 1), datenum (2010, 5, 2), "m"), lbusdate ([2008*ones(12,1);2009*ones(12,1);2010*ones(5,1)], [1:12 1:12 1:5]'))
+ %!assert (busdays (datenum (2008, 1, 1), datenum (2008, 1, 2), "q"), datenum (2008, 3, 31))
+--- a/inst/datefind.m
++++ b/inst/datefind.m
+@@ -44,5 +44,5 @@
+ endfunction
+ 
+ ## Tests
+-%!assert (datefind (datenum (1999, 7, [10;20]), datenum (1999, 7, 1:31)), [10;20])
+-%!assert (datefind (datenum (1999, 7, [10;20]), datenum (1999, 7, 1:31), 1), [9;10;11;19;20;21])
++%!assert (datefind (datenum (1999, [7;7], [10;20]), datenum (1999, repmat (7, 1, 31), 1:31)), [10;20])
++%!assert (datefind (datenum (1999, [7;7], [10;20]), datenum (1999, repmat (7, 1, 31), 1:31), 1), [9;10;11;19;20;21])
+--- a/inst/nweekdate.m
++++ b/inst/nweekdate.m
+@@ -146,7 +146,7 @@
+ # It doesn't exist, so return 0
+ %!assert(nweekdate(5, 4, 2008, 1, 6), 0)
+ # Try vector arguments
+-%!assert(nweekdate(1:6, 4, 2008, 1, 6), [datenum(2008, 1, 2:7:23), 0, 0])
++%!assert(nweekdate(1:6, 4, 2008, 1, 6), [datenum(2008, ones (1, length (2:7:23)), 2:7:23), 0, 0])
+ 
+ # Try the lweekdate operation of this function:
+ # Find the last Wednesday in Jan 2008
+--- a/inst/eomdate.m
++++ b/inst/eomdate.m
+@@ -31,7 +31,11 @@
+   endif
+ 
+   d = eomday (y, m);
+-  e = datenum (y, m, d);
++  if isscalar (m)
++    e = datenum (y, repmat (m, size (d)), d);
++  else
++    e = datenum (y, m, d);
++  endif
+ 
+ endfunction
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9955251
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+datenum-month-vector.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-time



More information about the Pkg-octave-commit mailing list