summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJauhien Piatlicki <jauhien@gentoo.org>2014-08-29 14:12:27 +0000
committerJauhien Piatlicki <jauhien@gentoo.org>2014-08-29 14:12:27 +0000
commit6e3129337ed287d404c15934e191ad34ab98b116 (patch)
tree9796313107809313f0e9a2c4b356bb9f33180cbd
parentVersion bump. (diff)
downloadgentoo-2-6e3129337ed287d404c15934e191ad34ab98b116.tar.gz
gentoo-2-6e3129337ed287d404c15934e191ad34ab98b116.tar.bz2
gentoo-2-6e3129337ed287d404c15934e191ad34ab98b116.zip
Add slotting to rust ebuilds
Add these slots: (major.minor) rust release (nightly) nightly version (git) git master branch Remove old unslotted versions (Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key 0xB2EFA1D4)
-rw-r--r--dev-lang/rust/ChangeLog16
-rw-r--r--dev-lang/rust/files/50rust-mode-gentoo.el3
-rw-r--r--dev-lang/rust/files/rust-0.11.0-libdir.patch270
-rw-r--r--dev-lang/rust/files/rust-0.12.0-no-ldconfig.patch2
-rw-r--r--dev-lang/rust/files/rust-9999-libdir.patch113
-rw-r--r--dev-lang/rust/metadata.xml4
-rw-r--r--dev-lang/rust/rust-0.10.ebuild93
-rw-r--r--dev-lang/rust/rust-0.11.0-r1.ebuild (renamed from dev-lang/rust/rust-0.11.0.ebuild)51
-rw-r--r--dev-lang/rust/rust-999.ebuild132
-rw-r--r--dev-lang/rust/rust-9999-r2.ebuild (renamed from dev-lang/rust/rust-9999.ebuild)53
10 files changed, 616 insertions, 121 deletions
diff --git a/dev-lang/rust/ChangeLog b/dev-lang/rust/ChangeLog
index cdbde54a4bd2..d81bad9630d6 100644
--- a/dev-lang/rust/ChangeLog
+++ b/dev-lang/rust/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for dev-lang/rust
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/rust/ChangeLog,v 1.3 2014/07/31 14:29:09 jauhien Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/rust/ChangeLog,v 1.4 2014/08/29 14:12:27 jauhien Exp $
+
+*rust-0.11.0-r1 (29 Aug 2014)
+*rust-999 (29 Aug 2014)
+*rust-9999-r2 (29 Aug 2014)
+
+ 29 Aug 2014; Jauhien Piatlicki <jauhien@gentoo.org>
+ +files/rust-0.11.0-libdir.patch, +files/rust-9999-libdir.patch,
+ +rust-0.11.0-r1.ebuild, +rust-999.ebuild, +rust-9999-r2.ebuild,
+ -rust-0.10.ebuild, -rust-0.11.0.ebuild, -rust-9999.ebuild,
+ files/50rust-mode-gentoo.el, files/rust-0.12.0-no-ldconfig.patch,
+ metadata.xml:
+ Add slotting to rust ebuilds Add these slots: (major.minor) rust release
+ (nightly) nightly version (git) git master branch Remove old unslotted
+ versions
*rust-9999 (31 Jul 2014)
diff --git a/dev-lang/rust/files/50rust-mode-gentoo.el b/dev-lang/rust/files/50rust-mode-gentoo.el
index 8686a13069af..92eb10d13ee2 100644
--- a/dev-lang/rust/files/50rust-mode-gentoo.el
+++ b/dev-lang/rust/files/50rust-mode-gentoo.el
@@ -1,2 +1,5 @@
+
+;;; rust-mode site-lisp configuration
+
(add-to-list 'load-path "@SITELISP@")
(require 'rust-mode)
diff --git a/dev-lang/rust/files/rust-0.11.0-libdir.patch b/dev-lang/rust/files/rust-0.11.0-libdir.patch
new file mode 100644
index 000000000000..f895e76903e9
--- /dev/null
+++ b/dev-lang/rust/files/rust-0.11.0-libdir.patch
@@ -0,0 +1,270 @@
+This patch adds proper support for --libdir configure option
+See https://github.com/rust-lang/rust/issues/11671 and
+https://github.com/rust-lang/rust/pull/16552
+
+diff -r -u rust-0.11.0.orig/configure rust-0.11.0/configure
+--- rust-0.11.0.orig/configure
++++ rust-0.11.0/configure
+@@ -453,6 +453,14 @@
+
+ valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries"
+
++case "$CFG_LIBDIR" in
++ "$CFG_PREFIX"/*) CAT_INC=2;;
++ "$CFG_PREFIX"*) CAT_INC=1;;
++ *)
++ err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
++esac
++CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
++
+ if [ $HELP -eq 1 ]
+ then
+ echo
+@@ -838,6 +846,15 @@
+ do
+ for t in $CFG_TARGET
+ do
++ # host lib dir stage0
++ make_dir $h/stage0/lib
++
++ # target bin dir stage0
++ make_dir $h/stage0/lib/rustlib/$t/bin
++
++ # target lib dir stage0
++ make_dir $h/stage0/lib/rustlib/$t/lib
++
+ for i in 0 1 2 3
+ do
+ # host bin dir
+diff -r -u rust-0.11.0.orig/mk/main.mk rust-0.11.0/mk/main.mk
+--- rust-0.11.0.orig/mk/main.mk
++++ rust-0.11.0/mk/main.mk
+@@ -304,7 +304,11 @@
+ # Destinations of artifacts for the host compiler
+ HROOT$(1)_H_$(3) = $(3)/stage$(1)
+ HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
++ifeq ($(1),0)
++HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
++else
+ HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
++endif
+
+ # Destinations of artifacts for target architectures
+ TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
+diff -r -u rust-0.11.0.orig/src/etc/install.sh rust-0.11.0/src/etc/install.sh
+--- rust-0.11.0.orig/src/etc/install.sh
++++ rust-0.11.0/src/etc/install.sh
+@@ -35,6 +35,13 @@
+ fi
+ }
+
++need_cmd() {
++ if command -v $1 >/dev/null 2>&1
++ then msg "found $1"
++ else err "need $1"
++ fi
++}
++
+ putvar() {
+ local T
+ eval T=\$$1
+@@ -198,7 +205,16 @@
+ ABSOLUTIFIED="${FILE_PATH}"
+ }
+
+-CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
++msg "looking for install programs"
++need_cmd mkdir
++need_cmd printf
++need_cmd cut
++need_cmd grep
++need_cmd uname
++need_cmd tr
++need_cmd sed
++
++CFG_SRC_DIR="$(cd $(dirname $0) && pwd)"
+ CFG_SELF="$0"
+ CFG_ARGS="$@"
+
+@@ -216,16 +232,85 @@
+ step_msg "processing $CFG_SELF args"
+ fi
+
++# Check for mingw or cygwin in order to special case $CFG_LIBDIR_RELATIVE.
++# This logic is duplicated from configure in order to get the correct libdir
++# for Windows installs.
++CFG_OSTYPE=$(uname -s)
++
++case $CFG_OSTYPE in
++
++ MINGW32*)
++ CFG_OSTYPE=pc-mingw32
++ ;;
++
++ MINGW64*)
++ # msys2, MSYSTEM=MINGW64
++ CFG_OSTYPE=w64-mingw32
++ ;;
++
++# Thad's Cygwin identifers below
++
++# Vista 32 bit
++ CYGWIN_NT-6.0)
++ CFG_OSTYPE=pc-mingw32
++ ;;
++
++# Vista 64 bit
++ CYGWIN_NT-6.0-WOW64)
++ CFG_OSTYPE=w64-mingw32
++ ;;
++
++# Win 7 32 bit
++ CYGWIN_NT-6.1)
++ CFG_OSTYPE=pc-mingw32
++ ;;
++
++# Win 7 64 bit
++ CYGWIN_NT-6.1-WOW64)
++ CFG_OSTYPE=w64-mingw32
++ ;;
++esac
++
+ OPTIONS=""
+ BOOL_OPTIONS=""
+ VAL_OPTIONS=""
+
++# On windows we just store the libraries in the bin directory because
++# there's no rpath. This is where the build system itself puts libraries;
++# --libdir is used to configure the installation directory.
++# FIXME: Thise needs to parameterized over target triples. Do it in platform.mk
++CFG_LIBDIR_RELATIVE=lib
++if [ "$CFG_OSTYPE" = "pc-mingw32" ] || [ "$CFG_OSTYPE" = "w64-mingw32" ]
++then
++ CFG_LIBDIR_RELATIVE=bin
++fi
++
++if [ "$CFG_OSTYPE" = "pc-mingw32" ] || [ "$CFG_OSTYPE" = "w64-mingw32" ]
++then
++ CFG_LD_PATH_VAR=PATH
++ CFG_OLD_LD_PATH_VAR=$PATH
++elif [ "$CFG_OSTYPE" = "Darwin" ]
++then
++ CFG_LD_PATH_VAR=DYLD_LIBRARY_PATH
++ CFG_OLD_LD_PATH_VAR=$DYLD_LIBRARY_PATH
++else
++ CFG_LD_PATH_VAR=LD_LIBRARY_PATH
++ CFG_OLD_LD_PATH_VAR=$LD_LIBRARY_PATH
++fi
++
+ flag uninstall "only uninstall from the installation prefix"
+ opt verify 1 "verify that the installed binaries run correctly"
+ valopt prefix "/usr/local" "set installation prefix"
+-# NB This isn't quite the same definition as in `configure`.
+-# just using 'lib' instead of CFG_LIBDIR_RELATIVE
+-valopt libdir "${CFG_PREFIX}/lib" "install libraries"
++# NB This is exactly the same definition as in `configure`.
++valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries"
++case "$CFG_LIBDIR" in
++ "$CFG_PREFIX"/*) CAT_INC=2;;
++ "$CFG_PREFIX"*) CAT_INC=1;;
++ *)
++ err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
++esac
++CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
++
+ valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
+
+ if [ $HELP -eq 1 ]
+@@ -247,11 +332,13 @@
+ if [ -z "${CFG_UNINSTALL}" ]
+ then
+ msg "verifying platform can run binaries"
++ export $CFG_LD_PATH_VAR="${CFG_SRC_DIR}/lib":$CFG_OLD_LD_PATH_VAR
+ "${CFG_SRC_DIR}/bin/rustc" --version > /dev/null
+ if [ $? -ne 0 ]
+ then
+ err "can't execute rustc binary on this platform"
+ fi
++ export $CFG_LD_PATH_VAR=$CFG_OLD_LD_PATH_VAR
+ fi
+ fi
+
+@@ -348,9 +435,9 @@
+ # Decide the destination of the file
+ FILE_INSTALL_PATH="${CFG_PREFIX}/$p"
+
+- if echo "$p" | grep "^lib/" > /dev/null
++ if echo "$p" | grep "^${CFG_LIBDIR_RELATIVE}/" > /dev/null
+ then
+- pp=`echo $p | sed 's/^lib\///'`
++ pp=`echo $p | sed "s%^${CFG_LIBDIR_RELATIVE}/%%"`
+ FILE_INSTALL_PATH="${CFG_LIBDIR}/$pp"
+ fi
+
+@@ -384,24 +471,36 @@
+ need_ok "failed to update manifest"
+
+ # The manifest lists all files to install
+-done < "${CFG_SRC_DIR}/lib/rustlib/manifest.in"
++done < "${CFG_SRC_DIR}/${CFG_LIBDIR_RELATIVE}/rustlib/manifest.in"
+
+ # Sanity check: can we run the installed binaries?
++#
++# As with the verification above, make sure the right LD_LIBRARY_PATH-equivalent
++# is in place. Try first without this variable, and if that fails try again with
++# the variable. If the second time tries, print a hopefully helpful message to
++# add something to the appropriate environment variable.
+ if [ -z "${CFG_DISABLE_VERIFY}" ]
+ then
+ msg "verifying installed binaries are executable"
+- "${CFG_PREFIX}/bin/rustc" --version > /dev/null
++ "${CFG_PREFIX}/bin/rustc" --version 2> /dev/null 1> /dev/null
+ if [ $? -ne 0 ]
+ then
+- ERR="can't execute installed rustc binary. "
+- ERR="${ERR}installation may be broken. "
+- ERR="${ERR}if this is expected then rerun install.sh with \`--disable-verify\` "
+- ERR="${ERR}or \`make install\` with \`--disable-verify-install\`"
+- err "${ERR}"
++ export $CFG_LD_PATH_VAR="${CFG_PREFIX}/lib":$CFG_OLD_LD_PATH_VAR
++ "${CFG_PREFIX}/bin/rustc" --version > /dev/null
++ if [ $? -ne 0 ]
++ then
++ ERR="can't execute installed rustc binary. "
++ ERR="${ERR}installation may be broken. "
++ ERR="${ERR}if this is expected then rerun install.sh with \`--disable-verify\` "
++ ERR="${ERR}or \`make install\` with \`--disable-verify-install\`"
++ err "${ERR}"
++ else
++ echo
++ echo " Note: please ensure '${CFG_PREFIX}/lib' is added to ${CFG_LD_PATH_VAR}"
++ fi
+ fi
+ fi
+
+-
+ echo
+ echo " Rust is ready to roll."
+ echo
+diff -r -u rust-0.11.0.orig/src/librustc/metadata/filesearch.rs rust-0.11.0/src/librustc/metadata/filesearch.rs
+--- rust-0.11.0.orig/src/librustc/metadata/filesearch.rs
++++ rust-0.11.0/src/librustc/metadata/filesearch.rs
+@@ -243,10 +243,14 @@
+ // of the directory where librustc is located, rather than where the rustc
+ // binary is.
+
+- if sysroot.join(primary_libdir_name()).join(rustlibdir()).exists() {
+- return primary_libdir_name();
+- } else {
+- return secondary_libdir_name();
++ match option_env!("CFG_LIBDIR_RELATIVE") {
++ None => if sysroot.join(primary_libdir_name()).join(rustlibdir()).exists() {
++ return primary_libdir_name();
++ } else {
++ return secondary_libdir_name();
++ },
++
++ Some(libdir) => return libdir.to_string()
+ }
+
+ #[cfg(target_word_size = "64")]
diff --git a/dev-lang/rust/files/rust-0.12.0-no-ldconfig.patch b/dev-lang/rust/files/rust-0.12.0-no-ldconfig.patch
index b3b78f990e1f..0ab3a5a836bb 100644
--- a/dev-lang/rust/files/rust-0.12.0-no-ldconfig.patch
+++ b/dev-lang/rust/files/rust-0.12.0-no-ldconfig.patch
@@ -1,8 +1,6 @@
Remove ldconfig(1) execution to prevent the installation script from accessing
outside of a sandbox.
-Author: Heather Cynede
-
diff --git a/src/etc/install.sh b/src/etc/install.sh
index c949743..7c3daa5 100644
--- a/src/etc/install.sh
diff --git a/dev-lang/rust/files/rust-9999-libdir.patch b/dev-lang/rust/files/rust-9999-libdir.patch
new file mode 100644
index 000000000000..33098b87c921
--- /dev/null
+++ b/dev-lang/rust/files/rust-9999-libdir.patch
@@ -0,0 +1,113 @@
+This patch adds proper support for --libdir configure option
+See https://github.com/rust-lang/rust/issues/11671 and
+https://github.com/rust-lang/rust/pull/16552
+
+diff --git a/configure b/configure
+index 636d502..fff67b6 100755
+--- a/configure
++++ b/configure
+@@ -459,6 +459,14 @@ fi
+
+ valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries"
+
++case "$CFG_LIBDIR" in
++ "$CFG_PREFIX"/*) CAT_INC=2;;
++ "$CFG_PREFIX"*) CAT_INC=1;;
++ *)
++ err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
++esac
++CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
++
+ if [ $HELP -eq 1 ]
+ then
+ echo
+@@ -855,6 +863,15 @@ for h in $CFG_HOST
+ do
+ for t in $CFG_TARGET
+ do
++ # host lib dir stage0
++ make_dir $h/stage0/lib
++
++ # target bin dir stage0
++ make_dir $h/stage0/lib/rustlib/$t/bin
++
++ # target lib dir stage0
++ make_dir $h/stage0/lib/rustlib/$t/lib
++
+ for i in 0 1 2 3
+ do
+ # host bin dir
+diff --git a/mk/main.mk b/mk/main.mk
+index 2bdfc1b..bca5b3b 100644
+--- a/mk/main.mk
++++ b/mk/main.mk
+@@ -311,7 +311,11 @@ define SREQ
+ # Destinations of artifacts for the host compiler
+ HROOT$(1)_H_$(3) = $(3)/stage$(1)
+ HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
++ifeq ($(1),0)
++HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
++else
+ HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
++endif
+
+ # Destinations of artifacts for target architectures
+ TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
+diff --git a/src/etc/install.sh b/src/etc/install.sh
+index c949743..1a472c6 100644
+--- a/src/etc/install.sh
++++ b/src/etc/install.sh
+@@ -301,9 +301,16 @@ fi
+ flag uninstall "only uninstall from the installation prefix"
+ opt verify 1 "verify that the installed binaries run correctly"
+ valopt prefix "/usr/local" "set installation prefix"
+-# NB This isn't quite the same definition as in `configure`.
+-# just using 'lib' instead of CFG_LIBDIR_RELATIVE
++# NB This is exactly the same definition as in `configure`.
+ valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries"
++case "$CFG_LIBDIR" in
++ "$CFG_PREFIX"/*) CAT_INC=2;;
++ "$CFG_PREFIX"*) CAT_INC=1;;
++ *)
++ err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
++esac
++CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
++
+ valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
+
+ if [ $HELP -eq 1 ]
+@@ -428,9 +435,9 @@ while read p; do
+ # Decide the destination of the file
+ FILE_INSTALL_PATH="${CFG_PREFIX}/$p"
+
+- if echo "$p" | grep "^lib/" > /dev/null
++ if echo "$p" | grep "^${CFG_LIBDIR_RELATIVE}/" > /dev/null
+ then
+- pp=`echo $p | sed 's/^lib\///'`
++ pp=`echo $p | sed "s%^${CFG_LIBDIR_RELATIVE}/%%"`
+ FILE_INSTALL_PATH="${CFG_LIBDIR}/$pp"
+ fi
+
+diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
+index 99b98b6..f3e37ff 100644
+--- a/src/librustc/metadata/filesearch.rs
++++ b/src/librustc/metadata/filesearch.rs
+@@ -243,10 +243,14 @@ fn find_libdir(sysroot: &Path) -> String {
+ // of the directory where librustc is located, rather than where the rustc
+ // binary is.
+
+- if sysroot.join(primary_libdir_name()).join(rustlibdir()).exists() {
+- return primary_libdir_name();
+- } else {
+- return secondary_libdir_name();
++ match option_env!("CFG_LIBDIR_RELATIVE") {
++ None => if sysroot.join(primary_libdir_name()).join(rustlibdir()).exists() {
++ return primary_libdir_name();
++ } else {
++ return secondary_libdir_name();
++ },
++
++ Some(libdir) => return libdir.to_string()
+ }
+
+ #[cfg(target_word_size = "64")]
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index b2372428725b..d84b0f6f3efc 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -5,8 +5,10 @@
<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="libcxx">Use <pkg>sys-libs/libcxx</pkg> as standard
library when building with <pkg>sys-devel/clang</pkg></flag>
diff --git a/dev-lang/rust/rust-0.10.ebuild b/dev-lang/rust/rust-0.10.ebuild
deleted file mode 100644
index b87c586eb506..000000000000
--- a/dev-lang/rust/rust-0.10.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/rust/rust-0.10.ebuild,v 1.1 2014/05/18 23:46:09 jauhien Exp $
-
-EAPI="5"
-
-PYTHON_COMPAT=( python{2_6,2_7} )
-
-inherit elisp-common python-any-r1
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="http://www.rust-lang.org/"
-
-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="+binary-bootstrap clang debug emacs vim-syntax zsh-completion"
-
-RDEPEND="emacs? ( virtual/emacs )
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
- zsh-completion? ( app-shells/zsh )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- >=dev-lang/perl-5.0
- 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/" \
- $(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) \
- --enable-local-rust \
- --local-rust-root="${LOCAL_RUST_PATH}" \
- --disable-manage-submodules \
- || die
-}
-
-src_compile() {
- 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
-}
-
-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-r1.ebuild
index 2880ec4e734b..e3be7ee19530 100644
--- a/dev-lang/rust/rust-0.11.0.ebuild
+++ b/dev-lang/rust/rust-0.11.0-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/rust/rust-0.11.0.ebuild,v 1.1 2014/07/31 09:52:41 jauhien Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/rust/rust-0.11.0-r1.ebuild,v 1.1 2014/08/29 14:12:27 jauhien Exp $
EAPI="5"
@@ -17,7 +17,7 @@ ARCH_SRC_URI="amd64? ( http://static.rust-lang.org/dist/${P}-x86_64-unknown-linu
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"
+SLOT="0.11"
KEYWORDS="~amd64 ~x86"
IUSE="clang debug emacs libcxx vim-syntax zsh-completion"
@@ -27,15 +27,17 @@ RDEPEND="vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
zsh-completion? ( app-shells/zsh )"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
+ app-admin/eselect-rust
>=dev-lang/perl-5.0
clang? ( sys-devel/clang )
emacs? ( virtual/emacs )
- libcxx? ( sys-libs/libcxx )"
+ libcxx? ( sys-libs/libcxx )
+ !dev-lang/rust:0"
SITEFILE="50${PN}-mode-gentoo.el"
src_prepare() {
- epatch "${FILESDIR}/${P}-stage0.patch"
+ epatch "${FILESDIR}/${P}-stage0.patch" "${FILESDIR}/${P}-libdir.patch"
}
src_configure() {
@@ -44,7 +46,9 @@ src_configure() {
LOCAL_RUST_PATH="${WORKDIR}/${P}-${ARCH_POSTFIX}-unknown-linux-gnu"
"${ECONF_SOURCE:-.}"/configure \
- --prefix="${EPREFIX}/usr/" \
+ --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) \
@@ -56,11 +60,12 @@ src_configure() {
--enable-local-rust \
--local-rust-root="${LOCAL_RUST_PATH}" \
--disable-manage-submodules \
+ --disable-verify-install \
|| die
}
src_compile() {
- default
+ emake VERBOSE=1
if use emacs; then
cd src/etc/emacs || die
@@ -73,25 +78,47 @@ 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}"
+ 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/vim/vimfiles
+ insinto /usr/share/${P}/vim/vimfiles
doins -r src/etc/vim/*
fi
if use zsh-completion; then
- insinto "/usr/share/zsh/site-functions"
+ 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
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/lib/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
}
pkg_postinst() {
- use emacs && elisp-site-regen
+ 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() {
- use emacs && elisp-site-regen
+ eselect rust unset --if-invalid
}
diff --git a/dev-lang/rust/rust-999.ebuild b/dev-lang/rust/rust-999.ebuild
new file mode 100644
index 000000000000..5669a63d5c48
--- /dev/null
+++ b/dev-lang/rust/rust-999.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/rust/rust-999.ebuild,v 1.1 2014/08/29 14:12:27 jauhien Exp $
+
+EAPI="5"
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+
+inherit elisp-common eutils python-any-r1
+
+MY_P=${PN}-nightly
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+MY_SRC_URI="http://static.rust-lang.org/dist/${MY_P}.tar.gz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="nightly"
+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}
+ ${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"
+
+S="${WORKDIR}/${MY_P}"
+
+SITEFILE="50${PN}-mode-gentoo.el"
+
+src_unpack() {
+ wget "${MY_SRC_URI}" || die
+ unpack ./"${PN}-nightly.tar.gz"
+
+ 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" "${FILESDIR}/${PN}-9999-libdir.patch"
+}
+
+src_configure() {
+ "${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) \
+ --disable-manage-submodules \
+ --disable-verify-install \
+ || die
+}
+
+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
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/lib/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+}
+
+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-9999.ebuild b/dev-lang/rust/rust-9999-r2.ebuild
index 63ae345aac8c..d3b3c85ace3d 100644
--- a/dev-lang/rust/rust-9999.ebuild
+++ b/dev-lang/rust/rust-9999-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/rust/rust-9999.ebuild,v 1.1 2014/07/31 14:29:09 jauhien Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/rust/rust-9999-r2.ebuild,v 1.1 2014/08/29 14:12:27 jauhien Exp $
EAPI="5"
@@ -13,7 +13,7 @@ HOMEPAGE="http://www.rust-lang.org/"
EGIT_REPO_URI="git://github.com/rust-lang/rust.git"
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-SLOT="0"
+SLOT="git"
KEYWORDS=""
IUSE="clang debug emacs libcxx vim-syntax zsh-completion"
@@ -23,10 +23,12 @@ RDEPEND="vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
zsh-completion? ( app-shells/zsh )"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
+ app-admin/eselect-rust
>=dev-lang/perl-5.0
clang? ( sys-devel/clang )
emacs? ( virtual/emacs )
- libcxx? ( sys-libs/libcxx )"
+ libcxx? ( sys-libs/libcxx )
+ !dev-lang/rust:0"
SITEFILE="50${PN}-mode-gentoo.el"
@@ -43,12 +45,16 @@ src_unpack() {
}
src_prepare() {
- epatch "${FILESDIR}/${PN}-0.12.0-no-ldconfig.patch"
+ 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
}
src_configure() {
"${ECONF_SOURCE:-.}"/configure \
- --prefix="${EPREFIX}/usr/" \
+ --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) \
@@ -58,11 +64,12 @@ src_configure() {
$(use_enable !debug optimize-tests) \
$(use_enable libcxx libcpp) \
--disable-manage-submodules \
+ --disable-verify-install \
|| die
}
src_compile() {
- default
+ emake VERBOSE=1
if use emacs; then
cd src/etc/emacs || die
@@ -75,25 +82,47 @@ 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}"
+ 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/vim/vimfiles
+ insinto /usr/share/${P}/vim/vimfiles
doins -r src/etc/vim/*
fi
if use zsh-completion; then
- insinto "/usr/share/zsh/site-functions"
+ 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
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/lib/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
}
pkg_postinst() {
- use emacs && elisp-site-regen
+ 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() {
- use emacs && elisp-site-regen
+ eselect rust unset --if-invalid
}