diff options
author | Jauhien Piatlicki <jauhien@gentoo.org> | 2014-08-10 04:14:08 +0200 |
---|---|---|
committer | Jauhien Piatlicki <jauhien@gentoo.org> | 2014-08-10 04:14:08 +0200 |
commit | ca29664fd8b599804e8fa94ed35cc9400e32ac25 (patch) | |
tree | f2fc71dd1be3e78d2e09396a32e1025af0a98f55 /dev-lang | |
parent | Update cargo-9999.ebuild. (diff) | |
download | rust-ca29664fd8b599804e8fa94ed35cc9400e32ac25.tar.gz rust-ca29664fd8b599804e8fa94ed35cc9400e32ac25.tar.bz2 rust-ca29664fd8b599804e8fa94ed35cc9400e32ac25.zip |
sync rust ebuilds with tree version
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/rust/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/rust/files/50rust-mode-gentoo.el | 2 | ||||
-rw-r--r-- | dev-lang/rust/files/rust-0.11.0-stage0.patch | 28 | ||||
-rw-r--r-- | dev-lang/rust/metadata.xml | 28 | ||||
-rw-r--r-- | dev-lang/rust/rust-0.10.ebuild | 93 | ||||
-rw-r--r-- | dev-lang/rust/rust-0.11.0.ebuild | 95 | ||||
-rw-r--r-- | dev-lang/rust/rust-9999.ebuild | 98 |
7 files changed, 213 insertions, 135 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 4a3e54c..55ca7ec 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -1,2 +1,6 @@ DIST rust-0.10.tar.gz 19538709 SHA256 c72cfbbf03016804a81d7b68e8258ffaf018f8f5a25550ad64571ce6c2642cf9 SHA512 c5a36f947864a86241e0e443c7a19a96e7cd052c2fa7c91dacf50a6d5617ce9b6f60c74194af13a173c6360b72d4066ac8f96c0f3be7e8471f5bf77c3263d654 WHIRLPOOL 567b8e41d7e1cad1ccbcbf250a5a1abbe479aaa89bc3d110ba9c53c0c06a44d9e18b056ec2045670be1505e82f70a23cd21b9bee53857122e1e4fb61b62075fd +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-bin-amd64-0.10.tbz2 63434006 SHA256 08011188919ac845a285b03b724bfbebcf5e08199880553749f0a62dfe736c83 SHA512 adb1916a478a7a0d0b3cbc0f13688820fa16e7d26ae6df2e42fb82960a4d0a209bcfa0988351d1cdb5e89c146b951ce0261e3a4486c1801c078c8e713e8d04fd WHIRLPOOL 42114bb56a1c09b56c57549789873f4a553c2ec79af481ddde406aee94ba6232ac02aac335d4a76b4f4fdb0aa666bcc494f8995a9e52cea301daeca356b95e6e +DIST rust-bin-x86-0.10.tbz2 63244554 SHA256 8bd67c8d595bdcb3eef50d4c5db5eefeca85d0e657f9557e5159048247d0e480 SHA512 20a671151951a54cba7818cefcb6767ed873f2c126c232be12e1e9540d853bead8ce90a687bd0a0df9812226a421008cf2e0c181f8693f8f37fd1ee6f8e55a33 WHIRLPOOL 489b44c0d24948eab0f252a60bdb61249075058e6004ba1491ad002ad8a9f2f89e37c5e468a447b4e9a98928f515f62e5437afc070f541f7278f6f7e8678f12d diff --git a/dev-lang/rust/files/50rust-mode-gentoo.el b/dev-lang/rust/files/50rust-mode-gentoo.el new file mode 100644 index 0000000..8686a13 --- /dev/null +++ b/dev-lang/rust/files/50rust-mode-gentoo.el @@ -0,0 +1,2 @@ +(add-to-list 'load-path "@SITELISP@") +(require 'rust-mode) diff --git a/dev-lang/rust/files/rust-0.11.0-stage0.patch b/dev-lang/rust/files/rust-0.11.0-stage0.patch new file mode 100644 index 0000000..2416cef --- /dev/null +++ b/dev-lang/rust/files/rust-0.11.0-stage0.patch @@ -0,0 +1,28 @@ +--- src/libcore/ops.rs ++++ src/libcore/ops.rs +@@ -570,12 +570,6 @@ + + macro_rules! shl_impl( + ($($t:ty)*) => ($( +- #[cfg(stage0)] +- impl Shl<$t, $t> for $t { +- #[inline] +- fn shl(&self, other: &$t) -> $t { (*self) << (*other) } +- } +- #[cfg(not(stage0), not(test))] + impl Shl<$t, $t> for $t { + #[inline] + fn shl(&self, other: &$t) -> $t { +@@ -619,12 +613,6 @@ + + macro_rules! shr_impl( + ($($t:ty)*) => ($( +- #[cfg(stage0, not(test))] +- impl Shr<$t, $t> for $t { +- #[inline] +- fn shr(&self, other: &$t) -> $t { (*self) >> (*other) } +- } +- #[cfg(not(stage0), not(test))] + impl Shr<$t, $t> for $t { + #[inline] + fn shr(&self, other: &$t) -> $t { (*self) >> (*other as uint) } diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml index e7d5859..85325e9 100644 --- a/dev-lang/rust/metadata.xml +++ b/dev-lang/rust/metadata.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer> - <email>Heather@Cynede.net</email> - </maintainer> - <longdescription> - Mozilla Rust - </longdescription> - <use> - <flag name='clang'> - clang codegeneration - </flag> - <flag name='heather'> - Heather fork - </flag> - </use> + <maintainer> + <email>jauhien@gentoo.org</email> + <name>Jauhien Piatlicki</name> + </maintainer> + <maintainer> + <email>Heather@Cynede.net</email> + </maintainer> + <use> + <flag name="binary-bootstrap">Download precompiled rust for compilator bootstrap</flag> + <flag name="clang">Use <pkg>sys-devel/clang</pkg> for building</flag> + <flag name="heather">Heather fork</flag> + <flag name="libcxx">Use <pkg>sys-libs/libcxx</pkg> as standard + library when building with <pkg>sys-devel/clang</pkg></flag> + </use> </pkgmetadata> diff --git a/dev-lang/rust/rust-0.10.ebuild b/dev-lang/rust/rust-0.10.ebuild index d4a6e64..6c17b28 100644 --- a/dev-lang/rust/rust-0.10.ebuild +++ b/dev-lang/rust/rust-0.10.ebuild @@ -4,43 +4,44 @@ EAPI="5" -inherit multilib +PYTHON_COMPAT=( python{2_6,2_7} ) -DESCRIPTION="Open source programming language from Mozilla" +inherit elisp-common python-any-r1 + +DESCRIPTION="Systems programming language from Mozilla" HOMEPAGE="http://www.rust-lang.org/" -LICENSE="|| ( MIT Apache-2.0 )" +ARCH_SRC_URI="amd64? ( mirror://gentoo/${PN}-bin-amd64-${PV}.tbz2 ) + x86? ( mirror://gentoo/${PN}-bin-x86-${PV}.tbz2 )" +SRC_URI="http://static.rust-lang.org/dist/${P}.tar.gz + binary-bootstrap? ( ${ARCH_SRC_URI} )" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="+bootstrap clang debug emacs vim-syntax zsh-completion" - -if [[ ${PV} != 9999 ]]; then - SRC_URI="http://static.rust-lang.org/dist/${P}.tar.gz" -else - inherit git-r3 - IUSE="${IUSE} heather" - - if use heather; then - EGIT_REPO_URI="git://github.com/Heather/rust.git" - else - EGIT_REPO_URI="git://github.com/mozilla/rust.git" - fi -fi +IUSE="+binary-bootstrap clang debug emacs vim-syntax zsh-completion" -RDEPEND="zsh-completion? ( app-shells/zsh )" +RDEPEND="emacs? ( virtual/emacs ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + zsh-completion? ( app-shells/zsh )" DEPEND="${RDEPEND} - clang? ( sys-devel/clang ) + ${PYTHON_DEPS} >=dev-lang/perl-5.0 - >=dev-lang/python-2.6 -" -PDEPEND="emacs? ( app-emacs/rust-mode ) - vim-syntax? ( app-vim/rust-mode ) -" + clang? ( sys-devel/clang )" + +SITEFILE="50${PN}-mode-gentoo.el" src_configure() { + local LOCAL_RUST_PATH=/usr + if use binary-bootstrap; then + LOCAL_RUST_PATH="${WORKDIR}${LOCAL_RUST_PATH}" + else + LOCAL_RUST_PATH="${EPREFIX}${LOCAL_RUST_PATH}" + fi + "${ECONF_SOURCE:-.}"/configure \ - --prefix="${EPREFIX}"/usr \ + --prefix="${EPREFIX}/usr/" \ $(use_enable clang) \ $(use_enable debug) \ $(use_enable debug llvm-assertions) \ @@ -48,35 +49,45 @@ src_configure() { $(use_enable !debug optimize-cxx) \ $(use_enable !debug optimize-llvm) \ $(use_enable !debug optimize-tests) \ - $(use_enable !bootstrap local-rust) \ - --local-rust-root="${EPREFIX}"/usr \ + --enable-local-rust \ + --local-rust-root="${LOCAL_RUST_PATH}" \ --disable-manage-submodules \ - || die + || die } src_compile() { - # Fetch current build snapshot before executing make. - if use bootstrap; then - CFG_SRC_DIR="${ECONF_SOURCE:-.}" \ - python "${ECONF_SOURCE:-.}"/src/etc/get-snapshot.py \ - `grep 'CFG_BUILD\s' config.mk | tail -n1 | sed -e 's/.*:=\s//'` \ - || die - fi - default + + 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 + elisp-install ${PN}-mode src/etc/emacs/*.el src/etc/emacs/*.elc + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r src/etc/vim/* + fi + if use zsh-completion; then insinto "/usr/share/zsh/site-functions" doins src/etc/zsh/_rust fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} - rm -f "${ED}/usr/$(get_libdir)/librusti.so" || die - rm -f "${ED}/usr/$(get_libdir)/librustc.so" || die - rm -f "${ED}/usr/$(get_libdir)/librust.so" || die - rm -f "${ED}/usr/$(get_libdir)/librustpkg.so" || die - rm -f "${ED}/usr/$(get_libdir)/librustdoc.so" || die +pkg_postrm() { + use emacs && elisp-site-regen } diff --git a/dev-lang/rust/rust-0.11.0.ebuild b/dev-lang/rust/rust-0.11.0.ebuild index 77690a3..5727ea1 100644 --- a/dev-lang/rust/rust-0.11.0.ebuild +++ b/dev-lang/rust/rust-0.11.0.ebuild @@ -4,75 +4,82 @@ EAPI="5" -inherit multilib +PYTHON_COMPAT=( python{2_6,2_7} ) -DESCRIPTION="Open source programming language from Mozilla" +inherit elisp-common eutils python-any-r1 + +DESCRIPTION="Systems programming language from Mozilla" HOMEPAGE="http://www.rust-lang.org/" -LICENSE="|| ( MIT Apache-2.0 )" -SLOT="0" -KEYWORDS="~amd64 ~x86" +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 )" -IUSE="+bootstrap clang debug doc emacs vim-syntax zsh-completion" +SRC_URI="http://static.rust-lang.org/dist/${P}.tar.gz ${ARCH_SRC_URI}" -if [[ ${PV} != 9999 ]]; then - SRC_URI="http://static.rust-lang.org/dist/${P}.tar.gz" -else - inherit git-r3 - IUSE="${IUSE} heather" +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~x86" - if use heather; then - EGIT_REPO_URI="git://github.com/Heather/rust.git" - else - EGIT_REPO_URI="git://github.com/mozilla/rust.git" - fi -fi +IUSE="clang debug emacs libcxx vim-syntax zsh-completion" +REQUIRED_USE="libcxx? ( clang )" -RDEPEND="zsh-completion? ( app-shells/zsh )" +RDEPEND="vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + zsh-completion? ( app-shells/zsh )" DEPEND="${RDEPEND} - clang? ( sys-devel/clang ) + ${PYTHON_DEPS} >=dev-lang/perl-5.0 - >=dev-lang/python-2.6 - sys-libs/libcxx -" -PDEPEND="emacs? ( app-emacs/rust-mode ) - vim-syntax? ( app-vim/rust-mode ) -" + clang? ( sys-devel/clang ) + emacs? ( virtual/emacs ) + libcxx? ( sys-libs/libcxx )" + +SITEFILE="50${PN}-mode-gentoo.el" + +src_prepare() { + epatch "${FILESDIR}/${P}-stage0.patch" +} 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 \ + --prefix="${EPREFIX}/usr/" \ $(use_enable clang) \ - $(use_enable doc docs) \ $(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 !bootstrap local-rust) \ - --local-rust-root="${EPREFIX}"/usr \ + $(use_enable libcxx libcpp) \ + --enable-local-rust \ + --local-rust-root="${LOCAL_RUST_PATH}" \ --disable-manage-submodules \ - || die + || die } src_compile() { - # Fetch current build snapshot before executing make. - if use bootstrap; then - CFG_SRC_DIR="${ECONF_SOURCE:-.}" \ - python "${ECONF_SOURCE:-.}"/src/etc/get-snapshot.py \ - `grep 'CFG_BUILD\s' config.mk | tail -n1 | sed -e 's/.*:=\s//'` \ - || die - fi - default + + 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 doc; then - dohtml -r doc/* + if use emacs; then + elisp-install ${PN}-mode src/etc/emacs/*.el src/etc/emacs/*.elc + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r src/etc/vim/* fi if use zsh-completion; then @@ -80,3 +87,11 @@ src_install() { doins src/etc/zsh/_rust fi } + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/rust/rust-9999.ebuild b/dev-lang/rust/rust-9999.ebuild index 1d77f85..b83b348 100644 --- a/dev-lang/rust/rust-9999.ebuild +++ b/dev-lang/rust/rust-9999.ebuild @@ -4,40 +4,48 @@ EAPI="5" -inherit multilib +PYTHON_COMPAT=( python{2_6,2_7} ) -DESCRIPTION="Open source programming language from Mozilla" +inherit elisp-common eutils git-r3 python-any-r1 + +DESCRIPTION="Systems programming language from Mozilla" HOMEPAGE="http://www.rust-lang.org/" -LICENSE="|| ( MIT Apache-2.0 )" +if use heather; then + EGIT_REPO_URI="git://github.com/Heather/rust.git" +else + EGIT_REPO_URI="git://github.com/rust-lang/rust.git" +fi + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="0" KEYWORDS="" -IUSE="+bootstrap clang debug doc emacs vim-syntax zsh-completion" - -if [[ ${PV} != 9999 ]]; then - SRC_URI="http://static.rust-lang.org/dist/${P}.tar.gz" -else - inherit git-r3 - IUSE="${IUSE} heather" - - if use heather; then - EGIT_REPO_URI="git://github.com/Heather/rust.git" - else - EGIT_REPO_URI="git://github.com/rust-lang/rust.git" - fi -fi +IUSE="clang debug emacs heather libcxx vim-syntax zsh-completion" +REQUIRED_USE="libcxx? ( clang )" -RDEPEND="zsh-completion? ( app-shells/zsh )" +RDEPEND="vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + zsh-completion? ( app-shells/zsh )" DEPEND="${RDEPEND} - clang? ( sys-devel/clang ) + ${PYTHON_DEPS} >=dev-lang/perl-5.0 - >=dev-lang/python-2.6 - sys-libs/libcxx -" -PDEPEND="emacs? ( app-emacs/rust-mode ) - vim-syntax? ( app-vim/rust-mode ) -" + clang? ( sys-devel/clang ) + emacs? ( virtual/emacs ) + libcxx? ( sys-libs/libcxx )" + +SITEFILE="50${PN}-mode-gentoo.el" + +src_unpack() { + git-r3_src_unpack + + use amd64 && BUILD_TRIPLE=x86_64-unknown-linux-gnu + use x86 && BUILD_TRIPLE=i686-unknown-linux-gnu + export CFG_SRC_DIR="${S}" && \ + cd ${S} && \ + mkdir -p "${S}/dl" && \ + mkdir -p "${S}/${BUILD_TRIPLE}/stage0/bin" && \ + python2 "${S}/src/etc/get-snapshot.py" ${BUILD_TRIPLE} || die +} src_prepare() { epatch "${FILESDIR}/${PN}-0.12.0-no-ldconfig.patch" @@ -45,38 +53,40 @@ src_prepare() { src_configure() { "${ECONF_SOURCE:-.}"/configure \ - --prefix="${EPREFIX}"/usr \ + --prefix="${EPREFIX}/usr/" \ $(use_enable clang) \ - $(use_enable doc docs) \ $(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 !bootstrap local-rust) \ - --local-rust-root="${EPREFIX}"/usr \ + $(use_enable libcxx libcpp) \ --disable-manage-submodules \ - || die + || die } src_compile() { - # Fetch current build snapshot before executing make. - if use bootstrap; then - CFG_SRC_DIR="${ECONF_SOURCE:-.}" \ - python "${ECONF_SOURCE:-.}"/src/etc/get-snapshot.py \ - `grep 'CFG_BUILD\s' config.mk | tail -n1 | sed -e 's/.*:=\s//'` \ - || die - fi - default + + 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 doc; then - dohtml -r doc/* + if use emacs; then + elisp-install ${PN}-mode src/etc/emacs/*.el src/etc/emacs/*.elc + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r src/etc/vim/* fi if use zsh-completion; then @@ -84,3 +94,11 @@ src_install() { doins src/etc/zsh/_rust fi } + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |