# $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-tar/toolchain-tar-1.15.1-r1.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ PNAME="toolchain-tar" PVER="1.15.1" PBUILD="r1" SRCFILE="tar-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/tar-${PVER}" SRC_URI=( mirror://tar/${SRCFILE} mirror://tar/tar-${PVER}-sparse_fix-1.patch ) ## global toolchain var ## # export CFLAGS, CHOST, TOOLCHAIN_PREFIX export CFLAGS="-mtune=i486 -Os -pipe" export CXXFLAGS="${CFLAGS}" export TOOLCHAIN_PREFIX="/tools" zapmost() { local rootdir rootdir="${1}/" [ ! -e "$rootdir" ] && echo "zapmost: $rootdir not found; skipping..." && return 1 install -d ${BUILDDIR}/zap local dirs shift local x for x in ${*} do if [ "${x##*/}" = "${x}" ] then #one deep mv ${rootdir}${x} ${BUILDDIR}/zap else #more than one deep; create intermediate directories dirs=${x%/*} install -d ${BUILDDIR}/zap/${dirs} mv ${rootdir}${x} ${BUILDDIR}/zap/${x} fi done rm -rf ${rootdir}* mv ${BUILDDIR}/zap/* ${rootdir} } src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fixes the -S bug with files > 4GB mpatch -Np1 tar-${PVER}-sparse_fix-1.patch || die } src_compile() { cd ${SRCDIR} ./configure \ --host=${CHOST} \ --prefix=${TOOLCHAIN_PREFIX} \ --disable-dependency-tracking \ --disable-nls \ || die mmake || die } src_install() { cd ${SRCDIR} make DESTDIR=${BINDIR} install || die # remove unwanted stuff KEEPFILES="bin/tar" zapmost ${BINDIR}/${TOOLCHAIN_PREFIX} ${KEEPFILES} || die }