#!/bin/bash EZM3_VER=1.1 cd /usr/local/src/ezm3 source ./scripts/arch || exit 1 source ./scripts/helper-funcs || exit 1 ROOT=/usr/local/src/ezm3/root/${ARCH} mkdir -p ${ARCH} cd ${ARCH} LOG=${PWD}/log ########## # Unpack/setup the appropriate sources ########## status "Unpacking ezm3-${EZM3_VER} source" rm -rf ezm3-${EZM3_VER} tar -jxf /usr/portage/distfiles/ezm3-${EZM3_VER}-src.tar.bz2 cd ezm3-${EZM3_VER} status "Adding support for ${ARCH}" patch -p1 < ../../patches/${ARCH}.patch >& ${LOG} || die "patch1 failed" ########## # Build the bootstrap stuff ########## status "Building bootstrap for ${ARCH}" export PATH="${ROOT}/bin:${PATH}" cd language/modula3/m3compiler/m3bootstrap ( m3build -DBOOTTARGET=${ARCH} >& ${LOG} \ && echo yes > status \ || echo no > status ) & touch ${LOG} last="" while [ ! -e status ] ; do this="`grep ^---------- ${LOG} | tail -n 1 | sed 's:----------::g'`" if [ "${this}" != "${last}" ] ; then last="${this}" status "${last}" fi sleep 1 done if [ "$(