* [gentoo-commits] gentoo-x86 commit in dev-util/ccache/files: ccache-config-2
@ 2013-09-13 14:25 Christoph Junghans (ottxor)
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Junghans (ottxor) @ 2013-09-13 14:25 UTC (permalink / raw
To: gentoo-commits
ottxor 13/09/13 14:25:31
Added: ccache-config-2
Log:
added prefix support (bug #484012)
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key C2000586)
Revision Changes Path
1.1 dev-util/ccache/files/ccache-config-2
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.1&content-type=text/plain
Index: ccache-config-2
===================================================================
#!/bin/sh
#
# ccache-config - helper script for ccache and its ebuild
#
# Copyright 2003-2013 Superlucidity Services, LLC
# Copyright 2013 Gentoo Foundation
# 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
EPREFIX=''
. "${EPREFIX}"/etc/init.d/functions.sh 2>/dev/null || {
ebegin() { echo " * $* ..."; }
eend() {
local r=${1:-$?}
[ ${r} -eq 0 ] && echo " [ OK ]" || echo " [ !! ]"
return $r
}
}
LIBDIR="lib"
# this should be getopt'd someday (override with CC_QUIET=1)
CC_VERBOSE=1
unset _CC_QUIET
c_quiet() {
[ -n "${CC_QUIET:-${_CC_QUIET}}" ] || [ -z "${CC_VERBOSE}" ]
}
c_ebegin() { c_quiet || ebegin "$@" ; }
c_eend() { c_quiet || eend "$@" ; }
###
# the following functions manage the ccache symlinks
# they allow the user or other scripts (namely gcc-config) to
# automatically update ccache's links when upgrading toolchains
#
cc_path() {
echo ${ROOT%/}${EPREFIX}/usr/${LIBDIR}/ccache/bin/$1
}
cc_remove_link() {
local t=$(cc_path "$1")
if [ -L ${t} ]; then
c_ebegin "Removing ${t}"
rm -f "${t}"
c_eend
fi
}
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
# first be sure any old link is removed
_CC_QUIET=1
cc_remove_link "${1}"
unset _CC_QUIET
# then create the new link
local t=$(cc_path "$1")
c_ebegin "Creating ccache shadow link ${t}"
mkdir -p -m 0755 "${t%/*}" && ln -s "${EPREFIX}"/usr/bin/ccache "${t}"
c_eend
fi
}
cc_links() {
local a
for a in gcc cc c++ g++ ; do
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
}
###
# main routine
case "${1}" in
--install-links )
cc_links install "${2}"
;;
--remove-links )
cc_links remove "${2}"
;;
* )
echo "usage: ${0} {--install-links|--remove-links} [ CHOST ]"
;;
esac
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in dev-util/ccache/files: ccache-config-2
@ 2013-09-28 22:44 Christoph Junghans (ottxor)
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Junghans (ottxor) @ 2013-09-28 22:44 UTC (permalink / raw
To: gentoo-commits
ottxor 13/09/28 22:44:47
Modified: ccache-config-2
Log:
add icc/clang support (bug #484772)
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key C2000586)
Revision Changes Path
1.2 dev-util/ccache/files/ccache-config-2
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?r1=1.1&r2=1.2
Index: ccache-config-2
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-util/ccache/files/ccache-config-2,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ccache-config-2 13 Sep 2013 14:25:31 -0000 1.1
+++ ccache-config-2 28 Sep 2013 22:44:47 -0000 1.2
@@ -69,14 +69,8 @@
}
cc_links() {
local a
- for a in gcc cc c++ g++ ; do
- 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}"
+ for a in gcc cc c++ g++ icc icpc clang clang++ ; do
+ eval "cc_${1}_link" "${2}${2:+-}${a}"
done
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in dev-util/ccache/files: ccache-config-2
@ 2014-03-08 21:29 Mike Frysinger (vapier)
0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger (vapier) @ 2014-03-08 21:29 UTC (permalink / raw
To: gentoo-commits
vapier 14/03/08 21:29:38
Modified: ccache-config-2
Log:
Use `command` rather than `type` #503428 by Naohiro Aota.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Revision Changes Path
1.3 dev-util/ccache/files/ccache-config-2
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?r1=1.2&r2=1.3
Index: ccache-config-2
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-util/ccache/files/ccache-config-2,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ccache-config-2 28 Sep 2013 22:44:47 -0000 1.2
+++ ccache-config-2 8 Mar 2014 21:29:38 -0000 1.3
@@ -2,8 +2,8 @@
#
# ccache-config - helper script for ccache and its ebuild
#
-# Copyright 2003-2013 Superlucidity Services, LLC
-# Copyright 2013 Gentoo Foundation
+# Copyright 2003-2014 Superlucidity Services, LLC
+# Copyright 2013-2014 Gentoo Foundation
# This program licensed under the GNU GPL version 2.
#
# This script developed by Zachary T Welch at Superlucidity Services, LLC
@@ -54,10 +54,10 @@
# 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 command -v "$1" >/dev/null ; then
# first be sure any old link is removed
_CC_QUIET=1
- cc_remove_link "${1}"
+ cc_remove_link "$1"
unset _CC_QUIET
# then create the new link
@@ -77,14 +77,14 @@
###
# main routine
-case "${1}" in
+case $1 in
--install-links )
- cc_links install "${2}"
+ cc_links install "$2"
;;
--remove-links )
- cc_links remove "${2}"
+ cc_links remove "$2"
;;
* )
- echo "usage: ${0} {--install-links|--remove-links} [ CHOST ]"
+ echo "usage: $0 {--install-links|--remove-links} [ CHOST ]"
;;
esac
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in dev-util/ccache/files: ccache-config-2
@ 2014-11-04 4:51 Mike Frysinger (vapier)
0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger (vapier) @ 2014-11-04 4:51 UTC (permalink / raw
To: gentoo-commits
vapier 14/11/04 04:51:22
Modified: ccache-config-2
Log:
Trim empty ccache dirs automatically #517242 by Arfrever Frehtes Taifersar Arahesis.
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Revision Changes Path
1.4 dev-util/ccache/files/ccache-config-2
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?r1=1.3&r2=1.4
Index: ccache-config-2
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-util/ccache/files/ccache-config-2,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ccache-config-2 8 Mar 2014 21:29:38 -0000 1.3
+++ ccache-config-2 4 Nov 2014 04:51:22 -0000 1.4
@@ -48,6 +48,13 @@
c_ebegin "Removing ${t}"
rm -f "${t}"
c_eend
+
+ # Trim the empty dir if possible. #517242
+ t=${t%/*}
+ if rmdir "${t}" 2>/dev/null; then
+ rmdir "${t%/*}" 2>/dev/null
+ fi
+ :
fi
}
cc_install_link() {
@@ -70,7 +77,7 @@
cc_links() {
local a
for a in gcc cc c++ g++ icc icpc clang clang++ ; do
- eval "cc_${1}_link" "${2}${2:+-}${a}"
+ "cc_${1}_link" "${2}${2:+-}${a}"
done
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-04 4:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 14:25 [gentoo-commits] gentoo-x86 commit in dev-util/ccache/files: ccache-config-2 Christoph Junghans (ottxor)
-- strict thread matches above, loose matches on Subject: below --
2013-09-28 22:44 Christoph Junghans (ottxor)
2014-03-08 21:29 Mike Frysinger (vapier)
2014-11-04 4:51 Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox