From d749dcc1b6a4fe8aee785def086a6fdbc9bec9bb Mon Sep 17 00:00:00 2001 From: begasus Date: Mon, 6 Jun 2022 08:36:19 +0200 Subject: Add support for Haiku diff --git a/src/build_targets.rs b/src/build_targets.rs index c0e5240..300af37 100644 --- a/src/build_targets.rs +++ b/src/build_targets.rs @@ -81,7 +81,8 @@ impl BuildTargets { | ("freebsd", _) | ("dragonfly", _) | ("netbsd", _) - | ("android", _) => { + | ("android", _) + | ("haiku", _) => { let static_lib = targetdir.join(&format!("lib{}.a", lib_name)); let shared_lib = targetdir.join(&format!("lib{}.so", lib_name)); (shared_lib, static_lib, None, None) diff --git a/src/install.rs b/src/install.rs index f958c72..864c627 100644 --- a/src/install.rs +++ b/src/install.rs @@ -84,9 +84,12 @@ impl LibType { let env = &target.env; match (os.as_str(), env.as_str()) { - ("linux", _) | ("freebsd", _) | ("dragonfly", _) | ("netbsd", _) | ("android", _) => { - LibType::So - } + ("linux", _) + | ("freebsd", _) + | ("dragonfly", _) + | ("netbsd", _) + | ("android", _) + | ("haiku", _) => LibType::So, ("macos", _) | ("ios", _) => LibType::Dylib, ("windows", _) => LibType::Windows, _ => unimplemented!("The target {}-{} is not supported yet", os, env), diff --git a/src/target.rs b/src/target.rs index 79ab283..f447f2d 100644 --- a/src/target.rs +++ b/src/target.rs @@ -72,7 +72,11 @@ impl Target { if os == "android" { lines.push(format!("-Wl,-soname,lib{}.so", lib_name)); } else if env != "musl" - && (os == "linux" || os == "freebsd" || os == "dragonfly" || os == "netbsd") + && (os == "linux" + || os == "freebsd" + || os == "dragonfly" + || os == "netbsd" + || os == "haiku") { lines.push(format!("-Wl,-soname,lib{}.so.{}", lib_name, major)); } else if os == "macos" || os == "ios" { -- 2.36.1