summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authordrochner <drochner>2007-09-24 20:56:46 +0000
committerdrochner <drochner>2007-09-24 20:56:46 +0000
commit2713af7988f65f88fffb94053ca77364401c61ff (patch)
tree83a1a96db1b758949b535e7ec965cfd0e942723b /math
parent0146858095f638dc8e00e5d79e44b965d11ea3c3 (diff)
downloadpkgsrc-2713af7988f65f88fffb94053ca77364401c61ff.tar.gz
-Fix non-portable use of strptime(3): SUSv3 does not require it to do
calendar math and fill in wday/yday. Use mktime(3) to have those fields calculated. -Fix non-portable use of sort(1) (in an example/selftest only): the "-n" option should "restrict" the sort key to a numeric field, there is no requirement to use another key if no numbers are present. -bump PKGREVISION
Diffstat (limited to 'math')
-rw-r--r--math/octave-current/Makefile3
-rw-r--r--math/octave-current/distinfo4
-rw-r--r--math/octave-current/patches/patch-ai23
-rw-r--r--math/octave-current/patches/patch-aj22
4 files changed, 50 insertions, 2 deletions
diff --git a/math/octave-current/Makefile b/math/octave-current/Makefile
index 7c48ba71491..54fd5dee390 100644
--- a/math/octave-current/Makefile
+++ b/math/octave-current/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.61 2007/09/19 18:09:16 drochner Exp $
+# $NetBSD: Makefile,v 1.62 2007/09/24 20:56:46 drochner Exp $
DISTNAME= octave-${OCTAVE_VER}
PKGNAME= octave-current-${OCTAVE_VER}
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.che.wisc.edu/pub/octave/bleeding-edge/ \
ftp://ftp.eos.hokudai.ac.jp/pub/GNU/misc/octave/bleeding-edge/ \
diff --git a/math/octave-current/distinfo b/math/octave-current/distinfo
index 304a1cd4a12..c7b371d935c 100644
--- a/math/octave-current/distinfo
+++ b/math/octave-current/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.36 2007/09/19 18:09:16 drochner Exp $
+$NetBSD: distinfo,v 1.37 2007/09/24 20:56:46 drochner Exp $
SHA1 (octave-2.9.14.tar.bz2) = f97ae13c931276a359312ceb5f957df23d723c6a
RMD160 (octave-2.9.14.tar.bz2) = d5b9904501cabdea63329d116c4c8e6d3716327b
@@ -11,3 +11,5 @@ SHA1 (patch-ae) = 0a07bf983831cdd75f9e3f8e83974168514e93ab
SHA1 (patch-af) = 7edb2c44fa8886c84d79692fc3574b97f09d32c4
SHA1 (patch-ag) = 2c8dee1e65a4cacbb29432844baaa70c4a4a7863
SHA1 (patch-ah) = f0f1989b0f6979f4978d7f6130b1d8d0776c1580
+SHA1 (patch-ai) = 5137072d649ffe98f18eab992fcb24d0be38194a
+SHA1 (patch-aj) = a8881299270237a25880b29dbde997216637cdf3
diff --git a/math/octave-current/patches/patch-ai b/math/octave-current/patches/patch-ai
new file mode 100644
index 00000000000..a90b53b07a9
--- /dev/null
+++ b/math/octave-current/patches/patch-ai
@@ -0,0 +1,23 @@
+$NetBSD: patch-ai,v 1.3 2007/09/24 20:56:46 drochner Exp $
+
+--- liboctave/oct-time.cc.orig 2007-09-24 13:33:47.000000000 +0200
++++ liboctave/oct-time.cc
+@@ -35,6 +35,8 @@ Software Foundation, Inc., 51 Franklin S
+ #include <unistd.h>
+ #endif
+
++#include <time.h>
++
+ #if defined (OCTAVE_USE_WINDOWS_API)
+ #include <windows.h>
+ #undef min
+@@ -354,6 +356,9 @@ octave_strptime::init (const std::string
+ char *p = strsave (str.c_str ());
+
+ char *q = oct_strptime (p, fmt.c_str (), &t);
++ /* fill in wday and yday */
++ t.tm_isdst = -1;
++ mktime(&t);
+
+ if (q)
+ nchars = q - p + 1;
diff --git a/math/octave-current/patches/patch-aj b/math/octave-current/patches/patch-aj
new file mode 100644
index 00000000000..0baa5b1526d
--- /dev/null
+++ b/math/octave-current/patches/patch-aj
@@ -0,0 +1,22 @@
+$NetBSD: patch-aj,v 1.3 2007/09/24 20:56:46 drochner Exp $
+
+--- src/syscalls.cc.orig 2007-09-24 16:38:36.000000000 +0200
++++ src/syscalls.cc
+@@ -236,7 +236,7 @@ For example,\n\
+ \n\
+ @example\n\
+ @group\n\
+-[in, out, pid] = popen2 (\"sort\", \"-nr\");\n\
++[in, out, pid] = popen2 (\"sort\", \"-r\");\n\
+ fputs (in, \"these\\nare\\nsome\\nstrings\\n\");\n\
+ fclose (in);\n\
+ EAGAIN = errno (\"EAGAIN\");\n\
+@@ -352,7 +352,7 @@ fclose (out);\n\
+
+ %!test
+ %! if (isunix())
+-%! [in, out, pid] = popen2 ("sort", "-nr");
++%! [in, out, pid] = popen2 ("sort", "-r");
+ %! EAGAIN = errno ("EAGAIN");
+ %! else
+ %! [in, out, pid] = popen2 ("sort", "/R");