From 771f5f3fd33b061a4d4172c6a0c1940201297744 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Mon, 8 Dec 2014 20:36:06 -0500 Subject: [PATCH] update cargo --- recipes-deps/libgit2/libgit2-git.inc | 1 + recipes/cargo/cargo_2014-12-04.bb | 26 ------ recipes/cargo/cargo_git.bb | 21 +++++ ...plicitly-linking-in-openssl.-If-it-.patch} | 14 +-- ...ed-in-curl-rust-so-include-it-expli.patch} | 6 +- ...amespaced-environment-variables-base.patch | 93 ------------------- ...nconditionally-depend-on-openssl-sys.patch | 16 ++-- 7 files changed, 43 insertions(+), 134 deletions(-) delete mode 100644 recipes/cargo/cargo_2014-12-04.bb create mode 100644 recipes/cargo/cargo_git.bb rename recipes/cargo/files/curl-rust/{0001-curl-sys-avoid-explicitly-linking-in-openssl-If-it-.patch => 0001-curl-sys-avoid-explicitly-linking-in-openssl.-If-it-.patch} (77%) rename recipes/cargo/files/curl-rust/{0001-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch => 0002-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch} (75%) delete mode 100644 recipes/cargo/files/gcc-rs/0001-Support-use-of-namespaced-environment-variables-base.patch diff --git a/recipes-deps/libgit2/libgit2-git.inc b/recipes-deps/libgit2/libgit2-git.inc index f872784..7bb080e 100644 --- a/recipes-deps/libgit2/libgit2-git.inc +++ b/recipes-deps/libgit2/libgit2-git.inc @@ -1,2 +1,3 @@ require libgit2.inc +S = "${WORKDIR}/git" SRC_URI = "git://github.com/libgit2/libgit2.git;protocol=https" diff --git a/recipes/cargo/cargo_2014-12-04.bb b/recipes/cargo/cargo_2014-12-04.bb deleted file mode 100644 index 137114a..0000000 --- a/recipes/cargo/cargo_2014-12-04.bb +++ /dev/null @@ -1,26 +0,0 @@ -SRCREV_cargo = "70f5205dba9887d8dab07f72dbc507aa74b12c1f" -require cargo.inc - -SRC_URI += " \ - file://0001-custom_build-build-output-goes-in-the-directory-for-.patch \ -\ - git://github.com/carllerche/curl-rust.git;protocol=https;name=curl-rust;destsuffix=curl-rust \ - file://curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl-If-it-.patch;patchdir=../curl-rust \ - file://curl-rust/0001-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch;patchdir=../curl-rust \ -\ - git://github.com/alexcrichton/ssh2-rs.git;protocol=https;name=ssh2-rs;destsuffix=ssh2-rs \ - file://ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch;patchdir=../ssh2-rs \ -\ - git://github.com/alexcrichton/gcc-rs.git;protocol=https;name=gcc-rs;destsuffix=gcc-rs \ - file://gcc-rs/0001-Support-use-of-namespaced-environment-variables-base.patch;patchdir=../gcc-rs \ -" - -SRCREV_curl-rust = "5d0f5c8848e3cf1e12480a1923ae888e24d58f63" -SRCREV_ssh2-rs = "490f91fb9e90bf4e305f1a23a051228c59e60eaf" -SRCREV_gcc-rs = "d32b24466d3e0094cef1c1809a04d7a28536f0e0" -SRCREV_FORMAT = "cargo_curl-rust_ssh2-rs_gcc-rs" -EXTRA_OECARGO_PATHS = "\ - ${WORKDIR}/curl-rust \ - ${WORKDIR}/ssh2-rs \ - ${WORKDIR}/gcc-rs \ -" diff --git a/recipes/cargo/cargo_git.bb b/recipes/cargo/cargo_git.bb new file mode 100644 index 0000000..50d67f3 --- /dev/null +++ b/recipes/cargo/cargo_git.bb @@ -0,0 +1,21 @@ +SRCREV_cargo = "0f6667ca0631fe72d1e15759c845f0197e3dfe19" +require cargo.inc + +SRC_URI += " \ + file://0001-custom_build-build-output-goes-in-the-directory-for-.patch \ +\ + git://github.com/carllerche/curl-rust.git;protocol=https;name=curl-rust;destsuffix=curl-rust \ + file://curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.-If-it-.patch;patchdir=../curl-rust \ + file://curl-rust/0002-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch;patchdir=../curl-rust \ +\ + git://github.com/alexcrichton/ssh2-rs.git;protocol=https;name=ssh2-rs;destsuffix=ssh2-rs \ + file://ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch;patchdir=../ssh2-rs \ +" + +SRCREV_curl-rust = "6f007b4967ec12e36937dcb081abe0bdb3bcc508" +SRCREV_ssh2-rs = "982dc47a45a5a2d66ea092ee6bb9503ddcbf36d9" +SRCREV_FORMAT = "cargo_curl-rust_ssh2-rs" +EXTRA_OECARGO_PATHS = "\ + ${WORKDIR}/curl-rust \ + ${WORKDIR}/ssh2-rs \ +" diff --git a/recipes/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl-If-it-.patch b/recipes/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.-If-it-.patch similarity index 77% rename from recipes/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl-If-it-.patch rename to recipes/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.-If-it-.patch index 8ff58a3..7cbb93c 100644 --- a/recipes/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl-If-it-.patch +++ b/recipes/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.-If-it-.patch @@ -1,19 +1,19 @@ -From b5c97df71c3ed0a6a31281e679cb77440293ef55 Mon Sep 17 00:00:00 2001 +From 56ce13c48b28b85071e234317cc90371bac1fd48 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 25 Nov 2014 11:50:28 -0500 -Subject: [PATCH] curl-sys: avoid explicitly linking in openssl. If it is +Subject: [PATCH 1/2] curl-sys: avoid explicitly linking in openssl. If it is needed, pkgconfig will pull it in --- - curl-sys/Cargo.toml | 14 -------------- + curl-sys/Cargo.toml | 16 ---------------- curl-sys/lib.rs | 1 - - 2 files changed, 15 deletions(-) + 2 files changed, 17 deletions(-) diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml -index 20bb49a..80a320f 100644 +index d166ae9..80a320f 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml -@@ -14,17 +14,3 @@ path = "lib.rs" +@@ -14,19 +14,3 @@ path = "lib.rs" [dependencies.libz-sys] git = "https://github.com/alexcrichton/libz-sys" @@ -27,6 +27,8 @@ index 20bb49a..80a320f 100644 - git = "https://github.com/sfackler/rust-openssl" -[target.x86_64-unknown-linux-gnu.dependencies.openssl-sys] - git = "https://github.com/sfackler/rust-openssl" +-[target.arm-unknown-linux-gnueabihf.dependencies.openssl-sys] +- git = "https://github.com/sfackler/rust-openssl" -[target.i686-unknown-freebsd.dependencies.openssl-sys] - git = "https://github.com/sfackler/rust-openssl" -[target.x86_64-unknown-freebsd.dependencies.openssl-sys] diff --git a/recipes/cargo/files/curl-rust/0001-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch b/recipes/cargo/files/curl-rust/0002-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch similarity index 75% rename from recipes/cargo/files/curl-rust/0001-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch rename to recipes/cargo/files/curl-rust/0002-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch index 7735308..84377e8 100644 --- a/recipes/cargo/files/curl-rust/0001-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch +++ b/recipes/cargo/files/curl-rust/0002-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch @@ -1,8 +1,8 @@ -From c8c54e266bad3e568f55caea4f061182a0d9fd23 Mon Sep 17 00:00:00 2001 +From d71d6fa0b9be06cd84eb6c8f7411c624725431c4 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 25 Nov 2014 12:26:48 -0500 -Subject: [PATCH] openssl-sys is used in curl-rust, so include it explicitly - here +Subject: [PATCH 2/2] openssl-sys is used in curl-rust, so include it + explicitly here --- Cargo.toml | 3 +++ diff --git a/recipes/cargo/files/gcc-rs/0001-Support-use-of-namespaced-environment-variables-base.patch b/recipes/cargo/files/gcc-rs/0001-Support-use-of-namespaced-environment-variables-base.patch deleted file mode 100644 index 77b2938..0000000 --- a/recipes/cargo/files/gcc-rs/0001-Support-use-of-namespaced-environment-variables-base.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 94205321c27fc40f7c9604558e08db345cd5a81a Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Wed, 3 Dec 2014 13:41:11 -0500 -Subject: [PATCH] Support use of namespaced environment variables based on - TARGET and HOST - ---- - README.md | 25 +++++++++++++++++++++++++ - src/lib.rs | 21 ++++++++++++++++++--- - 2 files changed, 43 insertions(+), 3 deletions(-) - -diff --git a/README.md b/README.md -index bb7047d..0268ce1 100644 ---- a/README.md -+++ b/README.md -@@ -11,6 +11,31 @@ fn main() { - } - ``` - -+# External configuration via environment variables -+ -+To control the programs and flags used for building, the builder can set a number of different enviroment variables. -+* `CFLAGS` - a series of space seperated flags passed to "gcc". Note that -+ individual flags cannot currently contain spaces, so doing -+ something like: "-L=foo\ bar" is not possible. -+* `CC` - the actual c compiler used. Note that this is used as an exact -+ executable name, so (for example) no extra flags can be passed inside -+ this variable, and the builder must ensure that there aren't any -+ trailing spaces. This compiler must understand the `-c` flag. For -+ certain `TARGET`s, it also is assumed to know about other flags (most -+ common is `-fPIC`). -+* `AR` - the `ar` (archiver) executable to use to build the static library. -+ -+Each of these variables can also be supplied with certain prefixes and suffixes, in the following prioritized order: -+ -+1. `_` - for example, `CC_x86_64-unknown-linux-gnu` -+1. `_` - for example, `CC_x86_64_unknown_linux_gnu` -+1. `_` - for example, `HOST_CC` or `TARGET_CFLAGS` -+1. `` - a plain `CC`, `AR` as above. -+ -+If none of these varaibles exist, gcc-rs uses built-in defaults -+ -+In addition to the the above optional environment variables, `gcc-rs` has some functions with hard requirements on some variables supplied by [cargo's build-script driver][cargo] that it has the `TARGET`, `OUT_DIR`, `OPT_LEVEL`, and `HOST` variables -+ - # Windows notes - - Currently use of this crate means that Windows users will require gcc to be -diff --git a/src/lib.rs b/src/lib.rs -index 51157c8..bb0cb3c 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -109,8 +109,23 @@ fn run(cmd: &mut Command) { - } - } - -+fn get_var(var_base: &str) -> Option { -+ let target = os::getenv("TARGET") -+ .expect("Environment variable 'TARGET' is unset"); -+ let host = os::getenv("HOST") -+ .expect("Environment variable 'HOST' is unset"); -+ let kind = if host == target { "HOST" } else { "TARGET" }; -+ let target_u = target.split('-') -+ .collect::>() -+ .connect("_"); -+ os::getenv(format!("{}_{}", var_base, target).as_slice()) -+ .or_else(|| os::getenv(format!("{}_{}", var_base, target_u).as_slice())) -+ .or_else(|| os::getenv(format!("{}_{}", kind, var_base).as_slice())) -+ .or_else(|| os::getenv(var_base)) -+} -+ - fn gcc() -> String { -- os::getenv("CC").unwrap_or(if cfg!(windows) { -+ get_var("CC").unwrap_or(if cfg!(windows) { - "gcc".to_string() - } else { - "cc".to_string() -@@ -118,11 +133,11 @@ fn gcc() -> String { - } - - fn ar() -> String { -- os::getenv("AR").unwrap_or("ar".to_string()) -+ get_var("AR").unwrap_or("ar".to_string()) - } - - fn cflags() -> Vec { -- os::getenv("CFLAGS").unwrap_or(String::new()) -+ get_var("CFLAGS").unwrap_or(String::new()) - .as_slice().words().map(|s| s.to_string()) - .collect() - } --- -2.1.3 - diff --git a/recipes/cargo/files/ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch b/recipes/cargo/files/ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch index 5723626..6d383b9 100644 --- a/recipes/cargo/files/ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch +++ b/recipes/cargo/files/ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch @@ -1,17 +1,17 @@ -From 89782cabdc9848865845b2d00a444074ce3d59e7 Mon Sep 17 00:00:00 2001 +From 95e10eb73f61a3aef83fb387f22ea6c33732bc8d Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Mon, 1 Dec 2014 10:51:31 -0500 Subject: [PATCH] Unconditionally depend on openssl-sys --- - libssh2-sys/Cargo.toml | 12 +----------- - 1 file changed, 1 insertion(+), 11 deletions(-) + libssh2-sys/Cargo.toml | 16 ++-------------- + 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/libssh2-sys/Cargo.toml b/libssh2-sys/Cargo.toml -index b16493b..10ad017 100644 +index 74fa893..c3fa4db 100644 --- a/libssh2-sys/Cargo.toml +++ b/libssh2-sys/Cargo.toml -@@ -12,17 +12,7 @@ path = "lib.rs" +@@ -12,20 +12,8 @@ path = "lib.rs" [dependencies.libz-sys] git = "https://github.com/alexcrichton/libz-sys" @@ -23,13 +23,17 @@ index b16493b..10ad017 100644 - git = "https://github.com/sfackler/rust-openssl" -[target.x86_64-unknown-linux-gnu.dependencies.openssl-sys] - git = "https://github.com/sfackler/rust-openssl" +-[target.arm-unknown-linux-gnueabihf.dependencies.openssl-sys] +- git = "https://github.com/sfackler/rust-openssl" -[target.i686-unknown-freebsd.dependencies.openssl-sys] - git = "https://github.com/sfackler/rust-openssl" -[target.x86_64-unknown-freebsd.dependencies.openssl-sys] +- git = "https://github.com/sfackler/rust-openssl" +[dependencies.openssl-sys] - git = "https://github.com/sfackler/rust-openssl" ++ git = "https://github.com/sfackler/rust-openssl" [build-dependencies.pkg-config] + git = "https://github.com/alexcrichton/pkg-config-rs" -- 2.1.3