-
-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I made it to recognize macport openssl library. #1266
base: master
Are you sure you want to change the base?
Conversation
This modification will resolve sfackler#976.
openssl-sys/build/find_normal.rs
Outdated
@@ -50,6 +50,10 @@ fn find_openssl_dir(target: &str) -> OsString { | |||
return homebrew.to_path_buf().into(); | |||
} | |||
} | |||
let port_out = get_macport_openssl(); | |||
if !port_out.is_empty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's generally preferable to use an Option to track optional data than the emptyness of a string, IMO.
I used Option to find macport openssl path.
openssl-sys/build/find_normal.rs
Outdated
let version = get_macport_openssl_version(outputs); | ||
|
||
if version.is_some() | ||
&& version.unwrap() >= std::string::String::from("@1.1") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to compare versions as strings seems suspicious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I revised some lines to compare version rather than string. I chose the way to write simple version struct for mac port openssl rather than rust semver. Semver did not parse mac port openssl version like "1.1.1h".
This modification will resolve #976.