Lines 1-10
Link Here
|
1 |
# Copyright 1999-2013 Gentoo Foundation |
1 |
# Copyright 1999-2013 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ccache-3.1.9.ebuild,v 1.15 2013/04/24 05:44:24 dirtyepic Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ccache-3.1.8.ebuild,v 1.9 2012/12/17 17:51:11 ago Exp $ |
4 |
|
4 |
|
5 |
EAPI="4" |
5 |
EAPI=5 |
6 |
|
6 |
|
7 |
inherit multilib eutils |
7 |
inherit multilib eutils readme.gentoo |
8 |
|
8 |
|
9 |
DESCRIPTION="fast compiler cache" |
9 |
DESCRIPTION="fast compiler cache" |
10 |
HOMEPAGE="http://ccache.samba.org/" |
10 |
HOMEPAGE="http://ccache.samba.org/" |
Lines 12-21
Link Here
|
12 |
|
12 |
|
13 |
LICENSE="GPL-3" |
13 |
LICENSE="GPL-3" |
14 |
SLOT="0" |
14 |
SLOT="0" |
15 |
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" |
15 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris" |
16 |
IUSE="" |
16 |
IUSE="clang icc" |
17 |
|
17 |
|
18 |
RDEPEND="sys-libs/zlib" |
18 |
RDEPEND="sys-libs/zlib |
|
|
19 |
clang? ( sys-devel/clang ) |
20 |
icc? ( dev-lang/icc )" |
19 |
DEPEND="${RDEPEND} |
21 |
DEPEND="${RDEPEND} |
20 |
app-arch/xz-utils" |
22 |
app-arch/xz-utils" |
21 |
|
23 |
|
Lines 26-32
Link Here
|
26 |
epatch "${FILESDIR}"/${P}-test-gcc-4.8.patch #461966 |
28 |
epatch "${FILESDIR}"/${P}-test-gcc-4.8.patch #461966 |
27 |
sed \ |
29 |
sed \ |
28 |
-e "/^LIBDIR=/s:lib:$(get_libdir):" \ |
30 |
-e "/^LIBDIR=/s:lib:$(get_libdir):" \ |
29 |
"${FILESDIR}"/ccache-config > ccache-config || die |
31 |
-e "/^EPREFIX=/s:'':'${EPREFIX}':" \ |
|
|
32 |
"${FILESDIR}"/ccache-config-2 > ccache-config || die |
33 |
|
34 |
DOC_CONTENTS="To use ccache with **non-Portage** C compiling, add |
35 |
${EROOT}usr/$(get_libdir)/ccache/bin to the beginning of your path, before ${EROOT}usr/bin. |
36 |
Portage 2.0.46-r11+ will automatically take advantage of ccache with |
37 |
no additional steps. If this is your first install of ccache, type |
38 |
something like this to set a maximum cache size of 2GB:\\n# ccache -M 2G\\n |
39 |
If you are upgrading from an older version than 3.x you should clear all of your caches like so:\\n |
40 |
# CCACHE_DIR='${CCACHE_DIR:-${PORTAGE_TMPDIR}/ccache}' ccache -C" |
30 |
} |
41 |
} |
31 |
|
42 |
|
32 |
src_install() { |
43 |
src_install() { |
Lines 34-62
Link Here
|
34 |
dodoc AUTHORS.txt MANUAL.txt NEWS.txt README.txt |
45 |
dodoc AUTHORS.txt MANUAL.txt NEWS.txt README.txt |
35 |
|
46 |
|
36 |
dobin ccache-config |
47 |
dobin ccache-config |
|
|
48 |
|
49 |
readme.gentoo_create_doc |
37 |
} |
50 |
} |
38 |
|
51 |
|
39 |
pkg_postinst() { |
52 |
pkg_postinst() { |
40 |
"${ROOT}"/usr/bin/ccache-config --install-links |
53 |
"${EROOT}"/usr/bin/ccache-config --install-links |
41 |
"${ROOT}"/usr/bin/ccache-config --install-links ${CHOST} |
54 |
"${EROOT}"/usr/bin/ccache-config --install-links ${CHOST} |
|
|
55 |
use icc && "${EROOT}"/usr/bin/ccache-config --install-links icc |
56 |
use clang && "${EROOT}"/usr/bin/ccache-config --install-links clang |
42 |
|
57 |
|
43 |
# nuke broken symlinks from previous versions that shouldn't exist |
58 |
# nuke broken symlinks from previous versions that shouldn't exist |
44 |
rm -f "${ROOT}/usr/$(get_libdir)/ccache/bin/${CHOST}-cc" |
59 |
rm -f "${EROOT}/usr/$(get_libdir)/ccache/bin/${CHOST}-cc" |
45 |
[[ -d "${ROOT}/usr/$(get_libdir)/ccache.backup" ]] && \ |
60 |
[[ -d "${EROOT}/usr/$(get_libdir)/ccache.backup" ]] && \ |
46 |
rm -rf "${ROOT}/usr/$(get_libdir)/ccache.backup" |
61 |
rm -rf "${EROOT}/usr/$(get_libdir)/ccache.backup" |
47 |
|
62 |
|
48 |
if [[ -z ${REPLACING_VERSIONS} ]] ; then |
63 |
readme.gentoo_pkg_postinst |
49 |
elog "To use ccache with **non-Portage** C compiling, add" |
|
|
50 |
elog "/usr/$(get_libdir)/ccache/bin to the beginning of your path, before /usr/bin." |
51 |
elog "Portage 2.0.46-r11+ will automatically take advantage of ccache with" |
52 |
elog "no additional steps." |
53 |
elog |
54 |
elog "You might want to set a maximum cache size:" |
55 |
elog "# ccache -M 2G" |
56 |
fi |
57 |
if has_version "<${CATEGORY}/${PN}-3" ; then |
58 |
elog "If you are upgrading from an older version than 3.x you should clear" |
59 |
elog "all of your caches like so:" |
60 |
elog "# CCACHE_DIR='${CCACHE_DIR:-${PORTAGE_TMPDIR}/ccache}' ccache -C" |
61 |
fi |
62 |
} |
64 |
} |