From 0b779475c5b49ec291a99d6b2beb2394361dc628 Mon Sep 17 00:00:00 2001 From: cos Date: Tue, 12 Nov 2024 19:00:38 +0100 Subject: Make build script work with OpenBSD On OpenBSD the pkg-config names takes a minimalist format. No dash, and no separator between the major and minor version number. Build script is thus adapted to have also these in their set of alt_probes. --- mlua-sys/build/find_normal.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mlua-sys/build/find_normal.rs b/mlua-sys/build/find_normal.rs index 4fa874a..dbbc18c 100644 --- a/mlua-sys/build/find_normal.rs +++ b/mlua-sys/build/find_normal.rs @@ -32,13 +32,17 @@ pub fn probe_lua() { // Find using `pkg-config` #[cfg(feature = "lua54")] - let (incl_bound, excl_bound, alt_probe, ver) = ("5.4", "5.5", ["lua5.4", "lua-5.4"], "5.4"); + let (incl_bound, excl_bound, alt_probe, ver) = + ("5.4", "5.5", ["lua5.4", "lua-5.4", "lua54"], "5.4"); #[cfg(feature = "lua53")] - let (incl_bound, excl_bound, alt_probe, ver) = ("5.3", "5.4", ["lua5.3", "lua-5.3"], "5.3"); + let (incl_bound, excl_bound, alt_probe, ver) = + ("5.3", "5.4", ["lua5.3", "lua-5.3", "lua53"], "5.3"); #[cfg(feature = "lua52")] - let (incl_bound, excl_bound, alt_probe, ver) = ("5.2", "5.3", ["lua5.2", "lua-5.2"], "5.2"); + let (incl_bound, excl_bound, alt_probe, ver) = + ("5.2", "5.3", ["lua5.2", "lua-5.2", "lua52"], "5.2"); #[cfg(feature = "lua51")] - let (incl_bound, excl_bound, alt_probe, ver) = ("5.1", "5.2", ["lua5.1", "lua-5.1"], "5.1"); + let (incl_bound, excl_bound, alt_probe, ver) = + ("5.1", "5.2", ["lua5.1", "lua-5.1", "lua51"], "5.1"); #[cfg(feature = "luajit")] let (incl_bound, excl_bound, alt_probe, ver) = ("2.0.4", "2.2", [], "JIT"); -- cgit v1.2.3