pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap added bootstrap support for IRIX 5.3 (finall...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cdfee03ba96a
branches:  trunk
changeset: 511155:cdfee03ba96a
user:      schwarz <schwarz%pkgsrc.org@localhost>
date:      Mon Apr 10 13:29:38 2006 +0000

description:
added bootstrap support for IRIX 5.3 (finally :-))

diffstat:

 bootstrap/README.IRIX5.3   |  94 ++++++++++++++++++++++++++++++++++++++++++++++
 bootstrap/bootstrap        |  65 ++++++++++++++++++++++++-------
 bootstrap/files/fakeldd    |   2 +
 bootstrap/files/irix.patch |  40 -------------------
 4 files changed, 146 insertions(+), 55 deletions(-)

diffs (truncated from 310 to 300 lines):

diff -r 47c126152dc6 -r cdfee03ba96a bootstrap/README.IRIX5.3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/bootstrap/README.IRIX5.3  Mon Apr 10 13:29:38 2006 +0000
@@ -0,0 +1,94 @@
+$NetBSD: README.IRIX5.3,v 1.1 2006/04/10 13:29:38 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
+ftp://ftp.sgi.com/sgi/IRIX5.3/iris-development-option-5.3.tardist and
+install it using IRIX's Software Manager. While you're at it you might also
+want to install any missing patches from ftp://ftp.sgi.com/support/Patches/5.3.
+Get ftp://ftp.mayn.de/pub/really_old_stuff/irix/ido/dev* and install the
+missing dev.sw.abi and dev.sw.irix_speclibs subpackages.
+Note that IRIX 5.3's ftp does not support passive ftp (to my knowledge), so
+if you are behind a firewall (and you better make sure you are with IRIX
+5.3!) you might need to first transfer the files to another local machine.
+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 differtent
+directory hierarchy than pkgsrc (in the following example
+--prefix=/usr/local is assumed). Obtain and install the following GNU
+software:
+- GNU findutils (4.2.23 is know 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
+appropriate source file or first install GNU patch [2.5.4 works fine]. This
+will probably be fixed with later releases. You should configure GNU grep
+with --disable-nls and do not bother when make stops when it cannot find
+makeinfo; just proceed with make install)
+- GNU coreutils (5.21 installs out of the box)
+- 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:
+
+.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:
+
+.if defined(USE_LANGUAGES) && !empty(USE_LANGUAGES:Mc++)
+CXX=g++
+USE_TOOLS+=cxx
+TOOLS_PLATFORM.cxx=/usr/local/bin/g++
+TOOLS_CMD.cxx=${TOOLS_DIR}/bin/g++
+.endif
diff -r 47c126152dc6 -r cdfee03ba96a bootstrap/bootstrap
--- a/bootstrap/bootstrap       Mon Apr 10 13:26:15 2006 +0000
+++ b/bootstrap/bootstrap       Mon Apr 10 13:29:38 2006 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.47 2005/12/17 17:51:40 jschauma Exp $
+# $NetBSD: bootstrap,v 1.48 2006/04/10 13:29:38 schwarz Exp $
 #
 #
 # Copyright (c) 2001-2002 Alistair G. Crooks.  All rights reserved.
@@ -109,6 +109,7 @@
        abi_opsys=$@
        case "$abi_opsys" in
        IRIX)
+               if [ `uname -r` -ge 6 ]; then
                abi=`sed -e 's/.*\(abi=\)\([on]*[36][24]\).*/\2/' /etc/compiler.defaults`
                isa=`sed -e 's/.*\(isa=mips\)\([1234]\).*/\2/' /etc/compiler.defaults`
                case "$abi" in
@@ -124,8 +125,9 @@
                        abi="64"
                        ;;
                esac
-
-
+               else # IRIX before 6
+               abi=32
+               fi
                ;;
        esac
 }
@@ -165,15 +167,14 @@
 {
        case "$opsys" in
        IRIX)
-               # setting X11BASE to /usr breaks buildlink
-               if [ ! -e /usr/X11R6 ]; then
-                       ln -sf /usr /usr/X11R6
-               fi
-               if [ ! -z $imakeopts ]; then
+               if [ ! -z "$imakeopts" ]; then
                        echo "IMAKEOPTS+=$imakeopts" >> ${MKCONF_EXAMPLE}
                fi
-               patch -d / --forward --quiet -E -p0 \
-                       < files/irix.patch 2>/dev/null || true
+               if [ `uname -r` -lt 6 ]; then
+                       echo_msg "Installing fake ldd script"
+                       run_cmd "$shprog $wrkdir/install-sh -c -o $user -g $group -m 755 files/fakeldd $prefix/sbin"
+                       echo "LDD=$prefix/sbin/fakeldd" >> ${MKCONF_EXAMPLE}
+               fi
                ;;
        OSF1)
                if [ ! -e /usr/X11R6 ]; then
@@ -185,6 +186,15 @@
 
 is_root()
 {
+       if [ `uname -s` = "IRIX" ]; then
+               if [ `uname -r` -lt 6 ]; then
+       # older version of IRIX have an id command with limited features
+                       if [ "`$idprog`" != "uid=0(root) gid=0(sys)" ]; then
+                               return 0
+                       fi
+                       return 1
+               fi
+       fi
        if [ `$idprog -u` != 0 ]; then
                return 0
        fi
@@ -218,7 +228,7 @@
        if [ ! -d $wrkdir/$_dst ]; then
                mkdir_p $wrkdir/$_dst
        fi
-       $cpprog -R $_src/* $wrkdir/$_dst
+       $cpprog -r $_src/* $wrkdir/$_dst
 }
 
 get_optarg()
@@ -278,6 +288,10 @@
 
 overpath=""
 root_user=root
+bmakexenv=
+bmakexargs=
+tnftpxenv=
+digestxenv=
 case "$opsys" in
 Darwin)
        root_group=wheel
@@ -336,6 +350,15 @@
        bmakexargs="MACHINE_ARCH=$machine_arch"
        bmakexenv="MAKE=pmake"
        check_compiler=yes
+       if [ `uname -r` -lt 6 ]; then
+# IRIX 5 does not have uint32_t typedef'd in sys/types.h
+               tnftpxenv="CPPFLAGS=-DUINT32_T=int"
+# IRIX 5 does not have snprintf() needed to compile digest
+               digestxenv="LDFLAGS=\"\$LDFLAGS -L../libnbcompat\" LIBS=-lnbcompat"
+# IRIX 5 is lacking fnmatch.h and regex.h, both provided by libnbcompat
+               needfnmatchh=yes
+               needregexh=yes
+       fi
        ;;
 Linux)
        if [ -f /etc/debian_version ]; then
@@ -468,6 +491,7 @@
 check_prog cpprog cp
 check_prog idprog id
 check_prog groupsprog groups
+check_prog lnprog ln
 check_prog lsprog ls
 check_prog rmdirprog rmdir
 check_prog sedprog sed
@@ -498,7 +522,11 @@
        else
                case "$opsys" in
                IRIX)
-                       compiler="mipspro"
+                       if [ `uname -r` -ge 6 ]; then
+                               compiler="mipspro"
+                       else
+                               compiler="ido"
+                       fi
                        ;;
                esac
        fi
@@ -564,6 +592,13 @@
 copy_src ../pkgtools/libnbcompat/files libnbcompat
 run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && make)"
 
+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
 export MKCONF_EXAMPLE
@@ -672,7 +707,7 @@
 esac
 echo_msg "Installing tnftp"
 copy_src ../net/tnftp/files tnftp
-run_cmd "(cd $wrkdir/tnftp; env $BSTRAP_ENV $shprog ./configure --prefix=$prefix --sysconfdir=$sysconfdir && make && (cd src && make install))"
+run_cmd "(cd $wrkdir/tnftp; env $BSTRAP_ENV $tnftpxenv $shprog ./configure --prefix=$prefix --sysconfdir=$sysconfdir && make && (cd src && make install))"
 pkg_install_args="$pkg_install_args --with-ftp=$prefix/bin/ftp"
 
 FETCH_CMD=$prefix/bin/ftp
@@ -682,10 +717,10 @@
 # bootstrap digest
 echo_msg "Installing digest"
 copy_src ../pkgtools/digest/files digest
-run_cmd "(cd $wrkdir/digest; env $BSTRAP_ENV $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && make && make install)"
+run_cmd "(cd $wrkdir/digest; env $BSTRAP_ENV $digestxenv $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && make && make install)"
 
 # create the digest package's meta files
-digestversion=digest-`$awkprog -F "'" '/^PACKAGE_VERSION=/ {print $2}' $wrkdir/digest/configure`
+digestversion=digest-`$awkprog -F\' '/^PACKAGE_VERSION=/ {print $2}' $wrkdir/digest/configure`
 $lsprog -ld $prefix/bin/digest | $awkprog '{ print $5 }' > $wrkdir/digest/.size
 env DIGESTPROG=$prefix/bin/digest PKG_DIGEST=md5 PKG_DBDIR=$pkgdbdir \
        $shprog ./pkg.sh create -d $wrkdir/digest/DESCR -O \
diff -r 47c126152dc6 -r cdfee03ba96a bootstrap/files/fakeldd
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/bootstrap/files/fakeldd   Mon Apr 10 13:29:38 2006 +0000
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/elfdump -Dl $* | /usr/bin/nawk 'NF == 7 || NF == 8 {printf "x x %s\n",$1}'
diff -r 47c126152dc6 -r cdfee03ba96a bootstrap/files/irix.patch
--- a/bootstrap/files/irix.patch        Mon Apr 10 13:26:15 2006 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-$NetBSD: irix.patch,v 1.1.1.1 2004/03/11 13:03:59 grant Exp $
-
---- /usr/lib/X11/config/X11.rules.orig Thu Jun 12 09:12:20 2003
-+++ /usr/lib/X11/config/X11.rules      Sun Jun  8 10:31:35 2003
-@@ -79,7 +79,7 @@
- #if UseInstalledX11 
- #if defined(X11ProjectRoot)
- # define X11BuildLibPath      $(XPROJECTROOT)/lib
--else
-+#else
- # define X11BuildLibPath        $(USRLIBDIR)
- #endif
- #elif ImportX11
---- /usr/lib/X11/config/sgi.cf.orig    Thu Jun 12 09:12:20 2003
-+++ /usr/lib/X11/config/sgi.cf         Sun Jun  8 12:55:50 2003
-@@ -241,7 +241,9 @@
-  * Actually, it doesn't matter what MakeCmd is, since we don't use it.
-  * We assume that $(MAKE) gets set for us by make.
-  */
-+#ifndef MakeCmd
- #define MakeCmd $(TOOLROOTSAFE) $(TOOLROOT)/sbin/make
-+#endif
- #define TroffCmd psroff -t
- 
- #define StandardIncludes -nostdinc -I$(ROOT)/usr/include
-@@ -320,10 +322,14 @@
- #define NroffFilemanDir $(MAN4DIR)$(MANPACKAGE)
- #define NroffMiscmanDir $(MAN5DIR)$(MANPACKAGE)
- 
-+#ifndef ManUsr



Home | Main Index | Thread Index | Old Index