# $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-util-linux/toolchain-util-linux-2.12q-r2.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ PNAME="toolchain-util-linux" PVER="2.12q" PBUILD="r2" SRCFILE="util-linux-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/util-linux-${PVER}" SRC_URI=( mirror://util-linux/${SRCFILE} mirror://util-linux/util-linux-2.11z-parallel-make.patch mirror://util-linux/no-symlink-resolve.patch mirror://util-linux/util-linux-2.11z-agetty-domainname-option.patch mirror://util-linux/util-linux-${PVER}-i18n-update.patch mirror://util-linux/util-linux-2.12i-nfsv4.patch mirror://util-linux/util-linux-2.12i-ignore-managed.patch mirror://util-linux/util-linux-2.12i-pic.patch mirror://util-linux/util-linux-2.12p-swapon-check-symlinks.patch mirror://util-linux/util-linux-${PVER}-cramfs-1.patch ) # needs: glibc, ncurses-5.2-r2 # build: sed, perl, gettext, kernel-headers #compile time: 0m58.893s (Athlon XP 1900+, 512mb DDR400) ## global toolchain var ## # export CFLAGS, CHOST, TOOLCHAIN_PREFIX export CFLAGS="-mtune=i486 -Os -pipe" export CXXFLAGS="${CFLAGS}" export TOOLCHAIN_PREFIX="/tools" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fixes parallel makes mpatch -Np1 util-linux-2.11z-parallel-make.patch || die # fixes some issues with devfs mpatch -Np1 no-symlink-resolve.patch || die # adds the -O option mpatch -Np1 util-linux-2.11z-agetty-domainname-option.patch || die # fix some typos in the french locale mpatch -Np0 util-linux-${PVER}-i18n-update.patch || die # add nfs4 support mpatch -Np1 util-linux-2.12i-nfsv4.patch || die # no kudzu manages (-> hal) mpatch -Np1 util-linux-2.12i-ignore-managed.patch || die # allows build with -fPIC mpatch -Np1 util-linux-2.12i-pic.patch || die # swap has issues with symlinks mpatch -Np1 util-linux-2.12p-swapon-check-symlinks.patch || die # fixes some compile issues with cramfs and >= linux-libc-headers-2.6.9 # note: will never be upstream mpatch -Np1 util-linux-${PVER}-cramfs-1.patch || die # fhs compatibility sed -i -e 's%etc/adjtime%var/lib/hwclock/adjtime%' hwclock/hwclock.c || die # force use of our ${CLFAGS} and man/info path fix sed -i \ -e "s:-pipe -O2 \$(CPUOPT) -fomit-frame-pointer:${CFLAGS}:" \ -e "s:CPU=.*:CPU=${CHOST%%-*}:" \ -e "s:usr/man:usr/share/man:" \ -e "s:usr/info:usr/share/info:" \ MCONFIG || die # disable build of nls sed -i -e 's/DISABLE_NLS=no/DISABLE_NLS=yes/' MCONFIG || die } src_compile() { cd ${SRCDIR} ./configure --host=${CHOST} || die # libs are needed to compile mount & more make -C lib || die # compile mount && more only make -C mount mount umount || die make -C text-utils more || die } src_install() { cd ${SRCDIR} # needed directories install -d ${BINDIR}${TOOLCHAIN_PREFIX}/bin || die install -m 0755 -o root -g root \ mount/{,u}mount text-utils/more \ ${BINDIR}${TOOLCHAIN_PREFIX}/bin || die }