Skip to content
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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

toshiyuki-rs
Copy link

This modification will resolve #976.

@@ -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() {
Copy link
Owner

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.
let version = get_macport_openssl_version(outputs);

if version.is_some()
&& version.unwrap() >= std::string::String::from("@1.1") {
Copy link
Owner

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.

Copy link
Author

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[macos] Build error is misleading for MacPorts users/systems
2 participants