#!/bin/sh # Built on TCL v3.5.1 # Required extensions: # compiletc # binutils # base-dev # bison # diffutils # file # findutils # flex # gawk # gcc # gcc_libs # cloog # ppl # gmp # mpfr # gperf # grep # m4 # make # patch # pkg-config # sed # squashfs-tools-4.x # tar # tcl-dev # tcl # expect getTime.sh installExtension() { if [ ! -e /usr/local/tce.installed/$1 ]; then echo "Installing "$1" ..." if [ -e $TCEDIR/optional/$1.tcz ]; then tce-load -i $1 else tce-load -wi $1 fi [ ! -e /usr/local/tce.installed/$1 ] && echo "Error: Extension "$1" not installed! Aborting" && exit fi } createExtension() { mksquashfs $1 $1.tcz -noappend [ ! -e $1.tcz ] && echo "Error: "$1".tcz not created! Aborting" && exit } unpackSrc() { #unpack source if [ -e $1.tar.bz2 ]; then tar -jxf $1.tar.bz2 elif [ -e $1.tb2 ]; then tar -jxf $1.tb2 elif [ -e $1.tbz ]; then tar -jxf $1.tbz elif [ -e $1.tar.gz ]; then tar -zxf $1.tar.gz elif [ -e $1.tgz ]; then tar -zxf $1.tgz elif [ -e $1.tar.xz ]; then tar -Jxf $1.tar.xz elif [ -e $1.txz ]; then tar -Jxf $1.txz elif [ -e $1.tar.lzma ]; then tar -xf $1.tar.lzma --lzma elif [ -e $1.tlz ]; then tar -xf $1.tlz --lzma else echo "Source "$1" not found! Aborting" && exit fi } # Install these extensions automagically export EXTS="compiletc squashfs-tools-4.x tar tcl-dev expect" export TCEDIR=`cat /opt/.tce_dir` export CFLAGS="-march=i486 -mtune=i686 -Os -pipe" export CXXFLAGS=$CFLAGS" -fno-exceptions -fno-rtti" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig export EXTNAME="dejagnu" export VER="-1.5" export DESTDIR=`pwd`/$EXTNAME export PKGNAME=$EXTNAME$VER for f in $EXTS; do installExtension $f done unpackSrc $PKGNAME cd $EXTNAME$VER ./configure --with-tclinclude=/usr/local/bin && make && make check 2>&1 | tee ../$EXTNAME.test && make install-strip || exit cd $DESTDIR rm -rf usr/local/man cd .. createExtension $EXTNAME rm -rf $PKGNAME $EXTNAME # Create extension support files and test installExtension "submitqc" submitqc