Subject: pkg/22929: Cleanups to time/cal
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/24/2003 10:42:47
>Number:         22929
>Category:       pkg
>Synopsis:       Cleanups to time/cal
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 24 10:43:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Perkin
>Release:        N/A
>Organization:
British Broadcasting Corporation
>Environment:
SunOS build1 5.9 Generic_112233-01 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
Fix build on Solaris (no stricmp), and remove gcc specifics.
>How-To-Repeat:
Undefined			first referenced
 symbol  			    in file
stricmp                             /var/tmp//ccEQeliA.o
ld: fatal: Symbol referencing errors. No output written to cal
collect2: ld returned 1 exit status
*** Error code 1

>Fix:
http://www.perkin.org.uk/projects/netbsd/cal.diff

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/time/cal/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo	2003/01/03 22:22:10	1.3
+++ distinfo	2003/09/24 10:41:31
@@ -2,5 +2,5 @@
 
 SHA1 (cal-3.5.tar.gz) = 4be982ce4576db6e2db8f8006b7bffa016d6af9d
 Size (cal-3.5.tar.gz) = 47645 bytes
-SHA1 (patch-aa) = 37beac0349a79cc02851e88efdfa269505f6a64e
-SHA1 (patch-ab) = 32bea36394cf9747bccd52d4c0595a90b27fcf1c
+SHA1 (patch-aa) = 59faa366d366cf9ed265c7f0664b5d09e1c671d1
+SHA1 (patch-ab) = 70aaa0364c87cd5d73a2f5a40fce8d791c3f83fc
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/time/cal/patches/patch-aa,v
retrieving revision 1.2
diff -u -r1.2 patch-aa
--- patches/patch-aa	2003/01/03 22:22:10	1.2
+++ patches/patch-aa	2003/09/24 10:41:31
@@ -1,13 +1,15 @@
 $NetBSD: patch-aa,v 1.2 2003/01/03 22:22:10 jmmv Exp $
 
---- makefile.unx.orig	Mon Mar  4 22:36:27 1996
-+++ makefile.unx
-@@ -8,7 +8,7 @@
+--- makefile.unx.orig	Mon Mar  4 21:36:27 1996
++++ makefile.unx	Wed Sep 24 11:37:37 2003
+@@ -7,8 +7,8 @@
+ # To use, enter "make -f makefile.unx"
  
  RM=rm -f
- CC=gcc
+-CC=gcc
 -CFLAGS=-O -Wall -DUNIX -DUSE_REMINDER
-+CFLAGS+=-O -Wall -DUNIX -DUSE_REMINDER
++#CC=gcc
++CFLAGS+=-DUNIX -DUSE_REMINDER
  
  BINDIR=/usr/bin
  MANDIR=/usr/man
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/time/cal/patches/patch-ab,v
retrieving revision 1.2
diff -u -r1.2 patch-ab
--- patches/patch-ab	2003/01/03 22:22:11	1.2
+++ patches/patch-ab	2003/09/24 10:41:31
@@ -1,8 +1,8 @@
 $NetBSD: patch-ab,v 1.2 2003/01/03 22:22:11 jmmv Exp $
 
---- cal.c.orig	Thu Jul 11 21:36:33 1996
-+++ cal.c
-@@ -122,6 +122,7 @@ BASIC DATA STRUCTURE:                   
+--- cal.c.orig	Thu Jul 11 20:36:33 1996
++++ cal.c	Wed Sep 24 11:30:56 2003
+@@ -122,6 +122,7 @@
  #include <ctype.h>
  #include <string.h>
  #include <sys/types.h>
@@ -10,18 +10,18 @@
   
  #ifndef max
  #define max(a,b) (((a)>(b))?(a):(b))
-@@ -130,6 +131,10 @@ BASIC DATA STRUCTURE:                   
+@@ -130,6 +131,10 @@
  /* Note: Other unix systems may require this next re-define to work. */
  /* I believe that SCO is one such system.  Please send in any fixes  */
  /* needed to get your system running.                                */
-+#if (defined(BSD) && BSD >= 199306)
++#if (defined(BSD) && BSD >= 199306) || defined (sun)
 +#define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */
 +#endif
 + 
  #ifdef __linux__          /* Make linux compatible with stricmp() */
  #define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */
  #endif
-@@ -1401,8 +1406,8 @@ FILE *efopen(const char *file, const cha
+@@ -1401,8 +1406,8 @@
              strcpy(str, ".");
              strcpy(str, file);
              if ((fp = fopen(str, mode)) == NULL) {
>Release-Note:
>Audit-Trail:
>Unformatted: