aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoro01eg <o01eg@yandex.ru>2017-03-05 15:31:14 +0300
committero01eg <o01eg@yandex.ru>2017-03-05 15:31:14 +0300
commit08fd73e88962f5f7419e84b5dd2773a364694c38 (patch)
tree4bad0bf3c01a094a6dd12bc2243b3213de07a7f8 /dev-lang/rust/rust-9999.ebuild
parentMerge pull request #234 from TyanNN/add-libressl (diff)
downloadrust-08fd73e88962f5f7419e84b5dd2773a364694c38.tar.gz
rust-08fd73e88962f5f7419e84b5dd2773a364694c38.tar.bz2
rust-08fd73e88962f5f7419e84b5dd2773a364694c38.zip
dev-lang/rust-9999: build and install stdlib analysis files.
Diffstat (limited to 'dev-lang/rust/rust-9999.ebuild')
-rw-r--r--dev-lang/rust/rust-9999.ebuild29
1 files changed, 26 insertions, 3 deletions
diff --git a/dev-lang/rust/rust-9999.ebuild b/dev-lang/rust/rust-9999.ebuild
index 135a881..0c327d3 100644
--- a/dev-lang/rust/rust-9999.ebuild
+++ b/dev-lang/rust/rust-9999.ebuild
@@ -27,7 +27,7 @@ HOMEPAGE="http://www.rust-lang.org/"
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
KEYWORDS=""
-IUSE="clang debug doc libcxx source +system-llvm sanitize"
+IUSE="clang debug doc libcxx source +system-llvm sanitize analysis"
REQUIRED_USE="libcxx? ( clang )"
CDEPEND="libcxx? ( sys-libs/libcxx )
@@ -60,6 +60,14 @@ src_unpack() {
use x86 && BUILD_TRIPLE=i686-unknown-linux-gnu
}
+src_prepare() {
+ default
+
+ if use analysis; then
+ epatch ${FILESDIR}/rust-9999-enable-analysis-dev.patch
+ fi
+}
+
src_configure() {
export CFG_DISABLE_LDCONFIG="notempty"
@@ -89,16 +97,19 @@ src_configure() {
$(use_enable doc docs) \
$(use_enable libcxx libcpp) \
$(use_enable sanitize sanitizers) \
- $(usex system-llvm "--llvm-root=${EPREFIX}/usr" " ") \
+ $(usex system-llvm "--llvm-root=${EPREFIX}/usr" " ") \
|| die
}
src_compile() {
+ if use analysis; then
+ export RUSTC_SAVE_ANALYSIS="api"
+ fi
emake dist VERBOSE=1
}
src_install() {
- default
+ default VERBOSE=1
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
@@ -135,6 +146,18 @@ src_install() {
dodir /usr/share/${P}
cp -R "${S}/src" "${D}/usr/share/${P}"
fi
+
+ if use debug; then
+ TARGET=debug
+ else
+ TARGET=release
+ fi
+
+ if use analysis; then
+ dodir /usr/lib/rustlib/${BUILD_TRIPLE}/analysis
+ insinto /usr/lib/rustlib/${BUILD_TRIPLE}/analysis
+ doins "${S}/build/${BUILD_TRIPLE}/stage1-std/${BUILD_TRIPLE}/${TARGET}/deps/save-analysis"/* || die
+ fi
}
pkg_postinst() {