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-libs/libcxx/
Date: Wed, 05 Oct 2016 13:38:23
Message-Id: 1475674691.692417fccb61e9aaac344f9d3486d9859b4ba909.mgorny@gentoo
1 commit: 692417fccb61e9aaac344f9d3486d9859b4ba909
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 3 11:00:59 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 5 13:38:11 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=692417fc
7
8 sys-libs/libcxx: Run tests without LLVM sources
9
10 sys-libs/libcxx/libcxx-3.9.0.ebuild | 34 ++++++++++------------------------
11 sys-libs/libcxx/libcxx-9999.ebuild | 35 +++++++++++------------------------
12 2 files changed, 21 insertions(+), 48 deletions(-)
13
14 diff --git a/sys-libs/libcxx/libcxx-3.9.0.ebuild b/sys-libs/libcxx/libcxx-3.9.0.ebuild
15 index a559476..110038b 100644
16 --- a/sys-libs/libcxx/libcxx-3.9.0.ebuild
17 +++ b/sys-libs/libcxx/libcxx-3.9.0.ebuild
18 @@ -19,13 +19,10 @@ inherit ${SCM} cmake-multilib python-any-r1 toolchain-funcs
19 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
20 HOMEPAGE="http://libcxx.llvm.org/"
21 if [[ ${PV} != 9999 ]] ; then
22 - SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
23 - test? ( http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.xz )"
24 + SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz"
25 S="${WORKDIR}/${P}.src"
26 - LLVM_S="${WORKDIR}/llvm-${PV}.src"
27 else
28 SRC_URI=""
29 - LLVM_S="${WORKDIR}/llvm"
30 fi
31
32 LICENSE="|| ( UoI-NCSA MIT )"
33 @@ -46,7 +43,7 @@ RDEPEND="libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP
34 # which removes the need for MULTILIB_USEDEP
35 DEPEND="${RDEPEND}
36 test? ( >=sys-devel/clang-3.9.0
37 - ${PYTHON_DEPS} )
38 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )
39 app-arch/xz-utils
40 >=sys-devel/llvm-3.9.0"
41
42 @@ -62,8 +59,12 @@ PATCHES=(
43 "${FILESDIR}/${PN}-3.9-cmake-static-lib.patch"
44 )
45
46 +python_check_deps() {
47 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
48 +}
49 +
50 pkg_setup() {
51 - use test && python_setup
52 + use test && python-any-r1_pkg_setup
53
54 if ! use libcxxrt && ! tc-is-gcc ; then
55 eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
56 @@ -79,23 +80,6 @@ pkg_setup() {
57 fi
58 }
59
60 -src_unpack() {
61 - [[ ${PV} != 9999 ]] && default && return
62 -
63 - if use test; then
64 - # needed for tests
65 - git-r3_fetch "http://llvm.org/git/llvm.git
66 - https://github.com/llvm-mirror/llvm.git"
67 - fi
68 - git-r3_fetch
69 -
70 - if use test; then
71 - git-r3_checkout http://llvm.org/git/llvm.git \
72 - "${WORKDIR}"/llvm
73 - fi
74 - git-r3_checkout
75 -}
76 -
77 src_configure() {
78 NATIVE_LIBDIR=$(get_libdir)
79 cmake-multilib_src_configure
80 @@ -131,7 +115,9 @@ multilib_src_configure() {
81 )
82 if use test; then
83 mycmakeargs+=(
84 - -DLLVM_MAIN_SRC_DIR=${LLVM_S}
85 + # this can be any directory, it just needs to exist...
86 + -DLLVM_MAIN_SRC_DIR="${T}"
87 + -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
88 )
89 fi
90 cmake-utils_src_configure
91
92 diff --git a/sys-libs/libcxx/libcxx-9999.ebuild b/sys-libs/libcxx/libcxx-9999.ebuild
93 index 6d0328d..401a8ea 100644
94 --- a/sys-libs/libcxx/libcxx-9999.ebuild
95 +++ b/sys-libs/libcxx/libcxx-9999.ebuild
96 @@ -19,13 +19,10 @@ inherit ${SCM} cmake-multilib python-any-r1 toolchain-funcs
97 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
98 HOMEPAGE="http://libcxx.llvm.org/"
99 if [[ ${PV} != 9999 ]] ; then
100 - SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
101 - test? ( http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.xz )"
102 + SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz"
103 S="${WORKDIR}/${P}.src"
104 - LLVM_S="${WORKDIR}/llvm-${PV}.src"
105 else
106 SRC_URI=""
107 - LLVM_S="${WORKDIR}/llvm"
108 fi
109
110 LICENSE="|| ( UoI-NCSA MIT )"
111 @@ -49,7 +46,7 @@ RDEPEND="
112 # which removes the need for MULTILIB_USEDEP
113 DEPEND="${RDEPEND}
114 test? ( >=sys-devel/clang-3.9.0
115 - ${PYTHON_DEPS} )
116 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )
117 app-arch/xz-utils
118 >=sys-devel/llvm-3.9.0"
119
120 @@ -61,8 +58,12 @@ PATCHES=(
121 "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
122 )
123
124 +python_check_deps() {
125 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
126 +}
127 +
128 pkg_setup() {
129 - use test && python_setup
130 + use test && python-any-r1_pkg_setup
131
132 if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then
133 eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
134 @@ -78,23 +79,6 @@ pkg_setup() {
135 fi
136 }
137
138 -src_unpack() {
139 - [[ ${PV} != 9999 ]] && default && return
140 -
141 - if use test; then
142 - # needed for tests
143 - git-r3_fetch "http://llvm.org/git/llvm.git
144 - https://github.com/llvm-mirror/llvm.git"
145 - fi
146 - git-r3_fetch
147 -
148 - if use test; then
149 - git-r3_checkout http://llvm.org/git/llvm.git \
150 - "${WORKDIR}"/llvm
151 - fi
152 - git-r3_checkout
153 -}
154 -
155 src_configure() {
156 NATIVE_LIBDIR=$(get_libdir)
157 cmake-multilib_src_configure
158 @@ -133,7 +117,10 @@ multilib_src_configure() {
159 )
160 if use test; then
161 mycmakeargs+=(
162 - -DLLVM_MAIN_SRC_DIR=${LLVM_S}
163 + # this can be any directory, it just needs to exist...
164 + # FIXME: remove this once https://reviews.llvm.org/D25093 is merged
165 + -DLLVM_MAIN_SRC_DIR="${T}"
166 + -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
167 )
168 fi
169 cmake-utils_src_configure