From 6254c1881b336eb996c098ece620fcceee07485f Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Sat, 21 Mar 2020 12:46:59 +0100 Subject: [PATCH] Fix build on DragonFly DragonFly has libressl/openssl in ports (/usr/local). With this commit, rust-openssl builds out of the box given that either libressl or openssl is installed (which is usually the case). Tested on DragonFly 5.9-DEVELOPMENT with libressl-3.0.2. --- openssl-sys/build/find_normal.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openssl-sys/build/find_normal.rs b/openssl-sys/build/find_normal.rs index 896d39543..b1bdd0c70 100644 --- a/openssl-sys/build/find_normal.rs +++ b/openssl-sys/build/find_normal.rs @@ -60,6 +60,11 @@ fn find_openssl_dir(target: &str) -> OsString { return OsString::from("/usr"); } + // DragonFly has libressl (or openssl) in ports, but this doesn't include a pkg-config file + if host == target && target.contains("dragonfly") { + return OsString::from("/usr/local"); + } + let mut msg = format!( " -- GitLab