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: Mon, 24 Jul 2017 19:04:03
Message-Id: 1500923025.cbda03c26b5c5c26662fce4f1f8114b4bbfa9682.mgorny@gentoo
1 commit: cbda03c26b5c5c26662fce4f1f8114b4bbfa9682
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 23 16:44:29 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 24 19:03:45 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbda03c2
7
8 sys-devel/lld: Branch for 5.0.0 release
9
10 sys-devel/lld/lld-5.0.9999.ebuild | 75 +++++++++++++++++++++++++++++++++++++++
11 1 file changed, 75 insertions(+)
12
13 diff --git a/sys-devel/lld/lld-5.0.9999.ebuild b/sys-devel/lld/lld-5.0.9999.ebuild
14 new file mode 100644
15 index 00000000000..6c2601f5d42
16 --- /dev/null
17 +++ b/sys-devel/lld/lld-5.0.9999.ebuild
18 @@ -0,0 +1,75 @@
19 +# Copyright 1999-2017 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 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_50"
37 +
38 +LICENSE="UoI-NCSA"
39 +SLOT="0"
40 +KEYWORDS=""
41 +IUSE="test"
42 +
43 +RDEPEND="~sys-devel/llvm-${PV}"
44 +DEPEND="${RDEPEND}
45 + test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )"
46 +
47 +# least intrusive of all
48 +CMAKE_BUILD_TYPE=RelWithDebInfo
49 +
50 +python_check_deps() {
51 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
52 +}
53 +
54 +pkg_setup() {
55 + LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
56 + use test && python-any-r1_pkg_setup
57 +}
58 +
59 +src_unpack() {
60 + if use test; then
61 + # needed for patched gtest
62 + git-r3_fetch "https://git.llvm.org/git/llvm.git
63 + https://github.com/llvm-mirror/llvm.git"
64 + fi
65 + git-r3_fetch
66 +
67 + if use test; then
68 + git-r3_checkout https://llvm.org/git/llvm.git \
69 + "${WORKDIR}"/llvm
70 + fi
71 + git-r3_checkout
72 +}
73 +
74 +src_configure() {
75 + local mycmakeargs=(
76 + -DBUILD_SHARED_LIBS=ON
77 +
78 + -DLLVM_INCLUDE_TESTS=$(usex test)
79 + # TODO: fix detecting pthread upstream in stand-alone build
80 + -DPTHREAD_LIB='-lpthread'
81 + )
82 + use test && mycmakeargs+=(
83 + -DLLVM_BUILD_TESTS=ON
84 + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
85 + -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
86 + )
87 +
88 + cmake-utils_src_configure
89 +}
90 +
91 +src_test() {
92 + cmake-utils_src_make check-lld
93 +}