Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/lld/
Date: Sun, 29 Jan 2023 14:36:11
Message-Id: 1675002952.26b6ff712cb15a22b9c3bafe4ad273912d02d045.chewi@gentoo
1 commit: 26b6ff712cb15a22b9c3bafe4ad273912d02d045
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 29 14:35:52 2023 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 29 14:35:52 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26b6ff71
7
8 sys-devel/lld: Simplify cross-compile with BDEPEND
9
10 I was so used to fixing LLVM and Clang with has_version, due to the dependency
11 being circular, that I forgot that I could just use BDEPEND in this case.
12
13 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
14
15 sys-devel/lld/lld-15.0.7.ebuild | 11 ++++-------
16 sys-devel/lld/lld-16.0.0.9999.ebuild | 11 ++++-------
17 sys-devel/lld/lld-16.0.0_pre20230107.ebuild | 11 ++++-------
18 sys-devel/lld/lld-16.0.0_pre20230127.ebuild | 11 ++++-------
19 sys-devel/lld/lld-17.0.0.9999.ebuild | 11 ++++-------
20 5 files changed, 20 insertions(+), 35 deletions(-)
21
22 diff --git a/sys-devel/lld/lld-15.0.7.ebuild b/sys-devel/lld/lld-15.0.7.ebuild
23 index 6156f9bae682..9f1faebcbbbf 100644
24 --- a/sys-devel/lld/lld-15.0.7.ebuild
25 +++ b/sys-devel/lld/lld-15.0.7.ebuild
26 @@ -24,6 +24,7 @@ RDEPEND="
27 !sys-devel/lld:0
28 "
29 BDEPEND="
30 + sys-devel/llvm:${LLVM_MAJOR}
31 test? (
32 >=dev-util/cmake-3.16
33 $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
34 @@ -77,13 +78,9 @@ src_configure() {
35 -DPython3_EXECUTABLE="${PYTHON}"
36 )
37
38 - if tc-is-cross-compiler; then
39 - has_version -b sys-devel/llvm:${LLVM_MAJOR} ||
40 - die "sys-devel/llvm:${LLVM_MAJOR} is required on the build host."
41 - mycmakeargs+=(
42 - -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
43 - )
44 - fi
45 + tc-is-cross-compiler && mycmakeargs+=(
46 + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
47 + )
48
49 cmake_src_configure
50 }
51
52 diff --git a/sys-devel/lld/lld-16.0.0.9999.ebuild b/sys-devel/lld/lld-16.0.0.9999.ebuild
53 index c23949899ce7..d22c1fb13951 100644
54 --- a/sys-devel/lld/lld-16.0.0.9999.ebuild
55 +++ b/sys-devel/lld/lld-16.0.0.9999.ebuild
56 @@ -25,6 +25,7 @@ RDEPEND="
57 !sys-devel/lld:0
58 "
59 BDEPEND="
60 + sys-devel/llvm:${LLVM_MAJOR}
61 test? (
62 >=dev-util/cmake-3.16
63 $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
64 @@ -76,13 +77,9 @@ src_configure() {
65 -DPython3_EXECUTABLE="${PYTHON}"
66 )
67
68 - if tc-is-cross-compiler; then
69 - has_version -b sys-devel/llvm:${LLVM_MAJOR} ||
70 - die "sys-devel/llvm:${LLVM_MAJOR} is required on the build host."
71 - mycmakeargs+=(
72 - -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
73 - )
74 - fi
75 + tc-is-cross-compiler && mycmakeargs+=(
76 + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
77 + )
78
79 cmake_src_configure
80 }
81
82 diff --git a/sys-devel/lld/lld-16.0.0_pre20230107.ebuild b/sys-devel/lld/lld-16.0.0_pre20230107.ebuild
83 index c23949899ce7..d22c1fb13951 100644
84 --- a/sys-devel/lld/lld-16.0.0_pre20230107.ebuild
85 +++ b/sys-devel/lld/lld-16.0.0_pre20230107.ebuild
86 @@ -25,6 +25,7 @@ RDEPEND="
87 !sys-devel/lld:0
88 "
89 BDEPEND="
90 + sys-devel/llvm:${LLVM_MAJOR}
91 test? (
92 >=dev-util/cmake-3.16
93 $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
94 @@ -76,13 +77,9 @@ src_configure() {
95 -DPython3_EXECUTABLE="${PYTHON}"
96 )
97
98 - if tc-is-cross-compiler; then
99 - has_version -b sys-devel/llvm:${LLVM_MAJOR} ||
100 - die "sys-devel/llvm:${LLVM_MAJOR} is required on the build host."
101 - mycmakeargs+=(
102 - -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
103 - )
104 - fi
105 + tc-is-cross-compiler && mycmakeargs+=(
106 + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
107 + )
108
109 cmake_src_configure
110 }
111
112 diff --git a/sys-devel/lld/lld-16.0.0_pre20230127.ebuild b/sys-devel/lld/lld-16.0.0_pre20230127.ebuild
113 index c23949899ce7..d22c1fb13951 100644
114 --- a/sys-devel/lld/lld-16.0.0_pre20230127.ebuild
115 +++ b/sys-devel/lld/lld-16.0.0_pre20230127.ebuild
116 @@ -25,6 +25,7 @@ RDEPEND="
117 !sys-devel/lld:0
118 "
119 BDEPEND="
120 + sys-devel/llvm:${LLVM_MAJOR}
121 test? (
122 >=dev-util/cmake-3.16
123 $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
124 @@ -76,13 +77,9 @@ src_configure() {
125 -DPython3_EXECUTABLE="${PYTHON}"
126 )
127
128 - if tc-is-cross-compiler; then
129 - has_version -b sys-devel/llvm:${LLVM_MAJOR} ||
130 - die "sys-devel/llvm:${LLVM_MAJOR} is required on the build host."
131 - mycmakeargs+=(
132 - -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
133 - )
134 - fi
135 + tc-is-cross-compiler && mycmakeargs+=(
136 + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
137 + )
138
139 cmake_src_configure
140 }
141
142 diff --git a/sys-devel/lld/lld-17.0.0.9999.ebuild b/sys-devel/lld/lld-17.0.0.9999.ebuild
143 index c23949899ce7..d22c1fb13951 100644
144 --- a/sys-devel/lld/lld-17.0.0.9999.ebuild
145 +++ b/sys-devel/lld/lld-17.0.0.9999.ebuild
146 @@ -25,6 +25,7 @@ RDEPEND="
147 !sys-devel/lld:0
148 "
149 BDEPEND="
150 + sys-devel/llvm:${LLVM_MAJOR}
151 test? (
152 >=dev-util/cmake-3.16
153 $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
154 @@ -76,13 +77,9 @@ src_configure() {
155 -DPython3_EXECUTABLE="${PYTHON}"
156 )
157
158 - if tc-is-cross-compiler; then
159 - has_version -b sys-devel/llvm:${LLVM_MAJOR} ||
160 - die "sys-devel/llvm:${LLVM_MAJOR} is required on the build host."
161 - mycmakeargs+=(
162 - -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
163 - )
164 - fi
165 + tc-is-cross-compiler && mycmakeargs+=(
166 + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
167 + )
168
169 cmake_src_configure
170 }