diff options
author | garga <garga@FreeBSD.org> | 2006-04-11 15:39:41 +0000 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2006-04-11 15:39:41 +0000 |
commit | 150c69e9144f27614c8c56e245a9ee6e30236606 (patch) | |
tree | 822017280cde0236a10e5f4a7f90884e015fb80d /lang | |
parent | b7bc1f65c997d10bcb53b981e29020af753fbf92 (diff) | |
download | FreeBSD-ports-150c69e9144f27614c8c56e245a9ee6e30236606.zip FreeBSD-ports-150c69e9144f27614c8c56e245a9ee6e30236606.tar.gz |
- Fix: If summer-time daylight saving is in effect, getHours() returns
wrong value.
- Change .if defined(WITH_GC) -> ;if !defined(WITHOUT_GC) since it's on
by default.
PR: ports/94996
Submitted by: maintainer
Diffstat (limited to 'lang')
-rw-r--r-- | lang/see/Makefile | 5 | ||||
-rw-r--r-- | lang/see/files/patch-libsee_obj__Date.c | 35 |
2 files changed, 38 insertions, 2 deletions
diff --git a/lang/see/Makefile b/lang/see/Makefile index ada5b1c..5326f26 100644 --- a/lang/see/Makefile +++ b/lang/see/Makefile @@ -7,6 +7,7 @@ PORTNAME= see PORTVERSION= 1.3.1 +PORTREVISION= 1 CATEGORIES= lang devel MASTER_SITES= http://www.adaptive-enterprises.com.au/~d/software/see/ @@ -15,7 +16,7 @@ COMMENT= Simple ECMAScript Engine (SEE) CONFLICTS= see-devel-[0-9]* -OPTIONS= GC "Use Boehm-Weiser garbage collection package" on \ +OPTIONS= GC "Use Boehm-Weiser garbage collection pkg" on \ OPTIMIZED_CFLAGS "Enable some additional optimizations" off INSTALLS_SHLIB= yes @@ -32,7 +33,7 @@ CONFIGURE_ENV= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}" \ CFLAGS+= -O3 -fomit-frame-pointer .endif -.if defined(WITH_GC) +.if !defined(WITHOUT_GC) LIB_DEPENDS+= gc:${PORTSDIR}/devel/boehm-gc .else CONFIGURE_ARGS+= --without-boehm-gc diff --git a/lang/see/files/patch-libsee_obj__Date.c b/lang/see/files/patch-libsee_obj__Date.c new file mode 100644 index 0000000..12c3a06 --- /dev/null +++ b/lang/see/files/patch-libsee_obj__Date.c @@ -0,0 +1,35 @@ +--- libsee/obj_Date.c.orig Wed Jan 18 13:51:50 2006 ++++ libsee/obj_Date.c Mon Mar 27 10:56:41 2006 +@@ -2167,20 +2167,12 @@ + DaylightSavingTA(t) + SEE_number_t t; + { +- SEE_number_t ysec = t - TimeFromYear((SEE_number_t)YearFromTime(t)); +- int ily = InLeapYear(t); +- int wstart = WeekDay(TimeFromYear((SEE_number_t)YearFromTime(t))); +- int equiv_year = yearmap[ily][wstart]; + struct tm tm; + time_t dst_time, nodst_time; ++ time_t tt; ++ tt=t/1000; ++ tm=*localtime(&tt); + +- memset(&tm, 0, sizeof tm); +- tm.tm_sec = SecFromTime(ysec); +- tm.tm_min = MinFromTime(ysec); +- tm.tm_hour = HourFromTime(ysec); +- tm.tm_mday = DateFromTime(ysec); +- tm.tm_mon = MonthFromTime(ysec) - 1; +- tm.tm_year = equiv_year - 1900; + tm.tm_isdst = -1; + + if (tm.tm_isdst == 0) return 0; +@@ -2189,7 +2181,7 @@ + tm.tm_isdst = 0; + nodst_time = mktime(&tm); + +- return (dst_time - nodst_time) * 1000; ++ return -(dst_time - nodst_time) * 1000; + } + + static void |