Magellan Linux

Contents of /branches/R11-stable/extras/ccache/ccache-3.1.9-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 15816 - (show annotations) (download)
Thu Jan 10 09:51:29 2013 UTC (11 years, 10 months ago) by niro
File size: 1765 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="ccache"
4 PVER="3.1.9"
5 PBUILD="r1"
6
7 PCAT="dev-util"
8
9 DESCRIPTION="ccache is a caching pre-processor for C/C++ compilers."
10 HOMEPAGE="http://ccache.samba.org/"
11
12 DEPEND=">= virtual/glibc
13 >= sys-libs/zlib-1.2.5"
14
15 SRCFILE="${PNAME}-${PVER}.tar.xz"
16 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
17
18 CCC_REV=1.2
19
20 sminclude mbuild mtools
21
22 SRC_URI=(
23 http://samba.org/ftp/${PNAME}/${SRCFILE}
24 mirror://${PNAME}/${SRCFILE}
25 mirror://${PNAME}/ccache-config-${CCC_REV}
26 )
27
28 UP2DATE="updatecmd 'http://www.samba.org/ftp/ccache/?C=M;O=A' | lasttarball xz"
29
30 src_install()
31 {
32 cd ${SRCDIR}
33 mmake DESTDIR=${BINDIR} install || die
34
35 # bins
36 minstallexec -s ccache-config-${CCC_REV} /usr/bin/ccache-config || die
37
38 # fix hardcoded libdir
39 sed -i "/^LIBDIR=/s:lib:$(mlibdir):" ${BINDIR}/usr/bin/ccache-config || die
40
41 # special needed directories
42 mkeepdir /root/.ccache || die
43 mchmod 0700 /root/.ccache || die
44 }
45
46 postinstall()
47 {
48 if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
49 then
50 echo "Setting up ccache with system compiler ..."
51 /usr/bin/ccache-config --install-links
52 /usr/bin/ccache-config --install-links ${CHOST}
53 else
54 echo "Please enter chroot of ${MROOT} and run:"
55 echo " /usr/bin/ccache-config --install-links"
56 echo " /usr/bin/ccache-config --install-links ${CHOST}"
57 echo "to complete the installation."
58 fi
59
60 echo
61 echo "Please setup your maximum compiler cache."
62 echo "This sets up a cache with 2GB space:"
63 echo " 'ccache -M 2G'"
64 echo
65 echo "To use ccache with smage, edit your /etc/mage.conf"
66 echo "and add the feature 'ccache' to MAGE_FEATURES."
67 echo "Be sure that your mage version is not prior >= mage-0.4.82."
68 echo
69 echo "If you are upgrading from an older version than 3.x you should clear"
70 echo "all of your caches:"
71 echo " 'ccache -C'"
72 echo
73 }