Subject: pkg/22886: Few cleanups to misc/chord
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/22/2003 10:38:25
>Number:         22886
>Category:       pkg
>Synopsis:       Few cleanups to misc/chord
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 22 10:39: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:
Few fixes:

 1) Pull in ${PAPERSIZE} setting rather than hardcoding to `US'.
 2) Don't hardcode `cc'.
 3) Remove GCC-specific CFLAGS.
 4) Use install macros rather than hardcoded install/cp etc.
 5) Leave install macros to determine compressed manual pages.

This gets it building/installing on Solaris, so they're not merely
cosmetic :-)
>How-To-Repeat:

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

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/misc/chord/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	2003/07/17 21:48:47	1.10
+++ Makefile	2003/09/22 10:35:07
@@ -12,6 +12,6 @@
 
 NO_SRC_ON_FTP=		Already in MASTER_SITE_LOCAL
 
-MANCOMPRESSED=	yes
+CFLAGS+=	-DPAPERSIZE=${PAPERSIZE}
 
 .include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/misc/chord/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo	2001/07/22 01:16:58	1.3
+++ distinfo	2003/09/22 10:35:07
@@ -2,5 +2,5 @@
 
 SHA1 (chord.tar.gz) = 2d93a43ee153f840786d7218cf49b44c85d19388
 Size (chord.tar.gz) = 74809 bytes
-SHA1 (patch-aa) = 3af8a5e93e0c9c4f3dbf45cdc598daae96531509
+SHA1 (patch-aa) = 8625a6cf246d265c305faaffd826e984b30fdbc3
 SHA1 (patch-ab) = d99fade958792cf1b31905d5b685b6cbfd699585
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/misc/chord/patches/patch-aa,v
retrieving revision 1.2
diff -u -r1.2 patch-aa
--- patches/patch-aa	1998/08/07 11:10:11	1.2
+++ patches/patch-aa	2003/09/22 10:35:07
@@ -1,13 +1,15 @@
 $NetBSD: patch-aa,v 1.2 1998/08/07 11:10:11 agc Exp $
 
---- ./Makefile.org	Tue Apr 25 00:04:52 1995
-+++ ./Makefile	Tue Apr 25 00:14:57 1995
-@@ -9,14 +9,14 @@
+--- Makefile.orig	Tue Apr 25 08:04:52 1995
++++ Makefile	Mon Sep 22 11:18:10 2003
+@@ -8,15 +8,15 @@
+ #GETOPT = getopt.o
  
  # Use a ansi or K&R compiler
- CC = cc 
+-CC = cc 
 -CFLAGS = -D$(PAPERSIZE) -g
-+CFLAGS = -D$(PAPERSIZE) -O2
++#CC = cc 
++#CFLAGS = -D$(PAPERSIZE) -g
  
  # where to put the resulting program
 -BINDIR = /usr/local/bin
@@ -21,38 +23,23 @@
  
  # You should not have to change anything below this line
  
-@@ -37,7 +37,7 @@
- 
- a2crd: a2crd.o Makefile
- 	$(CC) $(CFLAGS) -o $@ a2crd.o common.o
--	
-+
- chord.o    : chord.h
- common.o   : chord.h
- grid.o     : chord.h
-@@ -46,13 +46,14 @@
+@@ -46,13 +46,12 @@
  toc.o	   : chord.h
  
  install : all
 -	cp $(PROGRAMS) $(BINDIR)
 -	rm -f $(MANDIR)/cat$(MANEXT)/chord.$(MANEXT)
-+	install -c -s $(PROGRAMS) $(BINDIR)
- 	cp chord.man $(MANDIR)/man$(MANEXT)/chord.$(MANEXT)
+-	cp chord.man $(MANDIR)/man$(MANEXT)/chord.$(MANEXT)
 -	chmod 666 $(MANDIR)/man$(MANEXT)/chord.$(MANEXT)
 -	Cp a2crd.man $(MANDIR)/man$(MANEXT)/a2crd.$(MANEXT)
 -	chmod 666 $(MANDIR)/man$(MANEXT)/a2crd.$(MANEXT)
 -	
-+	chmod 444 $(MANDIR)/man$(MANEXT)/chord.$(MANEXT)
-+	gzip -9nf $(MANDIR)/man$(MANEXT)/chord.$(MANEXT)
-+	cp a2crd.man $(MANDIR)/man$(MANEXT)/a2crd.$(MANEXT)
-+	chmod 444 $(MANDIR)/man$(MANEXT)/a2crd.$(MANEXT)
-+	gzip -9nf $(MANDIR)/man$(MANEXT)/a2crd.$(MANEXT)
++	for prog in $(PROGRAMS); do \
++		${BSD_INSTALL_PROGRAM} $$prog $(BINDIR)/$$prog; \
++	done
++	${BSD_INSTALL_MAN} chord.man $(MANDIR)/man$(MANEXT)/chord.$(MANEXT)
++	${BSD_INSTALL_MAN} a2crd.man $(MANDIR)/man$(MANEXT)/a2crd.$(MANEXT)
 +
  shar : $(SRC)
  	rm -f $(RELNAME).part*
  	shar -F -L 60 -o $(RELNAME).part $(SRC) $(INCL) $(SONGS) $(DOCS)
-@@ -68,4 +69,3 @@
- clean:
- 	rm -f core *.o chord 
- 
--	
>Release-Note:
>Audit-Trail:
>Unformatted: