summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-07-21 16:13:25 +0200
committerAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-07-21 16:22:08 +0200
commitd5b7d657f2c8f9eefb431990f5d4b6abc6f5350b (patch)
tree0aed3482c4ebfd08f7796272e507eb71b51e97af
parentb6abf48cf99692af85976c809a01bf2f272cb1cb (diff)
downloadrust-d5b7d657f2c8f9eefb431990f5d4b6abc6f5350b.tar.gz
rust-d5b7d657f2c8f9eefb431990f5d4b6abc6f5350b.tar.xz
rust: fix build with recent libressl
Signed-off-by: Marc-Antoine Perennou <keruspe@exherbo.org>
-rw-r--r--packages/dev-lang/rust/files/0001-1.19.0-update-openssl.patch165
-rw-r--r--packages/dev-lang/rust/rust-build.exlib6
2 files changed, 171 insertions, 0 deletions
diff --git a/packages/dev-lang/rust/files/0001-1.19.0-update-openssl.patch b/packages/dev-lang/rust/files/0001-1.19.0-update-openssl.patch
new file mode 100644
index 0000000..3dcf2f6
--- /dev/null
+++ b/packages/dev-lang/rust/files/0001-1.19.0-update-openssl.patch
@@ -0,0 +1,165 @@
+From 353965145e3059117f18233bb52345f43906f180 Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+Date: Fri, 21 Jul 2017 16:12:10 +0200
+Subject: [PATCH] 1.19.0: update openssl
+
+Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+---
+ src/Cargo.lock | 46 ++++++++++++----------------------------------
+ 1 file changed, 12 insertions(+), 34 deletions(-)
+
+diff --git a/src/Cargo.lock b/src/Cargo.lock
+index dcda218ff4..e48626d871 100644
+--- a/src/Cargo.lock
++++ b/src/Cargo.lock
+@@ -170,7 +170,7 @@ dependencies = [
+ "log 0.3.7 (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.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -302,7 +302,7 @@ dependencies = [
+ "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.22 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -314,7 +314,7 @@ dependencies = [
+ "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+@@ -420,15 +420,6 @@ version = "0.3.50"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+-name = "gdi32-sys"
+-version = "0.2.0"
+-source = "registry+https://github.com/rust-lang/crates.io-index"
+-dependencies = [
+- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+-]
+-
+-[[package]]
+ name = "getopts"
+ version = "0.0.0"
+
+@@ -446,7 +437,7 @@ dependencies = [
+ "libc 0.2.22 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -569,7 +560,7 @@ dependencies = [
+ "libc 0.2.22 (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.13 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -581,7 +572,7 @@ dependencies = [
+ "cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -765,14 +756,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+ name = "openssl"
+-version = "0.9.12"
++version = "0.9.15"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+- "bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
++ "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.22 (registry+https://github.com/rust-lang/crates.io-index)",
+- "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
++ "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+@@ -782,14 +773,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+ name = "openssl-sys"
+-version = "0.9.12"
++version = "0.9.15"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+- "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+@@ -1683,15 +1672,6 @@ dependencies = [
+ ]
+
+ [[package]]
+-name = "user32-sys"
+-version = "0.2.0"
+-source = "registry+https://github.com/rust-lang/crates.io-index"
+-dependencies = [
+- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+-]
+-
+-[[package]]
+ name = "utf8-ranges"
+ version = "0.1.3"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+@@ -1790,7 +1770,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+ "checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d"
+ "checksum fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34edaee07555859dc13ca387e6ae05686bb4d0364c95d649b6dab959511f4baf"
+ "checksum gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)" = "5f837c392f2ea61cb1576eac188653df828c861b7137d74ea4a5caa89621f9e6"
+-"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
+ "checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
+ "checksum git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa01936ac96555c083c0e8553f672616274408d9d3fc5b8696603fbf63ff43ee"
+ "checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"
+@@ -1824,9 +1803,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+ "checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
+ "checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167"
+ "checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842"
+-"checksum openssl 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)" = "bb5d1663b73d10c6a3eda53e2e9d0346f822394e7b858d7257718f65f61dfbe2"
++"checksum openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f776f1d8af832fd2c637ee182c801e8f7ea8895718a2be9914cca001f6e2c40a"
+ "checksum openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d98df0270d404ccd3c050a41d579c52d1db15375168bb3471e04ec0f5f378daf"
+-"checksum openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3a5886d87d3e2a0d890bf62dc8944f5e3769a405f7e1e9ef6e517e47fd7a0897"
++"checksum openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "ad95f8160d1c150c4f44d4c4959732e048ac046c37f597fe362f8bf57561ffb4"
+ "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
+ "checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8"
+ "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903"
+@@ -1879,7 +1858,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+ "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
+ "checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
+ "checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e"
+-"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
+ "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
+ "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
+ "checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f"
+--
+2.13.3
+
diff --git a/packages/dev-lang/rust/rust-build.exlib b/packages/dev-lang/rust/rust-build.exlib
index ef3bb65..076abe1 100644
--- a/packages/dev-lang/rust/rust-build.exlib
+++ b/packages/dev-lang/rust/rust-build.exlib
@@ -137,6 +137,12 @@ rust-build_src_unpack() {
default
fi
+ if ! ever at_least 1.20; then
+ # We need to patch here as we downloads the deps just after
+ edo cd "${WORK}"
+ edo patch -p1 < "${FILES}"/0001-1.19.0-update-openssl.patch
+ fi
+
edo cd "${WORK}"/src/bootstrap
ecargo_fetch
edo cd "${WORK}"/src