[evince] shared_module: use so suffix on macOS



commit d396cb7e02ae4140203cc92d4afa835b3d78111d
Author: Tom Schoonjans <Tom Schoonjans rfi ac uk>
Date:   Sat May 30 11:30:01 2020 +0100

    shared_module: use so suffix on macOS
    
    GLib and GModule expect shared_modules to have the so suffix on macOS,
    but meson uses dylib by default, which means that the backends are not
    loaded.
    
    This patch enforces the use of the so suffix for shared modules.

 backend/comics/meson.build | 1 +
 backend/djvu/meson.build   | 1 +
 backend/dvi/meson.build    | 1 +
 backend/pdf/meson.build    | 1 +
 backend/ps/meson.build     | 1 +
 backend/tiff/meson.build   | 1 +
 backend/xps/meson.build    | 1 +
 browser-plugin/meson.build | 1 +
 meson.build                | 7 +++++++
 properties/meson.build     | 1 +
 10 files changed, 16 insertions(+)
---
diff --git a/backend/comics/meson.build b/backend/comics/meson.build
index 66b73a9a..f1a80ca3 100644
--- a/backend/comics/meson.build
+++ b/backend/comics/meson.build
@@ -20,6 +20,7 @@ shared_module(
   link_depends: backends_symbol_map,
   install: true,
   install_dir: ev_backendsdir,
+  name_suffix: name_suffix,
 )
 
 test_name = 'test-ev-archive'
diff --git a/backend/djvu/meson.build b/backend/djvu/meson.build
index 604450c0..b5328974 100644
--- a/backend/djvu/meson.build
+++ b/backend/djvu/meson.build
@@ -14,4 +14,5 @@ shared_module(
   link_depends: backends_symbol_map,
   install: true,
   install_dir: ev_backendsdir,
+  name_suffix: name_suffix,
 )
diff --git a/backend/dvi/meson.build b/backend/dvi/meson.build
index 9f659369..c3bea84d 100644
--- a/backend/dvi/meson.build
+++ b/backend/dvi/meson.build
@@ -24,4 +24,5 @@ shared_module(
   link_depends: backends_symbol_map,
   install: true,
   install_dir: ev_backendsdir,
+  name_suffix: name_suffix,
 )
diff --git a/backend/pdf/meson.build b/backend/pdf/meson.build
index b1f3be45..f89fce2b 100644
--- a/backend/pdf/meson.build
+++ b/backend/pdf/meson.build
@@ -15,4 +15,5 @@ shared_module(
   link_depends: backends_symbol_map,
   install: true,
   install_dir: ev_backendsdir,
+  name_suffix: name_suffix,
 )
diff --git a/backend/ps/meson.build b/backend/ps/meson.build
index 3569bd18..109cb522 100644
--- a/backend/ps/meson.build
+++ b/backend/ps/meson.build
@@ -8,4 +8,5 @@ shared_module(
   link_depends: backends_symbol_map,
   install: true,
   install_dir: ev_backendsdir,
+  name_suffix: name_suffix,
 )
diff --git a/backend/tiff/meson.build b/backend/tiff/meson.build
index b33cc1de..bb14a1d2 100644
--- a/backend/tiff/meson.build
+++ b/backend/tiff/meson.build
@@ -13,4 +13,5 @@ shared_module(
   link_depends: backends_symbol_map,
   install: true,
   install_dir: ev_backendsdir,
+  name_suffix: name_suffix,
 )
diff --git a/backend/xps/meson.build b/backend/xps/meson.build
index 6306599f..361ac7be 100644
--- a/backend/xps/meson.build
+++ b/backend/xps/meson.build
@@ -8,4 +8,5 @@ shared_module(
   link_depends: backends_symbol_map,
   install: true,
   install_dir: ev_backendsdir,
+  name_suffix: name_suffix,
 )
diff --git a/browser-plugin/meson.build b/browser-plugin/meson.build
index af1dc699..84d0311f 100644
--- a/browser-plugin/meson.build
+++ b/browser-plugin/meson.build
@@ -52,4 +52,5 @@ shared_module(
   cpp_args: cppflags,
   install: true,
   install_dir: browser_plugin_dir,
+  name_suffix: name_suffix,
 )
diff --git a/meson.build b/meson.build
index 22233199..bef678e0 100644
--- a/meson.build
+++ b/meson.build
@@ -107,6 +107,13 @@ if build_machine.system() == 'windows'
   common_ldflags = cc.get_supported_link_arguments('-mwindows')
 endif
 
+# GLib on macOS expects so as shared_module suffix, while meson uses dylib by default
+if host_machine.system() == 'darwin'
+  name_suffix = 'so'
+else
+  name_suffix = []
+endif
+
 if ev_debug
   common_flags += ['-DEV_ENABLE_DEBUG'] + cc.get_supported_arguments([
     '-Wnested-externs',
diff --git a/properties/meson.build b/properties/meson.build
index cd64dde5..50e65bee 100644
--- a/properties/meson.build
+++ b/properties/meson.build
@@ -25,5 +25,6 @@ if enable_nautilus
     link_with: libevproperties,
     install: true,
     install_dir: nautilus_extension_dir,
+    name_suffix: name_suffix,
   )
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]