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