diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/Manifest b/sdk_container/src/third_party/portage-stable/dev-lang/rust/Manifest
new file mode 100644
index 0000000000..07d3b5ebe0
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/Manifest
@@ -0,0 +1,16 @@
+DIST cargo-0.19.0-i686-unknown-linux-gnu.tar.gz 5068212 BLAKE2B 4fd16e33b220ae496603cd5a16055557d96cbbf04943040c36f6121eb3b7e53d5644a6e0cd8794d3485bb323f0a719e921be8a944f466cd4dc317d82b1b8deea SHA512 bfe5df682eb566c91995b8c00b5e8edb5d2c3410d1baa5be2ede2e39260b653d34b7723c6c3e8f07d8102ffab50b13e62f9f2d816dad8fba9f39b7bec984181e
+DIST cargo-0.19.0-x86_64-unknown-linux-gnu.tar.gz 5133993 BLAKE2B 39eed4905b06a9f28340b1ca0362dd9d592b5ab6a11ceb8a749069827b65b25c34b8020ca434b3174733dcdda2c38b460c7c0d9b877ff2fed1a790f5f70d9c5a SHA512 6fedb8f83d70dc4fb93a29d400577a5578ceed1448f4e85e8a9509b98b037a125532ebfb6a7e6bc9411501ea74774d2c47ac7e2bcb7ac82baeb925abc46609e8
+DIST rust-1.22.0-i686-unknown-linux-gnu.tar.gz 151889962 BLAKE2B cf2f30fdc01cbcf45de427b5a5a226b8482f3fc13e122cc4f021a75f648678b23a789706b54b6425346bdba57224898809102d97bfee8b143f90763ea985b6c3 SHA512 b46eb37f918833f1dbf3700fe156f26eff19dc90534434add5aa2d86b8ccc02aef273cba6a8291deaa89d27d2bd4af1529655b6463f44736a9f521a67cccc4f0
+DIST rust-1.22.0-x86_64-unknown-linux-gnu.tar.gz 160427151 BLAKE2B f56a8205023ec39a5569e443f1c7954c55c9b2fe94126c03bcf9eadf4d26cb60d8ae9e8c6638550e79acc5906d865bdaaa5e0e61a63c9b23383afef673018638 SHA512 30206d5ccec432a6a92aeffb34170290109d65973a6d1cd91e7e1aa82781a0da00023275b5a3a3effad79d539d2f4829d1eea5fc3d0c1c58a7f3a4855a84785c
+DIST rust-std-1.18.0-i686-unknown-linux-gnu.tar.gz 66316236 BLAKE2B 64712595bd979b7eadb626198df1c43951cf040dd94e9b18821d5cc9807d6b3135c62129d89b8cbebe2aabb28e7fcbe22454cc7c4a66ef1a16db899f30e91671 SHA512 0649743437f15d80f7fe08ae32177b36e2a89e87db8062433cfa6d0f62fe7e8fdbc109a025c02dc110d8abdf4b74ddfe80ba8fb895992b0f5ac6a880bbbdf051
+DIST rust-std-1.18.0-x86_64-unknown-linux-gnu.tar.gz 75723132 BLAKE2B 1a0407be9f65db914dd5573daf4ca47804bd3254a3ef51b244c1952e91b5f1395f712dd2c82eb73623ad7da79bffcc8ac9b5e6e0404b3ffa300fe0292189caec SHA512 98f50016cf6f7c89f90830e1c9f41b5413adf2eaa5e2874ca117ffe84ee59fe77cb461ca3601ee65c5c5c884eb42e22509a94c00544527c727f2e3d6d0adb530
+DIST rustc-1.14.0-i686-unknown-linux-gnu.tar.gz 51391277 BLAKE2B 3c9c9f6567bc03c03dd45516b137a9ac19ee05adf32440a720941c9edc9c3158dd003a37f54694919ac5efd559383f8c893e86651aa5e5bd30cdd74f7d81e6cc SHA512 4a951439d8c001b8ff2f6aa2f505e23130209494026fdacea019aef05bebb2f0d3404df047ccedbe9f4140cb5163404db22a5b0977752c495fc45f739d1252fb
+DIST rustc-1.14.0-x86_64-unknown-linux-gnu.tar.gz 49370951 BLAKE2B bc226cc826ced161bbbfc70c6202f7f3e96dc1636e663df1bd393048f8c9f7490792abde3e7aa41a5f4aad9a6a41844fee7f7e555e562dde725ccdbb332334da SHA512 da33a8c509d3a554bed3173f8cdd6fc3639646e5b12eae80654d83290160227238c6f9ff9c0247d63a90f48eeafc8dc31a4a02575ba43fa6d5f75ae58a347c32
+DIST rustc-1.15.1-i686-unknown-linux-gnu.tar.gz 39314075 BLAKE2B 59e79324807d92d57e71588f82983457cd6f3fbbf7eb2bd9b63a84c16d15e30679bc7625dbd20b20da62a80ccdeed58825bee1357b3b7af9b4a5aa83ba5f3a60 SHA512 138a4a893a70860650da1636f734977c215e32b1f9b15b957bfc31575d2662ea6c2c65a130bd13647ec1f2366fe0deb26a94ea09aaec7cbda8e466fa295a0c42
+DIST rustc-1.15.1-src.tar.gz 28100203 BLAKE2B 1fea7db9c75003d71d34df87c0180c27fcb863bd18095bdb70b3522602c485f5996ecd552e871612fc92352789d870836d4c509e73cffd7cb920504e763a9e57 SHA512 10d533b17cf7f92b9dff14b399b5dd0ac8b68284eea072c85ede78a4e4c2c4fce8c781777124c64798057aceb6444535e02e067fd67ba3633c3e828fb4d2d339
+DIST rustc-1.15.1-x86_64-unknown-linux-gnu.tar.gz 37650863 BLAKE2B 15ad871d0c23c662d63093e372b730ea02c79e35bbe4e7cbad64d2ae4d3e43f94edabaa3ab7b0f18f198d22830754a1271a55b283a423d155b6274b9d17b9409 SHA512 97f2fd905b1c2c9ee1fb9a9604a931154aa928692e6334af5a60f1853e49246b13af26afb6342f085cf77e624f23e90c409f05b81983408cf0538ba1401ef7cb
+DIST rustc-1.16.0-src.tar.gz 28470372 BLAKE2B 0b1f5156e97d8b6ecca086a818a9a15b667badcaf15a86e4ff9212c9f1e641e67ad82788008b3059d380e83fede7e7347f54209d9e85644decf6614c7d12f4ac SHA512 096b1b7406be9bc61161bb7cdd2061f2bc2174c161a31f4ed6ceecf7fc379f315fc2f7cb9f6c134ea4f8519c27bf6e5a3f712cf1e56d5785831d8c8374eb0ba5
+DIST rustc-1.18.0-i686-unknown-linux-gnu.tar.gz 47281118 BLAKE2B 96dbd061a048d74a4054356bc4073dc538aa0799dae362885909fc9fbd30e25ebe7da8215231a049ff83b6696d0e76a5741bc337c86a4b8d34fd0d4abc4e6170 SHA512 e270a314fb326fb226226741a5a15f237846ffb7ae6e0ab349f56328f5b3557d8b3dfdcfbc168f3ed4d9875806434537ce7bd5fb97b2c3078f7d03fd6ce65d2d
+DIST rustc-1.18.0-x86_64-unknown-linux-gnu.tar.gz 45281645 BLAKE2B 3034a693aa808d1d489ce36db5a00ce7d239bef8265f322c6fe4f1f5a9d77cf8f9e447e2ca539f6d3e758214dd01224957d8c662eeedd76ffccad3ad4f341f3c SHA512 7d8865a43b979150c3dc3abaa852921f46bebb54659bb0f14bc9b82b367f94ec031da4d03242cb6aae8bd11167402b9e166a14aa3c4a141413be54e9a685af31
+DIST rustc-1.19.0-src.tar.gz 50108626 BLAKE2B ae6016f816f2c41b81668764e2892d7846226ff944be9f173d9d8818c22aeb21cc7457e346bd4c985f41d3d22df1dad009d1977a733bbf40ff6fb8a6f0854254 SHA512 080a8625fc15bc4fc17ab910bdcc0d9a88ce8922f1a3eb241d0f956b5799e4db6df45ebabb5497295c198be08686e5a94dff65569582fc6a5ecb9200cfee5c24
+DIST rustc-1.23.0-src.tar.gz 60010149 BLAKE2B 64bba97fd1a16d3162b65b0d8dd2024ca07166a4fb3d541a96216a27a392baac5f5addd9b3b223ce935df9437a0789cd5c3d8328957f983cc3317a63f13a4dcd SHA512 a1dbb1a625c6d8dfe9708e1cf478a49154b1eb0aba5ba67ac85518a8c7d1c70d2d86ac4d441156e9bfd0fd77ca241fb5491a2bd68aefcf0b3c2e164c3cc29e4e
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-lang/rust/metadata.xml
new file mode 100644
index 0000000000..050e235f71
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/metadata.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ rust@gentoo.org
+ Rust Project
+
+
+
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.15.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.15.1.ebuild
new file mode 100644
index 0000000000..5d7f76787c
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.15.1.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+CARGO_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0"
+RUST_STAGE0_amd64="rustc-${STAGE0_VERSION}-x86_64-unknown-linux-gnu"
+RUST_STAGE0_x86="rustc-${STAGE0_VERSION}-i686-unknown-linux-gnu"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.gz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.gz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.gz )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clang debug doc libcxx +system-llvm"
+REQUIRED_USE="libcxx? ( clang )"
+
+RDEPEND="libcxx? ( sys-libs/libcxx )
+ system-llvm? ( >=sys-devel/llvm-3.8.1-r2:0
+ =dev-lang/perl-5.0
+ clang? ( sys-devel/clang )
+"
+
+PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ >=dev-util/cargo-${CARGO_VERSION}"
+
+S="${WORKDIR}/${MY_P}-src"
+
+src_prepare() {
+ find mk -name '*.mk' -exec \
+ sed -i -e "s/-Werror / /g" {} \; || die
+
+ default
+}
+
+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}" \
+ --mandir="${EPREFIX}/usr/share/${P}/man" \
+ --release-channel=${SLOT%%/*} \
+ --disable-manage-submodules \
+ --disable-rustbuild \
+ --default-linker=$(tc-getBUILD_CC) \
+ --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) \
+ $(use_enable !debug optimize) \
+ $(use_enable !debug optimize-cxx) \
+ $(use_enable !debug optimize-llvm) \
+ $(use_enable !debug optimize-tests) \
+ $(use_enable doc docs) \
+ $(use_enable libcxx libcpp) \
+ $(usex system-llvm "--llvm-root=${EPREFIX}/usr" " ") \
+ || die
+}
+
+src_compile() {
+ emake VERBOSE=1
+}
+
+src_install() {
+ unset SUDO_USER
+
+ default
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+
+ dodoc COPYRIGHT
+
+ dodir "/usr/share/doc/rust-${PV}/"
+ mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/rust-${PV}/" || die
+ rmdir "${D}/usr/share/doc/rust/" || die
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.16.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.16.0.ebuild
new file mode 100644
index 0000000000..e13e960aba
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.16.0.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+CARGO_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).1"
+RUST_STAGE0_amd64="rustc-${STAGE0_VERSION}-x86_64-unknown-linux-gnu"
+RUST_STAGE0_x86="rustc-${STAGE0_VERSION}-i686-unknown-linux-gnu"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.gz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.gz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.gz )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clang debug doc libcxx"
+REQUIRED_USE="libcxx? ( clang )"
+
+RDEPEND="libcxx? ( sys-libs/libcxx )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.0
+ clang? ( sys-devel/clang )
+"
+
+PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ >=dev-util/cargo-${CARGO_VERSION}"
+
+S="${WORKDIR}/${MY_P}-src"
+
+src_prepare() {
+ find mk -name '*.mk' -exec \
+ sed -i -e "s/-Werror / /g" {} \; || die
+
+ default
+}
+
+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}" \
+ --mandir="${EPREFIX}/usr/share/${P}/man" \
+ --release-channel=${SLOT%%/*} \
+ --disable-manage-submodules \
+ --disable-rustbuild \
+ --default-linker=$(tc-getBUILD_CC) \
+ --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) \
+ $(use_enable !debug optimize) \
+ $(use_enable !debug optimize-cxx) \
+ $(use_enable !debug optimize-llvm) \
+ $(use_enable !debug optimize-tests) \
+ $(use_enable doc docs) \
+ $(use_enable libcxx libcpp) \
+ || die
+}
+
+src_compile() {
+ emake VERBOSE=1
+}
+
+src_install() {
+ unset SUDO_USER
+
+ default
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+
+ dodoc COPYRIGHT
+
+ dodir "/usr/share/doc/rust-${PV}/"
+ mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/rust-${PV}/" || die
+ rmdir "${D}/usr/share/doc/rust/" || die
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.19.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.19.0.ebuild
new file mode 100644
index 0000000000..402db0937f
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.19.0.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+if [[ ${ARCH} = "amd64" ]]; then
+ TRIPLE="x86_64-unknown-linux-gnu"
+else
+ TRIPLE="i686-unknown-linux-gnu"
+fi
+
+CARGO_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0"
+STAGE0_VERSION_CARGO="0.$(($(get_version_component_range 2))).0"
+BOOTSTRAP_DATE="2017-06-08" # found in src/stage0.txt
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="amd64? (
+ https://static.rust-lang.org/dist/rustc-${STAGE0_VERSION}-x86_64-unknown-linux-gnu.tar.gz
+ https://static.rust-lang.org/dist/rust-std-${STAGE0_VERSION}-x86_64-unknown-linux-gnu.tar.gz
+ https://static.rust-lang.org/dist/cargo-${STAGE0_VERSION_CARGO}-x86_64-unknown-linux-gnu.tar.gz
+ )
+ x86? (
+ https://static.rust-lang.org/dist/rustc-${STAGE0_VERSION}-i686-unknown-linux-gnu.tar.gz
+ https://static.rust-lang.org/dist/rust-std-${STAGE0_VERSION}-i686-unknown-linux-gnu.tar.gz
+ https://static.rust-lang.org/dist/cargo-${STAGE0_VERSION_CARGO}-i686-unknown-linux-gnu.tar.gz
+ )
+ https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clang debug doc libcxx"
+REQUIRED_USE="libcxx? ( clang )"
+
+RDEPEND="libcxx? ( sys-libs/libcxx )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.0
+ clang? ( sys-devel/clang )
+ >=dev-util/cmake-3.4.3
+"
+
+PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ >=dev-util/cargo-${CARGO_VERSION}"
+
+S="${WORKDIR}/rustc-${PV}-src"
+
+src_unpack() {
+ unpack ${A##* }
+}
+
+src_configure() {
+ echo "No configure step for rust"
+}
+
+src_compile() {
+ local stage0="rust-${STAGE0_VERSION}-${TRIPLE}"
+ if use debug ; then
+ local optimized="false";
+ local debug="true";
+ else
+ local optimized="true";
+ local debug="false";
+ fi
+
+ cat <<- EOF > config.toml
+ [llvm]
+ optimize = ${optimized}
+ assertions = ${debug}
+ [build]
+ docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ vendor = true
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)/${P}"
+ mandir = "share/${P}/man"
+ docdir = "share/${P}/doc"
+ [rust]
+ optimize = ${optimized}
+ default-linker = "$(tc-getBUILD_CC)"
+ default-ar = "$(tc-getBUILD_AR)"
+ channel = "${SLOT%%/*}"
+ rpath = false
+ optimize-tests = ${optimized}
+ EOF
+
+ local cache_dir="build/cache/${BOOTSTRAP_DATE}"
+ mkdir -p ${cache_dir}
+ for i in ${A}; do
+ cp "${DISTDIR}/${i}" $cache_dir/
+ done
+ ${EPYTHON} x.py build || die
+}
+
+src_install() {
+ default
+
+ local obj="build/${TRIPLE}/stage2"
+ dobin "${obj}/bin/rustc" "${obj}/bin/rustdoc"
+ dobin src/etc/rust-gdb src/etc/rust-lldb
+ insinto "/usr/$(get_libdir)"
+ doins -r "${obj}/lib/"*
+ dodoc COPYRIGHT
+ doman man/*
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.23.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.23.0.ebuild
new file mode 100644
index 0000000000..eb5a124a96
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.23.0.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+CHOST_amd64=x86_64-unknown-linux-gnu
+CHOST_x86=i686-unknown-linux-gnu
+
+RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0"
+RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
+RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.gz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.gz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.gz )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="debug doc +jemalloc"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ dev-util/cmake
+"
+PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0_name="RUST_STAGE0_${ARCH}"
+ local rust_stage0="${!rust_stage0_name}"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_target_name="CHOST_${ARCH}"
+ local rust_target="${!rust_target_name}"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = ["${rust_target}"]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ verbose = 2
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+}
+
+src_compile() {
+ ./x.py build --verbose --config="${S}"/config.toml || die
+}
+
+src_install() {
+ env DESTDIR="${D}" ./x.py install || die
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+
+ dodoc COPYRIGHT
+
+ if use doc ; then
+ dodir "/usr/share/doc/rust-${PV}/"
+ mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/rust-${PV}/" || die
+ rmdir "${D}/usr/share/doc/rust/" || die
+ fi
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-lldb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.15.1 b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.15.1
new file mode 100644
index 0000000000..195bbdaec6
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.15.1
@@ -0,0 +1,15 @@
+DEFINED_PHASES=compile configure install postinst postrm prepare setup
+DEPEND=libcxx? ( sys-libs/libcxx ) system-llvm? ( >=sys-devel/llvm-3.8.1-r2:0 =dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/perl-5.0 clang? ( sys-devel/clang )
+DESCRIPTION=Systems programming language from Mozilla
+EAPI=6
+HOMEPAGE=http://www.rust-lang.org/
+IUSE=clang debug doc libcxx +system-llvm
+KEYWORDS=~amd64 ~x86
+LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
+PDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 >=dev-util/cargo-0.16.0
+RDEPEND=libcxx? ( sys-libs/libcxx ) system-llvm? ( >=sys-devel/llvm-3.8.1-r2:0 rustc-1.15.1-src.tar.gz amd64? ( https://static.rust-lang.org/dist/rustc-1.14.0-x86_64-unknown-linux-gnu.tar.gz ) x86? ( https://static.rust-lang.org/dist/rustc-1.14.0-i686-unknown-linux-gnu.tar.gz )
+_eclasses_=epatch 8233751dc5105a6ae8fcd86ce2bb0247 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 227b041a120d309fdefbebb3b8c1dfa9 ltprune 2770eed66a9b8ef944714cd0e968182e multilib 97f470f374f2e94ccab04a2fb21d811e python-any-r1 27d7f9da7187d283b7f3eae8390b7b09 python-utils-r1 c9de01becf9df3f8c10aeec3dc693f5d toolchain-funcs 185a06792159ca143528e7010368e8af versionator c80ccf29e90adea7c5cae94b42eb76d0
+_md5_=05d71fb18854fa610ee11865ec78a4c1
diff --git a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.16.0 b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.16.0
new file mode 100644
index 0000000000..4cef3eac32
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.16.0
@@ -0,0 +1,15 @@
+DEFINED_PHASES=compile configure install postinst postrm prepare setup
+DEPEND=libcxx? ( sys-libs/libcxx ) || ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/perl-5.0 clang? ( sys-devel/clang )
+DESCRIPTION=Systems programming language from Mozilla
+EAPI=6
+HOMEPAGE=http://www.rust-lang.org/
+IUSE=clang debug doc libcxx
+KEYWORDS=~amd64 ~x86
+LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
+PDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 >=dev-util/cargo-0.17.0
+RDEPEND=libcxx? ( sys-libs/libcxx )
+REQUIRED_USE=libcxx? ( clang )
+SLOT=stable/1.16
+SRC_URI=https://static.rust-lang.org/dist/rustc-1.16.0-src.tar.gz -> rustc-1.16.0-src.tar.gz amd64? ( https://static.rust-lang.org/dist/rustc-1.15.1-x86_64-unknown-linux-gnu.tar.gz ) x86? ( https://static.rust-lang.org/dist/rustc-1.15.1-i686-unknown-linux-gnu.tar.gz )
+_eclasses_=epatch 8233751dc5105a6ae8fcd86ce2bb0247 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 227b041a120d309fdefbebb3b8c1dfa9 ltprune 2770eed66a9b8ef944714cd0e968182e multilib 97f470f374f2e94ccab04a2fb21d811e python-any-r1 27d7f9da7187d283b7f3eae8390b7b09 python-utils-r1 c9de01becf9df3f8c10aeec3dc693f5d toolchain-funcs 185a06792159ca143528e7010368e8af versionator c80ccf29e90adea7c5cae94b42eb76d0
+_md5_=6b088f2ab3b9c4a232866efee2d92f0c
diff --git a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.19.0 b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.19.0
new file mode 100644
index 0000000000..0aa2431451
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.19.0
@@ -0,0 +1,15 @@
+DEFINED_PHASES=compile configure install postinst postrm setup unpack
+DEPEND=libcxx? ( sys-libs/libcxx ) || ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/perl-5.0 clang? ( sys-devel/clang ) >=dev-util/cmake-3.4.3
+DESCRIPTION=Systems programming language from Mozilla
+EAPI=6
+HOMEPAGE=http://www.rust-lang.org/
+IUSE=clang debug doc libcxx
+KEYWORDS=~amd64 ~x86
+LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
+PDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 >=dev-util/cargo-0.20.0
+RDEPEND=libcxx? ( sys-libs/libcxx )
+REQUIRED_USE=libcxx? ( clang )
+SLOT=stable/1.19
+SRC_URI=amd64? ( https://static.rust-lang.org/dist/rustc-1.18.0-x86_64-unknown-linux-gnu.tar.gz https://static.rust-lang.org/dist/rust-std-1.18.0-x86_64-unknown-linux-gnu.tar.gz https://static.rust-lang.org/dist/cargo-0.19.0-x86_64-unknown-linux-gnu.tar.gz ) x86? ( https://static.rust-lang.org/dist/rustc-1.18.0-i686-unknown-linux-gnu.tar.gz https://static.rust-lang.org/dist/rust-std-1.18.0-i686-unknown-linux-gnu.tar.gz https://static.rust-lang.org/dist/cargo-0.19.0-i686-unknown-linux-gnu.tar.gz ) https://static.rust-lang.org/dist/rustc-1.19.0-src.tar.gz
+_eclasses_=epatch 8233751dc5105a6ae8fcd86ce2bb0247 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 227b041a120d309fdefbebb3b8c1dfa9 ltprune 2770eed66a9b8ef944714cd0e968182e multilib 97f470f374f2e94ccab04a2fb21d811e python-any-r1 27d7f9da7187d283b7f3eae8390b7b09 python-utils-r1 c9de01becf9df3f8c10aeec3dc693f5d toolchain-funcs 185a06792159ca143528e7010368e8af versionator c80ccf29e90adea7c5cae94b42eb76d0
+_md5_=920bc279a5bc8a27ad0009e468905070
diff --git a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.23.0 b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.23.0
new file mode 100644
index 0000000000..a0976813ec
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-lang/rust-1.23.0
@@ -0,0 +1,14 @@
+DEFINED_PHASES=compile configure install postinst postrm prepare setup
+DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc ) || ( >=dev-lang/python-2.7.5-r2:2.7 ) || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.5 ) dev-util/cmake
+DESCRIPTION=Systems programming language from Mozilla
+EAPI=6
+HOMEPAGE=http://www.rust-lang.org/
+IUSE=debug doc +jemalloc
+KEYWORDS=~amd64 ~x86
+LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
+PDEPEND=>=dev-util/cargo-0.24.0
+RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc )
+SLOT=stable/1.23
+SRC_URI=https://static.rust-lang.org/dist/rustc-1.23.0-src.tar.gz -> rustc-1.23.0-src.tar.gz amd64? ( https://static.rust-lang.org/dist/rust-1.22.0-x86_64-unknown-linux-gnu.tar.gz ) x86? ( https://static.rust-lang.org/dist/rust-1.22.0-i686-unknown-linux-gnu.tar.gz )
+_eclasses_=epatch 8233751dc5105a6ae8fcd86ce2bb0247 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 227b041a120d309fdefbebb3b8c1dfa9 ltprune 2770eed66a9b8ef944714cd0e968182e multilib 97f470f374f2e94ccab04a2fb21d811e python-any-r1 27d7f9da7187d283b7f3eae8390b7b09 python-utils-r1 c9de01becf9df3f8c10aeec3dc693f5d toolchain-funcs 185a06792159ca143528e7010368e8af versionator c80ccf29e90adea7c5cae94b42eb76d0
+_md5_=66190b98a61687c08db96c21c3346e56