Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 484012
Collapse All | Expand All

(-)/usr/portage/dev-util/ccache/ccache-3.1.9.ebuild (-7 / +8 lines)
Lines 12-18 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=""
17
17
18
RDEPEND="sys-libs/zlib"
18
RDEPEND="sys-libs/zlib"
Lines 26-31 Link Here
26
	epatch "${FILESDIR}"/${P}-test-gcc-4.8.patch #461966
26
	epatch "${FILESDIR}"/${P}-test-gcc-4.8.patch #461966
27
	sed \
27
	sed \
28
		-e "/^LIBDIR=/s:lib:$(get_libdir):" \
28
		-e "/^LIBDIR=/s:lib:$(get_libdir):" \
29
		-e "/^EPREFIX=/s:'':'${EPREFIX}':" \
29
		"${FILESDIR}"/ccache-config > ccache-config || die
30
		"${FILESDIR}"/ccache-config > ccache-config || die
30
}
31
}
31
32
Lines 37-53 Link Here
37
}
38
}
38
39
39
pkg_postinst() {
40
pkg_postinst() {
40
	"${ROOT}"/usr/bin/ccache-config --install-links
41
	"${EROOT}"/usr/bin/ccache-config --install-links
41
	"${ROOT}"/usr/bin/ccache-config --install-links ${CHOST}
42
	"${EROOT}"/usr/bin/ccache-config --install-links ${CHOST}
42
43
43
	# nuke broken symlinks from previous versions that shouldn't exist
44
	# nuke broken symlinks from previous versions that shouldn't exist
44
	rm -f "${ROOT}/usr/$(get_libdir)/ccache/bin/${CHOST}-cc"
45
	rm -f "${EROOT}/usr/$(get_libdir)/ccache/bin/${CHOST}-cc"
45
	[[ -d "${ROOT}/usr/$(get_libdir)/ccache.backup" ]] && \
46
	[[ -d "${EROOT}/usr/$(get_libdir)/ccache.backup" ]] && \
46
		rm -rf "${ROOT}/usr/$(get_libdir)/ccache.backup"
47
		rm -rf "${EROOT}/usr/$(get_libdir)/ccache.backup"
47
48
48
	if [[ -z ${REPLACING_VERSIONS} ]] ; then
49
	if [[ -z ${REPLACING_VERSIONS} ]] ; then
49
		elog "To use ccache with **non-Portage** C compiling, add"
50
		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 "${EPREFIX}/usr/$(get_libdir)/ccache/bin to the beginning of your path, before ${EPREFIX}/usr/bin."
51
		elog "Portage 2.0.46-r11+ will automatically take advantage of ccache with"
52
		elog "Portage 2.0.46-r11+ will automatically take advantage of ccache with"
52
		elog "no additional steps."
53
		elog "no additional steps."
53
		elog
54
		elog
(-)/usr/portage/dev-util/ccache/files/ccache-config (-3 / +5 lines)
Lines 10-16 Link Here
10
#
10
#
11
# Additional features to come; this provides a starting point
11
# Additional features to come; this provides a starting point
12
12
13
. /etc/init.d/functions.sh 2>/dev/null || {
13
EPREFIX=''
14
15
. "${EPREFIX}"/etc/init.d/functions.sh 2>/dev/null || {
14
	ebegin() { echo " * $* ..."; }
16
	ebegin() { echo " * $* ..."; }
15
	eend() {
17
	eend() {
16
		local r=${1:-$?}
18
		local r=${1:-$?}
Lines 37-43 Link Here
37
#  automatically update ccache's links when upgrading toolchains
39
#  automatically update ccache's links when upgrading toolchains
38
#
40
#
39
cc_path() {
41
cc_path() {
40
	echo ${ROOT%/}/usr/${LIBDIR}/ccache/bin/$1
42
	echo ${ROOT%/}${EPREFIX}/usr/${LIBDIR}/ccache/bin/$1
41
}
43
}
42
cc_remove_link() {
44
cc_remove_link() {
43
	local t=$(cc_path "$1")
45
	local t=$(cc_path "$1")
Lines 60-66 Link Here
60
		# then create the new link
62
		# then create the new link
61
		local t=$(cc_path "$1")
63
		local t=$(cc_path "$1")
62
		c_ebegin "Creating ccache shadow link ${t}"
64
		c_ebegin "Creating ccache shadow link ${t}"
63
		mkdir -p -m 0755 "${t%/*}" && ln -s /usr/bin/ccache "${t}"
65
		mkdir -p -m 0755 "${t%/*}" && ln -s "${EPREFIX}"/usr/bin/ccache "${t}"
64
		c_eend
66
		c_eend
65
	fi
67
	fi
66
}
68
}

Return to bug 484012