# $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-perl/toolchain-perl-5.8.6-r1.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ PNAME="toolchain-perl" PVER="5.8.6" PBUILD="r1" SRCFILE="perl-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/perl-${PVER}" SRC_URI=( mirror://perl/${SRCFILE} mirror://perl/perl-5.8.0-libc-3.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 } src_compile() { cd ${SRCDIR} # minimal static extensions: -Dstatic_ext='IO Fcntl POSIX' ./configure.gnu \ -Dhost=${CHOST} \ -Dtarget=${CHOST} \ -Darchname=${CHOST} \ -Doptimize="${CFLAGS}" \ -Dpager="/bin/less -isR" \ -Dcf_by='Magellan' \ --prefix=${TOOLCHAIN_PREFIX} \ -Dstatic_ext='IO Fcntl POSIX' \ || die make || die } src_install() { cd ${SRCDIR} make DESTDIR=${BINDIR} install || die }