# $Id$ PNAME="ccache" PVER="3.5" PBUILD="r1" PCAT="dev-util" DESCRIPTION="ccache is a caching pre-processor for C/C++ compilers." HOMEPAGE="http://ccache.samba.org/" DEPEND=">= virtual/glibc >= sys-libs/zlib-1.2.8" SRCFILE="${PNAME}-${PVER}.tar.xz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" CCC_REV=1.3 msetfeature "!check" # fix me sminclude mbuild mtools SRC_URI=( http://samba.org/ftp/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/ccache-config-${CCC_REV} ) UP2DATE="updatecmd http://www.samba.org/ftp/ccache/ | highesttarball xz" src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die # bins minstallexec -s ccache-config-${CCC_REV} /usr/bin/ccache-config || die # fix hardcoded libdir sed -i "/^LIBDIR=/s:lib:$(mlibdir):" ${BINDIR}/usr/bin/ccache-config || die # special needed directories mkeepdir /root/.ccache || die mchmod 0700 /root/.ccache || die } postinstall() { if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] then echo "Setting up ccache with system compiler ..." /usr/bin/ccache-config --install-links /usr/bin/ccache-config --install-links ${CHOST} else echo "Please enter chroot of ${MROOT} and run:" echo " /usr/bin/ccache-config --install-links" echo " /usr/bin/ccache-config --install-links ${CHOST}" echo "to complete the installation." fi echo echo "Please setup your maximum compiler cache." echo "This sets up a cache with 2GB space:" echo " 'ccache -M 2G'" echo echo "To use ccache with smage, edit your /etc/mage.conf" echo "and add the feature 'ccache' to MAGE_FEATURES." echo "Be sure that your mage version is not prior >= mage-0.4.82." echo echo "If you are upgrading from an older version than 3.x you should clear" echo "all of your caches:" echo " 'ccache -C'" echo }