# $Id: coreutils-7.6-r3.smage2 3616 2009-10-27 13:57:05Z niro $ PNAME="coreutils" PVER="8.7" PBUILD="r1" PCATEGORIE="sys-apps" STATE="unstable" DESCRIPTION="Standard GNU file utilities (chmod, cp, dd, dir, ls, etc)." HOMEPAGE="http://www.gnu.org/software/coreutils/coreutils.html" DEPEND=">= virtual/glibc >= sys-libs/ncurses-5.7" SDEPEND=">= sys-dev/automake-3 >= sys-dev/autoconf-4 >= sys-dev/m4-1.4 >= dev-libs/gmp-5 >= sys-dev/gettext-0.18" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" MCORE_ONLY_KEEP="bin/dircolors bin/install bin/ls usr/bin/mktemp bin/touch" sminclude mtools mcore-split SRC_URI=( gnu://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-5.94-more-dir-colors.patch ) UP2DATE="updatecmd_gnu ${PNAME} gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # generic patches mpatch ${PNAME}-5.94-more-dir-colors.patch || die # fix compilation with newer versions of glibc sed -i "s/futimens/gl_&/" $(grep -lr futimens *) || die if [[ -z $(which cvs 2>/dev/null) ]] then # fix issues with gettext's autopoint if cvs is not installed export AUTOPOINT="/bin/true" fi export WANT_AUTOMAKE=1.11 export WANT_AUTOCONF=2.5 aclocal -I m4 &>/dev/null || die autoconf || die automake || die } src_compile() { cd ${SRCDIR} mconfigure --enable-largefile --disable-nls --disable-acl --disable-xattr || die mmake || die } mcore_generic_src_install() { cd ${SRCDIR} # some needed directories minstalldir /usr/bin || die minstalldir /usr/sbin || die minstalldir /bin || die minstalldir /sbin || die make DESTDIR=${BINDIR} install-root || die make DESTDIR=${BINDIR} install || die mv ${BINDIR}/usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} ${BINDIR}/bin || die mv ${BINDIR}/usr/bin/{dir,dircolors,du,date,echo,false,head} ${BINDIR}/bin || die mv ${BINDIR}/usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} ${BINDIR}/bin || die # small dirty fix, after move 'mv' will not be found anymore mlink /bin/mv /usr/bin/mv || die mv ${BINDIR}/usr/bin/{rm,rmdir,shred,sync,sleep,stty,test} ${BINDIR}/bin || die mv ${BINDIR}/usr/bin/{touch,true,uname,vdir} ${BINDIR}/bin || die mv ${BINDIR}/usr/bin/chroot ${BINDIR}/sbin || die mlink test /bin/[ || die mlink ../../bin/install /usr/bin || die minstalldocs ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README THANKS TODO || die } # preinstall() # { # if [[ ! -z $(magequery -n mktemp) ]] # then # echo -e ${COLRED} # echo -e "Error: sys-apps/mktemp is installed!!" # echo -e "mktemp is now provided by coreutils and doesn't need an extra package anymore." # echo -e "Please uninstall sys-apps/mktemp first!" # echo -e ${COLDEFAULT} # die "sys-apps/mktemp found!" # fi # }