the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: ccache
Version: 3.1.6
Revision: 1
Maintainer: David Fang
Source: http://samba.org/ftp/%n/%n-%v.tar.bz2
Source-MD5: 343dc9b642e1d2af1e6bd8e474dde92e
PatchScript: <<
#!/bin/sh -ev
# patch Makefile to not depend on implicit rules
file=Makefile.in
mv $file $file.orig
{ echo ".SUFFIXES: .c .o" && cat $file.orig ;} > $file
<<
UseMaxBuildJobs: true
CompileScript: <<
./configure %c
make CFLAGS='-g -O2 -Wall -W -I. -prebind'
<<
InfoTest: <<
TestConflicts: ccache-default
TestScript: <<
#!/bin/sh -ev
make -k check || exit 2
<<
TestSuiteSize: small
<<
InstallScript: <<
#!/bin/sh -ev
mkdir -p %i/bin
mkdir -p %i/share/man/man1
make install prefix=%i mandir=%i/share/man
echo creating ccache-default overrides...
pushd /usr/bin
# llvm-* clang c89 c99
for f in cc c++ c++-* gcc* g++* *-apple-darwin*-g*
do
echo "linking %p/bin/$f to ccache to override /usr/bin/$f"
ln -s %p/bin/ccache %i/bin/$f
done
popd
<<
PostInstScript: <<
echo "If you wish ccache to be the default compiler"
echo "(to override and send ALL compilations through ccache),"
echo " install the \"%n-default\" package."
<<
SplitOff: <<
Package: ccache-default
Depends: ccache (= %v-%r)
Files: <<
bin/cc
bin/c++*
bin/g++*
bin/gcc*
bin/*-apple-darwin*
<<
Description: C/C++ compiler cache - As default compiler
DescDetail: <<
This package installs symlinks for ccache to override your compiler.
ccache will affect ALL COMPILATIONS with this package installed.
If you have strange compilation problems, remove this package FIRST,
before reporting any package or compile bugs.
<<
PostInstScript: <<
ccache -c > /dev/null
echo "***************** WARNING ********************"
echo "ALL gcc3.3 and gcc4.0 and gcc4.2 compiles will now be sent through ccache!"
echo "For the most part ccache is reliable, but"
echo "it can occasionally cause strange compile problems!"
echo "If you have a strange compile problem, remove this package"
echo "and try again before reporting any bugs!"
echo ""
echo "Fink uses its own cache in CCACHE_DIR=%p/var/ccache."
echo "Additionally, the default cache size is 1 Gig."
echo "so you may want to run \"CCACHE_DIR=%p/var/ccache ccache -M 500M\" (for example)"
echo "to limit the size of the cache."
echo ""
echo "If you want --build-as-nobody to work with ccache-default,"
echo "I suggest: sudo chown -R fink-bld %p/var/ccache"
echo "and never building as root (always --build-as-nobody)."
echo "***************** WARNING ********************"
<<
<<
DocFiles: *.txt *.html
Description: C/C++ compiler cache
DescDetail: <<
ccache acts as a caching pre-processor to C/C++ compilers, using the -E
compiler switch and a hash to detect when a compilation can be satisfied
from cache. This often results in a 5 to 10 times speedup in common
compilations.
If you wish ccache to be the default compiler (to override and send ALL
compilations through ccache), install the "%n-default" package.
See f90cache for the Fortran equivalent of %n.
<<
DescUsage: <<
To use ccache manually, point your builds to use CC="ccache gcc"
and CXX="ccache g++" (if using gcc). Passing these variables to
most autoconf produced configure scripts should work.
By default ccache will create a cache in ~/.ccache, but this location
can be overriden by the CCACHE_DIR environment variable.
If you wish ccache to be the default compiler (to override and send ALL
compilations through ccache), install the "%n-default" package.
<<
Homepage: http://ccache.samba.org/
License: GPL
DescPackaging: <<
Former maintainer: Ben Hines
TestConflicts with own ccache-default because one test assumes 'gcc' to
be uncached, thus we remove ccache-default temporarily during testing.
TODO:
* make work more robustly with --build-as-nobody
* add sym-links for FSF versions of gcc4x, possibly creating more splitoffs
* test against LLVM, clang and add sym-links for them
* test against mpic* (open MPI compilers, gcc-4.2+)
* test against c89, c99*
<<