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 17/18] sys-libs/libcxx: Dedupe with new eclass code
Date: Sat, 20 Jun 2020 21:22:38
Message-Id: 20200620211624.427466-18-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/18] llvm.org.eclass: more deduplication with packages by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 sys-libs/libcxx/libcxx-10.0.1.9999.ebuild | 15 +++------------
4 sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild | 15 +++------------
5 sys-libs/libcxx/libcxx-11.0.0.9999.ebuild | 15 +++------------
6 3 files changed, 9 insertions(+), 36 deletions(-)
7
8 diff --git a/sys-libs/libcxx/libcxx-10.0.1.9999.ebuild b/sys-libs/libcxx/libcxx-10.0.1.9999.ebuild
9 index 055385df1c68..f96a537e3541 100644
10 --- a/sys-libs/libcxx/libcxx-10.0.1.9999.ebuild
11 +++ b/sys-libs/libcxx/libcxx-10.0.1.9999.ebuild
12 @@ -5,8 +5,7 @@ EAPI=7
13
14 CMAKE_ECLASS=cmake
15 PYTHON_COMPAT=( python3_{6..9} )
16 -inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \
17 - toolchain-funcs
18 +inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
19
20 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
21 HOMEPAGE="https://libcxx.llvm.org/"
22 @@ -34,9 +33,6 @@ BDEPEND="
23
24 DOCS=( CREDITS.TXT )
25
26 -# least intrusive of all
27 -CMAKE_BUILD_TYPE=RelWithDebInfo
28 -
29 python_check_deps() {
30 has_version "dev-python/lit[${PYTHON_USEDEP}]"
31 }
32 @@ -58,10 +54,7 @@ src_prepare() {
33 # out-of-tree build.
34 eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
35
36 - # cmake eclasses suck by forcing ${S} here
37 - CMAKE_USE_DIR=${S} \
38 - S=${WORKDIR} \
39 - cmake_src_prepare
40 + llvm.org_src_prepare
41 }
42
43 test_compiler() {
44 @@ -132,13 +125,11 @@ multilib_src_configure() {
45
46 if use test; then
47 local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
48 - local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
49 -
50 [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
51
52 mycmakeargs+=(
53 -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
54 - -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
55 + -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
56 )
57 fi
58 cmake_src_configure
59 diff --git a/sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild b/sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild
60 index 055385df1c68..f96a537e3541 100644
61 --- a/sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild
62 +++ b/sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild
63 @@ -5,8 +5,7 @@ EAPI=7
64
65 CMAKE_ECLASS=cmake
66 PYTHON_COMPAT=( python3_{6..9} )
67 -inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \
68 - toolchain-funcs
69 +inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
70
71 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
72 HOMEPAGE="https://libcxx.llvm.org/"
73 @@ -34,9 +33,6 @@ BDEPEND="
74
75 DOCS=( CREDITS.TXT )
76
77 -# least intrusive of all
78 -CMAKE_BUILD_TYPE=RelWithDebInfo
79 -
80 python_check_deps() {
81 has_version "dev-python/lit[${PYTHON_USEDEP}]"
82 }
83 @@ -58,10 +54,7 @@ src_prepare() {
84 # out-of-tree build.
85 eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
86
87 - # cmake eclasses suck by forcing ${S} here
88 - CMAKE_USE_DIR=${S} \
89 - S=${WORKDIR} \
90 - cmake_src_prepare
91 + llvm.org_src_prepare
92 }
93
94 test_compiler() {
95 @@ -132,13 +125,11 @@ multilib_src_configure() {
96
97 if use test; then
98 local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
99 - local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
100 -
101 [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
102
103 mycmakeargs+=(
104 -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
105 - -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
106 + -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
107 )
108 fi
109 cmake_src_configure
110 diff --git a/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild
111 index bb151379aedf..01acafa1f815 100644
112 --- a/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild
113 +++ b/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild
114 @@ -5,8 +5,7 @@ EAPI=7
115
116 CMAKE_ECLASS=cmake
117 PYTHON_COMPAT=( python3_{6..9} )
118 -inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \
119 - toolchain-funcs
120 +inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
121
122 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
123 HOMEPAGE="https://libcxx.llvm.org/"
124 @@ -35,9 +34,6 @@ BDEPEND="
125
126 DOCS=( CREDITS.TXT )
127
128 -# least intrusive of all
129 -CMAKE_BUILD_TYPE=RelWithDebInfo
130 -
131 python_check_deps() {
132 has_version "dev-python/lit[${PYTHON_USEDEP}]"
133 }
134 @@ -59,10 +55,7 @@ src_prepare() {
135 # out-of-tree build.
136 eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
137
138 - # cmake eclasses suck by forcing ${S} here
139 - CMAKE_USE_DIR=${S} \
140 - S=${WORKDIR} \
141 - cmake_src_prepare
142 + llvm.org_src_prepare
143 }
144
145 test_compiler() {
146 @@ -133,13 +126,11 @@ multilib_src_configure() {
147
148 if use test; then
149 local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
150 - local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
151 -
152 [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
153
154 mycmakeargs+=(
155 -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
156 - -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
157 + -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
158 )
159 fi
160 cmake_src_configure
161 --
162 2.27.0