summaryrefslogtreecommitdiff
path: root/time/titrax
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2014-11-05 22:41:38 +0000
committerhe <he@pkgsrc.org>2014-11-05 22:41:38 +0000
commit59383e466fcd70e86ae453ce1f7a29ab46a54927 (patch)
tree943ee38af8601c0a6b2e576fa1b223bbc1a1d066 /time/titrax
parentfbe15322214c3591fa1c554dc09ff6daaebc7ea5 (diff)
downloadpkgsrc-59383e466fcd70e86ae453ce1f7a29ab46a54927.tar.gz
Add a patch to weekno.perl so that it uses ISO 8601 week numbering.
Remove dependence on timelocal.pl; use Time::Local instead. Rename other patches according to new conventions. Fix pkglint warnings. Bump PKGREVISION.
Diffstat (limited to 'time/titrax')
-rw-r--r--time/titrax/Makefile6
-rw-r--r--time/titrax/PLIST6
-rw-r--r--time/titrax/distinfo10
-rw-r--r--time/titrax/patches/patch-Imakefile (renamed from time/titrax/patches/patch-aa)2
-rw-r--r--time/titrax/patches/patch-sumtitra (renamed from time/titrax/patches/patch-ac)2
-rw-r--r--time/titrax/patches/patch-titrat (renamed from time/titrax/patches/patch-ab)5
-rw-r--r--time/titrax/patches/patch-weekno.perl59
7 files changed, 75 insertions, 15 deletions
diff --git a/time/titrax/Makefile b/time/titrax/Makefile
index 68da545caf5..881e3e81d11 100644
--- a/time/titrax/Makefile
+++ b/time/titrax/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.30 2014/06/29 19:12:51 dholland Exp $
+# $NetBSD: Makefile,v 1.31 2014/11/05 22:41:38 he Exp $
#
DISTNAME= titrax-1.98
-PKGREVISION= 9
+PKGREVISION= 10
CATEGORIES= x11 time
MASTER_SITES= ${MASTER_SITE_XCONTRIB:=office/}
@@ -22,7 +22,7 @@ USE_TOOLS+= perl:run
pre-configure:
${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile.bak
- ${SED} -e "s|@LOCALBASE@|${LOCALBASE}|g" \
+ ${SED} -e "s|@LOCALBASE@|${PREFIX}|g" \
-e "s|@X11BASE@|${X11PREFIX}|g" \
${WRKSRC}/Imakefile.bak > ${WRKSRC}/Imakefile
diff --git a/time/titrax/PLIST b/time/titrax/PLIST
index 5883bd5de06..cbd172a9681 100644
--- a/time/titrax/PLIST
+++ b/time/titrax/PLIST
@@ -1,8 +1,8 @@
-@comment $NetBSD: PLIST,v 1.3 2009/06/14 18:18:00 joerg Exp $
+@comment $NetBSD: PLIST,v 1.4 2014/11/05 22:41:38 he Exp $
bin/sumtitra
bin/titrax
bin/titrat
lib/X11/app-defaults/Titrax
libexec/titrax/weekno.perl
-${IMAKE_MAN_DIR}/sumtitra.${IMAKE_MANNEWSUFFIX}
-${IMAKE_MAN_DIR}/titrax.${IMAKE_MANNEWSUFFIX}
+${IMAKE_MAN_DIR}/sumtitra.${IMAKE_MAN_SUFFIX}
+${IMAKE_MAN_DIR}/titrax.${IMAKE_MAN_SUFFIX}
diff --git a/time/titrax/distinfo b/time/titrax/distinfo
index 4aa4b44fc05..26b9e46daf9 100644
--- a/time/titrax/distinfo
+++ b/time/titrax/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.7 2014/06/29 19:12:51 dholland Exp $
+$NetBSD: distinfo,v 1.8 2014/11/05 22:41:38 he Exp $
SHA1 (titrax-1.98.tar.gz) = 2849f8930aac945d435f58ad0a2a98fc19477da0
RMD160 (titrax-1.98.tar.gz) = 519898ed0d74b50d1a01041a6479fb4974823f3e
Size (titrax-1.98.tar.gz) = 41154 bytes
-SHA1 (patch-aa) = 67b1aadb6e8ad5bc86959fe41c71dd5467d35f2c
-SHA1 (patch-ab) = 03ea1f434ab68ccd408830c778a462c083729c95
-SHA1 (patch-ac) = 2fbad9d6cdbc5239cf2a25ab057f640452c5a33e
-SHA1 (patch-ad) = 49ab87c6c5d1574bcef3baf6d0c8a4c8e0220583
+SHA1 (patch-Imakefile) = 67b1aadb6e8ad5bc86959fe41c71dd5467d35f2c
+SHA1 (patch-sumtitra) = 2fbad9d6cdbc5239cf2a25ab057f640452c5a33e
+SHA1 (patch-titrat) = a6979392d0d0f755ff94147c490c466c3f60ff55
+SHA1 (patch-weekno.perl) = c5b431054d600fd2ee6ebe345257fd0febe9e0b0
diff --git a/time/titrax/patches/patch-aa b/time/titrax/patches/patch-Imakefile
index 829be32cd5f..748ba9f6b42 100644
--- a/time/titrax/patches/patch-aa
+++ b/time/titrax/patches/patch-Imakefile
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 2014/06/29 19:12:51 dholland Exp $
+$NetBSD: patch-Imakefile,v 1.1 2014/11/05 22:41:38 he Exp $
- configure for pkgsrc
- do ratty interpreter fixes (XXX: change to REPLACE_PERL)
diff --git a/time/titrax/patches/patch-ac b/time/titrax/patches/patch-sumtitra
index 34e9e272689..fe530d2d42d 100644
--- a/time/titrax/patches/patch-ac
+++ b/time/titrax/patches/patch-sumtitra
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.2 2011/01/17 12:52:15 he Exp $
+$NetBSD: patch-sumtitra,v 1.1 2014/11/05 22:41:38 he Exp $
Fix a "year 2000" bug, and fix this to work without warning
with newer perl.
diff --git a/time/titrax/patches/patch-ab b/time/titrax/patches/patch-titrat
index 3f060b75f4e..3f34e5c28c3 100644
--- a/time/titrax/patches/patch-ab
+++ b/time/titrax/patches/patch-titrat
@@ -1,4 +1,6 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/12/17 23:32:20 wiz Exp $
+$NetBSD: patch-titrat,v 1.1 2014/11/05 22:41:38 he Exp $
+
+Don't use errno.ph, instead hardcode the EEXIST value.
--- titrat.orig Tue Oct 17 14:44:49 1995
+++ titrat Tue Dec 8 13:48:48 1998
@@ -14,4 +16,3 @@ $NetBSD: patch-ab,v 1.1.1.1 2000/12/17 23:32:20 wiz Exp $
$SIG{'HUP'} = 'signal';
$SIG{'INT'} = 'signal';
-
diff --git a/time/titrax/patches/patch-weekno.perl b/time/titrax/patches/patch-weekno.perl
new file mode 100644
index 00000000000..23f2366c1c4
--- /dev/null
+++ b/time/titrax/patches/patch-weekno.perl
@@ -0,0 +1,59 @@
+$NetBSD: patch-weekno.perl,v 1.1 2014/11/05 22:41:38 he Exp $
+
+Fix this so that it uses week numbering according to ISO 8601.
+
+--- weekno.perl.orig 1995-10-17 13:44:49.000000000 +0000
++++ weekno.perl
+@@ -1,7 +1,7 @@
+ #!/local/bin/perl
+ # Package for date handling
+-# Use the PERL std library timelocal - older had his own
+-require "timelocal.pl";
++# Use the PERL std package Time::Local
++use Time::Local;
+
+ package DATE;
+ # J F M A M J J A S O N D
+@@ -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 {