Fri Mar 1 12:23:07 2024 UTC (88d)
time/titrax: replace the old perl ' module separator with ::.

Newer perl now complains if ' is used as module separator.
Bump PKGREVISION.


(he)
diff -r1.40 -r1.41 pkgsrc/time/titrax/Makefile
diff -r1.12 -r1.13 pkgsrc/time/titrax/distinfo
diff -r1.1 -r1.2 pkgsrc/time/titrax/patches/patch-sumtitra
diff -r1.1 -r1.2 pkgsrc/time/titrax/patches/patch-weekno.perl

cvs diff -r1.40 -r1.41 pkgsrc/time/titrax/Makefile (expand / switch to unified diff)

--- pkgsrc/time/titrax/Makefile 2022/06/28 11:36:59 1.40
+++ pkgsrc/time/titrax/Makefile 2024/03/01 12:23:07 1.41
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.40 2022/06/28 11:36:59 wiz Exp $ 1# $NetBSD: Makefile,v 1.41 2024/03/01 12:23:07 he Exp $
2# 2#
3 3
4DISTNAME= titrax-1.98 4DISTNAME= titrax-1.98
5PKGREVISION= 17 5PKGREVISION= 18
6CATEGORIES= x11 time 6CATEGORIES= x11 time
7MASTER_SITES= ${MASTER_SITE_XCONTRIB:=office/} 7MASTER_SITES= ${MASTER_SITE_XCONTRIB:=office/}
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.alvestrand.no/titrax/TimeTracker.html 10HOMEPAGE= https://www.alvestrand.no/titrax/TimeTracker.html
11COMMENT= Little X11 tool to track project times 11COMMENT= Little X11 tool to track project times
12LICENSE= titrax-license 12LICENSE= titrax-license
13 13
14RESTRICTED= Do not sell for "real money". 14RESTRICTED= Do not sell for "real money".
15# XXX Arguably NO_*_ON_CDROM is not necessary, because "real money" seems 15# XXX Arguably NO_*_ON_CDROM is not necessary, because "real money" seems
16# to exclude CDROM distribution charges. 16# to exclude CDROM distribution charges.
17NO_SRC_ON_CDROM= ${RESTRICTED} 17NO_SRC_ON_CDROM= ${RESTRICTED}
18NO_BIN_ON_CDROM= ${RESTRICTED} 18NO_BIN_ON_CDROM= ${RESTRICTED}

cvs diff -r1.12 -r1.13 pkgsrc/time/titrax/distinfo (expand / switch to unified diff)

--- pkgsrc/time/titrax/distinfo 2021/10/26 11:24:44 1.12
+++ pkgsrc/time/titrax/distinfo 2024/03/01 12:23:07 1.13
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: distinfo,v 1.12 2021/10/26 11:24:44 nia Exp $ 1$NetBSD: distinfo,v 1.13 2024/03/01 12:23:07 he Exp $
2 2
3BLAKE2s (titrax-1.98.tar.gz) = fe6c301ccbffd3ed980c927896fe05bf5ad92fa8b3633b258066c923837c6350 3BLAKE2s (titrax-1.98.tar.gz) = fe6c301ccbffd3ed980c927896fe05bf5ad92fa8b3633b258066c923837c6350
4SHA512 (titrax-1.98.tar.gz) = 5d7f0833efe3dc4b2ef638836b171fcc83efc0cb66b119b17bd3937773555ab6171d0558439bf3265a95e66c3dbe44eae57df3198c3131265b75cf44ec11848c 4SHA512 (titrax-1.98.tar.gz) = 5d7f0833efe3dc4b2ef638836b171fcc83efc0cb66b119b17bd3937773555ab6171d0558439bf3265a95e66c3dbe44eae57df3198c3131265b75cf44ec11848c
5Size (titrax-1.98.tar.gz) = 41154 bytes 5Size (titrax-1.98.tar.gz) = 41154 bytes
6SHA1 (patch-Imakefile) = b6e2ab54377d0720c60f53224257b5dcf123ec2c 6SHA1 (patch-Imakefile) = b6e2ab54377d0720c60f53224257b5dcf123ec2c
7SHA1 (patch-sumtitra) = 2fbad9d6cdbc5239cf2a25ab057f640452c5a33e 7SHA1 (patch-sumtitra) = 67d60097edef2db6c494569e107ea76c5cc05374
8SHA1 (patch-titrat) = a6979392d0d0f755ff94147c490c466c3f60ff55 8SHA1 (patch-titrat) = a6979392d0d0f755ff94147c490c466c3f60ff55
9SHA1 (patch-weekno.perl) = c5b431054d600fd2ee6ebe345257fd0febe9e0b0 9SHA1 (patch-weekno.perl) = d9eb0e3b178f54022f860646f3236c7d6f9dbc52

cvs diff -r1.1 -r1.2 pkgsrc/time/titrax/patches/patch-sumtitra (expand / switch to unified diff)

--- pkgsrc/time/titrax/patches/patch-sumtitra 2014/11/05 22:41:38 1.1
+++ pkgsrc/time/titrax/patches/patch-sumtitra 2024/03/01 12:23:07 1.2
@@ -1,25 +1,44 @@ @@ -1,25 +1,44 @@
1$NetBSD: patch-sumtitra,v 1.1 2014/11/05 22:41:38 he Exp $ 1$NetBSD: patch-sumtitra,v 1.2 2024/03/01 12:23:07 he Exp $
2 2
3Fix a "year 2000" bug, and fix this to work without warning 3Fix a "year 2000" bug, and fix this to work without warning
4with newer perl. 4with newer perl.
 5Also replace ' with :: for newer perl.
5 6
6--- sumtitra.orig 1995-10-17 13:44:48.000000000 +0000 7--- sumtitra.orig 1995-10-17 13:44:48.000000000 +0000
7+++ sumtitra 8+++ sumtitra
8@@ -83,7 +83,7 @@ $DATE'startday = $startday; 9@@ -79,21 +79,21 @@ if ($projwidth <= 0) {
 10 $projwidth = 1;
 11 }
 12
 13-$DATE'startday = $startday;
 14+$DATE::startday = $startday;
9 $endday = $startday + $numdays - 1; 15 $endday = $startday + $numdays - 1;
10  16
11 # Find which week to sum for 17 # Find which week to sum for
12-$week = shift(ARGV); 18-$week = shift(ARGV);
13+$week = shift(@ARGV); 19+$week = shift(@ARGV);
14 $oneday = 24 * 60 * 60; 20 $oneday = 24 * 60 * 60;
15 if (!$week) { 21 if (!$week) {
16 # Default is last week. 22 # Default is last week.
 23- $week = &DATE'weekno($timenow) - 1;
 24+ $week = &DATE::weekno($timenow) - 1;
 25 } elsif ($week eq "now") {
 26 # now is this week
 27- $week = &DATE'weekno($timenow);
 28+ $week = &DATE::weekno($timenow);
 29 }
 30
 31-$timefetch = &DATE'firstinweek($week, $year);
 32+$timefetch = &DATE::firstinweek($week, $year);
 33 push(@dirlist, $TimeTrackerdir);
 34 if ($extradir) {
 35 push(@dirlist, $extradir);
17@@ -150,7 +150,7 @@ if ($nameadd) { 36@@ -150,7 +150,7 @@ if ($nameadd) {
18 } else { 37 } else {
19 print "$name\n"; 38 print "$name\n";
20 } 39 }
21-print $word{"banner"}, " $week 19$year\n"; 40-print $word{"banner"}, " $week 19$year\n";
22+print $word{"banner"}, " $week ", 1900+$year, "\n"; 41+print $word{"banner"}, " $week ", 1900+$year, "\n";
23  42
24 printf "%-${projwidth}.${projwidth}s%6s!", $word{"project"}, $word{"tot"}; 43 printf "%-${projwidth}.${projwidth}s%6s!", $word{"project"}, $word{"tot"};
25 for ($startday..$endday) { 44 for ($startday..$endday) {

cvs diff -r1.1 -r1.2 pkgsrc/time/titrax/patches/patch-weekno.perl (expand / switch to unified diff)

--- pkgsrc/time/titrax/patches/patch-weekno.perl 2014/11/05 22:41:38 1.1
+++ pkgsrc/time/titrax/patches/patch-weekno.perl 2024/03/01 12:23:07 1.2
@@ -1,59 +1,70 @@ @@ -1,59 +1,70 @@
1$NetBSD: patch-weekno.perl,v 1.1 2014/11/05 22:41:38 he Exp $ 1$NetBSD: patch-weekno.perl,v 1.2 2024/03/01 12:23:07 he Exp $
2 2
3Fix this so that it uses week numbering according to ISO 8601. 3Fix this so that it uses week numbering according to ISO 8601.
 4Also replace ' with :: for newer perl.
4 5
5--- weekno.perl.orig 1995-10-17 13:44:49.000000000 +0000 6--- weekno.perl.orig 1995-10-17 13:44:49.000000000 +0000
6+++ weekno.perl 7+++ weekno.perl
7@@ -1,7 +1,7 @@ 8@@ -1,7 +1,7 @@
8 #!/local/bin/perl 9 #!/local/bin/perl
9 # Package for date handling 10 # Package for date handling
10-# Use the PERL std library timelocal - older had his own 11-# Use the PERL std library timelocal - older had his own
11-require "timelocal.pl"; 12-require "timelocal.pl";
12+# Use the PERL std package Time::Local 13+# Use the PERL std package Time::Local
13+use Time::Local; 14+use Time::Local;
14  15
15 package DATE; 16 package DATE;
16 # J F M A M J J A S O N D 17 # J F M A M J J A S O N D
17@@ -51,7 +51,21 @@ sub weekno { 18@@ -51,21 +51,36 @@ sub weekno {
18  19
19  20
20 sub firstdayfirstweek { 21 sub firstdayfirstweek {
21-# Return first day of week 1 of any year 22-# Return first day of week 1 of any year
22+# Return the day of the year (0 is Jan 1st) 23+# Return the day of the year (0 is Jan 1st)
23+# for the first day of week 1 of any year. 24+# for the first day of week 1 of any year.
24+# 25+#
25+# Quoting strftime(3): 26+# Quoting strftime(3):
26+# %V is replaced by the week number of the year (Monday as the first day 27+# %V is replaced by the week number of the year (Monday as the first day
27+# of the week) as a decimal number [01,53]. According to ISO 8601 the 28+# of the week) as a decimal number [01,53]. According to ISO 8601 the
28+# week containing January 1 is week 1 if it has four or more days in 29+# week containing January 1 is week 1 if it has four or more days in
29+# the new year, otherwise it is week 53 of the previous year, and the 30+# the new year, otherwise it is week 53 of the previous year, and the
30+# next week is week 1. The year is given by the `%G' conversion 31+# next week is week 1. The year is given by the `%G' conversion
31+# specification. 32+# specification.
32+# 33+#
33+# So this will return a negative value in some cases, i.e. when 34+# So this will return a negative value in some cases, i.e. when
34+# Jan 1st falls on either of Tuesday, Wednesday or Thursday, and 35+# Jan 1st falls on either of Tuesday, Wednesday or Thursday, and
35+# will be positive (1) or zero for Sunday or Monday respectively. 36+# will be positive (1) or zero for Sunday or Monday respectively.
36+# 37+#
37 local($y) = @_; 38 local($y) = @_;
38 local($ret); 39 local($ret);
39 # Get time of January 1, 0.0.0.0 40 # Get time of January 1, 0.0.0.0
40@@ -59,13 +73,14 @@ sub firstdayfirstweek { 41 # Note that DST is never in effect on Jan 1...
41 local($firsttime) = &main'timelocal(0, 0, 0, 1, 0, $y, 0, 0, 0); 42- local($firsttime) = &main'timelocal(0, 0, 0, 1, 0, $y, 0, 0, 0);
 43+ local($firsttime) = &main::timelocal(0, 0, 0, 1, 0, $y, 0, 0, 0);
42 local(@firstday) = localtime($firsttime); 44 local(@firstday) = localtime($firsttime);
43 local($wday) = $firstday[6]; 45 local($wday) = $firstday[6];
44- # Rule works for some years.....89 to 92 tested, they all hit branch 2... 46- # Rule works for some years.....89 to 92 tested, they all hit branch 2...
45- if ($wday > 3) { 47- if ($wday > 3) {
46- $ret = 8 - $wday; 48- $ret = 8 - $wday;
47+ # Weekday 4 is Thursday (localtime returns zero-based with Sunday = 0) 49+ # Weekday 4 is Thursday (localtime returns zero-based with Sunday = 0)
48+ if ($wday <= 4) { 50+ if ($wday <= 4) {
49+ $ret = 1 - $wday; # first day of week 1 may be in late December 51+ $ret = 1 - $wday; # first day of week 1 may be in late December
50+ # The exception is when Jan 1 = Sunday (wday 0) 52+ # The exception is when Jan 1 = Sunday (wday 0)
51 } else { 53 } else {
52- $ret = 1 - $wday; 54- $ret = 1 - $wday;
53+ $ret = 8 - $wday; # first day of week 1 is in January 55+ $ret = 8 - $wday; # first day of week 1 is in January
54 } 56 }
55- $ret; 57- $ret;
56+ return $ret; 58+ return $ret;
57 } 59 }
58  60
59 sub firstinweek { 61 sub firstinweek {
 62@@ -73,7 +88,7 @@ sub firstinweek {
 63 # (to avoid DST troubles)
 64 local($weekno, $year) = @_;
 65 # 2 hours into this year
 66- local($time) = &main'timelocal(0, 0, 2, 1, 0, $year, 0, 0, 0);
 67+ local($time) = &main::timelocal(0, 0, 2, 1, 0, $year, 0, 0, 0);
 68 # Add number of days since start of year
 69 $time += (($weekno - 1) * 7 + &firstdayfirstweek($year)) * 60 * 60 * 24;
 70 $time;