1 |
commit: b7d8543a4bed9f4e23a775b1c65fb23c2c131de5 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 19 19:48:36 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 19 20:10:48 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7d8543a |
7 |
|
8 |
sys-devel/clang: Remove 7.0.9999 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-devel/clang/clang-7.0.9999.ebuild | 298 ---------------------------------- |
13 |
1 file changed, 298 deletions(-) |
14 |
|
15 |
diff --git a/sys-devel/clang/clang-7.0.9999.ebuild b/sys-devel/clang/clang-7.0.9999.ebuild |
16 |
deleted file mode 100644 |
17 |
index 6a5681d1a0e..00000000000 |
18 |
--- a/sys-devel/clang/clang-7.0.9999.ebuild |
19 |
+++ /dev/null |
20 |
@@ -1,298 +0,0 @@ |
21 |
-# Copyright 1999-2018 Gentoo Foundation |
22 |
-# Distributed under the terms of the GNU General Public License v2 |
23 |
- |
24 |
-EAPI=6 |
25 |
- |
26 |
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
27 |
-# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
28 |
-CMAKE_MIN_VERSION=3.7.0-r1 |
29 |
-PYTHON_COMPAT=( python2_7 ) |
30 |
- |
31 |
-inherit cmake-utils eapi7-ver flag-o-matic git-r3 llvm \ |
32 |
- multilib-minimal multiprocessing pax-utils python-single-r1 \ |
33 |
- toolchain-funcs |
34 |
- |
35 |
-DESCRIPTION="C language family frontend for LLVM" |
36 |
-HOMEPAGE="https://llvm.org/" |
37 |
-SRC_URI="" |
38 |
-EGIT_REPO_URI="https://git.llvm.org/git/clang.git |
39 |
- https://github.com/llvm-mirror/clang.git" |
40 |
-EGIT_BRANCH="release_70" |
41 |
- |
42 |
-# Keep in sync with sys-devel/llvm |
43 |
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 |
44 |
- NVPTX PowerPC Sparc SystemZ X86 XCore ) |
45 |
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
46 |
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} |
47 |
- |
48 |
-LICENSE="UoI-NCSA" |
49 |
-SLOT="$(ver_cut 1)" |
50 |
-KEYWORDS="" |
51 |
-IUSE="debug default-compiler-rt default-libcxx doc +static-analyzer |
52 |
- test xml z3 kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" |
53 |
-RESTRICT="!test? ( test )" |
54 |
- |
55 |
-RDEPEND=" |
56 |
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${LLVM_TARGET_USEDEPS// /,},${MULTILIB_USEDEP}] |
57 |
- static-analyzer? ( |
58 |
- dev-lang/perl:* |
59 |
- z3? ( <sci-mathematics/z3-4.6:0= ) |
60 |
- ) |
61 |
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) |
62 |
- ${PYTHON_DEPS}" |
63 |
-# configparser-3.2 breaks the build (3.3 or none at all are fine) |
64 |
-DEPEND="${RDEPEND} |
65 |
- doc? ( dev-python/sphinx ) |
66 |
- xml? ( virtual/pkgconfig ) |
67 |
- !!<dev-python/configparser-3.3.0.2 |
68 |
- ${PYTHON_DEPS}" |
69 |
-RDEPEND="${RDEPEND} |
70 |
- !<sys-devel/llvm-4.0.0_rc:0 |
71 |
- !sys-devel/clang:0" |
72 |
-PDEPEND=" |
73 |
- sys-devel/clang-common |
74 |
- ~sys-devel/clang-runtime-${PV} |
75 |
- default-compiler-rt? ( =sys-libs/compiler-rt-${PV%_*}* ) |
76 |
- default-libcxx? ( >=sys-libs/libcxx-${PV} )" |
77 |
- |
78 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE} |
79 |
- || ( ${ALL_LLVM_TARGETS[*]} )" |
80 |
- |
81 |
-# We need extra level of indirection for CLANG_RESOURCE_DIR |
82 |
-S=${WORKDIR}/x/y/${P} |
83 |
- |
84 |
-# least intrusive of all |
85 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
86 |
- |
87 |
-# Multilib notes: |
88 |
-# 1. ABI_* flags control ABIs libclang* is built for only. |
89 |
-# 2. clang is always capable of compiling code for all ABIs for enabled |
90 |
-# target. However, you will need appropriate crt* files (installed |
91 |
-# e.g. by sys-devel/gcc and sys-libs/glibc). |
92 |
-# 3. ${CHOST}-clang wrappers are always installed for all ABIs included |
93 |
-# in the current profile (i.e. alike supported by sys-devel/gcc). |
94 |
-# |
95 |
-# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
96 |
-# multilib clang* libraries (not runtime, not wrappers). |
97 |
- |
98 |
-pkg_setup() { |
99 |
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup |
100 |
- python-single-r1_pkg_setup |
101 |
-} |
102 |
- |
103 |
-src_unpack() { |
104 |
- # create extra parent dir for CLANG_RESOURCE_DIR |
105 |
- mkdir -p x/y || die |
106 |
- cd x/y || die |
107 |
- |
108 |
- git-r3_fetch "https://git.llvm.org/git/clang-tools-extra.git |
109 |
- https://github.com/llvm-mirror/clang-tools-extra.git" |
110 |
- if use test; then |
111 |
- # needed for patched gtest |
112 |
- git-r3_fetch "https://git.llvm.org/git/llvm.git |
113 |
- https://github.com/llvm-mirror/llvm.git" |
114 |
- fi |
115 |
- git-r3_fetch |
116 |
- |
117 |
- git-r3_checkout https://llvm.org/git/clang-tools-extra.git \ |
118 |
- "${S}"/tools/extra |
119 |
- if use test; then |
120 |
- git-r3_checkout https://llvm.org/git/llvm.git \ |
121 |
- "${WORKDIR}"/llvm '' \ |
122 |
- lib/Testing/Support utils/{lit,llvm-lit,unittest} |
123 |
- fi |
124 |
- git-r3_checkout "${EGIT_REPO_URI}" "${S}" |
125 |
-} |
126 |
- |
127 |
-multilib_src_configure() { |
128 |
- local llvm_version=$(llvm-config --version) || die |
129 |
- local clang_version=$(ver_cut 1-3 "${llvm_version}") |
130 |
- |
131 |
- local mycmakeargs=( |
132 |
- # ensure that the correct llvm-config is used |
133 |
- -DLLVM_CONFIG="$(type -P "${CHOST}-llvm-config")" |
134 |
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" |
135 |
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" |
136 |
- # relative to bindir |
137 |
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" |
138 |
- |
139 |
- -DBUILD_SHARED_LIBS=ON |
140 |
- -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" |
141 |
- -DLLVM_BUILD_TESTS=$(usex test) |
142 |
- |
143 |
- # these are not propagated reliably, so redefine them |
144 |
- -DLLVM_ENABLE_EH=ON |
145 |
- -DLLVM_ENABLE_RTTI=ON |
146 |
- |
147 |
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) |
148 |
- # libgomp support fails to find headers without explicit -I |
149 |
- # furthermore, it provides only syntax checking |
150 |
- -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp |
151 |
- |
152 |
- # override default stdlib and rtlib |
153 |
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") |
154 |
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") |
155 |
- |
156 |
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) |
157 |
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) |
158 |
- # z3 is not multilib-friendly |
159 |
- -DCLANG_ANALYZER_BUILD_Z3=$(multilib_native_usex z3) |
160 |
- ) |
161 |
- use test && mycmakeargs+=( |
162 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
163 |
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |
164 |
- ) |
165 |
- |
166 |
- if multilib_is_native_abi; then |
167 |
- mycmakeargs+=( |
168 |
- # normally copied from LLVM_INCLUDE_DOCS but the latter |
169 |
- # is lacking value in stand-alone builds |
170 |
- -DCLANG_INCLUDE_DOCS=$(usex doc) |
171 |
- -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=$(usex doc) |
172 |
- ) |
173 |
- use doc && mycmakeargs+=( |
174 |
- -DLLVM_BUILD_DOCS=ON |
175 |
- -DLLVM_ENABLE_SPHINX=ON |
176 |
- -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" |
177 |
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" |
178 |
- -DSPHINX_WARNINGS_AS_ERRORS=OFF |
179 |
- ) |
180 |
- use z3 && mycmakeargs+=( |
181 |
- -DZ3_INCLUDE_DIR="${EPREFIX}/usr/include/z3" |
182 |
- ) |
183 |
- else |
184 |
- mycmakeargs+=( |
185 |
- -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF |
186 |
- ) |
187 |
- fi |
188 |
- |
189 |
- if [[ -n ${EPREFIX} ]]; then |
190 |
- mycmakeargs+=( |
191 |
- -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" |
192 |
- ) |
193 |
- fi |
194 |
- |
195 |
- if tc-is-cross-compiler; then |
196 |
- [[ -x "/usr/bin/clang-tblgen" ]] \ |
197 |
- || die "/usr/bin/clang-tblgen not found or usable" |
198 |
- mycmakeargs+=( |
199 |
- -DCMAKE_CROSSCOMPILING=ON |
200 |
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen |
201 |
- ) |
202 |
- fi |
203 |
- |
204 |
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
205 |
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
206 |
- cmake-utils_src_configure |
207 |
-} |
208 |
- |
209 |
-multilib_src_compile() { |
210 |
- cmake-utils_src_compile |
211 |
- |
212 |
- # provide a symlink for tests |
213 |
- if [[ ! -L ${WORKDIR}/lib/clang ]]; then |
214 |
- mkdir -p "${WORKDIR}"/lib || die |
215 |
- ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die |
216 |
- fi |
217 |
-} |
218 |
- |
219 |
-multilib_src_test() { |
220 |
- # respect TMPDIR! |
221 |
- local -x LIT_PRESERVES_TMP=1 |
222 |
- cmake-utils_src_make check-clang |
223 |
- multilib_is_native_abi && cmake-utils_src_make check-clang-tools |
224 |
-} |
225 |
- |
226 |
-src_install() { |
227 |
- MULTILIB_WRAPPED_HEADERS=( |
228 |
- /usr/include/clang/Config/config.h |
229 |
- ) |
230 |
- |
231 |
- multilib-minimal_src_install |
232 |
- |
233 |
- # Move runtime headers to /usr/lib/clang, where they belong |
234 |
- mv "${ED%/}"/usr/include/clangrt "${ED%/}"/usr/lib/clang || die |
235 |
- # move (remaining) wrapped headers back |
236 |
- mv "${ED%/}"/usr/include "${ED%/}"/usr/lib/llvm/${SLOT}/include || die |
237 |
- |
238 |
- # Apply CHOST and version suffix to clang tools |
239 |
- # note: we use two version components here (vs 3 in runtime path) |
240 |
- local llvm_version=$(llvm-config --version) || die |
241 |
- local clang_version=$(ver_cut 1 "${llvm_version}") |
242 |
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}") |
243 |
- local clang_tools=( clang clang++ clang-cl clang-cpp ) |
244 |
- local abi i |
245 |
- |
246 |
- # cmake gives us: |
247 |
- # - clang-X |
248 |
- # - clang -> clang-X |
249 |
- # - clang++, clang-cl, clang-cpp -> clang |
250 |
- # we want to have: |
251 |
- # - clang-X |
252 |
- # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X |
253 |
- # - clang, clang++, clang-cl, clang-cpp -> clang*-X |
254 |
- # also in CHOST variant |
255 |
- for i in "${clang_tools[@]:1}"; do |
256 |
- rm "${ED%/}/usr/lib/llvm/${SLOT}/bin/${i}" || die |
257 |
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}" |
258 |
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}" |
259 |
- done |
260 |
- |
261 |
- # now create target symlinks for all supported ABIs |
262 |
- for abi in $(get_all_abis); do |
263 |
- local abi_chost=$(get_abi_CHOST "${abi}") |
264 |
- for i in "${clang_tools[@]}"; do |
265 |
- dosym "${i}-${clang_version}" \ |
266 |
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}" |
267 |
- dosym "${abi_chost}-${i}-${clang_version}" \ |
268 |
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}" |
269 |
- done |
270 |
- done |
271 |
- |
272 |
- # Remove unnecessary headers on FreeBSD, bug #417171 |
273 |
- if use kernel_FreeBSD; then |
274 |
- rm "${ED}"usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die |
275 |
- fi |
276 |
-} |
277 |
- |
278 |
-multilib_src_install() { |
279 |
- cmake-utils_src_install |
280 |
- |
281 |
- # move headers to /usr/include for wrapping & ABI mismatch checks |
282 |
- # (also drop the version suffix from runtime headers) |
283 |
- rm -rf "${ED%/}"/usr/include || die |
284 |
- mv "${ED%/}"/usr/lib/llvm/${SLOT}/include "${ED%/}"/usr/include || die |
285 |
- mv "${ED%/}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED%/}"/usr/include/clangrt || die |
286 |
-} |
287 |
- |
288 |
-multilib_src_install_all() { |
289 |
- python_fix_shebang "${ED}" |
290 |
- if use static-analyzer; then |
291 |
- python_optimize "${ED}"usr/lib/llvm/${SLOT}/share/scan-view |
292 |
- fi |
293 |
- |
294 |
- docompress "/usr/lib/llvm/${SLOT}/share/man" |
295 |
- # match 'html' non-compression |
296 |
- use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" |
297 |
- # +x for some reason; TODO: investigate |
298 |
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1" |
299 |
-} |
300 |
- |
301 |
-pkg_postinst() { |
302 |
- if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then |
303 |
- eselect compiler-shadow update all |
304 |
- fi |
305 |
- |
306 |
- elog "You can find additional utility scripts in:" |
307 |
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang" |
308 |
- elog "To use these scripts, you will need Python 2.7. Some of them are vim" |
309 |
- elog "integration scripts (with instructions inside). The run-clang-tidy.py" |
310 |
- elog "scripts requires the following additional package:" |
311 |
- elog " dev-python/pyyaml" |
312 |
-} |
313 |
- |
314 |
-pkg_postrm() { |
315 |
- if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then |
316 |
- eselect compiler-shadow clean all |
317 |
- fi |
318 |
-} |