pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/time/titrax Update from version 1.98nb3 to 1.98nb4.
details: https://anonhg.NetBSD.org/pkgsrc/rev/2c16bff6ba95
branches: trunk
changeset: 557489:2c16bff6ba95
user: he <he%pkgsrc.org@localhost>
date: Thu Apr 16 09:54:45 2009 +0000
description:
Update from version 1.98nb3 to 1.98nb4.
Pkgsrc changes:
o Add a fix to ensure this operates with week numbers in
accordance with ISO 8601.
diffstat:
time/titrax/Makefile | 4 +-
time/titrax/distinfo | 3 +-
time/titrax/patches/patch-ad | 49 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 53 insertions(+), 3 deletions(-)
diffs (81 lines):
diff -r 3dc7851ea0fd -r 2c16bff6ba95 time/titrax/Makefile
--- a/time/titrax/Makefile Thu Apr 16 09:50:37 2009 +0000
+++ b/time/titrax/Makefile Thu Apr 16 09:54:45 2009 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2008/11/10 17:21:38 wiz Exp $
+# $NetBSD: Makefile,v 1.21 2009/04/16 09:54:45 he Exp $
#
DISTNAME= titrax-1.98
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= x11 time
MASTER_SITES= ${MASTER_SITE_XCONTRIB:=office/}
diff -r 3dc7851ea0fd -r 2c16bff6ba95 time/titrax/distinfo
--- a/time/titrax/distinfo Thu Apr 16 09:50:37 2009 +0000
+++ b/time/titrax/distinfo Thu Apr 16 09:54:45 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2005/02/23 19:14:55 wiz Exp $
+$NetBSD: distinfo,v 1.5 2009/04/16 09:54:45 he Exp $
SHA1 (titrax-1.98.tar.gz) = 2849f8930aac945d435f58ad0a2a98fc19477da0
RMD160 (titrax-1.98.tar.gz) = 519898ed0d74b50d1a01041a6479fb4974823f3e
@@ -6,3 +6,4 @@
SHA1 (patch-aa) = 3e303f061b9f92397f01fe9cb337adfa85194dde
SHA1 (patch-ab) = 03ea1f434ab68ccd408830c778a462c083729c95
SHA1 (patch-ac) = 90aa3156fd42963049ac8931326f59d80b699aad
+SHA1 (patch-ad) = 49ab87c6c5d1574bcef3baf6d0c8a4c8e0220583
diff -r 3dc7851ea0fd -r 2c16bff6ba95 time/titrax/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/time/titrax/patches/patch-ad Thu Apr 16 09:54:45 2009 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-ad,v 1.1 2009/04/16 09:54:45 he Exp $
+
+Fix this so that it uses week numbering according to ISO 8601.
+
+--- weekno.perl.orig 1995-10-17 14:44:49.000000000 +0100
++++ weekno.perl
+@@ -51,7 +51,21 @@ sub weekno {
+
+
+ sub firstdayfirstweek {
+-# Return first day of week 1 of any year
++# Return the day of the year (0 is Jan 1st)
++# for the first day of week 1 of any year.
++#
++# Quoting strftime(3):
++# %V is replaced by the week number of the year (Monday as the first day
++# of the week) as a decimal number [01,53]. According to ISO 8601 the
++# week containing January 1 is week 1 if it has four or more days in
++# the new year, otherwise it is week 53 of the previous year, and the
++# next week is week 1. The year is given by the `%G' conversion
++# specification.
++#
++# So this will return a negative value in some cases, i.e. when
++# Jan 1st falls on either of Tuesday, Wednesday or Thursday, and
++# will be positive (1) or zero for Sunday or Monday respectively.
++#
+ local($y) = @_;
+ local($ret);
+ # Get time of January 1, 0.0.0.0
+@@ -59,13 +73,14 @@ sub firstdayfirstweek {
+ local($firsttime) = &main'timelocal(0, 0, 0, 1, 0, $y, 0, 0, 0);
+ local(@firstday) = localtime($firsttime);
+ local($wday) = $firstday[6];
+- # Rule works for some years.....89 to 92 tested, they all hit branch 2...
+- if ($wday > 3) {
+- $ret = 8 - $wday;
++ # Weekday 4 is Thursday (localtime returns zero-based with Sunday = 0)
++ if ($wday <= 4) {
++ $ret = 1 - $wday; # first day of week 1 may be in late December
++ # The exception is when Jan 1 = Sunday (wday 0)
+ } else {
+- $ret = 1 - $wday;
++ $ret = 8 - $wday; # first day of week 1 is in January
+ }
+- $ret;
++ return $ret;
+ }
+
+ sub firstinweek {
Home |
Main Index |
Thread Index |
Old Index