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 16/18] sys-libs/libcxxabi: Dedupe with new eclass code
Date: Sat, 20 Jun 2020 21:22:19
Message-Id: 20200620211624.427466-17-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/libcxxabi/libcxxabi-10.0.1.9999.ebuild | 16 ++--------------
4 sys-libs/libcxxabi/libcxxabi-10.0.1_rc1.ebuild | 16 ++--------------
5 sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild | 16 ++--------------
6 3 files changed, 6 insertions(+), 42 deletions(-)
7
8 diff --git a/sys-libs/libcxxabi/libcxxabi-10.0.1.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-10.0.1.9999.ebuild
9 index a1236effd156..41a864c31acd 100644
10 --- a/sys-libs/libcxxabi/libcxxabi-10.0.1.9999.ebuild
11 +++ b/sys-libs/libcxxabi/libcxxabi-10.0.1.9999.ebuild
12 @@ -5,7 +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 toolchain-funcs
17 +inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
18
19 DESCRIPTION="Low level support for a standard C++ library"
20 HOMEPAGE="https://libcxxabi.llvm.org/"
21 @@ -33,9 +33,6 @@ BDEPEND="
22 test? ( >=sys-devel/clang-3.9.0
23 $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
24
25 -# least intrusive of all
26 -CMAKE_BUILD_TYPE=RelWithDebInfo
27 -
28 python_check_deps() {
29 has_version "dev-python/lit[${PYTHON_USEDEP}]"
30 }
31 @@ -45,13 +42,6 @@ pkg_setup() {
32 use test && python-any-r1_pkg_setup
33 }
34
35 -src_prepare() {
36 - # cmake eclasses suck by forcing ${S} here
37 - CMAKE_USE_DIR=${S} \
38 - S=${WORKDIR} \
39 - cmake_src_prepare
40 -}
41 -
42 multilib_src_configure() {
43 # link against compiler-rt instead of libgcc if we are using clang with libunwind
44 local want_compiler_rt=OFF
45 @@ -79,13 +69,11 @@ multilib_src_configure() {
46 )
47 if use test; then
48 local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
49 - local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
50 -
51 [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
52
53 mycmakeargs+=(
54 -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
55 - -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
56 + -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
57 )
58 fi
59 cmake_src_configure
60 diff --git a/sys-libs/libcxxabi/libcxxabi-10.0.1_rc1.ebuild b/sys-libs/libcxxabi/libcxxabi-10.0.1_rc1.ebuild
61 index a1236effd156..41a864c31acd 100644
62 --- a/sys-libs/libcxxabi/libcxxabi-10.0.1_rc1.ebuild
63 +++ b/sys-libs/libcxxabi/libcxxabi-10.0.1_rc1.ebuild
64 @@ -5,7 +5,7 @@ EAPI=7
65
66 CMAKE_ECLASS=cmake
67 PYTHON_COMPAT=( python3_{6..9} )
68 -inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 toolchain-funcs
69 +inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
70
71 DESCRIPTION="Low level support for a standard C++ library"
72 HOMEPAGE="https://libcxxabi.llvm.org/"
73 @@ -33,9 +33,6 @@ BDEPEND="
74 test? ( >=sys-devel/clang-3.9.0
75 $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
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 @@ -45,13 +42,6 @@ pkg_setup() {
84 use test && python-any-r1_pkg_setup
85 }
86
87 -src_prepare() {
88 - # cmake eclasses suck by forcing ${S} here
89 - CMAKE_USE_DIR=${S} \
90 - S=${WORKDIR} \
91 - cmake_src_prepare
92 -}
93 -
94 multilib_src_configure() {
95 # link against compiler-rt instead of libgcc if we are using clang with libunwind
96 local want_compiler_rt=OFF
97 @@ -79,13 +69,11 @@ multilib_src_configure() {
98 )
99 if use test; then
100 local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
101 - local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
102 -
103 [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
104
105 mycmakeargs+=(
106 -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
107 - -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
108 + -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
109 )
110 fi
111 cmake_src_configure
112 diff --git a/sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild
113 index b4d67fc8e6d6..534db9954d2c 100644
114 --- a/sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild
115 +++ b/sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild
116 @@ -5,7 +5,7 @@ EAPI=7
117
118 CMAKE_ECLASS=cmake
119 PYTHON_COMPAT=( python3_{6..9} )
120 -inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 toolchain-funcs
121 +inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
122
123 DESCRIPTION="Low level support for a standard C++ library"
124 HOMEPAGE="https://libcxxabi.llvm.org/"
125 @@ -33,9 +33,6 @@ BDEPEND="
126 test? ( >=sys-devel/clang-3.9.0
127 $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
128
129 -# least intrusive of all
130 -CMAKE_BUILD_TYPE=RelWithDebInfo
131 -
132 python_check_deps() {
133 has_version "dev-python/lit[${PYTHON_USEDEP}]"
134 }
135 @@ -45,13 +42,6 @@ pkg_setup() {
136 use test && python-any-r1_pkg_setup
137 }
138
139 -src_prepare() {
140 - # cmake eclasses suck by forcing ${S} here
141 - CMAKE_USE_DIR=${S} \
142 - S=${WORKDIR} \
143 - cmake_src_prepare
144 -}
145 -
146 multilib_src_configure() {
147 # link against compiler-rt instead of libgcc if we are using clang with libunwind
148 local want_compiler_rt=OFF
149 @@ -79,13 +69,11 @@ multilib_src_configure() {
150 )
151 if use test; then
152 local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
153 - local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
154 -
155 [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
156
157 mycmakeargs+=(
158 -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
159 - -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
160 + -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
161 )
162 fi
163 cmake_src_configure
164 --
165 2.27.0