Magellan Linux

Annotation of /smage/trunk/core/ccache/ccache-3.5-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12928 - (hide annotations) (download)
Thu Nov 22 14:42:55 2018 UTC (5 years, 5 months ago) by niro
File size: 1786 byte(s)
auto added: ver bump to 3.5-r1
1 niro 12928 # $Id$
2    
3     PNAME="ccache"
4     PVER="3.5"
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.8"
14    
15     SRCFILE="${PNAME}-${PVER}.tar.xz"
16     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
17    
18     CCC_REV=1.3
19    
20     msetfeature "!check" # fix me
21     sminclude mbuild mtools
22    
23     SRC_URI=(
24     http://samba.org/ftp/${PNAME}/${SRCFILE}
25     mirror://${PNAME}/${SRCFILE}
26     mirror://${PNAME}/ccache-config-${CCC_REV}
27     )
28    
29     UP2DATE="updatecmd http://www.samba.org/ftp/ccache/ | highesttarball xz"
30    
31     src_install()
32     {
33     cd ${SRCDIR}
34     mmake DESTDIR=${BINDIR} install || die
35    
36     # bins
37     minstallexec -s ccache-config-${CCC_REV} /usr/bin/ccache-config || die
38    
39     # fix hardcoded libdir
40     sed -i "/^LIBDIR=/s:lib:$(mlibdir):" ${BINDIR}/usr/bin/ccache-config || die
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 the feature 'ccache' to MAGE_FEATURES."
68     echo "Be sure that your mage version is not prior >= mage-0.4.82."
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     }