git: ed815de7a6be - main - devel/cargo-c: unbreak with libressl after 5c5878b7d124

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Tue, 07 Dec 2021 23:59:18 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ed815de7a6be1cc5e903cce4567cc34e3dc91a1e

commit ed815de7a6be1cc5e903cce4567cc34e3dc91a1e
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-12-07 23:45:19 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-12-07 23:57:50 +0000

    devel/cargo-c: unbreak with libressl after 5c5878b7d124
    
    error: failed to run custom build command for `openssl-sys v0.9.67`
    
    Caused by:
      process didn't exit successfully: `../target/release/build/openssl-sys-27209cbe1c4dcecb/build-script-main` (exit status: 101)
    
      --- stderr
      thread 'main' panicked at '
    
      This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
      through 3.4.0, but a different version of OpenSSL was found. The build is now aborting
      due to this version mismatch.
    
      ', cargo-crates/openssl-sys-0.9.67/build/main.rs:279:5
      stack backtrace:
         0: std::panicking::begin_panic
         1: build_script_main::version_error
         2: build_script_main::validate_headers
         3: build_script_main::main
         4: core::ops::function::FnOnce::call_oncex
    
    PR:             260269
    Submitted by:   lysfjord.daniel@smokepit.net (based on)
    Obtained from:  upstream
---
 devel/cargo-c/files/patch-libressl | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/devel/cargo-c/files/patch-libressl b/devel/cargo-c/files/patch-libressl
new file mode 100644
index 000000000000..afd03b581adb
--- /dev/null
+++ b/devel/cargo-c/files/patch-libressl
@@ -0,0 +1,13 @@
+https://github.com/sfackler/rust-openssl/commit/c6e3c17f9275
+https://github.com/sfackler/rust-openssl/commit/7768e0638078
+
+--- cargo-crates/openssl-sys-0.9.67/build/main.rs.orig	1973-11-29 21:33:09 UTC
++++ cargo-crates/openssl-sys-0.9.67/build/main.rs
+@@ -238,6 +238,7 @@ See rust-openssl README for more information:
+             (3, 3, 1) => ('3', '3', '1'),
+             (3, 3, _) => ('3', '3', 'x'),
+             (3, 4, 0) => ('3', '4', '0'),
++            (3, 4, _) => ('3', '4', 'x'),
+             _ => version_error(),
+         };
+