mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-28 00:12:56 +02:00
rust: update to 1.14.0.
Build docs again, else build fails...
This commit is contained in:
parent
2c74146f75
commit
10b39b7457
4 changed files with 43 additions and 75 deletions
1
srcpkgs/rust-doc
Symbolic link
1
srcpkgs/rust-doc
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
rust
|
|
@ -1,10 +0,0 @@
|
||||||
--- rustc-1.12.0/src/librustc_llvm/build.rs.orig
|
|
||||||
+++ rustc-1.12.0/src/librustc_llvm/build.rs
|
|
||||||
@@ -128,6 +128,7 @@
|
|
||||||
// of llvm-config, not the target that we're attempting to link.
|
|
||||||
let mut cmd = Command::new(&llvm_config);
|
|
||||||
cmd.arg("--libs");
|
|
||||||
+ cmd.arg("--link-static");
|
|
||||||
if !is_crossed {
|
|
||||||
cmd.arg("--system-libs");
|
|
||||||
}
|
|
|
@ -1,15 +1,19 @@
|
||||||
From: Jakub Jirutka <jakub@jirutka.cz>
|
--- src/bootstrap/compile.rs.orig
|
||||||
Date: Thu, 04 Aug 2016 17:53:00 +0200
|
+++ src/bootstrap/compile.rs
|
||||||
Subject: [PATCH] Do not link musl statically
|
@@ -89,10 +89,6 @@
|
||||||
|
t!(fs::create_dir_all(&libdir));
|
||||||
Static linking of rustc on Alpine doesn't work yet.
|
}
|
||||||
|
add_to_sysroot(&out_dir, &libdir);
|
||||||
This patch is ported from
|
-
|
||||||
https://gist.github.com/japaric/52b8816a4c86f5a4699bcc50ebc3e020.
|
- if target.contains("musl") && !target.contains("mips") {
|
||||||
|
- copy_musl_third_party_objects(build, target, &libdir);
|
||||||
--- a/src/bootstrap/sanity.rs
|
- }
|
||||||
+++ b/src/bootstrap/sanity.rs
|
}
|
||||||
@@ -115,27 +115,6 @@
|
|
||||||
|
/// Copies the crt(1,i,n).o startup objects
|
||||||
|
--- src/bootstrap/sanity.rs.orig
|
||||||
|
+++ src/bootstrap/sanity.rs
|
||||||
|
@@ -132,27 +132,6 @@
|
||||||
panic!("the iOS target is only supported on OSX");
|
panic!("the iOS target is only supported on OSX");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,8 +31,8 @@ https://gist.github.com/japaric/52b8816a4c86f5a4699bcc50ebc3e020.
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- None => {
|
- None => {
|
||||||
- panic!("when targeting MUSL either the build.musl-root \
|
- panic!("when targeting MUSL either the rust.musl-root \
|
||||||
- option or the target.$TARGET.musl-root one must \
|
- option or the target.$TARGET.musl-root option must \
|
||||||
- be specified in config.toml")
|
- be specified in config.toml")
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
|
@ -37,39 +41,3 @@ https://gist.github.com/japaric/52b8816a4c86f5a4699bcc50ebc3e020.
|
||||||
if target.contains("msvc") {
|
if target.contains("msvc") {
|
||||||
// There are three builds of cmake on windows: MSVC, MinGW, and
|
// There are three builds of cmake on windows: MSVC, MinGW, and
|
||||||
// Cygwin. The Cygwin build does not have generators for Visual
|
// Cygwin. The Cygwin build does not have generators for Visual
|
||||||
--- a/src/liblibc/src/unix/mod.rs
|
|
||||||
+++ b/src/liblibc/src/unix/mod.rs
|
|
||||||
@@ -197,9 +197,6 @@
|
|
||||||
} else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
|
|
||||||
// cargo build, don't pull in anything extra as the libstd dep
|
|
||||||
// already pulls in all libs.
|
|
||||||
- } else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
|
|
||||||
- #[link(name = "c", kind = "static")]
|
|
||||||
- extern {}
|
|
||||||
} else if #[cfg(target_os = "emscripten")] {
|
|
||||||
#[link(name = "c")]
|
|
||||||
extern {}
|
|
||||||
--- a/src/librustc_back/target/x86_64_unknown_linux_musl.rs
|
|
||||||
+++ b/src/librustc_back/target/x86_64_unknown_linux_musl.rs
|
|
||||||
@@ -11,7 +11,7 @@
|
|
||||||
use target::{Target, TargetResult};
|
|
||||||
|
|
||||||
pub fn target() -> TargetResult {
|
|
||||||
- let mut base = super::linux_musl_base::opts();
|
|
||||||
+ let mut base = super::linux_base::opts();
|
|
||||||
base.cpu = "x86-64".to_string();
|
|
||||||
base.max_atomic_width = 64;
|
|
||||||
base.pre_link_args.push("-m64".to_string());
|
|
||||||
--- a/src/libunwind/build.rs
|
|
||||||
+++ b/src/libunwind/build.rs
|
|
||||||
@@ -16,9 +16,7 @@
|
|
||||||
let target = env::var("TARGET").unwrap();
|
|
||||||
|
|
||||||
if target.contains("linux") {
|
|
||||||
- if target.contains("musl") && !target.contains("mips") {
|
|
||||||
- println!("cargo:rustc-link-lib=static=unwind");
|
|
||||||
- } else if !target.contains("android") {
|
|
||||||
+ if !target.contains("android") {
|
|
||||||
println!("cargo:rustc-link-lib=gcc_s");
|
|
||||||
}
|
|
||||||
} else if target.contains("freebsd") {
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'rust'
|
# Template file for 'rust'
|
||||||
pkgname=rust
|
pkgname=rust
|
||||||
version=1.13.0
|
version=1.14.0
|
||||||
revision=1
|
revision=1
|
||||||
# NB. if you push any(!) new version, don't forget to put a build
|
# NB. if you push any(!) new version, don't forget to put a build
|
||||||
# output of musl to https://repo.voidlinux.eu/distfiles/
|
# output of musl to https://repo.voidlinux.eu/distfiles/
|
||||||
|
@ -17,29 +17,29 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
homepage="http://www.rust-lang.org/"
|
homepage="http://www.rust-lang.org/"
|
||||||
license="MIT, Apache-2.0"
|
license="MIT, Apache-2.0"
|
||||||
distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
|
distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
|
||||||
checksum=ecb84775ca977a5efec14d0cad19621a155bfcbbf46e8050d18721bb1e3e5084
|
checksum=c790edd2e915bd01bea46122af2942108479a2fda9a6f76d1094add520ac3b6b
|
||||||
|
|
||||||
case "$XBPS_MACHINE" in
|
case "$XBPS_MACHINE" in
|
||||||
x86_64-musl)
|
x86_64-musl)
|
||||||
distfiles+="
|
distfiles+="
|
||||||
https://repo.voidlinux.eu/distfiles/rustc-1.12.1-x86_64-unknown-linux-musl.tar.gz
|
https://repo.voidlinux.eu/distfiles/rustc-1.13.0-x86_64-unknown-linux-musl.tar.gz
|
||||||
https://repo.voidlinux.eu/distfiles/rust-std-1.12.1-x86_64-unknown-linux-musl.tar.gz
|
https://repo.voidlinux.eu/distfiles/rust-std-1.13.0-x86_64-unknown-linux-musl.tar.gz
|
||||||
https://alpine.geeknet.cz/distfiles/cargo-0.11.0-nightly-x86_64-alpine-linux-musl.tar.gz"
|
https://alpine.geeknet.cz/distfiles/cargo-0.11.0-nightly-x86_64-alpine-linux-musl.tar.gz"
|
||||||
checksum+="
|
checksum+="
|
||||||
96733254cebd2dfacbfc774d7d788cb3df4d30cdfacd3f9c7883b0ffd104821d
|
40e86108823d541c823f898962ae62580ee6209d7f08699f50a9f14810f997e8
|
||||||
dcc68b2d920947f8795c46239f141dfc876803e7b90f34852dea15d51db13322
|
ed28dd3cdea193fe05d7e1aa72e6f6e04210f0c7e93dcfdbe157d385a545eb3c
|
||||||
587172026c0565e839d96b0c1d4c68c000927817398241f96682dca47fa8c3b9"
|
587172026c0565e839d96b0c1d4c68c000927817398241f96682dca47fa8c3b9"
|
||||||
;;
|
;;
|
||||||
x86_64)
|
x86_64)
|
||||||
# extract from src/stage0.txt
|
# extract from src/stage0.txt
|
||||||
distfiles+="
|
distfiles+="
|
||||||
https://static.rust-lang.org/dist/2016-10-20/rustc-1.12.1-x86_64-unknown-linux-gnu.tar.gz
|
https://static.rust-lang.org/dist/2016-11-08/rustc-1.13.0-x86_64-unknown-linux-gnu.tar.gz
|
||||||
https://static.rust-lang.org/dist/2016-10-20/rust-std-1.12.1-x86_64-unknown-linux-gnu.tar.gz
|
https://static.rust-lang.org/dist/2016-11-08/rust-std-1.13.0-x86_64-unknown-linux-gnu.tar.gz
|
||||||
https://static.rust-lang.org/cargo-dist/2016-08-21/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz"
|
https://static.rust-lang.org/cargo-dist/2016-11-02/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz"
|
||||||
checksum+="
|
checksum+="
|
||||||
a753e3b6cfa8417978e4bfc0d3282f22be4abc5e106af39f4cb54dc775f64546
|
0b092ba6750be89aad32b231ad9c625a11b040fae3cad5aa3ef32aaf213332d4
|
||||||
2d428042fd0b6cc1b08584341b2ad81dabe7abdfadcb0eb5082cfbc93e1ab90b
|
de1c616c5ac955f92e4fa4e50ed0485771726d97c7106875a931a8d3c3ed6a09
|
||||||
cf47787fd50bf6c7f68db290eab054e493e4619d42a8faf66565431449055f1c"
|
bf91da07e7cf81c5ba2d0fc453cb21edbf0d26def4f1a28093bf10851cc017c0"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -78,6 +78,9 @@ EOF
|
||||||
pre_build() {
|
pre_build() {
|
||||||
export CARGO_HOME="$wrksrc/.cargo"
|
export CARGO_HOME="$wrksrc/.cargo"
|
||||||
export LD_LIBRARY_PATH="$wrksrc/stage0/lib"
|
export LD_LIBRARY_PATH="$wrksrc/stage0/lib"
|
||||||
|
export PATH="$wrksrc/stage0/bin:$PATH"
|
||||||
|
export MUSL_ROOT=/usr
|
||||||
|
export RUST_BACKTRACE=1
|
||||||
}
|
}
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
|
@ -94,7 +97,6 @@ do_configure() {
|
||||||
--host=${_triplet}
|
--host=${_triplet}
|
||||||
--build=${_triplet}
|
--build=${_triplet}
|
||||||
--release-channel=stable
|
--release-channel=stable
|
||||||
--disable-docs
|
|
||||||
--disable-rpath
|
--disable-rpath
|
||||||
--enable-ccache
|
--enable-ccache
|
||||||
--enable-rustbuild
|
--enable-rustbuild
|
||||||
|
@ -112,6 +114,7 @@ do_install() {
|
||||||
vmkdir usr
|
vmkdir usr
|
||||||
tar xf build/dist/rustc-*-*-*.tar.gz -C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in
|
tar xf build/dist/rustc-*-*-*.tar.gz -C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in
|
||||||
tar xf build/dist/rust-std-*-*-*.tar.gz -C "$DESTDIR/usr/lib" --strip-components=3 --exclude=manifest.in
|
tar xf build/dist/rust-std-*-*-*.tar.gz -C "$DESTDIR/usr/lib" --strip-components=3 --exclude=manifest.in
|
||||||
|
tar xf build/dist/rust-docs-*-*-*.tar.gz -C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in
|
||||||
|
|
||||||
vlicense COPYRIGHT
|
vlicense COPYRIGHT
|
||||||
vlicense LICENSE-APACHE
|
vlicense LICENSE-APACHE
|
||||||
|
@ -119,6 +122,12 @@ do_install() {
|
||||||
|
|
||||||
cd ${DESTDIR}/usr/lib
|
cd ${DESTDIR}/usr/lib
|
||||||
ln -sf rustlib/*/lib/*.so . # symlinks instead of copies
|
ln -sf rustlib/*/lib/*.so . # symlinks instead of copies
|
||||||
|
}
|
||||||
rm -rf ${DESTDIR}/usr/share/doc/rust
|
|
||||||
|
rust-doc_package() {
|
||||||
|
short_desc+=" - documentation"
|
||||||
|
noarch=yes
|
||||||
|
pkg_install() {
|
||||||
|
vmove usr/share/doc
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue