summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/dev-lang/rust/files/0001-update-openssl-and-openssl-sys.patch134
-rw-r--r--packages/dev-lang/rust/rust-build.exlib4
2 files changed, 138 insertions, 0 deletions
diff --git a/packages/dev-lang/rust/files/0001-update-openssl-and-openssl-sys.patch b/packages/dev-lang/rust/files/0001-update-openssl-and-openssl-sys.patch
new file mode 100644
index 0000000..495af24
--- /dev/null
+++ b/packages/dev-lang/rust/files/0001-update-openssl-and-openssl-sys.patch
@@ -0,0 +1,134 @@
+Upstream: in master
+From 0747162d81fb2e9c0c85bf643da8a5a02297d2a0 Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+Date: Mon, 16 Oct 2017 20:09:06 +0200
+Subject: [PATCH] update openssl and openssl-sys
+
+Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+---
+ src/Cargo.lock | 30 ++++++++++++++++++------------
+ 1 file changed, 18 insertions(+), 12 deletions(-)
+
+diff --git a/src/Cargo.lock b/src/Cargo.lock
+index 19f3042c70..cdb96327ea 100644
+--- a/src/Cargo.lock
++++ b/src/Cargo.lock
+@@ -205,7 +205,7 @@ dependencies = [
+ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -243,6 +243,11 @@ dependencies = [
+ name = "cargotest2"
+ version = "0.1.0"
+
++[[package]]
++name = "cc"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
+ [[package]]
+ name = "cfg-if"
+ version = "0.1.2"
+@@ -355,7 +360,7 @@ dependencies = [
+ "curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "socket2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+@@ -368,7 +373,7 @@ dependencies = [
+ "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -540,7 +545,7 @@ dependencies = [
+ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -756,7 +761,7 @@ dependencies = [
+ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -768,7 +773,7 @@ dependencies = [
+ "cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -961,14 +966,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+ name = "openssl"
+-version = "0.9.17"
++version = "0.9.20"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+@@ -978,10 +983,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+ name = "openssl-sys"
+-version = "0.9.17"
++version = "0.9.20"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+- "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -2196,6 +2201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+ "checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
+ "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
+ "checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32"
++"checksum cc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c674f0870e3dbd4105184ea035acb1c32c8ae69939c9e228d2b11bbfe29efad"
+ "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
+ "checksum clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2267a8fdd4dce6956ba6649e130f62fb279026e5e84b92aa939ac8f85ce3f9f0"
+ "checksum cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f"
+@@ -2260,9 +2266,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+ "checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0"
+ "checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584"
+ "checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842"
+-"checksum openssl 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)" = "085aaedcc89a2fac1eb2bc19cd66f29d4ea99fec60f82a5f3a88a6be7dbd90b5"
++"checksum openssl 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)" = "8bf434ff6117485dc16478d77a4f5c84eccc9c3645c4da8323b287ad6a15a638"
+ "checksum openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d98df0270d404ccd3c050a41d579c52d1db15375168bb3471e04ec0f5f378daf"
+-"checksum openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7e3a9845a4c9fdb321931868aae5549e96bb7b979bf9af7de03603d74691b5f3"
++"checksum openssl-sys 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)" = "0ad395f1cee51b64a8d07cc8063498dc7554db62d5f3ca87a67f4eed2791d0c8"
+ "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
+ "checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356"
+ "checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8"
+--
+2.14.2
+
diff --git a/packages/dev-lang/rust/rust-build.exlib b/packages/dev-lang/rust/rust-build.exlib
index d7b70d3..63a4bdf 100644
--- a/packages/dev-lang/rust/rust-build.exlib
+++ b/packages/dev-lang/rust/rust-build.exlib
@@ -135,6 +135,10 @@ rust-build_src_unpack() {
default
fi
+ # We need to do that there so that the right versions of the deps are fetched just below
+ edo cd "${WORK}"
+ ever at_least 1.22 || edo patch -p1 < "${FILES}"/0001-update-openssl-and-openssl-sys.patch
+
edo cd "${WORK}"/src
ecargo_fetch
}