Subject: pkg/30528: tools.Linux.mk missing bzcat, tbl
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <grant@NetBSD.org>
List: pkgsrc-bugs
Date: 06/15/2005 07:07:00
>Number:         30528
>Category:       pkg
>Synopsis:       tools.Linux.mk missing bzcat, tbl
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 15 07:07:00 +0000 2005
>Originator:     grant beattie
>Release:        Linux 2.4.26
>Organization:
>Environment:
System: Linux liz 2.4.26 #2 Sat Jun 26 19:24:28 EST 2004 i686 unknown unknown GNU/Linux
Architecture: i386
Machine: i386
>Description:
tools.Linux.mk lacks default definitions for bzcat and tbl, meaning
that archivers/bzip2 and textproc/groff respectively are pulled in
unnecessarily simply to execute "bzcat" and "tbl".

these tools exist in many (most? all?) Linux distributions.
>How-To-Repeat:
code inspection.
>Fix:
Index: tools.Linux.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/tools.Linux.mk,v
retrieving revision 1.19
diff -u -r1.19 tools.Linux.mk
--- tools.Linux.mk	3 Jun 2005 22:54:44 -0000	1.19
+++ tools.Linux.mk	15 Jun 2005 07:03:04 -0000
@@ -13,6 +13,11 @@
 TOOLS_PLATFORM.bison?=		/usr/bin/bison
 TOOLS_PLATFORM.bison-yacc?=	/usr/bin/bison -y
 .endif
+.if exists(/usr/bin/bzcat)
+TOOLS_PLATFORM.bzcat?=		/usr/bin/bzcat
+.elif exists(/usr/bin/bzip2)
+TOOLS_PLATFORM.bzcat?=		/usr/bin/bzip2 -cd
+.endif
 TOOLS_PLATFORM.cat?=		/bin/cat
 TOOLS_PLATFORM.chgrp?=		/bin/chgrp
 TOOLS_PLATFORM.chmod?=		/bin/chmod
@@ -119,6 +124,9 @@
 TOOLS_PLATFORM.strip?=		/usr/bin/strip
 TOOLS_PLATFORM.tail?=		/usr/bin/tail
 TOOLS_PLATFORM.tar?=		${TOOLS_PLATFORM.gtar}
+.if exists(/usr/bin/tbl)
+TOOLS_PLATFORM.tbl?=		/usr/bin/tbl
+.endif
 TOOLS_PLATFORM.tee?=		/usr/bin/tee
 TOOLS_PLATFORM.test?=		test			# shell builtin
 .if exists(/bin/touch)