diff options
-rw-r--r-- | bootstrap/README.IRIX5.3 | 70 | ||||
-rwxr-xr-x | bootstrap/bootstrap | 41 |
2 files changed, 47 insertions, 64 deletions
diff --git a/bootstrap/README.IRIX5.3 b/bootstrap/README.IRIX5.3 index dc635696471..a90ce6038aa 100644 --- a/bootstrap/README.IRIX5.3 +++ b/bootstrap/README.IRIX5.3 @@ -1,4 +1,4 @@ -$NetBSD: README.IRIX5.3,v 1.3 2006/08/05 14:57:19 schwarz Exp $ +$NetBSD: README.IRIX5.3,v 1.4 2006/08/26 15:42:27 schwarz Exp $ Installing pkgsrc on IRIX 5.3 requires some preparation. First, if necessary, get the IRIX 5.3 IDO (cc etc.) from SGI at @@ -14,23 +14,12 @@ Furthermore, get Y2k patches from e.g. ftp://ftp.mayn.de/pub/really_old_stuff/irix/oldstuff/ if you haven't installed them already. -To date, pkgsrc expects the SGI IDO cc and might run into problems when -using gcc. -With IDO cc and the necessary supporting tools and development files -installed you can run bootstrap to create the essential pkgsrc tools, -notably bmake. Once this is done you will find mk.conf.example to start -your mk.conf pkgsrc configuration file from. You might want to add -CFLAGS+=-O2 (or if you are using an R4K machine -O2 -mips2) -and -DBG= - Unfortunately many of IRIX 5.3's native tools do not provide functionalitites that pkgsrc expects. It is therefore necessary to install the respective GNU tools for cp, grep, id, mkdir, test, touch, which, and xargs. To avoid conflicts you might want to do so under a different -directory hierarchy than pkgsrc (in the following example ---prefix=/usr/local is assumed). Obtain and install the following GNU -software: +directory hierarchy than pkgsrc (in the following example /usr/local is +assumed). Obtain and install the following GNU software: - GNU findutils (4.2.23 is known to install) - GNU grep (2.5.1a works, but you have to apply the patch from pkgsrc/textproc/grep/patches/patch-ab; either do so manually by editing the @@ -42,50 +31,23 @@ makeinfo; just proceed with make install) configure) - GNU which (2.16 works; be sure to configure with CC="cc -Xcpluscomm") -These tools can be installed independently of bootstrapping. To make them -accessible to pkgsrc make sure your mk.conf contains something like this: +To date, pkgsrc expects the SGI IDO cc and might run into problems when +using gcc. +With IDO cc and the necessary supporting tools and development files +installed you can run bootstrap to create the essential pkgsrc tools, +notably bmake: + +env CP=/usr/local/bin/cp GREP=/usr/local/bin/grep ID=/usr/local/bin/id MKDIR="/usr/local/bin/mkdir -p" TEST=/usr/local/bin/test TOUCH=/usr/local/bin/touch XARGS="/usr/local/bin/xargs -r" ./bootstrap + +Add the nedessary arguments such as --prefix= as necessary. +You might also want to set the CFLAGS, CPPFLAGS, or LDFLAGS. +For the IDO cc CFLAGS=-O2 (or CFLAGS="-O2 -mips2" if you are using an R4K +machine) is recommended. -.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}id) -TOOLS_PLATFORM.id=${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}id -.else -TOOLS_PLATFORM.id=/usr/local/bin/id -.endif -.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}mkdir) -TOOLS_PLATFORM.mkdir=${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}mkdir -p -.else -TOOLS_PLATFORM.mkdir=/usr/local/bin/mkdir -p -.endif -.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}grep) -TOOLS_PLATFORM.grep=${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}grep -.else -TOOLS_PLATFORM.grep=/usr/local/bin/grep -.endif -.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}cp) -TOOLS_PLATFORM.cp=${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}cp -.else -TOOLS_PLATFORM.cp=/usr/local/bin/cp -.endif -.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}test) -TOOLS_PLATFORM.test=${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}test -.else -TOOLS_PLATFORM.test=/usr/local/bin/test -.endif -.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}touch) -TOOLS_PLATFORM.touch=${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}touch -.else -TOOLS_PLATFORM.touch=/usr/local/bin/touch -.endif -.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}xargs) -TOOLS_PLATFORM.xargs=${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}xargs -r -.else -TOOLS_PLATFORM.xargs=/usr/local/bin/xargs -r -.endif -TYPE=/usr/local/bin/which - IRIX 5.3 IDO does not come with a C++ compiler. For packages that require C++ you can get the GNU C++ compiler, g++, which is part of the gcc distribution. Gcc 3.4.4 is known to bootstrap on IRIX 5.3. To activate it, -add the following lines to your mk.conf: +add the following lines to your mk.conf after bootstrapping: CXX=g++ USE_TOOLS+=cxx diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 6c4d1a1a55b..ba4f2a53ac1 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.80 2006/08/20 14:25:22 schwarz Exp $ +# $NetBSD: bootstrap,v 1.81 2006/08/26 15:42:27 schwarz Exp $ # # # Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved. @@ -35,6 +35,11 @@ # #set -x +# the following environment variables are honored: +# compiler/linker flags: CFLAGS, CPPFLAGS, LDFLAGS +# tools: CP, GREP, ID, MKDIR, TEST, TOUCH, XARGS + + BOOTSTRAP_VERSION=20060721 ignorecasecheck=no @@ -193,7 +198,7 @@ opsys_finish() is_root() { if [ `uname -s` = "IRIX" ]; then - if [ `uname -r` -lt 6 ]; then + if [ `uname -r` -lt 6 -a -z "$ID" ]; then # older version of IRIX have an id command with limited features if [ "`$idprog`" != "uid=0(root) gid=0(sys)" ]; then return 0 @@ -394,9 +399,8 @@ IRIX*) need_mkdir=yes # IRIX 5 does not have uint32_t typedef'd in sys/types.h tnftpxflags="-DUINT32_T=int" -# IRIX 5 is lacking fnmatch.h and regex.h, both provided by libnbcompat +# IRIX 5 is lacking fnmatch.h needed to build mtree needfnmatchh=yes - needregexh=yes fi ;; Linux) @@ -550,8 +554,16 @@ fi check_prog awkprog awk check_prog chmodprog chmod -check_prog cpprog cp -check_prog idprog id +if [ -n "$CP" ]; then + cpprog="$CP" +else + check_prog cpprog cp +fi +if [ -n "$ID" ]; then + idprog="$ID" +else + check_prog idprog id +fi check_prog groupsprog groups check_prog lnprog ln check_prog lsprog ls @@ -661,9 +673,6 @@ run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure -C --prefix=$prefix --mand if [ x"$needfnmatchh" = x"yes" ]; then $lnprog -s nbcompat/fnmatch.h $wrkdir/libnbcompat/fnmatch.h fi -if [ x"$needregexh" = x"yes" ]; then - $lnprog -s nbcompat/regex.h $wrkdir/libnbcompat/regex.h -fi # set up an example mk.conf file MKCONF_EXAMPLE=${wrkdir}/mk.conf.example @@ -741,7 +750,7 @@ if [ "$need_fixed_strip" = "yes" ] ; then need_extras=yes fi -if [ "$need_mkdir" = "yes" ]; then +if [ "$need_mkdir" = "yes" -a -z "$MKDIR" ]; then echo_msg "Installing fixed mkdir script \"mkdir-sh\"" run_cmd "$install_sh -c -o $user -g $group -m 755 $pkgsrcdir/pkgtools/bootstrap-extras/files/mkdir-sh $prefix/bin/mkdir-sh" echo "TOOLS_PLATFORM.mkdir?= $prefix/bin/mkdir-sh -p" >> ${MKCONF_EXAMPLE} @@ -836,6 +845,18 @@ echo_msg "Installing pkgtools" copy_src $pkgsrcdir/pkgtools/pkg_install/files pkg_install run_cmd "(cd $wrkdir/pkg_install; env $BSTRAP_ENV CPPFLAGS='$CPPFLAGS -I../libnbcompat -I../../libnbcompat' LDFLAGS='$LDFLAGS -L../libnbcompat -L../../libnbcompat' LIBS='-lnbcompat' $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir --with-pkgdbdir=$pkgdbdir --mandir=$mandir $pkg_install_args && $bmake && $bmake install)" +# preserve compiler and tool environment variables settings +test -z "$CP" || echo "TOOLS_PLATFORM.cp?= $CP" >> ${MKCONF_EXAMPLE} +test -z "$GREP" || echo "TOOLS_PLATFORM.grep?= $GREP" >> ${MKCONF_EXAMPLE} +test -z "$ID" || echo "TOOLS_PLATFORM.id?= $ID" >> {MKCONF_EXAMPLE} +test -z "$MKDIR" || echo "TOOLS_PLATFORM.mkdir?= $MKDIR" >> ${MKCONF_EXAMPLE} +test -z "$TEST" || echo "TOOLS_PLATFORM.test?= $TEST" >> ${MKCONF_EXAMPLE} +test -z "$TOUCH" || echo "TOOLS_PLATFORM.touch?= $TOUCH" >> ${MKCONF_EXAMPLE} +test -z "$XARGS" || echo "TOOLS_PLATFORM.xargs?= $XARGS" >> ${MKCONF_EXAMPLE} +test -z "$CFLAGS" || echo "CFLAGS+= $CFLAGS" >> ${MKCONF_EXAMPLE} +test -z "$CPPFLAGS" || echo "CPPFLAGS+= $CPPFLAGS" >> ${MKCONF_EXAMPLE} +test -z "$LDFLAGS" || echo "LDFLAGS+= $LDFLAGS" >> ${MKCONF_EXAMPLE} + # opsys specific fiddling opsys_finish |