Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 3/8] sys-devel/llvm: Port 9+ to llvm.org.eclass
Date: Fri, 01 Nov 2019 17:40:51
Message-Id: 20191101173927.146967-3-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/8] llvm.org.eclass: New eclass to help maintaining LLVM by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 sys-devel/llvm/llvm-10.0.0.9999.ebuild | 14 ++++----------
4 sys-devel/llvm/llvm-9.0.0.ebuild | 20 +++++++++++++++-----
5 sys-devel/llvm/llvm-9.0.1.9999.ebuild | 15 ++++-----------
6 3 files changed, 23 insertions(+), 26 deletions(-)
7
8 diff --git a/sys-devel/llvm/llvm-10.0.0.9999.ebuild b/sys-devel/llvm/llvm-10.0.0.9999.ebuild
9 index c5cd658cd7b0..062bef474e01 100644
10 --- a/sys-devel/llvm/llvm-10.0.0.9999.ebuild
11 +++ b/sys-devel/llvm/llvm-10.0.0.9999.ebuild
12 @@ -8,14 +8,13 @@ EAPI=7
13 CMAKE_MIN_VERSION=3.7.0-r1
14 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
15
16 -inherit cmake-utils git-r3 multilib-minimal multiprocessing pax-utils \
17 - python-any-r1 toolchain-funcs
18 +inherit cmake-utils llvm.org multilib-minimal multiprocessing \
19 + pax-utils python-any-r1 toolchain-funcs
20
21 DESCRIPTION="Low Level Virtual Machine"
22 HOMEPAGE="https://llvm.org/"
23 -SRC_URI=""
24 -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
25 -S=${WORKDIR}/${P}/llvm
26 +LLVM_COMPONENTS=( llvm )
27 +llvm.org_set_globals
28
29 # Those are in lib/Targets, without explicit CMakeLists.txt mention
30 ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR )
31 @@ -91,11 +90,6 @@ python_check_deps() {
32 has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
33 }
34
35 -src_unpack() {
36 - git-r3_fetch
37 - git-r3_checkout '' '' '' llvm
38 -}
39 -
40 check_live_ebuild() {
41 local prod_targets=(
42 $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
43 diff --git a/sys-devel/llvm/llvm-9.0.0.ebuild b/sys-devel/llvm/llvm-9.0.0.ebuild
44 index 62d66ff6800b..3fee2f3dffd0 100644
45 --- a/sys-devel/llvm/llvm-9.0.0.ebuild
46 +++ b/sys-devel/llvm/llvm-9.0.0.ebuild
47 @@ -8,15 +8,15 @@ EAPI=7
48 CMAKE_MIN_VERSION=3.7.0-r1
49 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
50
51 -inherit cmake-utils multilib-minimal multiprocessing pax-utils \
52 - python-any-r1 toolchain-funcs
53 +inherit cmake-utils llvm.org multilib-minimal multiprocessing \
54 + pax-utils python-any-r1 toolchain-funcs
55
56 -MY_P=${P}.src
57 DESCRIPTION="Low Level Virtual Machine"
58 HOMEPAGE="https://llvm.org/"
59 -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz
60 +SRC_URI="
61 !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )"
62 -S=${WORKDIR}/${MY_P}
63 +LLVM_COMPONENTS=( llvm )
64 +llvm.org_set_globals
65
66 # Keep in sync with CMakeLists.txt
67 ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
68 @@ -88,6 +88,16 @@ python_check_deps() {
69 has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
70 }
71
72 +src_unpack() {
73 + llvm.org_src_unpack
74 +
75 + if ! use doc; then
76 + ebegin "Unpacking llvm-${PV}-manpages.tar.bz2"
77 + tar -xf "${DISTDIR}/llvm-${PV}-manpages.tar.bz2" || die
78 + eend
79 + fi
80 +}
81 +
82 src_prepare() {
83 # Fix llvm-config for shared linking and sane flags
84 # https://bugs.gentoo.org/show_bug.cgi?id=565358
85 diff --git a/sys-devel/llvm/llvm-9.0.1.9999.ebuild b/sys-devel/llvm/llvm-9.0.1.9999.ebuild
86 index 45e29fba1c7b..09fb33203ad2 100644
87 --- a/sys-devel/llvm/llvm-9.0.1.9999.ebuild
88 +++ b/sys-devel/llvm/llvm-9.0.1.9999.ebuild
89 @@ -8,15 +8,13 @@ EAPI=7
90 CMAKE_MIN_VERSION=3.7.0-r1
91 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
92
93 -inherit cmake-utils git-r3 multilib-minimal multiprocessing pax-utils \
94 - python-any-r1 toolchain-funcs
95 +inherit cmake-utils llvm.org multilib-minimal multiprocessing \
96 + pax-utils python-any-r1 toolchain-funcs
97
98 DESCRIPTION="Low Level Virtual Machine"
99 HOMEPAGE="https://llvm.org/"
100 -SRC_URI=""
101 -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
102 -EGIT_BRANCH="release/9.x"
103 -S=${WORKDIR}/${P}/llvm
104 +LLVM_COMPONENTS=( llvm )
105 +llvm.org_set_globals
106
107 # Keep in sync with CMakeLists.txt
108 ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
109 @@ -88,11 +86,6 @@ python_check_deps() {
110 has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
111 }
112
113 -src_unpack() {
114 - git-r3_fetch
115 - git-r3_checkout '' '' '' llvm
116 -}
117 -
118 src_prepare() {
119 # Fix llvm-config for shared linking and sane flags
120 # https://bugs.gentoo.org/show_bug.cgi?id=565358
121 --
122 2.23.0