sys-libs/libcxxrt: Required gcc-6+ for tests

Closes: https://bugs.gentoo.org/635528
This commit is contained in:
Michał Górny
2017-12-08 15:40:10 +01:00
parent 446a9f633b
commit 1f49d9e226
2 changed files with 33 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ if [ "${PV%9999}" = "${PV}" ] ; then
else
KEYWORDS=""
fi
IUSE="+libunwind +static-libs"
IUSE="+libunwind +static-libs test"
RDEPEND="libunwind? ( || ( >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
sys-libs/llvm-libunwind[static-libs?,${MULTILIB_USEDEP}] ) )"
@@ -34,6 +34,22 @@ DEPEND="${RDEPEND}
DOCS=( AUTHORS COPYRIGHT README )
gcc_check() {
if tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]] && use test; then
eerror "At least gcc-6 is required to run tests. Please switch to a newer"
eerror "compiler before proceeding."
die "gcc-6 required for tests"
fi
}
pkg_pretend() {
gcc_check
}
pkg_setup() {
gcc_check
}
src_prepare() {
cp "${FILESDIR}/Makefile" src/ || die
cp "${FILESDIR}/Makefile.test" test/Makefile || die

View File

@@ -34,6 +34,22 @@ DEPEND="${RDEPEND}
DOCS=( AUTHORS COPYRIGHT README )
gcc_check() {
if tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]] && use test; then
eerror "At least gcc-6 is required to run tests. Please switch to a newer"
eerror "compiler before proceeding."
die "gcc-6 required for tests"
fi
}
pkg_pretend() {
gcc_check
}
pkg_setup() {
gcc_check
}
src_prepare() {
cp "${FILESDIR}/Makefile" src/ || die
cp "${FILESDIR}/Makefile.test" test/Makefile || die