From 4d711d5f63c27e680f3e0cdf6cb8d5c0433c3686 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Thu, 13 Nov 2014 17:28:01 -0500 Subject: [PATCH] Add patch for missing vendor --- ...hot-support-triples-lacking-a-vendor.patch | 29 +++++++++++++++++++ recipes/rust/rust.inc | 2 +- recipes/rust/rust_0.12.0+2014-11-13.bb | 4 +++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 recipes/rust/files/0001-src-etc-snapshot-support-triples-lacking-a-vendor.patch diff --git a/recipes/rust/files/0001-src-etc-snapshot-support-triples-lacking-a-vendor.patch b/recipes/rust/files/0001-src-etc-snapshot-support-triples-lacking-a-vendor.patch new file mode 100644 index 0000000..1dcfbc8 --- /dev/null +++ b/recipes/rust/files/0001-src-etc-snapshot-support-triples-lacking-a-vendor.patch @@ -0,0 +1,29 @@ +From 7200c63876da23634fea0c0987e4f955ebd08baf Mon Sep 17 00:00:00 2001 +From: Cody P Schafer +Date: Thu, 13 Nov 2014 17:14:46 -0500 +Subject: [PATCH] src/etc/snapshot: support triples lacking a vendor + +--- + src/etc/snapshot.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/etc/snapshot.py b/src/etc/snapshot.py +index e0610bf..85798da 100644 +--- a/src/etc/snapshot.py ++++ b/src/etc/snapshot.py +@@ -75,7 +75,11 @@ def full_snapshot_name(date, rev, platform, hsh): + + + def get_kernel(triple): +- os_name = triple.split('-')[2] ++ t=triple.split('-') ++ if len(t) == 2: ++ os_name = triple.split('-')[1] ++ else: ++ os_name = triple.split('-')[2] + if os_name == "windows": + return "winnt" + if os_name == "darwin": +-- +2.1.3 + diff --git a/recipes/rust/rust.inc b/recipes/rust/rust.inc index 69dd31f..a647a61 100644 --- a/recipes/rust/rust.inc +++ b/recipes/rust/rust.inc @@ -174,13 +174,13 @@ do_configure () { # rpath is required otherwise rustc fails to resolve symbols - #"--build=${BUILD_SYS}" ${S}/configure \ "--enable-rpath" \ "--disable-verify-install" \ "--prefix=${prefix}" \ "--target=${TARGET_SYS}" \ "--host=${HOST_SYS}" \ + "--build=${BUILD_SYS}" \ "--localstatedir=${localstatedir}" \ "--sysconfdir=${sysconfdir}" \ "--datadir=${datadir}" \ diff --git a/recipes/rust/rust_0.12.0+2014-11-13.bb b/recipes/rust/rust_0.12.0+2014-11-13.bb index 789047c..d42d3bf 100644 --- a/recipes/rust/rust_0.12.0+2014-11-13.bb +++ b/recipes/rust/rust_0.12.0+2014-11-13.bb @@ -1,2 +1,6 @@ SRCREV = "15ba87f0314fda5e81603f37ae5f40e2022bcfc1" require rust-git.inc + +SRC_URI_append = "\ + file://0001-src-etc-snapshot-support-triples-lacking-a-vendor.patch \ +"