# $Id$ PNAME="coreutils" PVER="8.30" PBUILD="r1" PCAT="sys-apps" 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.9 >= dev-libs/gmp-5 >= sys-dev/gettext-0.18 >= sys-apps/acl-2.2 >= sys-apps/attr-2.4 >= sys-libs/libcap-2.22 >= sys-libs/pam-1.1" SDEPEND=">= sys-dev/automake-3 >= sys-dev/autoconf-4 >= sys-dev/m4-1.4" SRCFILE="${PNAME}-${PVER}.tar.xz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( gnu://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-5.94-more-dir-colors.patch ) UP2DATE="updatecmd_gnu ${PNAME} xz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # generic patches mpatch ${PNAME}-5.94-more-dir-colors.patch || 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 } src_compile() { cd ${SRCDIR} # ignore root check FORCE_UNSAFE_CONFIGURE=1 \ mconfigure \ --libexecdir=/usr/$(mlibdir)/${PNAME} \ --enable-largefile \ --enable-nls \ --enable-acl \ --enable-xattr \ --enable-libcap \ --enable-pam \ --enable-install-program=arch \ || die mmake -j1 || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die mlink test /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 }