From 6d1398283fdf7053cd9b92f29b550319db46c401 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Thu, 13 Apr 2023 00:54:33 +0200 Subject: [PATCH] Fix pep_engine_sequoia_backend.pc - When generating `pep_engine_sequoia_backend.pc`, add the correct dependencies for the selected cryptographic backend. --- build.rs | 10 ++++++++++ pep_engine_sequoia_backend.pc.in | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 01b9411..9c04e94 100644 --- a/build.rs +++ b/build.rs @@ -39,6 +39,16 @@ fn main() -> Result<(), std::io::Error> { // This is set to allow the use of the library from the build // directory. let content = String::from_utf8(content).unwrap() + .replace("REQUIRES", + if cfg!(feature = "crypto-botan") { + "botan-2" + } else if cfg!(feature = "crypto-nettle") { + "nettle" + } else if cfg!(feature = "crypto-cng") { + "" + } else { + panic!("Don't know dependencies to add to .pc file") + }) .replace("LIBDIR", &build_dir .to_str() diff --git a/pep_engine_sequoia_backend.pc.in b/pep_engine_sequoia_backend.pc.in index de8cd24..8c7cd27 100644 --- a/pep_engine_sequoia_backend.pc.in +++ b/pep_engine_sequoia_backend.pc.in @@ -5,6 +5,6 @@ Name: pEpEngineSequoiaBackend Description: An implementation of the pEp Engine's crypttext interface using Sequoia URL: https://sequoia-pgp.org/ Version: VERSION -Requires: botan-2 +Requires: REQUIRES Cflags: Libs: -L${libdir} -lpep_engine_sequoia_backend -- GitLab