Wed Sep 14 15:14:54 2011 UTC ()
Use more host tools on SunOS. Default to GNU tools when available.


(hans)
diff -r1.169 -r1.170 pkgsrc/bootstrap/bootstrap
diff -r1.31 -r1.32 pkgsrc/mk/tools/tools.SunOS.mk

cvs diff -r1.169 -r1.170 pkgsrc/bootstrap/bootstrap (expand / switch to unified diff)

--- pkgsrc/bootstrap/bootstrap 2011/06/12 17:46:02 1.169
+++ pkgsrc/bootstrap/bootstrap 2011/09/14 15:14:53 1.170
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# $NetBSD: bootstrap,v 1.169 2011/06/12 17:46:02 agc Exp $ 3# $NetBSD: bootstrap,v 1.170 2011/09/14 15:14:53 hans Exp $
4# 4#
5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> 5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
6# All rights reserved. 6# All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
16# 16#
@@ -656,28 +656,36 @@ QNX) @@ -656,28 +656,36 @@ QNX)
656 need_awk=yes 656 need_awk=yes
657 need_sed=yes 657 need_sed=yes
658 set_opsys=no 658 set_opsys=no
659 groupsprog="id -gn" 659 groupsprog="id -gn"
660 whoamiprog="id -un" 660 whoamiprog="id -un"
661 machine_arch=`uname -p | sed -e 's/x86/i386/'` 661 machine_arch=`uname -p | sed -e 's/x86/i386/'`
662 ;; 662 ;;
663SunOS) 663SunOS)
664 if [ -d "/usr/xpg4/bin" ]; then 664 if [ -d "/usr/xpg4/bin" ]; then
665 overpath="/usr/xpg4/bin:$overpath" 665 overpath="/usr/xpg4/bin:$overpath"
666 fi 666 fi
667 root_group=root 667 root_group=root
668 need_bsd_install=yes 668 need_bsd_install=yes
669 need_awk=yes 669 if [ -x "/usr/gnu/bin/awk" ]; then
670 need_sed=yes 670 need_awk=no
 671 else
 672 need_awk=yes
 673 fi
 674 if [ -x "/usr/gnu/bin/sed" ]; then
 675 need_sed=no
 676 else
 677 need_sed=yes
 678 fi
671 need_ksh=yes 679 need_ksh=yes
672 set_opsys=no 680 set_opsys=no
673 groupsprog="/usr/xpg4/bin/id -gn" 681 groupsprog="/usr/xpg4/bin/id -gn"
674 whoamiprog="/usr/xpg4/bin/id -un" 682 whoamiprog="/usr/xpg4/bin/id -un"
675 machine_arch=`uname -p | sed -e 's/i86pc/i386/'` 683 machine_arch=`uname -p | sed -e 's/i86pc/i386/'`
676 check_compiler=yes 684 check_compiler=yes
677 ;; 685 ;;
678UnixWare) 686UnixWare)
679 root_group=sys 687 root_group=sys
680 need_bsd_install=no 688 need_bsd_install=no
681 BSTRAP_ENV="INSTALL=/usr/ucb/install $BSTRAP_ENV" 689 BSTRAP_ENV="INSTALL=/usr/ucb/install $BSTRAP_ENV"
682 need_mkdir=yes 690 need_mkdir=yes
683 need_awk=yes 691 need_awk=yes

cvs diff -r1.31 -r1.32 pkgsrc/mk/tools/tools.SunOS.mk (expand / switch to unified diff)

--- pkgsrc/mk/tools/tools.SunOS.mk 2011/07/15 15:33:15 1.31
+++ pkgsrc/mk/tools/tools.SunOS.mk 2011/09/14 15:14:53 1.32
@@ -1,115 +1,189 @@ @@ -1,115 +1,189 @@
1# $NetBSD: tools.SunOS.mk,v 1.31 2011/07/15 15:33:15 hans Exp $ 1# $NetBSD: tools.SunOS.mk,v 1.32 2011/09/14 15:14:53 hans Exp $
2# 2#
3# System-supplied tools for the Solaris operating system. 3# System-supplied tools for the Solaris operating system.
4# 4#
5# We bootstrap a pdksh shell on this platform. 5# We bootstrap a pdksh shell on this platform.
6 6
7TOOLS_PLATFORM.[?= [ # shell builtin 7TOOLS_PLATFORM.[?= [ # shell builtin
 8.if exists(/usr/bin/gawk)
 9TOOLS_PLATFORM.awk?= /usr/bin/gawk
 10.else
8TOOLS_PLATFORM.awk?= /usr/bin/nawk 11TOOLS_PLATFORM.awk?= /usr/bin/nawk
 12.endif
9TOOLS_PLATFORM.basename?= /usr/bin/basename 13TOOLS_PLATFORM.basename?= /usr/bin/basename
10.if exists(/bin/bash) 14.if exists(/bin/bash)
11TOOLS_PLATFORM.bash?= /bin/bash 15TOOLS_PLATFORM.bash?= /bin/bash
12.endif 16.endif
 17.if exists(/usr/bin/bison)
 18TOOLS_PLATFORM.bison?= /usr/bin/bison
 19TOOLS_PLATFORM.bison-yacc?= /usr/bin/bison -y
 20.endif
13.if exists(/usr/bin/bzcat) 21.if exists(/usr/bin/bzcat)
14TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat 22TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat
15.endif 23.endif
16.if exists(/usr/bin/bzip2) 24.if exists(/usr/bin/bzip2)
17TOOLS_PLATFORM.bzip2?= /usr/bin/bzip2 25TOOLS_PLATFORM.bzip2?= /usr/bin/bzip2
18.endif 26.endif
19TOOLS_PLATFORM.cat?= /usr/bin/cat 27TOOLS_PLATFORM.cat?= /usr/bin/cat
20TOOLS_PLATFORM.chgrp?= /usr/bin/chgrp 28TOOLS_PLATFORM.chgrp?= /usr/bin/chgrp
21TOOLS_PLATFORM.chmod?= /usr/bin/chmod 29TOOLS_PLATFORM.chmod?= /usr/bin/chmod
22TOOLS_PLATFORM.chown?= /usr/bin/chown 30TOOLS_PLATFORM.chown?= /usr/bin/chown
23.if exists(/bin/cmp) 31.if exists(/bin/cmp)
24TOOLS_PLATFORM.cmp?= /bin/cmp 32TOOLS_PLATFORM.cmp?= /bin/cmp
25.elif exists(/usr/bin/cmp) 33.elif exists(/usr/bin/cmp)
26TOOLS_PLATFORM.cmp?= /usr/bin/cmp 34TOOLS_PLATFORM.cmp?= /usr/bin/cmp
27.endif 35.endif
28TOOLS_PLATFORM.cp?= /bin/cp 36TOOLS_PLATFORM.cp?= /bin/cp
29TOOLS_PLATFORM.csh?= /bin/csh 37TOOLS_PLATFORM.csh?= /bin/csh
30TOOLS_PLATFORM.cut?= /usr/bin/cut 38TOOLS_PLATFORM.cut?= /usr/bin/cut
31TOOLS_PLATFORM.date?= /usr/xpg4/bin/date 39TOOLS_PLATFORM.date?= /usr/xpg4/bin/date
32.if exists(/bin/diff) 40.if exists(/usr/bin/gdiff)
33TOOLS_PLATFORM.diff?= /bin/diff 41TOOLS_PLATFORM.diff?= /usr/bin/gdiff
34.elif exists(/usr/bin/diff) 42.else
35TOOLS_PLATFORM.diff?= /usr/bin/diff 43TOOLS_PLATFORM.diff?= /usr/bin/diff
36.endif 44.endif
37.if exists(/bin/diff3) 45.if exists(/usr/bin/gdiff3)
38TOOLS_PLATFORM.diff3?= /bin/diff3 46TOOLS_PLATFORM.diff3?= /usr/bin/gdiff3
39.elif exists(/usr/bin/diff3) 47.else
40TOOLS_PLATFORM.diff3?= /usr/bin/diff3 48TOOLS_PLATFORM.diff3?= /usr/bin/diff3
41.endif 49.endif
42TOOLS_PLATFORM.dirname?= /usr/bin/dirname 50TOOLS_PLATFORM.dirname?= /usr/bin/dirname
43TOOLS_PLATFORM.echo?= echo # shell builtin 51TOOLS_PLATFORM.echo?= echo # shell builtin
 52.if exists(/usr/gnu/bin/grep)
 53TOOLS_PLATFORM.grep?= /usr/gnu/bin/grep
 54TOOLS_PLATFORM.egrep?= /usr/gnu/bin/grep -E
 55TOOLS_PLATFORM.fgrep?= /usr/gnu/bin/fgrep
 56.else
 57TOOLS_PLATFORM.grep?= /usr/xpg4/bin/grep
44TOOLS_PLATFORM.egrep?= /usr/xpg4/bin/grep -E 58TOOLS_PLATFORM.egrep?= /usr/xpg4/bin/grep -E
 59TOOLS_PLATFORM.fgrep?= /usr/xpg4/bin/fgrep
 60.endif
45TOOLS_PLATFORM.env?= /usr/bin/env 61TOOLS_PLATFORM.env?= /usr/bin/env
46TOOLS_PLATFORM.expr?= /usr/xpg4/bin/expr 62TOOLS_PLATFORM.expr?= /usr/xpg4/bin/expr
47.if exists(/usr/gnu/bin/false) # if we are using OpenSolaris 63.if exists(/usr/gnu/bin/false) # if we are using OpenSolaris
48TOOLS_PLATFORM.false?= /usr/gnu/bin/false 64TOOLS_PLATFORM.false?= /usr/gnu/bin/false
49.else 65.else
50TOOLS_PLATFORM.false?= false # shell builtin 66TOOLS_PLATFORM.false?= false # shell builtin
51.endif 67.endif
52TOOLS_PLATFORM.fgrep?= /usr/xpg4/bin/fgrep 
53TOOLS_PLATFORM.file?= /usr/bin/file 68TOOLS_PLATFORM.file?= /usr/bin/file
 69.if exists(/usr/gnu/bin/find)
 70TOOLS_PLATFORM.find?= /usr/gnu/bin/find
 71.else
54TOOLS_PLATFORM.find?= /usr/bin/find 72TOOLS_PLATFORM.find?= /usr/bin/find
55TOOLS_PLATFORM.grep?= /usr/xpg4/bin/grep 73.endif
 74.if exists(/usr/bin/flex)
 75TOOLS_PLATFORM.flex?= /usr/bin/flex
 76TOOLS_PLATFORM.lex?= /usr/bin/flex
 77.endif
 78.if exists(/usr/bin/gawk)
 79TOOLS_PLATFORM.gawk?= /usr/bin/gawk
 80.endif
 81.if exists(/usr/bin/gm4)
 82TOOLS_PLATFORM.gm4?= /usr/bin/gm4
 83.endif
 84.if exists(/usr/bin/gmake)
 85TOOLS_PLATFORM.gmake?= /usr/bin/gmake
 86.endif
 87.if exists(/usr/bin/groff)
 88TOOLS_PLATFORM.groff?= /usr/bin/groff
 89.endif
 90.if exists(/usr/bin/gsed)
 91TOOLS_PLATFORM.gsed?= /usr/bin/gsed
 92.endif
 93.if exists(/usr/bin/gsoelim)
 94TOOLS_PLATFORM.gsoelim?= /usr/bin/gsoelim
 95.endif
 96.if exists(/usr/bin/gtar)
 97TOOLS_PLATFORM.bsdtar?= /usr/bin/gtar
 98TOOLS_PLATFORM.gtar?= /usr/bin/gtar
 99TOOLS_PLATFORM.tar?= /usr/bin/gtar
 100.endif
56.if exists(/usr/bin/gzip) 101.if exists(/usr/bin/gzip)
57TOOLS_PLATFORM.gunzip?= /usr/bin/gzip -df 102TOOLS_PLATFORM.gunzip?= /usr/bin/gzip -df
58TOOLS_PLATFORM.gzcat?= /usr/bin/gzip -cd 103TOOLS_PLATFORM.gzcat?= /usr/bin/gzip -cd
59TOOLS_PLATFORM.gzip?= /usr/bin/gzip -nf ${GZIP} 104TOOLS_PLATFORM.gzip?= /usr/bin/gzip -nf ${GZIP}
60.endif 105.endif
61TOOLS_PLATFORM.head?= /usr/bin/head 106TOOLS_PLATFORM.head?= /usr/bin/head
62TOOLS_PLATFORM.hostname?= /bin/hostname 107TOOLS_PLATFORM.hostname?= /bin/hostname
63TOOLS_PLATFORM.id?= /usr/xpg4/bin/id 108TOOLS_PLATFORM.id?= /usr/xpg4/bin/id
 109.if exists(/usr/bin/install-info)
 110TOOLS_PLATFORM.install-info?= /usr/bin/install-info
 111.endif
64.if exists(/usr/bin/ginstall) # if we are using OpenSolaris 112.if exists(/usr/bin/ginstall) # if we are using OpenSolaris
65TOOLS_PLATFORM.install?= /usr/bin/ginstall 113TOOLS_PLATFORM.install?= /usr/bin/ginstall
66.else 114.else
67TOOLS_PLATFORM.install?= /usr/ucb/install 115TOOLS_PLATFORM.install?= /usr/ucb/install
68.endif 116.endif
69TOOLS_PLATFORM.ln?= /usr/bin/ln 117TOOLS_PLATFORM.ln?= /usr/bin/ln
70TOOLS_PLATFORM.ls?= /usr/bin/ls 118TOOLS_PLATFORM.ls?= /usr/bin/ls
71TOOLS_PLATFORM.m4?= /usr/ccs/bin/m4 119TOOLS_PLATFORM.m4?= /usr/ccs/bin/m4
72TOOLS_PLATFORM.mail?= /usr/bin/mailx 120TOOLS_PLATFORM.mail?= /usr/bin/mailx
 121.if exists(/usr/bin/makeinfo)
 122TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo
 123.endif
73TOOLS_PLATFORM.mkdir?= /usr/bin/mkdir -p 124TOOLS_PLATFORM.mkdir?= /usr/bin/mkdir -p
74.if exists(/usr/bin/mktemp) 125.if exists(/usr/bin/mktemp)
75TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp 126TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp
76.endif 127.endif
77TOOLS_PLATFORM.mv?= /usr/bin/mv 128TOOLS_PLATFORM.mv?= /usr/bin/mv
78TOOLS_PLATFORM.nice?= /usr/xpg4/bin/nice 129TOOLS_PLATFORM.nice?= /usr/xpg4/bin/nice
79.if exists(/usr/bin/nroff) 130.if exists(/usr/bin/gnroff)
80TOOLS_PLATFORM.nroff?= /usr/bin/nroff 131TOOLS_PLATFORM.nroff?= /usr/bin/gnroff
81.endif 132.endif
82.if exists(/usr/bin/openssl) 133.if exists(/usr/bin/openssl)
83TOOLS_PLATFORM.openssl?= /usr/bin/openssl 134TOOLS_PLATFORM.openssl?= /usr/bin/openssl
84.endif 135.endif
85.if exists(/usr/bin/gpatch) 136.if exists(/usr/bin/gpatch)
 137TOOLS_PLATFORM.gpatch?= /usr/bin/gpatch
86TOOLS_PLATFORM.patch?= /usr/bin/gpatch 138TOOLS_PLATFORM.patch?= /usr/bin/gpatch
87.endif 139.endif
 140.if exists(/usr/bin/perl)
 141TOOLS_PLATFORM.perl?= /usr/bin/perl
 142TOOLS_PLATFORM.pod2man?= /usr/perl5/bin/pod2man
 143.endif
 144.if exists(/usr/bin/pkg-config)
 145TOOLS_PLATFORM.pkg-config?= /usr/bin/pkg-config
 146.endif
88TOOLS_PLATFORM.printf?= /bin/printf 147TOOLS_PLATFORM.printf?= /bin/printf
89TOOLS_PLATFORM.pwd?= /bin/pwd 148TOOLS_PLATFORM.pwd?= /bin/pwd
 149.if exists(/usr/gnu/bin/readelf)
 150TOOLS_PLATFORM.readelf?= /usr/gnu/bin/readelf
 151.endif
90TOOLS_PLATFORM.rm?= /usr/bin/rm 152TOOLS_PLATFORM.rm?= /usr/bin/rm
91TOOLS_PLATFORM.rmdir?= /usr/bin/rmdir 153TOOLS_PLATFORM.rmdir?= /usr/bin/rmdir
92.if exists(/bin/sdiff) 154.if exists(/usr/bin/gsdiff)
93TOOLS_PLATFORM.sdiff?= /bin/sdiff 155TOOLS_PLATFORM.sdiff?= /usr/bin/gsdiff
94.elif exists(/usr/bin/sdiff) 156.else
95TOOLS_PLATFORM.sdiff?= /usr/bin/sdiff 157TOOLS_PLATFORM.sdiff?= /usr/bin/sdiff
96.endif 158.endif
 159.if exists(/usr/gnu/bin/sed)
 160TOOLS_PLATFORM.sed?= /usr/gnu/bin/sed
 161.endif
97TOOLS_PLATFORM.sh?= /bin/ksh 162TOOLS_PLATFORM.sh?= /bin/ksh
98TOOLS_PLATFORM.sleep?= /bin/sleep 163TOOLS_PLATFORM.sleep?= /bin/sleep
99.if exists(/usr/bin/soelim) 164.if exists(/usr/bin/soelim)
100TOOLS_PLATFORM.soelim?= /usr/bin/soelim 165TOOLS_PLATFORM.soelim?= /usr/bin/soelim
101.endif 166.endif
102TOOLS_PLATFORM.sort?= /usr/bin/sort 167TOOLS_PLATFORM.sort?= /usr/bin/sort
103TOOLS_PLATFORM.strip?= /usr/ccs/bin/strip 168TOOLS_PLATFORM.strip?= /usr/ccs/bin/strip
104TOOLS_PLATFORM.tail?= /usr/xpg4/bin/tail 169TOOLS_PLATFORM.tail?= /usr/xpg4/bin/tail
105.if exists(/usr/bin/tbl) 170.if exists(/usr/bin/tbl)
106TOOLS_PLATFORM.tbl?= /usr/bin/tbl 171TOOLS_PLATFORM.tbl?= /usr/bin/tbl
107.endif 172.endif
108TOOLS_PLATFORM.tee?= /usr/bin/tee 173TOOLS_PLATFORM.tee?= /usr/bin/tee
109TOOLS_PLATFORM.test?= test # shell builtin 174TOOLS_PLATFORM.test?= test # shell builtin
 175.if exists(/usr/bin/texi2html)
 176TOOLS_PLATFORM.texi2html?= /usr/bin/texi2html
 177.endif
110TOOLS_PLATFORM.touch?= /usr/bin/touch 178TOOLS_PLATFORM.touch?= /usr/bin/touch
111TOOLS_PLATFORM.tr?= /usr/bin/tr 179TOOLS_PLATFORM.tr?= /usr/xpg4/bin/tr
112TOOLS_PLATFORM.true?= true # shell builtin 180TOOLS_PLATFORM.true?= true # shell builtin
113TOOLS_PLATFORM.tsort?= /usr/ccs/bin/tsort 181TOOLS_PLATFORM.tsort?= /usr/ccs/bin/tsort
 182.if exists(/usr/bin/unzip)
 183TOOLS_PLATFORM.unzip?= /usr/bin/unzip
 184.endif
114TOOLS_PLATFORM.wc?= /usr/bin/wc 185TOOLS_PLATFORM.wc?= /usr/bin/wc
115TOOLS_PLATFORM.xargs?= /usr/bin/xargs 186TOOLS_PLATFORM.xargs?= /usr/bin/xargs
 187.if exists(/usr/bin/yacc)
 188TOOLS_PLATFORM.yacc?= /usr/bin/yacc
 189.endif