Contents of /branches/magellan-next/extras/ccache/ccache-3.1.5-r2.smage2
Parent Directory | Revision Log
Revision 9876 -
(show annotations)
(download)
Sat Jan 14 01:14:22 2012 UTC (12 years, 8 months ago) by niro
File size: 1760 byte(s)
Sat Jan 14 01:14:22 2012 UTC (12 years, 8 months ago) by niro
File size: 1760 byte(s)
-tell about mage-feature not the old variables
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 | 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 ${HOMEPAGE} | grep latest | sed 's/.* \(.*\)\./\1/;q'" |
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 | } |