summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-12-08 15:40:10 +0100
committerMichał Górny <mgorny@gentoo.org>2017-12-08 15:50:43 +0100
commit1f49d9e2269c9c81fa1e0dac5589b5e6ad15fefa (patch)
tree740388720d5b44c40a3f57320257d64415f09146
parentsci-chemistry/vmd: Version bump (diff)
downloadgentoo-1f49d9e2269c9c81fa1e0dac5589b5e6ad15fefa.tar.gz
gentoo-1f49d9e2269c9c81fa1e0dac5589b5e6ad15fefa.tar.bz2
gentoo-1f49d9e2269c9c81fa1e0dac5589b5e6ad15fefa.zip
sys-libs/libcxxrt: Required gcc-6+ for tests
Closes: https://bugs.gentoo.org/635528
-rw-r--r--sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild18
-rw-r--r--sys-libs/libcxxrt/libcxxrt-9999.ebuild16
2 files changed, 33 insertions, 1 deletions
diff --git a/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild b/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild
index 8d68b661f0c3..3eff48dfd4e0 100644
--- a/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild
+++ b/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild
@@ -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
diff --git a/sys-libs/libcxxrt/libcxxrt-9999.ebuild b/sys-libs/libcxxrt/libcxxrt-9999.ebuild
index 8d68b661f0c3..1b4a9c67f1f4 100644
--- a/sys-libs/libcxxrt/libcxxrt-9999.ebuild
+++ b/sys-libs/libcxxrt/libcxxrt-9999.ebuild
@@ -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