Magellan Linux

Contents of /branches/magellan-next/extras/ccache/ccache-3.1.5-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9874 - (show annotations) (download)
Sat Jan 14 00:57:34 2012 UTC (12 years, 4 months ago) by niro
File size: 1824 byte(s)
auto added: ver bump to 3.1.5-r2
1 # $Id$
2
3 PNAME="ccache"
4 PVER="3.1.5"
5 PBUILD="r2"
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.bz2"
16 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
17
18 sminclude mbuild mtools
19
20 SRC_URI=(
21 http://samba.org/ftp/${PNAME}/${SRCFILE}
22 mirror://${PNAME}/${SRCFILE}
23 mirror://${PNAME}/ccache-config
24 )
25
26 UP2DATE="updatecmd ${HOMEPAGE} | grep latest | sed 's/.* \(.*\)\./\1/;q'"
27
28 src_install()
29 {
30 cd ${SRCDIR}
31 mmake DESTDIR=${BINDIR} install || die
32
33 # bins
34 minstallexec -s ccache-config || die
35
36 # fix hardcoded libdir
37 sed -i "s:/usr/lib/ccache:/usr/$(mlibdir)/ccache:g" \
38 ${BINDIR}/usr/bin/ccache-config || die
39
40 # needed to run ccache-config
41 mkeepdir /usr/$(mlibdir)/cache || die
42 mkeepdir /usr/$(mlibdir)/cache/bin || die
43
44 # special needed directories
45 mkeepdir /root/.ccache || die
46 mchmod 0700 /root/.ccache || die
47 }
48
49 postinstall()
50 {
51 if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
52 then
53 echo "Setting up ccache with system compiler ..."
54 /usr/bin/ccache-config --install-links
55 /usr/bin/ccache-config --install-links ${CHOST}
56 else
57 echo "Please enter chroot of ${MROOT} and run:"
58 echo " /usr/bin/ccache-config --install-links"
59 echo " /usr/bin/ccache-config --install-links ${CHOST}"
60 echo "to complete the installation."
61 fi
62
63 echo
64 echo "Please setup your maximum compiler cache."
65 echo "This sets up a cache with 2GB space:"
66 echo " 'ccache -M 2G'"
67 echo
68 echo "To use ccache with smage, edit your /etc/mage.conf"
69 echo "and add 'SMAGE_USE_CCACHE=true'."
70 echo "Be sure that your mage version is not prior >= mage-0.3.6-r6."
71 echo
72 echo "If you are upgrading from an older version than 3.x you should clear"
73 echo "all of your caches:"
74 echo " 'ccache -C'"
75 echo
76 }