Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/lld/
Date: Wed, 01 Aug 2018 20:53:38
Message-Id: 1533156799.d1a30469768b416a6b0cb5bec2324fe419cce4e8.mgorny@gentoo
1 commit: d1a30469768b416a6b0cb5bec2324fe419cce4e8
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 1 16:39:37 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 1 20:53:19 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1a30469
7
8 sys-devel/lld: Branch out LLVM 7.0
9
10 sys-devel/lld/lld-7.0.9999.ebuild | 75 +++++++++++++++++++++++++++++++++++++++
11 1 file changed, 75 insertions(+)
12
13 diff --git a/sys-devel/lld/lld-7.0.9999.ebuild b/sys-devel/lld/lld-7.0.9999.ebuild
14 new file mode 100644
15 index 00000000000..2245210632c
16 --- /dev/null
17 +++ b/sys-devel/lld/lld-7.0.9999.ebuild
18 @@ -0,0 +1,75 @@
19 +# Copyright 1999-2018 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +
22 +EAPI=6
23 +
24 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
25 +# (needed due to CMAKE_BUILD_TYPE != Gentoo)
26 +CMAKE_MIN_VERSION=3.7.0-r1
27 +PYTHON_COMPAT=( python2_7 )
28 +
29 +inherit cmake-utils git-r3 llvm multiprocessing python-any-r1
30 +
31 +DESCRIPTION="The LLVM linker (link editor)"
32 +HOMEPAGE="https://llvm.org/"
33 +SRC_URI=""
34 +EGIT_REPO_URI="https://git.llvm.org/git/lld.git
35 + https://github.com/llvm-mirror/lld.git"
36 +EGIT_BRANCH="release_70"
37 +
38 +LICENSE="UoI-NCSA"
39 +SLOT="0"
40 +KEYWORDS=""
41 +IUSE="test"
42 +RESTRICT="!test? ( test )"
43 +
44 +RDEPEND="~sys-devel/llvm-${PV}"
45 +DEPEND="${RDEPEND}
46 + test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )"
47 +
48 +# least intrusive of all
49 +CMAKE_BUILD_TYPE=RelWithDebInfo
50 +
51 +python_check_deps() {
52 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
53 +}
54 +
55 +pkg_setup() {
56 + LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
57 + use test && python-any-r1_pkg_setup
58 +}
59 +
60 +src_unpack() {
61 + if use test; then
62 + # needed for patched gtest
63 + git-r3_fetch "https://git.llvm.org/git/llvm.git
64 + https://github.com/llvm-mirror/llvm.git"
65 + fi
66 + git-r3_fetch
67 +
68 + if use test; then
69 + git-r3_checkout https://llvm.org/git/llvm.git \
70 + "${WORKDIR}"/llvm '' utils/{lit,unittest}
71 + fi
72 + git-r3_checkout
73 +}
74 +
75 +src_configure() {
76 + local mycmakeargs=(
77 + -DBUILD_SHARED_LIBS=ON
78 +
79 + -DLLVM_INCLUDE_TESTS=$(usex test)
80 + )
81 + use test && mycmakeargs+=(
82 + -DLLVM_BUILD_TESTS=ON
83 + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
84 + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
85 + -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
86 + )
87 +
88 + cmake-utils_src_configure
89 +}
90 +
91 +src_test() {
92 + cmake-utils_src_make check-lld
93 +}