pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/math/octave-current -Fix non-portable use of strptime(...
details: https://anonhg.NetBSD.org/pkgsrc/rev/bd0e7739e345
branches: trunk
changeset: 533694:bd0e7739e345
user: drochner <drochner%pkgsrc.org@localhost>
date: Mon Sep 24 20:56:46 2007 +0000
description:
-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:
math/octave-current/Makefile | 3 ++-
math/octave-current/distinfo | 4 +++-
math/octave-current/patches/patch-ai | 23 +++++++++++++++++++++++
math/octave-current/patches/patch-aj | 22 ++++++++++++++++++++++
4 files changed, 50 insertions(+), 2 deletions(-)
diffs (81 lines):
diff -r a9789c23ce1e -r bd0e7739e345 math/octave-current/Makefile
--- a/math/octave-current/Makefile Mon Sep 24 18:57:30 2007 +0000
+++ b/math/octave-current/Makefile Mon Sep 24 20:56:46 2007 +0000
@@ -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 -r a9789c23ce1e -r bd0e7739e345 math/octave-current/distinfo
--- a/math/octave-current/distinfo Mon Sep 24 18:57:30 2007 +0000
+++ b/math/octave-current/distinfo Mon Sep 24 20:56:46 2007 +0000
@@ -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-af) = 7edb2c44fa8886c84d79692fc3574b97f09d32c4
SHA1 (patch-ag) = 2c8dee1e65a4cacbb29432844baaa70c4a4a7863
SHA1 (patch-ah) = f0f1989b0f6979f4978d7f6130b1d8d0776c1580
+SHA1 (patch-ai) = 5137072d649ffe98f18eab992fcb24d0be38194a
+SHA1 (patch-aj) = a8881299270237a25880b29dbde997216637cdf3
diff -r a9789c23ce1e -r bd0e7739e345 math/octave-current/patches/patch-ai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/math/octave-current/patches/patch-ai Mon Sep 24 20:56:46 2007 +0000
@@ -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 -r a9789c23ce1e -r bd0e7739e345 math/octave-current/patches/patch-aj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/math/octave-current/patches/patch-aj Mon Sep 24 20:56:46 2007 +0000
@@ -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");
Home |
Main Index |
Thread Index |
Old Index