summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2013-10-07 14:47:29 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 10:48:59 +0200
commita3630d33ce7851c9069bfd1a3a03338526e62643 (patch)
tree0c0c1e66238e134a6fa8ad59438c5b0b14b66fbc /dev-util
parentBump zram-init (diff)
downloadmv-a3630d33ce7851c9069bfd1a3a03338526e62643.tar.gz
mv-a3630d33ce7851c9069bfd1a3a03338526e62643.tar.bz2
mv-a3630d33ce7851c9069bfd1a3a03338526e62643.zip
Bump zram-init. Update ccache with latest gentoo patches
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/ccache/ChangeLog3
-rw-r--r--dev-util/ccache/ccache-99999999.ebuild29
-rw-r--r--dev-util/ccache/files/ccache-3.1.7-no-perl.patch15
-rw-r--r--dev-util/ccache/files/ccache-clang.patch29
-rw-r--r--dev-util/ccache/files/ccache-config-2 (renamed from dev-util/ccache/files/ccache-config)21
5 files changed, 47 insertions, 50 deletions
diff --git a/dev-util/ccache/ChangeLog b/dev-util/ccache/ChangeLog
index 8fb51920..c159fb2b 100644
--- a/dev-util/ccache/ChangeLog
+++ b/dev-util/ccache/ChangeLog
@@ -2,6 +2,9 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 07 Oct 2013; Martin Väth <martin@mvath.de>:
+ Add latest changes from the Gentoo tree (support also icc, fix tests)
+
14 Sep 2013; Martin Väth <martin@mvath.de>:
Bump to git-r3.eclass
diff --git a/dev-util/ccache/ccache-99999999.ebuild b/dev-util/ccache/ccache-99999999.ebuild
index 3581944e..03d450c7 100644
--- a/dev-util/ccache/ccache-99999999.ebuild
+++ b/dev-util/ccache/ccache-99999999.ebuild
@@ -24,10 +24,11 @@ DEPEND="${RDEPEND}
src_prepare() {
# make sure we always use system zlib
rm -rf zlib
+ epatch "${FILESDIR}"/${PN}-3.1.7-no-perl.patch #421609
sed \
-e "/^LIBDIR=/s:lib:$(get_libdir):" \
- "${FILESDIR}"/ccache-config > ccache-config || die
- epatch "${FILESDIR}"/ccache-clang.patch
+ -e "/^EPREFIX=/s:'':'${EPREFIX}':" \
+ "${FILESDIR}"/ccache-config-2 > ccache-config || die
epatch_user
eautoreconf
}
@@ -37,21 +38,28 @@ src_install() {
dodoc AUTHORS.txt MANUAL.txt NEWS.txt README.txt
dobin ccache-config
- rm -rfv -- "${D}/root"
+# rm -rfv -- "${D}/root"
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ "${EROOT}"/usr/bin/ccache-config --remove-links
+ "${EROOT}"/usr/bin/ccache-config --remove-links ${CHOST}
+ fi
}
pkg_postinst() {
- "${ROOT}"/usr/bin/ccache-config --install-links
- "${ROOT}"/usr/bin/ccache-config --install-links ${CHOST}
+ "${EROOT}"/usr/bin/ccache-config --install-links
+ "${EROOT}"/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 -rf "${ROOT}/usr/$(get_libdir)/ccache.backup"
+ rm -f "${EROOT}/usr/$(get_libdir)/ccache/bin/${CHOST}-cc"
+ [[ -d "${EROOT}/usr/$(get_libdir)/ccache.backup" ]] && \
+ rm -rf "${EROOT}/usr/$(get_libdir)/ccache.backup"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
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 "${EPREFIX}/usr/$(get_libdir)/ccache/bin to the beginning of your path, before ${EPREFIX}/usr/bin."
elog "Portage 2.0.46-r11+ will automatically take advantage of ccache with"
elog "no additional steps."
elog
@@ -63,4 +71,7 @@ pkg_postinst() {
elog "all of your caches like so:"
elog "# CCACHE_DIR='${CCACHE_DIR:-${PORTAGE_TMPDIR}/ccache}' ccache -C"
fi
+ if has_version "<${CATEGORY}/${PN}-3.1.9-r2" ; then
+ elog "ccache now supports sys-devel/clang and dev-lang/icc, too!"
+ fi
}
diff --git a/dev-util/ccache/files/ccache-3.1.7-no-perl.patch b/dev-util/ccache/files/ccache-3.1.7-no-perl.patch
new file mode 100644
index 00000000..5abd15e1
--- /dev/null
+++ b/dev-util/ccache/files/ccache-3.1.7-no-perl.patch
@@ -0,0 +1,15 @@
+avoid weak perl usage in tests
+
+https://bugs.gentoo.org/421609
+
+--- a/test.sh
++++ b/test.sh
+@@ -1466,7 +1466,7 @@
+ mkdir -p $dir
+ i=0
+ while [ $i -lt 10 ]; do
+- perl -e 'print "A" x 4017' >$dir/result$i-4017.o
++ printf '%4017s' '' | tr ' ' 'A' >$dir/result$i-4017.o
+ touch $dir/result$i-4017.stderr
+ touch $dir/result$i-4017.d
+ if [ $i -gt 5 ]; then
diff --git a/dev-util/ccache/files/ccache-clang.patch b/dev-util/ccache/files/ccache-clang.patch
deleted file mode 100644
index 8c766b30..00000000
--- a/dev-util/ccache/files/ccache-clang.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- 1/ccache-config
-+++ 1/ccache-config
-@@ -66,15 +66,17 @@
- }
- 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
-+ if [ -z "${2}" ] ; then
-+ # gcc-config doesn't install ${CHOST}-cc, so until
-+ # it does, don't install a ccache symlink for it
-+ for a in cc clang clang++
-+ do eval "cc_${1}_link" "${a}"
-+ done
-+ else
-+ for a in gcc c++ g++
-+ do eval "cc_${1}_link" "${2}-${a}"
-+ done
-+ fi
- }
-
- ###
diff --git a/dev-util/ccache/files/ccache-config b/dev-util/ccache/files/ccache-config-2
index 8c1bcb2d..e00e7b6c 100644
--- a/dev-util/ccache/files/ccache-config
+++ b/dev-util/ccache/files/ccache-config-2
@@ -2,7 +2,8 @@
#
# ccache-config - helper script for ccache and its ebuild
#
-# Copyright 2003-2010 Superlucidity Services, LLC
+# 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
@@ -10,7 +11,9 @@
#
# Additional features to come; this provides a starting point
-. /etc/init.d/functions.sh 2>/dev/null || {
+EPREFIX=''
+
+. "${EPREFIX}"/etc/init.d/functions.sh 2>/dev/null || {
ebegin() { echo " * $* ..."; }
eend() {
local r=${1:-$?}
@@ -37,7 +40,7 @@ c_eend() { c_quiet || eend "$@" ; }
# automatically update ccache's links when upgrading toolchains
#
cc_path() {
- echo ${ROOT%/}/usr/${LIBDIR}/ccache/bin/$1
+ echo ${ROOT%/}${EPREFIX}/usr/${LIBDIR}/ccache/bin/$1
}
cc_remove_link() {
local t=$(cc_path "$1")
@@ -60,20 +63,14 @@ cc_install_link() {
# then create the new link
local t=$(cc_path "$1")
c_ebegin "Creating ccache shadow link ${t}"
- mkdir -p -m 0755 "${t%/*}" && ln -s /usr/bin/ccache "${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}"
+ for a in gcc cc c++ g++ icc icpc clang clang++ ; do
+ eval "cc_${1}_link" "${2}${2:+-}${a}"
done
}