aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2013-07-07 17:02:09 -0600
committerChristoph Junghans <ottxor@gentoo.org>2013-07-07 17:02:09 -0600
commit69ec543762c9bcc9655e5e37e0a00af19b1025af (patch)
treed767eea681f5d8db913f943424a3f8469636e930
parentfixed package.mask for sci-chemistry/gromacs (diff)
downloadsci-69ec543762c9bcc9655e5e37e0a00af19b1025af.tar.gz
sci-69ec543762c9bcc9655e5e37e0a00af19b1025af.tar.bz2
sci-69ec543762c9bcc9655e5e37e0a00af19b1025af.zip
added mpi use, sync with gx86
Package-Manager: portage-2.2.0_alpha186
-rw-r--r--dev-util/ccache/ChangeLog5
-rw-r--r--dev-util/ccache/ccache-3.1.9-r1.ebuild32
-rw-r--r--dev-util/ccache/files/ccache-3.1.9-test-gcc-4.8.patch156
-rw-r--r--dev-util/ccache/files/ccache-config-26
4 files changed, 183 insertions, 16 deletions
diff --git a/dev-util/ccache/ChangeLog b/dev-util/ccache/ChangeLog
index d9859ff1f..3a884e216 100644
--- a/dev-util/ccache/ChangeLog
+++ b/dev-util/ccache/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 07 Jul 2013; Christoph Junghans <ottxor@gentoo.org>
+ +files/ccache-3.1.9-test-gcc-4.8.patch, ccache-3.1.9-r1.ebuild,
+ files/ccache-config-2:
+ added mpi use, sync with gx86
+
*ccache-3.1.9-r1 (18 Feb 2013)
18 Feb 2013; Christoph Junghans <ottxor@gentoo.org> +ccache-3.1.9-r1.ebuild,
diff --git a/dev-util/ccache/ccache-3.1.9-r1.ebuild b/dev-util/ccache/ccache-3.1.9-r1.ebuild
index f16a98e46..7b084e16a 100644
--- a/dev-util/ccache/ccache-3.1.9-r1.ebuild
+++ b/dev-util/ccache/ccache-3.1.9-r1.ebuild
@@ -2,9 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ccache-3.1.8.ebuild,v 1.9 2012/12/17 17:51:11 ago Exp $
-EAPI="4"
+EAPI=5
-inherit multilib eutils
+inherit multilib eutils readme.gentoo
DESCRIPTION="fast compiler cache"
HOMEPAGE="http://ccache.samba.org/"
@@ -13,11 +13,12 @@ SRC_URI="http://samba.org/ftp/ccache/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
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"
-IUSE="clang icc"
+IUSE="clang icc mpi"
RDEPEND="sys-libs/zlib
clang? ( sys-devel/clang )
- icc? ( dev-lang/icc )"
+ icc? ( dev-lang/icc )
+ mpi? ( virtual/mpi )"
DEPEND="${RDEPEND}
app-arch/xz-utils"
@@ -25,10 +26,19 @@ src_prepare() {
# make sure we always use system zlib
rm -rf zlib
epatch "${FILESDIR}"/${PN}-3.1.7-no-perl.patch #421609
+ epatch "${FILESDIR}"/${P}-test-gcc-4.8.patch #461966
sed \
-e "/^LIBDIR=/s:lib:$(get_libdir):" \
-e "/^EPREFIX=/s:'':'${EPREFIX}':" \
"${FILESDIR}"/ccache-config-2 > ccache-config || die
+
+ DOC_CONTENTS="To use ccache with **non-Portage** C compiling, add
+ ${EROOT}usr/$(get_libdir)/ccache/bin to the beginning of your path, before ${EROOT}usr/bin.
+ Portage 2.0.46-r11+ will automatically take advantage of ccache with
+ no additional steps. If this is your first install of ccache, type
+ something like this to set a maximum cache size of 2GB:\\n# ccache -M 2G\\n
+ If you are upgrading from an older version than 3.x you should clear all of your caches like so:\\n
+ # CCACHE_DIR='${CCACHE_DIR:-${PORTAGE_TMPDIR}/ccache}' ccache -C"
}
src_install() {
@@ -36,6 +46,8 @@ src_install() {
dodoc AUTHORS.txt MANUAL.txt NEWS.txt README.txt
dobin ccache-config
+
+ readme.gentoo_create_doc
}
pkg_postinst() {
@@ -43,20 +55,12 @@ pkg_postinst() {
"${EROOT}"/usr/bin/ccache-config --install-links ${CHOST}
use icc && "${EROOT}"/usr/bin/ccache-config --install-links icc
use clang && "${EROOT}"/usr/bin/ccache-config --install-links clang
+ use mpi && "${EROOT}"/usr/bin/ccache-config --install-links mpicc
# nuke broken symlinks from previous versions that shouldn't exist
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"
- 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"
+ readme.gentoo_pkg_postinst
}
diff --git a/dev-util/ccache/files/ccache-3.1.9-test-gcc-4.8.patch b/dev-util/ccache/files/ccache-3.1.9-test-gcc-4.8.patch
new file mode 100644
index 000000000..2a28baf02
--- /dev/null
+++ b/dev-util/ccache/files/ccache-3.1.9-test-gcc-4.8.patch
@@ -0,0 +1,156 @@
+https://bugs.gentoo.org/461966
+
+fix from upstream
+
+From b5d63f81c1a83fd4c50b769a96a04f581b7db70c Mon Sep 17 00:00:00 2001
+From: Joel Rosdahl <joel@rosdahl.net>
+Date: Wed, 20 Mar 2013 22:18:16 +0100
+Subject: [PATCH] Fix test suite failure on GCC 4.8
+
+GCC 4.8 includes /usr/include/stdc-predef.h implicitly, and this shows up
+in generated .d files.
+---
+ test.sh | 35 +++++++++++++++++++----------------
+ 1 file changed, 19 insertions(+), 16 deletions(-)
+
+diff --git a/test.sh b/test.sh
+index 3ed9069..3e38387 100755
+--- a/test.sh
++++ b/test.sh
+@@ -3,7 +3,7 @@
+ # A simple test suite for ccache.
+ #
+ # Copyright (C) 2002-2007 Andrew Tridgell
+-# Copyright (C) 2009-2012 Joel Rosdahl
++# Copyright (C) 2009-2013 Joel Rosdahl
+ #
+ # This program is free software; you can redistribute it and/or modify it under
+ # the terms of the GNU General Public License as published by the Free Software
+@@ -562,6 +562,9 @@ int test3;
+ EOF
+ backdate test1.h test2.h test3.h
+
++ $COMPILER -c -Wp,-MD,expected.d test.c
++ expected_d_content=`cat expected.d`
++
+ ##################################################################
+ # First compilation is a miss.
+ testname="first compilation"
+@@ -677,7 +680,7 @@ EOF
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ rm -f other.d
+
+@@ -685,7 +688,7 @@ EOF
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ rm -f other.d
+
+@@ -760,7 +763,7 @@ EOF
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ rm -f test.d
+
+@@ -768,7 +771,7 @@ EOF
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ ##################################################################
+ # Check the scenario of running a ccache with direct mode on a cache
+@@ -780,7 +783,7 @@ EOF
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ rm -f test.d
+
+@@ -788,7 +791,7 @@ EOF
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 1
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ rm -f test.d
+
+@@ -796,7 +799,7 @@ EOF
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 2
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ rm -f test.d
+
+@@ -804,7 +807,7 @@ EOF
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 2
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ ##################################################################
+ # Check that -MF works.
+@@ -815,7 +818,7 @@ EOF
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ rm -f other.d
+
+@@ -823,7 +826,7 @@ EOF
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ ##################################################################
+ # Check that a missing .d file in the cache is handled correctly.
+@@ -835,13 +838,13 @@ EOF
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ $CCACHE $COMPILER -c -MD test.c
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ find $CCACHE_DIR -name '*.d' -exec rm -f '{}' \;
+
+@@ -849,7 +852,7 @@ EOF
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 1
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ ##################################################################
+ # Check that stderr from both the preprocessor and the compiler is emitted
+--
+1.8.1.2
+
diff --git a/dev-util/ccache/files/ccache-config-2 b/dev-util/ccache/files/ccache-config-2
index 444f2e521..e5b6f65fa 100644
--- a/dev-util/ccache/files/ccache-config-2
+++ b/dev-util/ccache/files/ccache-config-2
@@ -2,7 +2,8 @@
#
# ccache-config - helper script for ccache and its ebuild
#
-# Copyright 2003-2012 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
@@ -70,6 +71,7 @@ cc_links() {
local a compilers="gcc cc c++ g++"
[ "${2}" = icc ] && compilers="icc icpc" && set -- "$1"
[ "${2}" = clang ] && compilers="clang clang++" && set -- "$1"
+ [ "${2}" = mpicc ] && compilers="mpicc mpic++ mpiCC" && set -- "$1"
for a in ${compilers} ; do
if [ -n "${2}" ] ; then
# gcc-config doesnt install ${CHOST}-cc, so until
@@ -92,6 +94,6 @@ case "${1}" in
cc_links remove "${2}"
;;
* )
- echo "usage: ${0} {--install-links|--remove-links} [ CHOST|clang|icc ]"
+ echo "usage: ${0} {--install-links|--remove-links} [ CHOST|clang|icc|mpicc ]"
;;
esac