View | Details | Raw Unified
Collapse All | Expand All

(-) ccache-2.4-r4.ebuild (-13 / +15 lines)
 Lines 27-33    Link Here 
do_links() {
do_links() {
	insinto /usr/lib/ccache/bin
	insinto /usr/lib/ccache/bin
	for a in ${CHOST}-{gcc,g++,c++} gcc c++ g++; do
	for a in ${CHOST}-{gcc,g++,c++} gcc c++ g++; do
	  dosym /usr/bin/${a} /usr/lib/ccache/bin/${a}
	    dosym /usr/bin/ccache /usr/lib/ccache/bin/${a}
	done
	done
}
}
 Lines 53-76    Link Here 
		dodir /root/.ccache
		dodir /root/.ccache
		keepdir /root/.ccache
		keepdir /root/.ccache
	fi
	fi
	if [[ ${ROOT} = "/" ]] ; then
	  einfo "Scanning for compiler front-ends..."
	  do_links
	else
	  ewarn "Install is incomplete; you must run the following commands:"
	  ewarn " # ccache-config --install-links"
	  ewarn " # ccache-config --install-links ${CHOST}"
	 ewarn "after booting or chrooting to ${ROOT} to complete installation."
	fi
}
}
pkg_preinst() {
pkg_preinst() {
	# Portage doesn't handle replacing a non-empty dir with a file!
	if [[ ${ROOT} = "/" ]] ; then
	[[ -d "${ROOT}/usr/lib/ccache" ]] && rm -fr "${ROOT}/usr/lib/ccache"
	    einfo "Scanning for compiler front-ends..."
	[[ -d "${ROOT}/usr/lib/ccache.backup" ]] && rm -fr "${ROOT}/usr/lib/ccache.backup"
	    do_links
	else
	    ewarn "Install is incomplete; you must run the following commands:"
	    ewarn " # ccache-config --install-links"
	    ewarn " # ccache-config --install-links ${CHOST}"
	    ewarn "after booting or chrooting to ${ROOT} to complete installation."
	fi
}
}
pkg_postinst() {
pkg_postinst() {
	# nuke broken symlinks from previous versions that shouldn't exist
	for i in cc ${CHOST}-cc ; do
	    [[ -L "${ROOT}/usr/lib/ccache/bin/${i}" ]] && rm -rf "${ROOT}/usr/lib/ccache/bin/${i}"
	done
	einfo "To use ccache with **non-Portage** C compiling, add"
	einfo "To use ccache with **non-Portage** C compiling, add"
	einfo "/usr/lib/ccache/bin to the beginning of your path, before /usr/bin."
	einfo "/usr/lib/ccache/bin to the beginning of your path, before /usr/bin."
	einfo "Portage 2.0.46-r11+ will automatically take advantage of ccache with"
	einfo "Portage 2.0.46-r11+ will automatically take advantage of ccache with"