pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/bootstrap Added an option --compiler, which can be use...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/90644ce6d44a
branches:  trunk
changeset: 517017:90644ce6d44a
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Aug 02 23:43:47 2006 +0000

description:
Added an option --compiler, which can be used to override the automatic
compiler detection. This is needed for Solaris with SunPro at least,
since bootstrap tried to install gcc>=2.95.3 during the registration of
the bootstrap packages.

diffstat:

 bootstrap/bootstrap |  18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diffs (81 lines):

diff -r b9577b8906bb -r 90644ce6d44a bootstrap/bootstrap
--- a/bootstrap/bootstrap       Wed Aug 02 21:22:26 2006 +0000
+++ b/bootstrap/bootstrap       Wed Aug 02 23:43:47 2006 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.78 2006/07/24 07:57:45 rillig Exp $
+# $NetBSD: bootstrap,v 1.79 2006/08/02 23:43:47 rillig Exp $
 #
 #
 # Copyright (c) 2001-2002 Alistair G. Crooks.  All rights reserved.
@@ -59,6 +59,7 @@
     [ --ignore-case-check ]
     [ --ignore-user-check ]
     [ --preserve-path ]
+    [ --compiler <compiler> ]
     [ --full ]
     [ --help ]'
 
@@ -252,7 +253,9 @@
 pkgmandir=
 sysconfdir=
 varbase=
-full=
+
+full=no
+compiler=""
 
 while [ $# -gt 0 ]; do
        case $1 in
@@ -270,6 +273,8 @@
        --varbase)      varbase="$2"; shift ;;
        --fetch-cmd=*)  fetch_cmd=`get_optarg "$1"` ;;
        --fetch-cmd)    fetch_cmd="$a"; shift ;;
+       --compiler=*)   compiler=`get_optarg "$1"` ;;
+       --compiler)     compiler="$2"; shift ;;
        --ignore-case-check) ignorecasecheck=yes ;;
        --ignore-user-check) ignoreusercheck=yes ;;
        --preserve-path) preserve_path=yes ;;
@@ -441,6 +446,7 @@
        set_opsys=no
        whoamiprog=/usr/ucb/whoami
        machine_arch=`uname -p | sed -e 's/i86pc/i386/'`
+       check_compiler=yes
        ;;
 AIX)
        root_group=system
@@ -568,7 +574,7 @@
 fi
 echo "Working directory is: ${wrkdir}"
 
-if [ x"$check_compiler" = x"yes" ]; then
+if [ "$compiler" = "" ] && [ x"$check_compiler" = x"yes" ]; then
        get_compiler
        if [ $compiler_is_gnu -gt 0 ]; then
                compiler="gcc"
@@ -581,6 +587,8 @@
                                compiler="ido"
                        fi
                        ;;
+               SunOS)  compiler="sunpro"
+                       ;;
                esac
        fi
 fi
@@ -670,13 +678,13 @@
 if [ ! -z "$abi" ]; then
        echo "ABI=                      $abi" >> ${MKCONF_EXAMPLE}
 fi
-if [ ! -z "$compiler" ]; then
+if [ "$compiler" != "" ]; then
        echo "PKGSRC_COMPILER=  $compiler" >> ${MKCONF_EXAMPLE}
 fi
 
 # enable unprivileged builds if not root
 if [ "$ignoreusercheck" = "yes" ]; then
-       echo "UNPRIVILEGED=     yes" >> ${MKCONF_EXAMPLE}
+       echo "UNPRIVILEGED=             yes" >> ${MKCONF_EXAMPLE}
 fi
 
 # save environment in example mk.conf



Home | Main Index | Thread Index | Old Index