From 6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:57:27 +0200 Subject: Adding upstream version 43.5. Signed-off-by: Daniel Baumann --- plugins/epiphany/meson.build | 87 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 plugins/epiphany/meson.build (limited to 'plugins/epiphany/meson.build') diff --git a/plugins/epiphany/meson.build b/plugins/epiphany/meson.build new file mode 100644 index 0000000..05fc7b6 --- /dev/null +++ b/plugins/epiphany/meson.build @@ -0,0 +1,87 @@ +cargs = ['-DG_LOG_DOMAIN="GsPluginEpiphany"'] + +# The WebAppProvider interface xml comes from: +# https://gitlab.gnome.org/GNOME/epiphany/-/blob/master/src/webapp-provider/org.gnome.Epiphany.WebAppProvider.xml +epiphany_generated = gnome.gdbus_codegen( + 'gs-epiphany-generated', + sources : ['org.gnome.Epiphany.WebAppProvider.xml'], + interface_prefix : 'org.gnome.Epiphany', + namespace : 'GsEphy', +) + +shared_module( + 'gs_plugin_epiphany', + epiphany_generated, + sources : 'gs-plugin-epiphany.c', + include_directories : [ + include_directories('../..'), + include_directories('../../lib'), + ], + install : true, + install_dir: plugin_dir, + c_args : cargs, + dependencies : plugin_libs, + link_with : [ + libgnomesoftware, + ], +) +metainfo = 'org.gnome.Software.Plugin.Epiphany.metainfo.xml' + +i18n.merge_file( + input: metainfo + '.in', + output: metainfo, + type: 'xml', + po_dir: join_paths(meson.project_source_root(), 'po'), + install: true, + install_dir: join_paths(get_option('datadir'), 'metainfo'), +) + +if get_option('tests') + # The DynamicLauncher interface xml comes from: + # https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.DynamicLauncher.xml + gdbus_codegen = find_program('gdbus-codegen') + dynamic_launcher_portal_iface_h = custom_target( + 'gs-dynamic-launcher-portal-iface.h', + input: ['org.freedesktop.portal.DynamicLauncher.xml'], + output: ['gs-dynamic-launcher-portal-iface.h'], + command: [gdbus_codegen, + '--interface-info-header', + '--output', '@OUTPUT@', + '@INPUT@'], + ) + dynamic_launcher_portal_iface_c = custom_target( + 'gs-dynamic-launcher-portal-iface.c', + input: ['org.freedesktop.portal.DynamicLauncher.xml'], + output: ['gs-dynamic-launcher-portal-iface.c'], + command: [gdbus_codegen, + '--interface-info-body', + '--output', '@OUTPUT@', + '@INPUT@'], + ) + cargs += ['-DLOCALPLUGINDIR="' + meson.current_build_dir() + '"'] + cargs += ['-DLOCALPLUGINDIR_CORE="' + meson.current_build_dir() + '/../core"'] + cargs += ['-DTESTDATADIR="' + join_paths(meson.current_source_dir(), '..', '..', 'data') + '"'] + e = executable( + 'gs-self-test-epiphany', + compiled_schemas, + sources : [ + 'gs-self-test.c', + dynamic_launcher_portal_iface_c, + dynamic_launcher_portal_iface_h, + epiphany_generated, + ], + include_directories : [ + include_directories('../..'), + include_directories('../../lib'), + ], + dependencies : [ + plugin_libs, + dependency('glib-testing-0', fallback: ['libglib-testing', 'libglib_testing_dep']), + ], + link_with : [ + libgnomesoftware, + ], + c_args : cargs, + ) + test('gs-self-test-epiphany', e, suite: ['plugins', 'epiphany'], env: test_env) +endif -- cgit v1.2.3