aboutsummaryrefslogtreecommitdiffstats
path: root/community/rust/minimize-rpath.patch
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-05-24 00:44:00 +0200
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-26 17:00:30 +0000
commit9da87c88454379df97a1a065daa14ed1d5817f29 (patch)
treeb5776dc2227a46301f7b5a5207c8376f8e888a0a /community/rust/minimize-rpath.patch
parentfdc9f037db8cfd09b1874ac0682821aa28c2ce51 (diff)
downloadaports-9da87c88454379df97a1a065daa14ed1d5817f29.tar.bz2
aports-9da87c88454379df97a1a065daa14ed1d5817f29.tar.xz
community/rust: upgrade to 1.34.2
* Adopt maintainership Closes GH-8057
Diffstat (limited to 'community/rust/minimize-rpath.patch')
-rw-r--r--community/rust/minimize-rpath.patch9
1 files changed, 4 insertions, 5 deletions
diff --git a/community/rust/minimize-rpath.patch b/community/rust/minimize-rpath.patch
index 8d3be50cbe..1d89d7d5af 100644
--- a/community/rust/minimize-rpath.patch
+++ b/community/rust/minimize-rpath.patch
@@ -31,7 +31,7 @@ and skip it there.
@@ -87,11 +88,13 @@
}
- fn get_rpaths_relative_to_output(config: &mut RPathConfig,
+ fn get_rpaths_relative_to_output(config: &mut RPathConfig<'_>,
- libs: &[PathBuf]) -> Vec<String> {
- libs.iter().map(|a| get_rpath_relative_to_output(config, a)).collect()
+ libs: &[PathBuf],
@@ -39,15 +39,15 @@ and skip it there.
+ libs.iter().filter_map(|a| get_rpath_relative_to_output(config, a, omit)).collect()
}
--fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path) -> String {
-+fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path,
+-fn get_rpath_relative_to_output(config: &mut RPathConfig<'_>, lib: &Path) -> String {
++fn get_rpath_relative_to_output(config: &mut RPathConfig<'_>, lib: &Path,
+ omit: &Vec<String>) -> Option<String> {
// Mac doesn't appear to support $ORIGIN
let prefix = if config.is_like_osx {
"@loader_path"
@@ -105,10 +108,16 @@
let mut output = cwd.join(&config.out_filename);
- output.pop();
+ output.pop(); // strip filename
let output = fs::canonicalize(&output).unwrap_or(output);
- let relative = path_relative_from(&lib, &output).unwrap_or_else(||
- panic!("couldn't create relative path from {:?} to {:?}", output, lib));
@@ -97,4 +97,3 @@ and skip it there.
assert_eq!(res, "$ORIGIN/../lib");
}
}
-