diff options
author | Pavel Vinogradov | 2019-09-04 09:40:19 -0400 |
---|---|---|
committer | Pavel Vinogradov | 2019-09-04 10:13:24 -0400 |
commit | ed6e92886c4b4276c7e670b0bfc58d5297fb34d5 (patch) | |
tree | 8b9804d09cfc4960e2785daa6cc26a83c83c3877 /devel | |
parent | 632097511719d8983cab605fe4ed3f7f0aeb0d5a (diff) |
devel/rust: extended the libressl patch for libressl >= 2.9.x
Diffstat (limited to 'devel')
-rw-r--r-- | devel/rust/HISTORY | 3 | ||||
-rw-r--r-- | devel/rust/patches/0001-libressl-2.9.x.patch | 44 |
2 files changed, 45 insertions, 2 deletions
diff --git a/devel/rust/HISTORY b/devel/rust/HISTORY index 39f234f746..759f8c54f0 100644 --- a/devel/rust/HISTORY +++ b/devel/rust/HISTORY @@ -1,3 +1,6 @@ +2019-09-04 Pavel Vinogradov <public@sourcemage.org> + * patches/0001-libressl-2.9.x.patch: updated for libressl >= 2.9.x + 2019-08-20 Ismael Luceno <ismael@iodev.co.uk> * DETAILS: PATCHLEVEL++ * BUILD: enable extended build (cargo and others) diff --git a/devel/rust/patches/0001-libressl-2.9.x.patch b/devel/rust/patches/0001-libressl-2.9.x.patch index 978613d330..9ccb0e2ad8 100644 --- a/devel/rust/patches/0001-libressl-2.9.x.patch +++ b/devel/rust/patches/0001-libressl-2.9.x.patch @@ -1,11 +1,51 @@ -Allow to build against libressl 2.9.x +Allow to build against libressl >= 2.9.x +diff --git a/vendor/openssl-sys/build/cfgs.rs b/vendor/openssl-sys/build/cfgs.rs +--- a/vendor/openssl-sys/build/cfgs.rs ++++ b/vendor/openssl-sys/build/cfgs.rs +@@ -22,6 +22,18 @@ + if libressl_version >= 0x2_08_01_00_0 { + cfgs.push("libressl281"); + } ++ if libressl_version >= 0x2_09_00_00_0 { ++ cfgs.push("libressl290"); ++ } ++ if libressl_version >= 0x2_09_01_00_0 { ++ cfgs.push("libressl291"); ++ } ++ if libressl_version >= 0x2_09_02_00_0 { ++ cfgs.push("libressl292"); ++ } ++ if libressl_version >= 0x3_00_00_00_0 { ++ cfgs.push("libressl300"); ++ } + } else { + let openssl_version = openssl_version.unwrap(); + +diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs --- a/vendor/openssl-sys/build/main.rs +++ b/vendor/openssl-sys/build/main.rs -@@ -199,6 +199,7 @@ See rust-openssl README for more information: +@@ -183,6 +183,7 @@ + if let Some(libressl_version) = libressl_version { + println!("cargo:libressl_version_number={:x}", libressl_version); + ++ let major = (libressl_version >> 28) as u8; + let minor = (libressl_version >> 20) as u8; + let fix = (libressl_version >> 12) as u8; + let (minor, fix) = match (minor, fix) { +@@ -199,11 +200,14 @@ (8, 1) => ('8', '1'), (8, _) => ('8', 'x'), (9, 0) => ('9', '0'), + (9, _) => ('9', 'x'), ++ (0, 0) => ('0', '0'), ++ (0, _) => ('0', 'x'), _ => version_error(), }; + + println!("cargo:libressl=true"); +- println!("cargo:libressl_version=2{}{}", minor, fix); ++ println!("cargo:libressl_version={}{}{}", major, minor, fix); + println!("cargo:version=101"); + Version::Libressl + } else { |