1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit readme.gentoo-r1
8 DESCRIPTION="fast compiler cache"
9 HOMEPAGE="https://ccache.samba.org/"
10 SRC_URI="https://www.samba.org/ftp/ccache/${P}.tar.xz"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
17 DEPEND="app-arch/xz-utils
21 sys-apps/gentoo-functions"
24 "${FILESDIR}"/${PN}-3.4-size-on-disk.patch #456178
25 "${FILESDIR}"/${PN}-3.5-nvcc-test.patch
28 S=${WORKDIR}/${P%a} # 3.5.1a->3.5.1, bug #674516
33 # make sure we always use system zlib
34 rm -rf src/zlib || die
36 -e "/^EPREFIX=/s:'':'${EPREFIX}':" \
37 "${FILESDIR}"/ccache-config-3 > ccache-config || die
49 DOCS=( doc/{AUTHORS,MANUAL,NEWS}.adoc CONTRIBUTING.md README.md )
53 insinto /usr/share/shadowman/tools
54 newins - ccache <<<'/usr/lib/ccache/bin'
57 To use ccache with **non-Portage** C compiling, add
58 ${EPREFIX}/usr/lib/ccache/bin to the beginning of your path, before ${EPREFIX}/usr/bin.
59 Portage 2.0.46-r11+ will automatically take advantage of ccache with
60 no additional steps. If this is your first install of ccache, type
61 something like this to set a maximum cache size of 2GB:\\n
63 If you are upgrading from an older version than 3.x you should clear all of your caches like so:\\n
64 # CCACHE_DIR='${CCACHE_DIR:-${PORTAGE_TMPDIR}/ccache}' ccache -C\\n
65 ccache now supports sys-devel/clang and dev-lang/icc, too!"
67 readme.gentoo_create_doc
71 if [[ -z ${REPLACED_BY_VERSION} && ${ROOT:-/} == / ]] ; then
72 eselect compiler-shadow remove ccache
77 if [[ ${ROOT:-/} == / ]]; then
78 eselect compiler-shadow update ccache
81 # nuke broken symlinks from previous versions that shouldn't exist
82 rm -rf "${EROOT}"/usr/lib/ccache.backup || die
84 readme.gentoo_print_elog