# $Id$ PNAME="ccache" PVER="2.4" PBUILD="r9" PCATEGORIE="dev-util" STATE="unstable" DESCRIPTION="ccache is a caching pre-processor for C/C++ compilers." HOMEPAGE="http://ccache.samba.org/" DEPEND=">= virtual/glibc" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools SRC_URI=( http://samba.org/ftp/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/ccache-config ) UP2DATE="updatecmd ${HOMEPAGE} | grep latest | sed 's/.* \(.*\)\./\1/;q'" src_install() { cd ${SRCDIR} # special needed directories mkeepdir /usr/$(mlibdir)/ccache/bin || die mkeepdir /root/.ccache || die mchmod 0700 /root/.ccache || die # bins minstallexec ccache || die minstallexec -s ccache-config || die # fix libdir on 64bit arches if [[ $(mlibdir) != lib ]] then sed -i "s:/usr/lib/ccache:/usr/$(mlibdir)/ccache:g" \ ${BINDIR}/usr/bin/ccache-config || die fi # man minstallman ccache.1 || die # docs minstalldocs README || die minstallhtml web/*.html || 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 'SMAGE_USE_CCACHE=true'." echo "Be sure that your mage version is not prior >= mage-0.3.6-r6." echo }