melib/notmuch: remove hardcoded major .so version for non linux/macos target_os

Credits to http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/mail/meli/patches/patch-melib_src_backends_notmuch_rs?rev=1.1&content-type=text/x-cvsweb-markup for discovering this.
pull/170/head
Manos Pitsidianakis 2022-12-04 15:43:08 +02:00
parent 4b96bd591f
commit eaecc5ea12
1 changed files with 3 additions and 1 deletions

View File

@ -309,10 +309,12 @@ impl NotmuchDb {
_is_subscribed: Box<dyn Fn(&str) -> bool>,
event_consumer: BackendEventConsumer,
) -> Result<Box<dyn MailBackend>> {
#[cfg(not(target_os = "macos"))]
#[cfg(target_os = "linux")]
let mut dlpath = "libnotmuch.so.5";
#[cfg(target_os = "macos")]
let mut dlpath = "libnotmuch.5.dylib";
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
let mut dlpath = "libnotmuch.so";
let mut custom_dlpath = false;
if let Some(lib_path) = s.extra.get("library_file_path") {
dlpath = lib_path.as_str();