summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorschwarz <schwarz@pkgsrc.org>2006-04-10 13:29:38 +0000
committerschwarz <schwarz@pkgsrc.org>2006-04-10 13:29:38 +0000
commit89bda489cdba150663005df18525b442d892c7bc (patch)
treee5397d415cda43029bcd919841a5c33ad6da9cb3 /bootstrap
parent7d455417201a0c368cd39afce5cd98130adc2aca (diff)
downloadpkgsrc-89bda489cdba150663005df18525b442d892c7bc.tar.gz
added bootstrap support for IRIX 5.3 (finally :-))
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/README.IRIX5.394
-rwxr-xr-xbootstrap/bootstrap65
-rwxr-xr-xbootstrap/files/fakeldd2
-rw-r--r--bootstrap/files/irix.patch40
4 files changed, 146 insertions, 55 deletions
diff --git a/bootstrap/README.IRIX5.3 b/bootstrap/README.IRIX5.3
new file mode 100644
index 00000000000..f7d2dbb417f
--- /dev/null
+++ b/bootstrap/README.IRIX5.3
@@ -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 --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index c11bf730c3c..1b482b9d68e 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -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 @@ get_abi()
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 @@ get_abi()
abi="64"
;;
esac
-
-
+ else # IRIX before 6
+ abi=32
+ fi
;;
esac
}
@@ -165,15 +167,14 @@ opsys_finish()
{
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 @@ opsys_finish()
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 @@ copy_src()
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 @@ fi
overpath=""
root_user=root
+bmakexenv=
+bmakexargs=
+tnftpxenv=
+digestxenv=
case "$opsys" in
Darwin)
root_group=wheel
@@ -336,6 +350,15 @@ IRIX*)
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 chmodprog chmod
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 @@ if [ x"$check_compiler" = x"yes" ]; then
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 @@ echo_msg "Building libnbcompat"
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 @@ yes)
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 @@ echo "FETCH_CMD=$prefix/bin/ftp" >> ${MKCONF_EXAMPLE}
# 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 --git a/bootstrap/files/fakeldd b/bootstrap/files/fakeldd
new file mode 100755
index 00000000000..727f9ba8c1c
--- /dev/null
+++ b/bootstrap/files/fakeldd
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/elfdump -Dl $* | /usr/bin/nawk 'NF == 7 || NF == 8 {printf "x x %s\n",$1}'
diff --git a/bootstrap/files/irix.patch b/bootstrap/files/irix.patch
deleted file mode 100644
index 6ef73048b0e..00000000000
--- a/bootstrap/files/irix.patch
+++ /dev/null
@@ -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
- #ifdef UseInstalled
- MANUSR = /usr/share/local
- #else
- MANUSR = /usr/share
-+#endif
-+#else
-+ MANUSR = ManUsr
- #endif
-
- CATMAN1DIR = $(MANUSR)/catman/u_man/cat1