summaryrefslogtreecommitdiff
path: root/time/titrax
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2009-04-16 09:54:45 +0000
committerhe <he@pkgsrc.org>2009-04-16 09:54:45 +0000
commit8581ee1b204ddfd16af38e24f5bb29cd88820998 (patch)
tree502f83abd84e8078ba2e1dab46d76e24d8ea0357 /time/titrax
parent021b4615a9813634a08d6834a7061daa8322c3da (diff)
downloadpkgsrc-8581ee1b204ddfd16af38e24f5bb29cd88820998.tar.gz
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 (limited to 'time/titrax')
-rw-r--r--time/titrax/Makefile4
-rw-r--r--time/titrax/distinfo3
-rw-r--r--time/titrax/patches/patch-ad49
3 files changed, 53 insertions, 3 deletions
diff --git a/time/titrax/Makefile b/time/titrax/Makefile
index b3f2f2af8d5..c99a61e933c 100644
--- a/time/titrax/Makefile
+++ b/time/titrax/Makefile
@@ -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 --git a/time/titrax/distinfo b/time/titrax/distinfo
index 55d3cf80e98..fd603c73bde 100644
--- a/time/titrax/distinfo
+++ b/time/titrax/distinfo
@@ -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 @@ Size (titrax-1.98.tar.gz) = 41154 bytes
SHA1 (patch-aa) = 3e303f061b9f92397f01fe9cb337adfa85194dde
SHA1 (patch-ab) = 03ea1f434ab68ccd408830c778a462c083729c95
SHA1 (patch-ac) = 90aa3156fd42963049ac8931326f59d80b699aad
+SHA1 (patch-ad) = 49ab87c6c5d1574bcef3baf6d0c8a4c8e0220583
diff --git a/time/titrax/patches/patch-ad b/time/titrax/patches/patch-ad
new file mode 100644
index 00000000000..1c5c8554471
--- /dev/null
+++ b/time/titrax/patches/patch-ad
@@ -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 {