diff options
-rw-r--r-- | app-emacs/rust-mode/Manifest | 1 | ||||
-rw-r--r-- | app-emacs/rust-mode/rust-mode-0.12.0.ebuild | 25 | ||||
-rw-r--r-- | app-shells/rust-zshcomp/Manifest | 1 | ||||
-rw-r--r-- | app-shells/rust-zshcomp/rust-zshcomp-0.12.0.ebuild | 36 | ||||
-rw-r--r-- | app-vim/rust-mode/Manifest | 1 | ||||
-rw-r--r-- | app-vim/rust-mode/rust-mode-0.12.0.ebuild | 23 | ||||
-rw-r--r-- | dev-lang/rust/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/rust/files/50rust-mode-gentoo.el | 5 | ||||
-rw-r--r-- | dev-lang/rust/files/rust-0.12.0-libdir.patch (renamed from dev-lang/rust/files/rust-9999-libdir.patch) | 0 | ||||
-rw-r--r-- | dev-lang/rust/files/rust-0.12.0-stage0.patch | 322 | ||||
-rw-r--r-- | dev-lang/rust/rust-0.11.0-r2.ebuild (renamed from dev-lang/rust/rust-0.11.0-r1.ebuild) | 54 | ||||
-rw-r--r-- | dev-lang/rust/rust-0.12.0.ebuild | 104 | ||||
-rw-r--r-- | dev-lang/rust/rust-999-r1.ebuild (renamed from dev-lang/rust/rust-999.ebuild) | 59 | ||||
-rw-r--r-- | dev-lang/rust/rust-9999-r3.ebuild (renamed from dev-lang/rust/rust-9999-r2.ebuild) | 61 |
14 files changed, 569 insertions, 126 deletions
diff --git a/app-emacs/rust-mode/Manifest b/app-emacs/rust-mode/Manifest index 2610a05..ad5b77f 100644 --- a/app-emacs/rust-mode/Manifest +++ b/app-emacs/rust-mode/Manifest @@ -1 +1,2 @@ DIST rust-0.11.0.tar.gz 21555837 SHA256 d1b3e36448bf12b8c9289024df416de10774b6d3235d7b1d22b248ef634411ba SHA512 a29e8a1c44097cc78d36d637d1ebf9b1b914d58a56d52f8112959a68916a2df9f5f63f93e596ba6db5be21a962912503e0fd678330a9dac6abe04a59d5af4584 WHIRLPOOL b7fb24920aca2a537af0c7e20925302a20fbd662209a1774a8ecc7c2cf9aaeb9b4fabfdd45620a0fda88b49122abc04882f7254a984b06df47212e537f8713f8 +DIST rust-0.12.0.tar.gz 21223176 SHA256 883e66b24d90d9957c5c538469fcde6f0668e5fb6448beecfc60884060e769b7 SHA512 b01f6ae97fb012ab701b47a8f240a764d0a6f3ee2224ab67289c61f021a1cef2e99a4b61aa3f8991ce90f52b19d6ec93a5a041e5ee4988803e6ef239c8b91445 WHIRLPOOL 8f952936f06d95c4eba4803752d690831d9e60b5f66e289d5c9083108f66bae403917c42744d4a611d636a69c2bd11d69c51c59ce3f899fe3fa94d15e30c4cfd diff --git a/app-emacs/rust-mode/rust-mode-0.12.0.ebuild b/app-emacs/rust-mode/rust-mode-0.12.0.ebuild new file mode 100644 index 0000000..8b4ab63 --- /dev/null +++ b/app-emacs/rust-mode/rust-mode-0.12.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" + +inherit elisp + +DESCRIPTION="A major emacs mode for editing Rust source code" +HOMEPAGE="http://www.rust-lang.org/" +SRC_URI="http://static.rust-lang.org/dist/rust-${PV}.tar.gz" + +LICENSE="|| ( MIT Apache-2.0 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="!!<=app-admin/eselect-rust-0.1_pre20140820 + !<=dev-lang/rust-0.11.0-r1:0.11 + !<=dev-lang/rust-999:nightly + !<=dev-lang/rust-9999-r2:git +" + +S="${WORKDIR}/rust-${PV}/src/etc/emacs" + +SITEFILE="50${PN}-gentoo.el" diff --git a/app-shells/rust-zshcomp/Manifest b/app-shells/rust-zshcomp/Manifest index 2610a05..ad5b77f 100644 --- a/app-shells/rust-zshcomp/Manifest +++ b/app-shells/rust-zshcomp/Manifest @@ -1 +1,2 @@ DIST rust-0.11.0.tar.gz 21555837 SHA256 d1b3e36448bf12b8c9289024df416de10774b6d3235d7b1d22b248ef634411ba SHA512 a29e8a1c44097cc78d36d637d1ebf9b1b914d58a56d52f8112959a68916a2df9f5f63f93e596ba6db5be21a962912503e0fd678330a9dac6abe04a59d5af4584 WHIRLPOOL b7fb24920aca2a537af0c7e20925302a20fbd662209a1774a8ecc7c2cf9aaeb9b4fabfdd45620a0fda88b49122abc04882f7254a984b06df47212e537f8713f8 +DIST rust-0.12.0.tar.gz 21223176 SHA256 883e66b24d90d9957c5c538469fcde6f0668e5fb6448beecfc60884060e769b7 SHA512 b01f6ae97fb012ab701b47a8f240a764d0a6f3ee2224ab67289c61f021a1cef2e99a4b61aa3f8991ce90f52b19d6ec93a5a041e5ee4988803e6ef239c8b91445 WHIRLPOOL 8f952936f06d95c4eba4803752d690831d9e60b5f66e289d5c9083108f66bae403917c42744d4a611d636a69c2bd11d69c51c59ce3f899fe3fa94d15e30c4cfd diff --git a/app-shells/rust-zshcomp/rust-zshcomp-0.12.0.ebuild b/app-shells/rust-zshcomp/rust-zshcomp-0.12.0.ebuild new file mode 100644 index 0000000..302e32a --- /dev/null +++ b/app-shells/rust-zshcomp/rust-zshcomp-0.12.0.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" + +DESCRIPTION="Rust zsh completions" +HOMEPAGE="http://www.rust-lang.org/" +SRC_URI="http://static.rust-lang.org/dist/rust-${PV}.tar.gz" + +LICENSE="|| ( MIT Apache-2.0 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="app-shells/zsh + !!<=app-admin/eselect-rust-0.1_pre20140820 + !<=dev-lang/rust-0.11.0-r1:0.11 + !<=dev-lang/rust-999:nightly + !<=dev-lang/rust-9999-r2:git +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/rust-${PV}" + +src_configure() { + : +} + +src_compile() { + : +} + +src_install() { + insinto /usr/share/zsh/site-functions + doins src/etc/zsh/_rust +} diff --git a/app-vim/rust-mode/Manifest b/app-vim/rust-mode/Manifest index 2610a05..ad5b77f 100644 --- a/app-vim/rust-mode/Manifest +++ b/app-vim/rust-mode/Manifest @@ -1 +1,2 @@ DIST rust-0.11.0.tar.gz 21555837 SHA256 d1b3e36448bf12b8c9289024df416de10774b6d3235d7b1d22b248ef634411ba SHA512 a29e8a1c44097cc78d36d637d1ebf9b1b914d58a56d52f8112959a68916a2df9f5f63f93e596ba6db5be21a962912503e0fd678330a9dac6abe04a59d5af4584 WHIRLPOOL b7fb24920aca2a537af0c7e20925302a20fbd662209a1774a8ecc7c2cf9aaeb9b4fabfdd45620a0fda88b49122abc04882f7254a984b06df47212e537f8713f8 +DIST rust-0.12.0.tar.gz 21223176 SHA256 883e66b24d90d9957c5c538469fcde6f0668e5fb6448beecfc60884060e769b7 SHA512 b01f6ae97fb012ab701b47a8f240a764d0a6f3ee2224ab67289c61f021a1cef2e99a4b61aa3f8991ce90f52b19d6ec93a5a041e5ee4988803e6ef239c8b91445 WHIRLPOOL 8f952936f06d95c4eba4803752d690831d9e60b5f66e289d5c9083108f66bae403917c42744d4a611d636a69c2bd11d69c51c59ce3f899fe3fa94d15e30c4cfd diff --git a/app-vim/rust-mode/rust-mode-0.12.0.ebuild b/app-vim/rust-mode/rust-mode-0.12.0.ebuild new file mode 100644 index 0000000..b4aaf5c --- /dev/null +++ b/app-vim/rust-mode/rust-mode-0.12.0.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" + +inherit vim-plugin + +DESCRIPTION="Rust mode for vim" +HOMEPAGE="http://www.rust-lang.org/" +SRC_URI="http://static.rust-lang.org/dist/rust-${PV}.tar.gz" + +LICENSE="|| ( MIT Apache-2.0 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="!!<=app-admin/eselect-rust-0.1_pre20140820 + !<=dev-lang/rust-0.11.0-r1:0.11 + !<=dev-lang/rust-999:nightly + !<=dev-lang/rust-9999-r2:git +" + +S="${WORKDIR}/rust-${PV}/src/etc/vim" diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 74e3abe..fbe08a7 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -1,3 +1,6 @@ DIST rust-0.11.0-i686-unknown-linux-gnu.tar.gz 96998445 SHA256 cbfe2050f708479f2625a935d2f41165868f354ff740d2697e08acb2255670b2 SHA512 ed9213ed97351cc7ee30aa4b1177389147771ccaf8d7aa5356cecdb082966a3c5469e08f2693cb840854da523c496c90c47fa3370ceae493638efe82d5994289 WHIRLPOOL baf470655ce9229fad58db537d1fc7d34e5b858d8a06dd94690e0403d0b8d111ed41c22cf1366c7145e22c0ed55851c0bbb56db5d2408c62931c7f76f2a02352 DIST rust-0.11.0-x86_64-unknown-linux-gnu.tar.gz 97323861 SHA256 331d6374b3c8fca3e2b5fffb65ce75dfce3529bd47333de4a9ce636cb87be432 SHA512 2f98028ddaf9900150fde0bc94f2ffe28a21def3e3c84ffc3d3e5e80ee8b6d5c7010ab01dedf43b768c1c9d356041cf102b43696805f9e15bded2377206510db WHIRLPOOL dd4fcdc4f85fb4aea60cb9b547b4f242b107c3f49f478e10902bf820032b4f620af85a335059bc0fa99e2159be3e66a80a6ea76d193c7643e9cda4c168fd9f5f DIST rust-0.11.0.tar.gz 21555837 SHA256 d1b3e36448bf12b8c9289024df416de10774b6d3235d7b1d22b248ef634411ba SHA512 a29e8a1c44097cc78d36d637d1ebf9b1b914d58a56d52f8112959a68916a2df9f5f63f93e596ba6db5be21a962912503e0fd678330a9dac6abe04a59d5af4584 WHIRLPOOL b7fb24920aca2a537af0c7e20925302a20fbd662209a1774a8ecc7c2cf9aaeb9b4fabfdd45620a0fda88b49122abc04882f7254a984b06df47212e537f8713f8 +DIST rust-0.12.0-i686-unknown-linux-gnu.tar.gz 110403651 SHA256 2a96a5662e1248da0c2dc3394646b7e75b2c05b2df332cb6f388bbbb6cb75999 SHA512 466234164e9dea906f2adcce8a4eb423fbce729171ec865cc3162b2c6b73166cbe4b4dad98cd342555ed35497dddde9c9e04b80a607d8862923e05931c406ecc WHIRLPOOL a0244cf7ed0de3417da7e982043c219cd91c08ecfba919bc6ffac9adf632f937bb21d403d1ba5ccc31e6fc44192f3954ed900ecaffc874320b67d879bfab18af +DIST rust-0.12.0-x86_64-unknown-linux-gnu.tar.gz 110096209 SHA256 bb3e2eda2bd25690c58a3925ca175dedc27fedada33af4159fdb63dae9cc41a3 SHA512 1e08408cd8c8900fba637ce69efeb3ef565323c80aa94bda8679a667d19b16c2c10daa527a54ea401d49537aebfda825e44d690c3e99c025aa8e5ebd1b79c5fe WHIRLPOOL 63cf0b46f51c2010a7485427b179f02baa3a9e7e4a277df70617b50a603fda75591e74d5e4a263ab964e7f6c88ff3713e437a9967879428742431840ca970abf +DIST rust-0.12.0.tar.gz 21223176 SHA256 883e66b24d90d9957c5c538469fcde6f0668e5fb6448beecfc60884060e769b7 SHA512 b01f6ae97fb012ab701b47a8f240a764d0a6f3ee2224ab67289c61f021a1cef2e99a4b61aa3f8991ce90f52b19d6ec93a5a041e5ee4988803e6ef239c8b91445 WHIRLPOOL 8f952936f06d95c4eba4803752d690831d9e60b5f66e289d5c9083108f66bae403917c42744d4a611d636a69c2bd11d69c51c59ce3f899fe3fa94d15e30c4cfd diff --git a/dev-lang/rust/files/50rust-mode-gentoo.el b/dev-lang/rust/files/50rust-mode-gentoo.el deleted file mode 100644 index 92eb10d..0000000 --- a/dev-lang/rust/files/50rust-mode-gentoo.el +++ /dev/null @@ -1,5 +0,0 @@ - -;;; rust-mode site-lisp configuration - -(add-to-list 'load-path "@SITELISP@") -(require 'rust-mode) diff --git a/dev-lang/rust/files/rust-9999-libdir.patch b/dev-lang/rust/files/rust-0.12.0-libdir.patch index 33098b8..33098b8 100644 --- a/dev-lang/rust/files/rust-9999-libdir.patch +++ b/dev-lang/rust/files/rust-0.12.0-libdir.patch diff --git a/dev-lang/rust/files/rust-0.12.0-stage0.patch b/dev-lang/rust/files/rust-0.12.0-stage0.patch new file mode 100644 index 0000000..c1b20e4 --- /dev/null +++ b/dev-lang/rust/files/rust-0.12.0-stage0.patch @@ -0,0 +1,322 @@ +diff -u -r rust-0.12.0.orig/src/libcollections/string.rs rust-0.12.0/src/libcollections/string.rs +--- rust-0.12.0.orig/src/libcollections/string.rs 2014-10-11 14:54:06.303867073 +0200 ++++ rust-0.12.0/src/libcollections/string.rs 2014-10-11 14:54:44.063471071 +0200 +@@ -928,29 +928,6 @@ + } + } + +-#[cfg(stage0)] +-impl ops::Slice<uint, str> for String { +- #[inline] +- fn as_slice_<'a>(&'a self) -> &'a str { +- self.as_slice() +- } +- +- #[inline] +- fn slice_from_<'a>(&'a self, from: &uint) -> &'a str { +- self[][*from..] +- } +- +- #[inline] +- fn slice_to_<'a>(&'a self, to: &uint) -> &'a str { +- self[][..*to] +- } +- +- #[inline] +- fn slice_<'a>(&'a self, from: &uint, to: &uint) -> &'a str { +- self[][*from..*to] +- } +-} +-#[cfg(not(stage0))] + impl ops::Slice<uint, str> for String { + #[inline] + fn as_slice_<'a>(&'a self) -> &'a str { +diff -u -r rust-0.12.0.orig/src/libcollections/trie.rs rust-0.12.0/src/libcollections/trie.rs +--- rust-0.12.0.orig/src/libcollections/trie.rs 2014-10-11 14:54:06.303867073 +0200 ++++ rust-0.12.0/src/libcollections/trie.rs 2014-10-11 14:55:10.623192469 +0200 +@@ -389,15 +389,6 @@ + + impl<T> TrieMap<T> { + // If `upper` is true then returns upper_bound else returns lower_bound. +- #[cfg(stage0)] +- #[inline] +- fn bound<'a>(&'a self, key: uint, upper: bool) -> Entries<'a, T> { +- bound!(Entries, self = self, +- key = key, is_upper = upper, +- slice_from = slice_from_, iter = iter, +- mutability = ) +- } +- #[cfg(not(stage0))] + #[inline] + fn bound<'a>(&'a self, key: uint, upper: bool) -> Entries<'a, T> { + bound!(Entries, self = self, +@@ -440,15 +431,6 @@ + self.bound(key, true) + } + // If `upper` is true then returns upper_bound else returns lower_bound. +- #[cfg(stage0)] +- #[inline] +- fn bound_mut<'a>(&'a mut self, key: uint, upper: bool) -> MutEntries<'a, T> { +- bound!(MutEntries, self = self, +- key = key, is_upper = upper, +- slice_from = slice_from_mut_, iter = iter_mut, +- mutability = mut) +- } +- #[cfg(not(stage0))] + #[inline] + fn bound_mut<'a>(&'a mut self, key: uint, upper: bool) -> MutEntries<'a, T> { + bound!(MutEntries, self = self, +diff -u -r rust-0.12.0.orig/src/libcollections/vec.rs rust-0.12.0/src/libcollections/vec.rs +--- rust-0.12.0.orig/src/libcollections/vec.rs 2014-10-11 14:54:06.303867073 +0200 ++++ rust-0.12.0/src/libcollections/vec.rs 2014-10-11 14:55:35.422932321 +0200 +@@ -460,28 +460,6 @@ + } + }*/ + +-#[cfg(stage0)] +-impl<T> ops::Slice<uint, [T]> for Vec<T> { +- #[inline] +- fn as_slice_<'a>(&'a self) -> &'a [T] { +- self.as_slice() +- } +- +- #[inline] +- fn slice_from_<'a>(&'a self, start: &uint) -> &'a [T] { +- self.as_slice().slice_from_(start) +- } +- +- #[inline] +- fn slice_to_<'a>(&'a self, end: &uint) -> &'a [T] { +- self.as_slice().slice_to_(end) +- } +- #[inline] +- fn slice_<'a>(&'a self, start: &uint, end: &uint) -> &'a [T] { +- self.as_slice().slice_(start, end) +- } +-} +-#[cfg(not(stage0))] + impl<T> ops::Slice<uint, [T]> for Vec<T> { + #[inline] + fn as_slice_<'a>(&'a self) -> &'a [T] { +@@ -503,28 +481,6 @@ + } + } + +-#[cfg(stage0)] +-impl<T> ops::SliceMut<uint, [T]> for Vec<T> { +- #[inline] +- fn as_mut_slice_<'a>(&'a mut self) -> &'a mut [T] { +- self.as_mut_slice() +- } +- +- #[inline] +- fn slice_from_mut_<'a>(&'a mut self, start: &uint) -> &'a mut [T] { +- self.as_mut_slice().slice_from_mut_(start) +- } +- +- #[inline] +- fn slice_to_mut_<'a>(&'a mut self, end: &uint) -> &'a mut [T] { +- self.as_mut_slice().slice_to_mut_(end) +- } +- #[inline] +- fn slice_mut_<'a>(&'a mut self, start: &uint, end: &uint) -> &'a mut [T] { +- self.as_mut_slice().slice_mut_(start, end) +- } +-} +-#[cfg(not(stage0))] + impl<T> ops::SliceMut<uint, [T]> for Vec<T> { + #[inline] + fn as_mut_slice_<'a>(&'a mut self) -> &'a mut [T] { +diff -u -r rust-0.12.0.orig/src/libcore/intrinsics.rs rust-0.12.0/src/libcore/intrinsics.rs +--- rust-0.12.0.orig/src/libcore/intrinsics.rs 2014-10-11 14:54:06.313867033 +0200 ++++ rust-0.12.0/src/libcore/intrinsics.rs 2014-10-11 14:57:53.081488143 +0200 +@@ -254,7 +254,6 @@ + /// enabling further optimizations. + /// + /// NB: This is very different from the `unreachable!()` macro! +- #[cfg(not(stage0))] + pub fn unreachable() -> !; + + /// Execute a breakpoint trap, for inspection by a debugger. +diff -u -r rust-0.12.0.orig/src/libcore/ops.rs rust-0.12.0/src/libcore/ops.rs +--- rust-0.12.0.orig/src/libcore/ops.rs 2014-10-11 14:54:06.313867033 +0200 ++++ rust-0.12.0/src/libcore/ops.rs 2014-10-11 14:56:38.552270110 +0200 +@@ -711,7 +711,6 @@ + * } + * ``` + */ +-#[cfg(not(stage0))] + #[lang="slice"] + pub trait Slice<Idx, Sized? Result> for Sized? { + /// The method for the slicing operation foo[] +@@ -723,21 +722,6 @@ + /// The method for the slicing operation foo[from..to] + fn slice_or_fail<'a>(&'a self, from: &Idx, to: &Idx) -> &'a Result; + } +-#[cfg(stage0)] +-/** +- * +- */ +-#[lang="slice"] +-pub trait Slice<Idx, Sized? Result> for Sized? { +- /// The method for the slicing operation foo[] +- fn as_slice_<'a>(&'a self) -> &'a Result; +- /// The method for the slicing operation foo[from..] +- fn slice_from_<'a>(&'a self, from: &Idx) -> &'a Result; +- /// The method for the slicing operation foo[..to] +- fn slice_to_<'a>(&'a self, to: &Idx) -> &'a Result; +- /// The method for the slicing operation foo[from..to] +- fn slice_<'a>(&'a self, from: &Idx, to: &Idx) -> &'a Result; +-} + + /** + * +@@ -776,7 +760,7 @@ + * } + * ``` + */ +-#[cfg(not(stage0))] ++ + #[lang="slice_mut"] + pub trait SliceMut<Idx, Sized? Result> for Sized? { + /// The method for the slicing operation foo[] +@@ -788,21 +772,7 @@ + /// The method for the slicing operation foo[from..to] + fn slice_or_fail_mut<'a>(&'a mut self, from: &Idx, to: &Idx) -> &'a mut Result; + } +-#[cfg(stage0)] +-/** +- * +- */ +-#[lang="slice_mut"] +-pub trait SliceMut<Idx, Sized? Result> for Sized? { +- /// The method for the slicing operation foo[mut] +- fn as_mut_slice_<'a>(&'a mut self) -> &'a mut Result; +- /// The method for the slicing operation foo[mut from..] +- fn slice_from_mut_<'a>(&'a mut self, from: &Idx) -> &'a mut Result; +- /// The method for the slicing operation foo[mut ..to] +- fn slice_to_mut_<'a>(&'a mut self, to: &Idx) -> &'a mut Result; +- /// The method for the slicing operation foo[mut from..to] +- fn slice_mut_<'a>(&'a mut self, from: &Idx, to: &Idx) -> &'a mut Result; +-} ++ + /** + * + * The `Deref` trait is used to specify the functionality of dereferencing +diff -u -r rust-0.12.0.orig/src/libcore/slice.rs rust-0.12.0/src/libcore/slice.rs +--- rust-0.12.0.orig/src/libcore/slice.rs 2014-10-11 14:54:06.313867033 +0200 ++++ rust-0.12.0/src/libcore/slice.rs 2014-10-11 14:57:08.101960051 +0200 +@@ -488,7 +488,6 @@ + + + +-#[cfg(not(stage0))] + impl<T> ops::Slice<uint, [T]> for [T] { + #[inline] + fn as_slice_<'a>(&'a self) -> &'a [T] { +@@ -516,36 +515,7 @@ + } + } + } +-#[cfg(stage0)] +-impl<T> ops::Slice<uint, [T]> for [T] { +- #[inline] +- fn as_slice_<'a>(&'a self) -> &'a [T] { +- self +- } +- +- #[inline] +- fn slice_from_<'a>(&'a self, start: &uint) -> &'a [T] { +- self.slice_(start, &self.len()) +- } + +- #[inline] +- fn slice_to_<'a>(&'a self, end: &uint) -> &'a [T] { +- self.slice_(&0, end) +- } +- #[inline] +- fn slice_<'a>(&'a self, start: &uint, end: &uint) -> &'a [T] { +- assert!(*start <= *end); +- assert!(*end <= self.len()); +- unsafe { +- transmute(RawSlice { +- data: self.as_ptr().offset(*start as int), +- len: (*end - *start) +- }) +- } +- } +-} +- +-#[cfg(not(stage0))] + impl<T> ops::SliceMut<uint, [T]> for [T] { + #[inline] + fn as_mut_slice_<'a>(&'a mut self) -> &'a mut [T] { +@@ -567,35 +537,6 @@ + assert!(*start <= *end); + assert!(*end <= self.len()); + unsafe { +- transmute(RawSlice { +- data: self.as_ptr().offset(*start as int), +- len: (*end - *start) +- }) +- } +- } +-} +-#[cfg(stage0)] +-impl<T> ops::SliceMut<uint, [T]> for [T] { +- #[inline] +- fn as_mut_slice_<'a>(&'a mut self) -> &'a mut [T] { +- self +- } +- +- #[inline] +- fn slice_from_mut_<'a>(&'a mut self, start: &uint) -> &'a mut [T] { +- let len = &self.len(); +- self.slice_mut_(start, len) +- } +- +- #[inline] +- fn slice_to_mut_<'a>(&'a mut self, end: &uint) -> &'a mut [T] { +- self.slice_mut_(&0, end) +- } +- #[inline] +- fn slice_mut_<'a>(&'a mut self, start: &uint, end: &uint) -> &'a mut [T] { +- assert!(*start <= *end); +- assert!(*end <= self.len()); +- unsafe { + transmute(RawSlice { + data: self.as_ptr().offset(*start as int), + len: (*end - *start) +diff -u -r rust-0.12.0.orig/src/libcore/str.rs rust-0.12.0/src/libcore/str.rs +--- rust-0.12.0.orig/src/libcore/str.rs 2014-10-11 14:54:06.313867033 +0200 ++++ rust-0.12.0/src/libcore/str.rs 2014-10-11 14:55:53.262745176 +0200 +@@ -1164,29 +1164,6 @@ + fn equiv(&self, other: &S) -> bool { eq_slice(*self, other.as_slice()) } + } + +- #[cfg(stage0)] +- impl ops::Slice<uint, str> for str { +- #[inline] +- fn as_slice_<'a>(&'a self) -> &'a str { +- self +- } +- +- #[inline] +- fn slice_from_<'a>(&'a self, from: &uint) -> &'a str { +- self.slice_from(*from) +- } +- +- #[inline] +- fn slice_to_<'a>(&'a self, to: &uint) -> &'a str { +- self.slice_to(*to) +- } +- +- #[inline] +- fn slice_<'a>(&'a self, from: &uint, to: &uint) -> &'a str { +- self.slice(*from, *to) +- } +- } +- #[cfg(not(stage0))] + impl ops::Slice<uint, str> for str { + #[inline] + fn as_slice_<'a>(&'a self) -> &'a str { diff --git a/dev-lang/rust/rust-0.11.0-r1.ebuild b/dev-lang/rust/rust-0.11.0-r2.ebuild index 5bb3fbe..25789a7 100644 --- a/dev-lang/rust/rust-0.11.0-r1.ebuild +++ b/dev-lang/rust/rust-0.11.0-r2.ebuild @@ -6,7 +6,7 @@ EAPI="5" PYTHON_COMPAT=( python{2_6,2_7} ) -inherit elisp-common eutils python-any-r1 +inherit eutils python-any-r1 DESCRIPTION="Systems programming language from Mozilla" HOMEPAGE="http://www.rust-lang.org/" @@ -23,18 +23,20 @@ KEYWORDS="~amd64 ~x86" IUSE="clang debug emacs libcxx vim-syntax zsh-completion" REQUIRED_USE="libcxx? ( clang )" -RDEPEND="vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) - zsh-completion? ( app-shells/zsh )" -DEPEND="${RDEPEND} +CDEPEND="libcxx? ( sys-libs/libcxx ) + >=app-admin/eselect-rust-0.2_pre20141011 + !dev-lang/rust:0 +" +DEPEND="${CDEPEND} ${PYTHON_DEPS} - app-admin/eselect-rust >=dev-lang/perl-5.0 clang? ( sys-devel/clang ) - emacs? ( virtual/emacs ) - libcxx? ( sys-libs/libcxx ) - !dev-lang/rust:0" - -SITEFILE="50${PN}-mode-gentoo.el" +" +RDEPEND="${CDEPEND} + emacs? ( >=app-emacs/rust-mode-${PV} ) + vim-syntax? ( >=app-vim/rust-mode-${PV} ) + zsh-completion? ( >=app-shells/rust-zshcomp-${PV} ) +" src_prepare() { epatch "${FILESDIR}/${P}-stage0.patch" "${FILESDIR}/${P}-libdir.patch" @@ -66,40 +68,11 @@ src_configure() { src_compile() { emake VERBOSE=1 - - if use emacs; then - cd src/etc/emacs || die - elisp-compile *.el - elisp-make-autoload-file "${PN}-mode-autoloads.el" . - fi } src_install() { default - if use emacs; then - local sf="${T}/${SITEFILE}" - local my_elisp_pn=${PN}-mode - - insinto "/usr/share/${P}/emacs/site-lisp/${my_elisp_pn}" - doins -r src/etc/emacs/*.el src/etc/emacs/*.elc - - cp "${FILESDIR}/${SITEFILE}" "${sf}" || die - sed -i -e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_elisp_pn}:g" "${sf}" || die - insinto "/usr/share/${P}/emacs/site-lisp/site-gentoo.d/" - doins "${sf}" - fi - - if use vim-syntax; then - insinto /usr/share/${P}/vim/vimfiles - doins -r src/etc/vim/* - fi - - if use zsh-completion; then - insinto "/usr/share/${P}/zsh/site-functions" - doins src/etc/zsh/_rust - fi - mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die @@ -108,6 +81,9 @@ src_install() { MANPATH="/usr/share/${P}/man" EOF doenvd "${T}"/50${P} + + dodir /etc/env.d/rust + touch "${D}/etc/env.d/rust/provider-${P}" || die } pkg_postinst() { diff --git a/dev-lang/rust/rust-0.12.0.ebuild b/dev-lang/rust/rust-0.12.0.ebuild new file mode 100644 index 0000000..6e9714d --- /dev/null +++ b/dev-lang/rust/rust-0.12.0.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" + +PYTHON_COMPAT=( python{2_6,2_7} ) + +inherit eutils python-any-r1 + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="http://www.rust-lang.org/" + +ARCH_SRC_URI="amd64? ( http://static.rust-lang.org/dist/${P}-x86_64-unknown-linux-gnu.tar.gz ) + x86? ( http://static.rust-lang.org/dist/${P}-i686-unknown-linux-gnu.tar.gz )" + +SRC_URI="http://static.rust-lang.org/dist/${P}.tar.gz ${ARCH_SRC_URI}" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +SLOT="0.12" +KEYWORDS="~amd64 ~x86" + +IUSE="clang debug emacs libcxx vim-syntax zsh-completion" +REQUIRED_USE="libcxx? ( clang )" + +CDEPEND="libcxx? ( sys-libs/libcxx ) + >=app-admin/eselect-rust-0.2_pre20141011 + !dev-lang/rust:0 +" +DEPEND="${CDEPEND} + ${PYTHON_DEPS} + >=dev-lang/perl-5.0 + clang? ( sys-devel/clang ) +" +RDEPEND="${CDEPEND} + emacs? ( >=app-emacs/rust-mode-${PV} ) + vim-syntax? ( >=app-vim/rust-mode-${PV} ) + zsh-completion? ( >=app-shells/rust-zshcomp-${PV} ) +" + +src_prepare() { + epatch "${FILESDIR}/${P}-stage0.patch" "${FILESDIR}/${P}-no-ldconfig.patch" "${FILESDIR}/${P}-libdir.patch" + + local postfix="gentoo-${SLOT}" + sed -i -e "s/CFG_FILENAME_EXTRA=.*/CFG_FILENAME_EXTRA=${postfix}/" mk/main.mk || die +} + +src_configure() { + use amd64 && ARCH_POSTFIX="x86_64" + use x86 && ARCH_POSTFIX="i686" + LOCAL_RUST_PATH="${WORKDIR}/${P}-${ARCH_POSTFIX}-unknown-linux-gnu" + + "${ECONF_SOURCE:-.}"/configure \ + --prefix="${EPREFIX}/usr" \ + --libdir="${EPREFIX}/usr/lib/${P}" \ + --mandir="${EPREFIX}/usr/share/${P}/man" \ + $(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 libcxx libcpp) \ + --enable-local-rust \ + --local-rust-root="${LOCAL_RUST_PATH}" \ + --disable-manage-submodules \ + --disable-verify-install \ + --disable-docs \ + || die +} + +src_compile() { + emake VERBOSE=1 +} + +src_install() { + default + + mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die + mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die + + cat <<-EOF > "${T}"/50${P} + LDPATH="/usr/lib/${P}" + MANPATH="/usr/share/${P}/man" + EOF + doenvd "${T}"/50${P} + + dodir /etc/env.d/rust + touch "${D}/etc/env.d/rust/provider-${P}" || die +} + +pkg_postinst() { + eselect rust update --if-unset + + elog "Rust uses slots now, use 'eselect rust list'" + elog "and 'eselect rust set' to list and set rust version." + elog "For more information see 'eselect rust help'" + elog "and http://wiki.gentoo.org/wiki/Project:Eselect/User_guide" +} + +pkg_postrm() { + eselect rust unset --if-invalid +} diff --git a/dev-lang/rust/rust-999.ebuild b/dev-lang/rust/rust-999-r1.ebuild index e9357ed..e92c254 100644 --- a/dev-lang/rust/rust-999.ebuild +++ b/dev-lang/rust/rust-999-r1.ebuild @@ -6,7 +6,7 @@ EAPI="5" PYTHON_COMPAT=( python{2_6,2_7} ) -inherit elisp-common eutils python-any-r1 +inherit eutils python-any-r1 MY_P=${PN}-nightly @@ -21,22 +21,24 @@ KEYWORDS="" IUSE="clang debug emacs libcxx vim-syntax zsh-completion" REQUIRED_USE="libcxx? ( clang )" -RDEPEND="vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) - zsh-completion? ( app-shells/zsh )" -DEPEND="${RDEPEND} +CDEPEND="libcxx? ( sys-libs/libcxx ) + >=app-admin/eselect-rust-0.2_pre20141011 + !dev-lang/rust:0 +" +DEPEND="${CDEPEND} ${PYTHON_DEPS} - app-admin/eselect-rust >=dev-lang/perl-5.0 net-misc/wget clang? ( sys-devel/clang ) - emacs? ( virtual/emacs ) - libcxx? ( sys-libs/libcxx ) - !dev-lang/rust:0" +" +RDEPEND="${CDEPEND} + emacs? ( >=app-emacs/rust-mode-${PV} ) + vim-syntax? ( >=app-vim/rust-mode-${PV} ) + zsh-completion? ( >=app-shells/rust-zshcomp-${PV} ) +" S="${WORKDIR}/${MY_P}" -SITEFILE="50${PN}-mode-gentoo.el" - src_unpack() { wget "${MY_SRC_URI}" || die unpack ./"${PN}-nightly.tar.gz" @@ -51,7 +53,10 @@ src_unpack() { } src_prepare() { - epatch "${FILESDIR}/${PN}-0.12.0-no-ldconfig.patch" "${FILESDIR}/${PN}-9999-libdir.patch" + epatch "${FILESDIR}/${PN}-0.12.0-no-ldconfig.patch" "${FILESDIR}/${PN}-0.12.0-libdir.patch" + + local postfix="gentoo-${SLOT}" + sed -i -e "s/CFG_FILENAME_EXTRA=.*/CFG_FILENAME_EXTRA=${postfix}/" mk/main.mk || die } src_configure() { @@ -75,40 +80,11 @@ src_configure() { src_compile() { emake VERBOSE=1 - - if use emacs; then - cd src/etc/emacs || die - elisp-compile *.el - elisp-make-autoload-file "${PN}-mode-autoloads.el" . - fi } src_install() { default - if use emacs; then - local sf="${T}/${SITEFILE}" - local my_elisp_pn=${PN}-mode - - insinto "/usr/share/${P}/emacs/site-lisp/${my_elisp_pn}" - doins -r src/etc/emacs/*.el src/etc/emacs/*.elc - - cp "${FILESDIR}/${SITEFILE}" "${sf}" || die - sed -i -e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_elisp_pn}:g" "${sf}" || die - insinto "/usr/share/${P}/emacs/site-lisp/site-gentoo.d/" - doins "${sf}" - fi - - if use vim-syntax; then - insinto /usr/share/${P}/vim/vimfiles - doins -r src/etc/vim/* - fi - - if use zsh-completion; then - insinto "/usr/share/${P}/zsh/site-functions" - doins src/etc/zsh/_rust - fi - mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die @@ -117,6 +93,9 @@ src_install() { MANPATH="/usr/share/${P}/man" EOF doenvd "${T}"/50${P} + + dodir /etc/env.d/rust + touch "${D}/etc/env.d/rust/provider-${P}" || die } pkg_postinst() { diff --git a/dev-lang/rust/rust-9999-r2.ebuild b/dev-lang/rust/rust-9999-r3.ebuild index 17fe126..aea54d0 100644 --- a/dev-lang/rust/rust-9999-r2.ebuild +++ b/dev-lang/rust/rust-9999-r3.ebuild @@ -6,7 +6,7 @@ EAPI="5" PYTHON_COMPAT=( python{2_6,2_7} ) -inherit elisp-common eutils git-r3 python-any-r1 +inherit eutils git-r3 python-any-r1 DESCRIPTION="Systems programming language from Mozilla" HOMEPAGE="http://www.rust-lang.org/" @@ -19,18 +19,20 @@ KEYWORDS="" IUSE="clang debug emacs libcxx vim-syntax zsh-completion" REQUIRED_USE="libcxx? ( clang )" -RDEPEND="vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) - zsh-completion? ( app-shells/zsh )" -DEPEND="${RDEPEND} +CDEPEND="libcxx? ( sys-libs/libcxx ) + >=app-admin/eselect-rust-0.2_pre20141011 + !dev-lang/rust:0 +" +DEPEND="${CDEPEND} ${PYTHON_DEPS} - app-admin/eselect-rust >=dev-lang/perl-5.0 clang? ( sys-devel/clang ) - emacs? ( virtual/emacs ) - libcxx? ( sys-libs/libcxx ) - !dev-lang/rust:0" - -SITEFILE="50${PN}-mode-gentoo.el" +" +RDEPEND="${CDEPEND} + emacs? ( >=app-emacs/rust-mode-${PV} ) + vim-syntax? ( >=app-vim/rust-mode-${PV} ) + zsh-completion? ( >=app-shells/rust-zshcomp-${PV} ) +" src_unpack() { git-r3_src_unpack @@ -45,9 +47,10 @@ src_unpack() { } src_prepare() { - epatch "${FILESDIR}/${PN}-0.12.0-no-ldconfig.patch" "${FILESDIR}/${P}-libdir.patch" - local commit_hash=`git rev-parse --short HEAD` - sed -i -e "s/CFG_FILENAME_EXTRA=.*/CFG_FILENAME_EXTRA=${commit_hash}/" mk/main.mk || die + epatch "${FILESDIR}/${PN}-0.12.0-no-ldconfig.patch" "${FILESDIR}/${PN}-0.12.0-libdir.patch" + + local postfix="gentoo-${SLOT}" + sed -i -e "s/CFG_FILENAME_EXTRA=.*/CFG_FILENAME_EXTRA=${postfix}/" mk/main.mk || die } src_configure() { @@ -71,40 +74,11 @@ src_configure() { src_compile() { emake VERBOSE=1 - - if use emacs; then - cd src/etc/emacs || die - elisp-compile *.el - elisp-make-autoload-file "${PN}-mode-autoloads.el" . - fi } src_install() { default - if use emacs; then - local sf="${T}/${SITEFILE}" - local my_elisp_pn=${PN}-mode - - insinto "/usr/share/${P}/emacs/site-lisp/${my_elisp_pn}" - doins -r src/etc/emacs/*.el src/etc/emacs/*.elc - - cp "${FILESDIR}/${SITEFILE}" "${sf}" || die - sed -i -e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_elisp_pn}:g" "${sf}" || die - insinto "/usr/share/${P}/emacs/site-lisp/site-gentoo.d/" - doins "${sf}" - fi - - if use vim-syntax; then - insinto /usr/share/${P}/vim/vimfiles - doins -r src/etc/vim/* - fi - - if use zsh-completion; then - insinto "/usr/share/${P}/zsh/site-functions" - doins src/etc/zsh/_rust - fi - mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die @@ -113,6 +87,9 @@ src_install() { MANPATH="/usr/share/${P}/man" EOF doenvd "${T}"/50${P} + + dodir /etc/env.d/rust + touch "${D}/etc/env.d/rust/provider-${P}" || die } pkg_postinst() { |