-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
- Don't fix the dependency to `nettle`. The required libraries depend on the configured backend. Substitute the appropriate dependencies based on the configured backend at build time. - Fixes #36.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,22 @@ impl PkgConfigTemplate { | |
("DESCRIPTION".to_string(), env!("CARGO_PKG_DESCRIPTION").to_string()), | ||
("VERSION".to_string(), env!("CARGO_PKG_VERSION").to_string()), | ||
("HOMEPAGE".to_string(), env!("CARGO_PKG_HOMEPAGE").to_string()), | ||
("REQUIRES".to_string(), | ||
if cfg!(feature = "crypto-botan") { | ||
"botan-2" | ||
} else if cfg!(feature = "crypto-nettle") { | ||
"nettle" | ||
} else if cfg!(feature = "crypto-openssl") { | ||
"libssl" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nwalfield
Author
Collaborator
|
||
} else if cfg!(feature = "crypto-cng") { | ||
"" | ||
} else if cfg!(feature = "crypto-rust") { | ||
"" | ||
} else { | ||
panic!("No cryptographic backend selected. Try: \ | ||
\"cargo build --no-default-features \ | ||
--features crypto-openssl\"") | ||
}.to_string()), | ||
]); | ||
|
||
Ok(PkgConfigTemplate { | ||
|
@nwalfield Is
libssl
sufficient? I guess it would be, since it listslibcrypto
(the bit we really want) as a private dependency.Fedora is currently replacing
nettle
withopenssl
, which will link in bothlibssl
andlibcrypto
explicitly -- but I'm realizing now that that's probably unnecessary overkill.Oh well, it'll sort itself out as soon as a release with this commit is packaged and the local patch is dropped. (Of the two options, erring on the side of overlinking is certainly the less bad outcome anyway.)