pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/math/nickle nickle: Fix build on SunOS and systems wit...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1fcc7bd2b3f9
branches:  trunk
changeset: 373504:1fcc7bd2b3f9
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Jan 03 12:12:07 2018 +0000

description:
nickle: Fix build on SunOS and systems without timelocal().

diffstat:

 math/nickle/distinfo                     |   3 +-
 math/nickle/patches/patch-builtin-date.c |  38 ++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 1 deletions(-)

diffs (56 lines):

diff -r d034636809da -r 1fcc7bd2b3f9 math/nickle/distinfo
--- a/math/nickle/distinfo      Wed Jan 03 11:50:39 2018 +0000
+++ b/math/nickle/distinfo      Wed Jan 03 12:12:07 2018 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.12 2017/11/23 16:15:23 wiz Exp $
+$NetBSD: distinfo,v 1.13 2018/01/03 12:12:07 jperkin Exp $
 
 SHA1 (nickle-2.81.tar.gz) = ef9c6de7ad2a544a3245657fbfd46dbfa9675476
 RMD160 (nickle-2.81.tar.gz) = 03c8ffbebfd0104b3cd54f748f702de7e6f999f5
 SHA512 (nickle-2.81.tar.gz) = b11755f824b3abf74f104db7bfaf58f52fef0b76e194ffd8c562693d5497f9de69121f9ce98777fb0366a7e02be7b32e7d800a31be03f5a5921b9d8bc3502aca
 Size (nickle-2.81.tar.gz) = 579140 bytes
 SHA1 (patch-aa) = 4cbb563244883f6c9f7a3594875052f8d9a9e9b3
+SHA1 (patch-builtin-date.c) = ca55181a501cfbe3437d38728398852e96b0111a
 SHA1 (patch-lex.c) = f9d5f3f282f97a94195730062525e9f6310bb316
diff -r d034636809da -r 1fcc7bd2b3f9 math/nickle/patches/patch-builtin-date.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/nickle/patches/patch-builtin-date.c  Wed Jan 03 12:12:07 2018 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-builtin-date.c,v 1.1 2018/01/03 12:12:07 jperkin Exp $
+
+Fix missing tm_zone on SunOS.
+Pull in upstream fix for missing timelocal().
+
+--- builtin-date.c.orig        2017-11-14 10:30:06.000000000 +0000
++++ builtin-date.c
+@@ -76,7 +76,11 @@ to_date(struct tm *tm)
+     BoxValueSet (box, 6, int_value(tm->tm_wday));
+     BoxValueSet (box, 7, int_value(tm->tm_yday));
+     BoxValueSet (box, 8, tm->tm_isdst ? TrueVal : FalseVal);
++#ifdef __sun
++    BoxValueSet (box, 9, NewStrString("GMT"));
++#else
+     BoxValueSet (box, 9, NewStrString(tm->tm_zone));
++#endif
+     return ret;
+ }
+ 
+@@ -92,7 +96,9 @@ from_date(Value date, struct tm *tm)
+     tm->tm_wday = value_int(date, "wday", "invalid wday", 0);
+     tm->tm_yday = value_int(date, "yday", "invalid yday", 0);
+     tm->tm_isdst = value_bool(date, "isdst", "invalid isdst", 0);
++#ifndef __sun
+     tm->tm_zone = NULL;
++#endif
+ }
+ 
+ static Value
+@@ -143,7 +149,7 @@ do_Date_timelocal(Value v)
+     time_t    seconds;
+ 
+     from_date(v, &tm);
+-    seconds = timelocal(&tm);
++    seconds = mktime(&tm);
+     RETURN(Reduce(NewSignedDigitInteger((signed_digit) seconds)));
+ }
+ 



Home | Main Index | Thread Index | Old Index