diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-11-19 09:46:35 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-11-19 09:46:35 +0000 |
commit | f1e6d11864e407a49b93a9b3d07f2aef031193c1 (patch) | |
tree | d306d5fcf536676d1949176ad1ebef25250aa62e /dev-util/ccache | |
parent | Add support for USE=gstreamer #345917 by Zorzo Luca. (diff) | |
download | gentoo-2-f1e6d11864e407a49b93a9b3d07f2aef031193c1.tar.gz gentoo-2-f1e6d11864e407a49b93a9b3d07f2aef031193c1.tar.bz2 gentoo-2-f1e6d11864e407a49b93a9b3d07f2aef031193c1.zip |
Version bump #313101 (which should also fix #270062 by Diego Elio Pettenò, #296371 by Attila Stehr, and #301727 by Mariusz Kozlowski). Make ccache-config respect ROOT/multilib and fix handling of cc/chost-cc symlinks between it and the ebuild #302048 by Christoph Junghans.
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/ccache')
-rw-r--r-- | dev-util/ccache/ChangeLog | 11 | ||||
-rw-r--r-- | dev-util/ccache/ccache-3.1.1.ebuild | 59 | ||||
-rw-r--r-- | dev-util/ccache/files/ccache-config | 25 |
3 files changed, 86 insertions, 9 deletions
diff --git a/dev-util/ccache/ChangeLog b/dev-util/ccache/ChangeLog index f75cd463e983..258c8cdefe2b 100644 --- a/dev-util/ccache/ChangeLog +++ b/dev-util/ccache/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-util/ccache # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ChangeLog,v 1.67 2010/11/19 07:54:40 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ChangeLog,v 1.68 2010/11/19 09:46:35 vapier Exp $ + +*ccache-3.1.1 (19 Nov 2010) + + 19 Nov 2010; Mike Frysinger <vapier@gentoo.org> +ccache-3.1.1.ebuild, + files/ccache-config: + Version bump #313101 (which should also fix #270062 by Diego Elio + Pettenò, #296371 by Attila Stehr, and #301727 by Mariusz Kozlowski). Make + ccache-config respect ROOT/multilib and fix handling of cc/chost-cc + symlinks between it and the ebuild #302048 by Christoph Junghans. *ccache-2.4-r9 (19 Nov 2010) diff --git a/dev-util/ccache/ccache-3.1.1.ebuild b/dev-util/ccache/ccache-3.1.1.ebuild new file mode 100644 index 000000000000..561cd703f85b --- /dev/null +++ b/dev-util/ccache/ccache-3.1.1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ccache-3.1.1.ebuild,v 1.1 2010/11/19 09:46:35 vapier Exp $ + +inherit multilib + +DESCRIPTION="fast compiler cache" +HOMEPAGE="http://ccache.samba.org/" +SRC_URI="http://samba.org/ftp/ccache/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="" + +RDEPEND="sys-libs/zlib" +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + # make sure we always use system zlib + rm -rf zlib +} + +src_install() { + emake install DESTDIR="${D}" || die + dodoc AUTHORS.txt MANUAL.txt NEWS.txt README.txt + + keepdir /usr/$(get_libdir)/ccache/bin + + dobin "${FILESDIR}"/ccache-config || die + dosed "/^LIBDIR=/s:lib:$(get_libdir):" /usr/bin/ccache-config + + diropts -m0700 + dodir /root/.ccache + keepdir /root/.ccache +} + +pkg_postinst() { + "${ROOT}"/usr/bin/ccache-config --install-links + "${ROOT}"/usr/bin/ccache-config --install-links ${CHOST} + + # nuke broken symlinks from previous versions that shouldn't exist + rm -f "${ROOT}/usr/$(get_libdir)/ccache/bin/${CHOST}-cc" + [[ -d "${ROOT}/usr/$(get_libdir)/ccache.backup" ]] && \ + rm -fr "${ROOT}/usr/$(get_libdir)/ccache.backup" + + elog "To use ccache with **non-Portage** C compiling, add" + elog "/usr/$(get_libdir)/ccache/bin to the beginning of your path, before /usr/bin." + elog "Portage 2.0.46-r11+ will automatically take advantage of ccache with" + elog "no additional steps. If this is your first install of ccache, type" + elog "something like this to set a maximum cache size of 2GB:" + elog "# ccache -M 2G" + elog + elog "If you are upgrading from an older version than 3.x you should clear" + elog "all of your caches like so:" + elog "# CCACHE_DIR='${CCACHE_DIR:-${PORTAGE_TMPDIR}/ccache}' ccache -C" +} diff --git a/dev-util/ccache/files/ccache-config b/dev-util/ccache/files/ccache-config index 0a4318258a2d..1cd2b37810ec 100644 --- a/dev-util/ccache/files/ccache-config +++ b/dev-util/ccache/files/ccache-config @@ -2,17 +2,19 @@ # # ccache-config - helper script for ccache and its ebuild # -# Copyright 2003 Superlucidity Services, LLC +# Copyright 2003-2010 Superlucidity Services, LLC # This program licensed under the GNU GPL version 2. # # This script developed by Zachary T Welch at Superlucidity Services, LLC # it was cloned from the distcc-config script -# +# # Additional features to come; this provides a starting point # this should be getopt'd someday (override with CC_QUIET=1) CC_VERBOSE=1 +LIBDIR="lib" + cc_echo() { [ -z "${CC_QUIET}" -a -n "${CC_VERBOSE}" ] && echo "$*" } @@ -22,8 +24,11 @@ cc_echo() { # they allow the user or other scripts (namely gcc-config) to # automatically update ccache's links when upgrading toolchains # +cc_path() { + echo ${ROOT%/}/usr/${LIBDIR}/ccache/bin/$1 +} cc_remove_link() { - local t="/usr/lib/ccache/bin/${1}" + local t=$(cc_path "$1") if [ -L ${t} ]; then cc_echo "Removing ${t}..." rm -f "${t}" @@ -32,13 +37,13 @@ cc_remove_link() { cc_install_link() { # Search the PATH for the specified compiler # then create shadow link in /usr/lib/ccache/bin to ccache - - if [ -n "$(type -p ${1})" ]; then + + if [ -n "$(type -p ${1})" ]; then # first be sure any old link is removed CC_QUIET=1 cc_remove_link "${1}" # then create the new link - local t="/usr/lib/ccache/bin/${1}" + local t=$(cc_path "$1") cc_echo "Creating ccache shadow link: ${t}..." ln -s /usr/bin/ccache "${t}" fi @@ -46,7 +51,12 @@ cc_install_link() { cc_links() { local a for a in gcc cc c++ g++ ; do - [ -n "${2}" ] && a="${2}-${a}" + if [ -n "${2}" ] ; then + # gcc-config doesnt install ${CHOST}-cc, so until + # it does, don't install a ccache symlink for it + [ "${a}" = "cc" ] && continue + a="${2}-${a}" + fi eval "cc_${1}_link" "${a}" done } @@ -65,4 +75,3 @@ case "${1}" in echo "usage: ${0} {--install-links|--remove-links} [ CHOST ]" ;; esac - |