diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-08-25 23:42:45 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-08-25 23:42:45 +0530 |
commit | 1ccfa4ee760c3b0cf601ab08ecb17e6c1dced716 (patch) | |
tree | fd5d7939619069e502d3e2f19c421941d93ac3fd /recipes/build-tools | |
parent | 75215b330886d94de7354482240809b566fac08b (diff) |
cargo-c.recipe: Force openssl-sys to pick our openssl, not brew
The plague of Rust -sys crates continues. The openssl-sys crate
UNCONDITIONALLY looks into the brew prefix to find openssl libs. It
doesn't bother using pkg-config or some other standard mechanism.
Thankfully, it first looks at `OPENSSL_LIB_DIR` and
`OPENSSL_INCLUDE_DIR` so let's set that.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1258>
Diffstat (limited to 'recipes/build-tools')
-rw-r--r-- | recipes/build-tools/cargo-c.recipe | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/recipes/build-tools/cargo-c.recipe b/recipes/build-tools/cargo-c.recipe index a1bb1e69..875e16c5 100644 --- a/recipes/build-tools/cargo-c.recipe +++ b/recipes/build-tools/cargo-c.recipe @@ -23,3 +23,8 @@ class Recipe(recipe.Recipe): } files_bins = ['cargo-capi', 'cargo-cbuild', 'cargo-cinstall', 'cargo-ctest'] + + def prepare(self): + if self.config.platform == Platform.DARWIN: + self.set_env('OPENSSL_LIB_DIR', self.config.libdir) + self.set_env('OPENSSL_INCLUDE_DIR', os.path.join(self.config.prefix, 'include')) |