Contents of /branches/magellan-next/extras/ccache/ccache-3.1.5-r1.smage2
Parent Directory | Revision Log
Revision 8015 -
(show annotations)
(download)
Tue Jun 28 21:28:44 2011 UTC (13 years, 3 months ago) by niro
File size: 1754 byte(s)
Tue Jun 28 21:28:44 2011 UTC (13 years, 3 months ago) by niro
File size: 1754 byte(s)
auto added: ver bump to 3.1.5-r1
1 | # $Id$ |
2 | |
3 | PNAME="ccache" |
4 | PVER="3.1.5" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="dev-util" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="ccache is a caching pre-processor for C/C++ compilers." |
11 | HOMEPAGE="http://ccache.samba.org/" |
12 | |
13 | DEPEND=">= virtual/glibc" |
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 libdir on 64bit arches |
37 | if [[ $(mlibdir) != lib ]] |
38 | then |
39 | sed -i "s:/usr/lib/ccache:/usr/$(mlibdir)/ccache:g" \ |
40 | ${BINDIR}/usr/bin/ccache-config || die |
41 | fi |
42 | |
43 | # special needed directories |
44 | mkeepdir /root/.ccache || die |
45 | mchmod 0700 /root/.ccache || die |
46 | } |
47 | |
48 | postinstall() |
49 | { |
50 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
51 | then |
52 | echo "Setting up ccache with system compiler ..." |
53 | /usr/bin/ccache-config --install-links |
54 | /usr/bin/ccache-config --install-links ${CHOST} |
55 | else |
56 | echo "Please enter chroot of ${MROOT} and run:" |
57 | echo " /usr/bin/ccache-config --install-links" |
58 | echo " /usr/bin/ccache-config --install-links ${CHOST}" |
59 | echo "to complete the installation." |
60 | fi |
61 | |
62 | echo |
63 | echo "Please setup your maximum compiler cache." |
64 | echo "This sets up a cache with 2GB space:" |
65 | echo " 'ccache -M 2G'" |
66 | echo |
67 | echo "To use ccache with smage, edit your /etc/mage.conf" |
68 | echo "and add 'SMAGE_USE_CCACHE=true'." |
69 | echo "Be sure that your mage version is not prior >= mage-0.3.6-r6." |
70 | echo |
71 | echo "If you are upgrading from an older version than 3.x you should clear" |
72 | echo "all of your caches:" |
73 | echo " 'ccache -C'" |
74 | echo |
75 | } |