summaryrefslogtreecommitdiff
path: root/dev-lang/rust/rust-1.12.0.ebuild
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2016-11-08 12:08:44 -0600
committerDoug Goldstein <cardoe@gentoo.org>2016-11-08 12:43:47 -0600
commitb99ef2bd0b4356c20bcfa97074d8db5771bd2b5f (patch)
tree8c047b5b415705b15206cb78e6d5500a88d5d100 /dev-lang/rust/rust-1.12.0.ebuild
parent775bfde564ecff4521d75d2b1d6ff1614124201b (diff)
downloadgentoo-b99ef2bd0b4356c20bcfa97074d8db5771bd2b5f.tar.gz
gentoo-b99ef2bd0b4356c20bcfa97074d8db5771bd2b5f.tar.xz
dev-lang/rust: simplify unpack
Instead of unpacking the tarball of the stage0 compiler and then patching the fetch script to not actually reach out to the internet, use the built in mechanism for supplying a stage0 compiler. This improves on d63d593dfdc5fb7dd1256663daac7b978aa892af and should make future bumps easier. Drops the now unnecessary patch as well. Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
Diffstat (limited to 'dev-lang/rust/rust-1.12.0.ebuild')
-rw-r--r--dev-lang/rust/rust-1.12.0.ebuild15
1 files changed, 5 insertions, 10 deletions
diff --git a/dev-lang/rust/rust-1.12.0.ebuild b/dev-lang/rust/rust-1.12.0.ebuild
index e608fbde2b3..4aede5889a7 100644
--- a/dev-lang/rust/rust-1.12.0.ebuild
+++ b/dev-lang/rust/rust-1.12.0.ebuild
@@ -55,16 +55,6 @@ PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425"
S="${WORKDIR}/${MY_P}"
-PATCHES=("${FILESDIR}/rust-1.12.0-disable-fetching-stage0.patch")
-
-src_unpack() {
- unpack "rustc-${PV}-src.tar.gz" || die
- mkdir "${MY_P}/dl" || die
- local stagename="RUST_STAGE0_${ARCH}"
- local stage0="${!stagename}"
- cp "${DISTDIR}/${stage0}.tar.gz" "${MY_P}/dl/" || die "cp stage0"
-}
-
src_prepare() {
find mk -name '*.mk' -exec \
sed -i -e "s/-Werror / /g" {} \; || die
@@ -75,6 +65,9 @@ src_prepare() {
src_configure() {
export CFG_DISABLE_LDCONFIG="notempty"
+ local stagename="RUST_STAGE0_${ARCH}"
+ local stage0="${!stagename}"
+
"${ECONF_SOURCE:-.}"/configure \
--prefix="${EPREFIX}/usr" \
--libdir="${EPREFIX}/usr/$(get_libdir)/${P}" \
@@ -85,6 +78,8 @@ src_configure() {
--default-ar=$(tc-getBUILD_AR) \
--python=${EPYTHON} \
--disable-rpath \
+ --enable-local-rust \
+ --local-rust-root="${WORKDIR}/${stage0}/rustc" \
$(use_enable clang) \
$(use_enable debug) \
$(use_enable debug llvm-assertions) \