Subject: pkg/22887: Remove hardcoded compiler stuff in misc/cksfv
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/22/2003 10:49:03
>Number:         22887
>Category:       pkg
>Synopsis:       Remove hardcoded compiler stuff in misc/cksfv
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 22 10:50: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:
The actual build problem is that the program builds with -Werror when
it isn't clean.  Doing a proper clean by picking up $(CC) and $(CFLAGS)
from pkgsrc fixes this, in addition to making it portable.
>How-To-Repeat:
===> Building for cksfv-1.3
cd src && bmake VERSION="1.3"
gcc -DVERSION=\"1.3\" -O -Wall -Werror -O2 -g -o cksfv cksfv.c print.c crc32.c readsfv.c newsfv.c
cc1: warnings being treated as errors
readsfv.c: In function `find_file':
readsfv.c:183: warning: subscript has type `char'
readsfv.c:183: warning: subscript has type `char'
*** Error code 1
>Fix:
http://www.perkin.org.uk/projects/netbsd/cksfv.diff

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/misc/cksfv/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo	2002/01/31 22:17:41	1.3
+++ distinfo	2003/09/22 10:46:58
@@ -6,3 +6,4 @@
 SHA1 (patch-ab) = e532c68c27518374de69f247f0b82160d11c7f08
 SHA1 (patch-ac) = 4048202c1e2baf8f01cd237e7c16368a0a8d1773
 SHA1 (patch-ad) = 99294fce6cdecbe7c256eaef90bc0e3c66096153
+SHA1 (patch-ae) = c08f7a11618b20fcece124d1124d1d50b52a61d0
--- /dev/null	Mon Sep 22 09:58:53 2003
+++ patches/patch-ae	Mon Sep 22 11:42:25 2003
@@ -1,0 +1,18 @@
+$NetBSD$
+
+--- src/Makefile.orig	Fri Jul  6 07:33:08 2001
++++ src/Makefile	Mon Sep 22 11:42:14 2003
+@@ -17,11 +17,11 @@
+ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ 
+ PROG=		cksfv
+-CFLAGS+=	-Wall -Werror -O2 -g
++#CFLAGS+=	-Wall -Werror -O2 -g
+ SRCS=		cksfv.c print.c crc32.c readsfv.c newsfv.c
+ 
+ cksfv: $(SRCS)
+-	gcc -DVERSION=\"$(VERSION)\" $(CFLAGS) -o $(PROG) $(SRCS)
++	$(CC) -DVERSION=\"$(VERSION)\" $(CFLAGS) -o $(PROG) $(SRCS)
+ 
+ install: cksfv
+ 	cp $(PROG) /usr/local/bin
>Release-Note:
>Audit-Trail:
>Unformatted: