summaryrefslogtreecommitdiff
path: root/lang/swi-prolog-lite
diff options
context:
space:
mode:
authorjoerg <joerg>2006-10-12 14:14:13 +0000
committerjoerg <joerg>2006-10-12 14:14:13 +0000
commitb3dc8d58b48fa3182b63e740f6c7b4446dba2d6e (patch)
treed28ee3e682a7ac9bb2c3c6afbc11ed613cc7aed6 /lang/swi-prolog-lite
parente7c2e2ae9c105e39e617a0d9f72b66504f185f43 (diff)
downloadpkgsrc-b3dc8d58b48fa3182b63e740f6c7b4446dba2d6e.tar.gz
Use a recursion depth of 3 for config.guess/config.sub replacement.
Use portable way to compute timezone offset instead of timezone/daylight, the former is a function on some BSDs and the latter doesn't even exist in DragonFly. Fix PLIST on swi-prolog-packages to not use NetBSD ELFism. Bump revision of swi-prolog-lite and swi-prolog-packages.
Diffstat (limited to 'lang/swi-prolog-lite')
-rw-r--r--lang/swi-prolog-lite/Makefile4
-rw-r--r--lang/swi-prolog-lite/distinfo3
-rw-r--r--lang/swi-prolog-lite/patches/patch-ak70
3 files changed, 75 insertions, 2 deletions
diff --git a/lang/swi-prolog-lite/Makefile b/lang/swi-prolog-lite/Makefile
index 4cf6d562a76..e4155c2552d 100644
--- a/lang/swi-prolog-lite/Makefile
+++ b/lang/swi-prolog-lite/Makefile
@@ -1,13 +1,15 @@
-# $NetBSD: Makefile,v 1.10 2006/08/02 15:15:36 kristerw Exp $
+# $NetBSD: Makefile,v 1.11 2006/10/12 14:14:13 joerg Exp $
.include "Makefile.common"
PKGNAME= swi-prolog-lite-${SWIPLVERS}
+PKGREVISION= 1
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= ISO/Edinburgh-style Prolog compiler
GNU_CONFIGURE= yes
+OVERRIDE_DIRDEPTH= 3
USE_GNU_READLINE= yes # uses rl_event_hook() interface
CONFIGURE_ENV+= PL=swi-prolog
diff --git a/lang/swi-prolog-lite/distinfo b/lang/swi-prolog-lite/distinfo
index 88c3b0abbdb..3e6ab402d19 100644
--- a/lang/swi-prolog-lite/distinfo
+++ b/lang/swi-prolog-lite/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2006/08/02 15:15:36 kristerw Exp $
+$NetBSD: distinfo,v 1.6 2006/10/12 14:14:13 joerg Exp $
SHA1 (swi-prolog/pl-5.6.17.tar.gz) = e46e98b3ec8a69de3dc2eb147a9df9cbd1a17399
RMD160 (swi-prolog/pl-5.6.17.tar.gz) = 7f6786013b43c2e00b8e4a3799cbad1f7cac2fab
@@ -13,3 +13,4 @@ SHA1 (patch-ag) = 750c50997129c8b1ae2c3c4c317296249668430b
SHA1 (patch-ah) = 3bfc13a920e0f3a79e6764a9ace89032989e2c67
SHA1 (patch-ai) = 9446bc38a0a7e02de303e68c923249b615c91833
SHA1 (patch-aj) = 4450848127eab9f05113aaabfa48725336353e79
+SHA1 (patch-ak) = e767d69287f5b649048a5a6081061522c06edc18
diff --git a/lang/swi-prolog-lite/patches/patch-ak b/lang/swi-prolog-lite/patches/patch-ak
new file mode 100644
index 00000000000..aead3650a5f
--- /dev/null
+++ b/lang/swi-prolog-lite/patches/patch-ak
@@ -0,0 +1,70 @@
+$NetBSD: patch-ak,v 1.1 2006/10/12 14:14:13 joerg Exp $
+
+--- src/pl-tai.c.orig 2006-07-28 09:20:12.000000000 +0000
++++ src/pl-tai.c
+@@ -38,11 +38,8 @@ long set by tzset(). Not really clean .
+
+ #ifdef WIN32
+ #define timezone _timezone
+-#define daylight _daylight
+ #else
+ extern char *tzname[2];
+-extern long timezone;
+-extern int daylight;
+ #endif
+
+
+@@ -82,8 +79,21 @@ do_tzset()
+
+ static int
+ tz_offset()
+-{ do_tzset();
+- return timezone;
++{
++ time_t now = time(NULL), t_gmt, t_local;
++ struct tm gmt, local;
++ int diff;
++
++ do_tzset();
++ gmtime_r(&now, &gmt);
++ t_gmt = mktime(&gmt);
++ localtime_r(&now, &local);
++ t_local = mktime(&local);
++ diff = t_local - t_gmt;
++ if (local.tm_isdst)
++ diff += 3600;
++
++ return diff;
+ }
+
+
+@@ -312,14 +322,12 @@ PRED_IMPL("stamp_date_time", 3, stamp_da
+ ct.hour = tm.tm_hour;
+ ct.minute = tm.tm_min;
+ tzatom = tz_name_as_atom(tm.tm_isdst);
+- if ( daylight ) /* from tzset() */
+- { if ( tm.tm_isdst )
++ if ( tm.tm_isdst )
+ { utcoffset -= 3600;
+ dstatom = ATOM_true;
+ } else
+ { dstatom = ATOM_false;
+ }
+- }
+ done = TRUE;
+ }
+ } else if ( alocal == ATOM_utc )
+@@ -721,12 +729,10 @@ PRED_IMPL("format_time", 3, format_time,
+ { localtime_r(&unixt, &tb.tm);
+ tb.sec = (double)tb.tm.tm_sec + modf(tb.stamp, &ip);
+ tb.utcoff = tz_offset();
+- if ( daylight )
+- { if ( tb.tm.tm_isdst )
++ if ( tb.tm.tm_isdst )
+ { tb.utcoff -= 3600;
+ tb.isdst = TRUE;
+ }
+- }
+ tb.tzname = tz_name_as_atom(tb.tm.tm_isdst);
+ tb.flags = HAS_STAMP|HAS_WYDAY;
+ } else