1 |
commit: 1f49d9e2269c9c81fa1e0dac5589b5e6ad15fefa |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 8 14:40:10 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 8 14:50:43 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f49d9e2 |
7 |
|
8 |
sys-libs/libcxxrt: Required gcc-6+ for tests |
9 |
|
10 |
Closes: https://bugs.gentoo.org/635528 |
11 |
|
12 |
sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild | 18 +++++++++++++++++- |
13 |
sys-libs/libcxxrt/libcxxrt-9999.ebuild | 16 ++++++++++++++++ |
14 |
2 files changed, 33 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild b/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild |
17 |
index 8d68b661f0c..3eff48dfd4e 100644 |
18 |
--- a/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild |
19 |
+++ b/sys-libs/libcxxrt/libcxxrt-0.0_p20170515.ebuild |
20 |
@@ -25,7 +25,7 @@ if [ "${PV%9999}" = "${PV}" ] ; then |
21 |
else |
22 |
KEYWORDS="" |
23 |
fi |
24 |
-IUSE="+libunwind +static-libs" |
25 |
+IUSE="+libunwind +static-libs test" |
26 |
|
27 |
RDEPEND="libunwind? ( || ( >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}] |
28 |
sys-libs/llvm-libunwind[static-libs?,${MULTILIB_USEDEP}] ) )" |
29 |
@@ -34,6 +34,22 @@ DEPEND="${RDEPEND} |
30 |
|
31 |
DOCS=( AUTHORS COPYRIGHT README ) |
32 |
|
33 |
+gcc_check() { |
34 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]] && use test; then |
35 |
+ eerror "At least gcc-6 is required to run tests. Please switch to a newer" |
36 |
+ eerror "compiler before proceeding." |
37 |
+ die "gcc-6 required for tests" |
38 |
+ fi |
39 |
+} |
40 |
+ |
41 |
+pkg_pretend() { |
42 |
+ gcc_check |
43 |
+} |
44 |
+ |
45 |
+pkg_setup() { |
46 |
+ gcc_check |
47 |
+} |
48 |
+ |
49 |
src_prepare() { |
50 |
cp "${FILESDIR}/Makefile" src/ || die |
51 |
cp "${FILESDIR}/Makefile.test" test/Makefile || die |
52 |
|
53 |
diff --git a/sys-libs/libcxxrt/libcxxrt-9999.ebuild b/sys-libs/libcxxrt/libcxxrt-9999.ebuild |
54 |
index 8d68b661f0c..1b4a9c67f1f 100644 |
55 |
--- a/sys-libs/libcxxrt/libcxxrt-9999.ebuild |
56 |
+++ b/sys-libs/libcxxrt/libcxxrt-9999.ebuild |
57 |
@@ -34,6 +34,22 @@ DEPEND="${RDEPEND} |
58 |
|
59 |
DOCS=( AUTHORS COPYRIGHT README ) |
60 |
|
61 |
+gcc_check() { |
62 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]] && use test; then |
63 |
+ eerror "At least gcc-6 is required to run tests. Please switch to a newer" |
64 |
+ eerror "compiler before proceeding." |
65 |
+ die "gcc-6 required for tests" |
66 |
+ fi |
67 |
+} |
68 |
+ |
69 |
+pkg_pretend() { |
70 |
+ gcc_check |
71 |
+} |
72 |
+ |
73 |
+pkg_setup() { |
74 |
+ gcc_check |
75 |
+} |
76 |
+ |
77 |
src_prepare() { |
78 |
cp "${FILESDIR}/Makefile" src/ || die |
79 |
cp "${FILESDIR}/Makefile.test" test/Makefile || die |