treewide: Reformat meson files

Ran `meson format -e -i -r`.

Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/798>
This commit is contained in:
Evangelos Ribeiro Tzaras
2025-10-14 15:04:38 +02:00
committed by Marge Bot
parent 50b34aec53
commit fec9e953ae
16 changed files with 516 additions and 557 deletions

View File

@@ -11,7 +11,7 @@ desktop_file = i18n.merge_file(
type: 'desktop', type: 'desktop',
po_dir: po_dir, po_dir: po_dir,
install: true, install: true,
install_dir : join_paths(datadir, 'applications') install_dir: join_paths(datadir, 'applications'),
) )
desktop_daemon_file = i18n.merge_file( desktop_daemon_file = i18n.merge_file(
@@ -20,7 +20,7 @@ desktop_daemon_file = i18n.merge_file(
type: 'desktop', type: 'desktop',
po_dir: po_dir, po_dir: po_dir,
install: true, install: true,
install_dir : join_paths(sysconfdir, 'xdg/autostart') install_dir: join_paths(sysconfdir, 'xdg/autostart'),
) )
service_data = configuration_data() service_data = configuration_data()
@@ -48,23 +48,17 @@ configure_file(
desktop_utils = find_program('desktop-file-validate', required: false) desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found() if desktop_utils.found()
test('Validate desktop file', test(
'Validate desktop file',
desktop_utils, desktop_utils,
args: [ args: [desktop_file.full_path()],
desktop_file.full_path() depends: [desktop_file],
],
depends: [
desktop_file,
],
) )
test('Validate daemon desktop file', test(
'Validate daemon desktop file',
desktop_utils, desktop_utils,
args: [ args: [desktop_daemon_file.full_path()],
desktop_daemon_file.full_path() depends: [desktop_daemon_file],
],
depends: [
desktop_daemon_file,
],
) )
endif endif
@@ -75,52 +69,44 @@ metainfo_file = i18n.merge_file(
output: 'org.gnome.Calls.metainfo.xml', output: 'org.gnome.Calls.metainfo.xml',
po_dir: '../po', po_dir: '../po',
install: true, install: true,
install_dir: join_paths(datadir, 'metainfo') install_dir: join_paths(datadir, 'metainfo'),
) )
appstreamcli = find_program('appstreamcli', required: false) appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found() if appstreamcli.found()
test('Validate metainfo file', appstreamcli, test(
args: ['validate', 'Validate metainfo file',
'--pedantic', appstreamcli,
'--no-net', args: ['validate', '--pedantic', '--no-net', metainfo_file],
metainfo_file )
])
endif endif
# Icons # Icons
install_data( install_data(
'org.gnome.Calls.svg', 'org.gnome.Calls.svg',
install_dir: join_paths( install_dir: join_paths(datadir, 'icons', 'hicolor', 'scalable', 'apps'),
datadir,
'icons',
'hicolor',
'scalable',
'apps'
)
) )
install_data( install_data(
'org.gnome.Calls-symbolic.svg', 'org.gnome.Calls-symbolic.svg',
install_dir: join_paths( install_dir: join_paths(datadir, 'icons', 'hicolor', 'symbolic', 'apps'),
datadir,
'icons',
'hicolor',
'symbolic',
'apps'
)
) )
schema_src = 'org.gnome.Calls.gschema.xml' schema_src = 'org.gnome.Calls.gschema.xml'
compiled = gnome.compile_schemas(build_by_default: true, compiled = gnome.compile_schemas(
depend_files: files(schema_src)) build_by_default: true,
depend_files: files(schema_src),
)
install_data(schema_src, install_data(
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') schema_src,
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas'),
) )
compile_schemas = find_program('glib-compile-schemas', required: false) compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found() if compile_schemas.found()
test('Validate schema file', compile_schemas, test(
args: ['--strict', '--dry-run', meson.current_source_dir()] 'Validate schema file',
compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()],
) )
endif endif

View File

@@ -7,31 +7,39 @@ glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html') docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
# only build the shared library for gtk-doc # only build the shared library for gtk-doc
calls_vala_doc_lib = library('calls-vala-doc', calls_vala_doc_lib = library(
'calls-vala-doc',
calls_vala_sources, calls_vala_sources,
dependencies: calls_vala_deps) dependencies: calls_vala_deps,
calls_doc_lib = library('calls-doc', )
calls_doc_lib = library(
'calls-doc',
[calls_sources, gdbofono_src], [calls_sources, gdbofono_src],
include_directories: calls_includes, include_directories: calls_includes,
link_with: calls_vala_doc_lib, link_with: calls_vala_doc_lib,
dependencies: calls_deps) dependencies: calls_deps,
calls_doc_deps = declare_dependency(sources: [calls_sources, calls_vala_sources], )
calls_doc_deps = declare_dependency(
sources: [calls_sources, calls_vala_sources],
include_directories: calls_includes, include_directories: calls_includes,
link_with: [calls_doc_lib, calls_vala_doc_lib], link_with: [calls_doc_lib, calls_vala_doc_lib],
dependencies: [calls_deps, calls_vala_deps]) dependencies: [calls_deps, calls_vala_deps],
)
gnome.gtkdoc('calls', gnome.gtkdoc(
'calls',
main_xml: 'calls-docs.xml', main_xml: 'calls-docs.xml',
src_dir: [ src_dir: [
join_paths(meson.project_source_root(), 'src'), join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_build_root(), 'src'), join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'src/dbus'), join_paths(meson.project_build_root(), 'src/dbus'),
join_paths(meson.project_build_root(), 'plugins/provider/ofono/libgdbofono'), join_paths(
meson.project_build_root(),
'plugins/provider/ofono/libgdbofono',
),
], ],
dependencies: calls_doc_deps, dependencies: calls_doc_deps,
scan_args: [ scan_args: ['--rebuild-types'],
'--rebuild-types',
],
fixxref_args: [ fixxref_args: [
'--html-dir=@0@'.format(docpath), '--html-dir=@0@'.format(docpath),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')), '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
@@ -41,7 +49,8 @@ gnome.gtkdoc('calls',
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gtk3')), '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gtk3')),
], ],
install_dir: 'calls', install_dir: 'calls',
install: true) install: true,
)
endif endif
@@ -51,7 +60,8 @@ if get_option('manpages') and not rst2man.found()
endif endif
if get_option('manpages') and rst2man.found() if get_option('manpages') and rst2man.found()
custom_target('man-gnome-calls', custom_target(
'man-gnome-calls',
input: 'gnome-calls.rst', input: 'gnome-calls.rst',
output: 'gnome-calls.1', output: 'gnome-calls.1',
command: [rst2man, '@INPUT@'], command: [rst2man, '@INPUT@'],

View File

@@ -6,4 +6,8 @@ ent_conf.set('PACKAGE_STRING', 'calls')
ent_conf.set('PACKAGE_TARNAME', 'calls-' + meson.project_version()) ent_conf.set('PACKAGE_TARNAME', 'calls-' + meson.project_version())
ent_conf.set('PACKAGE_URL', 'https://gitlab.gnome.org/GNOME/calls') ent_conf.set('PACKAGE_URL', 'https://gitlab.gnome.org/GNOME/calls')
ent_conf.set('PACKAGE_VERSION', meson.project_version()) ent_conf.set('PACKAGE_VERSION', meson.project_version())
configure_file(input: 'gtkdocentities.ent.in', output: 'gtkdocentities.ent', configuration: ent_conf) configure_file(
input: 'gtkdocentities.ent.in',
output: 'gtkdocentities.ent',
configuration: ent_conf,
)

View File

@@ -21,15 +21,16 @@
project( project(
'calls', 'calls',
'c', 'vala', 'c',
'vala',
version: '49.1.1', version: '49.1.1',
license: 'GPLv3+', license: 'GPLv3+',
meson_version: '>= 1.0', meson_version: '>= 1.0',
default_options: [ default_options: [
'warning_level=1', 'warning_level=1',
'buildtype=debugoptimized', 'buildtype=debugoptimized',
'c_std=gnu11' 'c_std=gnu11',
] ],
) )
gtk_version = '4.12' gtk_version = '4.12'
@@ -55,7 +56,8 @@ full_calls_plugin_libdir = join_paths(prefix, libdir, calls_name, 'plugins')
po_dir = join_paths(meson.project_source_root(), 'po') po_dir = join_paths(meson.project_source_root(), 'po')
mbpi_dep = dependency('mobile-broadband-provider-info') mbpi_dep = dependency('mobile-broadband-provider-info')
libcall_ui_dep = dependency('call-ui', libcall_ui_dep = dependency(
'call-ui',
fallback: ['libcall-ui', 'libcall_ui_dep'], fallback: ['libcall-ui', 'libcall_ui_dep'],
default_options: ['tests=false', 'examples=false', 'gtk_doc=false'], default_options: ['tests=false', 'examples=false', 'gtk_doc=false'],
) )
@@ -79,20 +81,24 @@ config_data.set_quoted('PLUGIN_LIBDIR', full_calls_plugin_libdir)
config_data.set_quoted('PACKAGE_URL', calls_homepage) config_data.set_quoted('PACKAGE_URL', calls_homepage)
config_data.set_quoted('PACKAGE_VERSION', calls_version) config_data.set_quoted('PACKAGE_VERSION', calls_version)
config_data.set('PACKAGE_URL_RAW', calls_homepage) config_data.set('PACKAGE_URL_RAW', calls_homepage)
config_data.set_quoted('CALLS_EMERGENCY_INFO_DATABASE', mbpi_dep.get_variable('database')) config_data.set_quoted(
'CALLS_EMERGENCY_INFO_DATABASE',
mbpi_dep.get_variable('database'),
)
gst_debug = get_option('gst_debug') gst_debug = get_option('gst_debug')
config_data.set('CALLS_GST_DEBUG', gst_debug, description: 'Use GStreamer debugging API') config_data.set(
'CALLS_GST_DEBUG',
gst_debug,
description: 'Use GStreamer debugging API',
)
run_data = configuration_data() run_data = configuration_data()
run_data.set('ABS_BUILDDIR', meson.current_build_dir()) run_data.set('ABS_BUILDDIR', meson.current_build_dir())
run_data.set('ABS_SRCDIR', meson.current_source_dir()) run_data.set('ABS_SRCDIR', meson.current_source_dir())
configure_file( configure_file(input: 'run.in', output: 'run', configuration: run_data)
input: 'run.in',
output: 'run',
configuration: run_data)
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
@@ -148,18 +154,17 @@ foreach arg: test_c_args
endif endif
endforeach endforeach
add_project_arguments( add_project_arguments(global_c_args, language: 'c')
global_c_args,
language: 'c'
)
summary({ summary(
{
'Build documentation': get_option('gtk_doc'), 'Build documentation': get_option('gtk_doc'),
'Build manpages': get_option('manpages'), 'Build manpages': get_option('manpages'),
'Build tests': get_option('tests'), 'Build tests': get_option('tests'),
'Use gstreamers debug API': get_option('gst_debug'), 'Use gstreamers debug API': get_option('gst_debug'),
'Directory for systemd user units': systemd_user_unit_dir, 'Directory for systemd user units': systemd_user_unit_dir,
}) },
)
subdir('po') subdir('po')
subdir('data') subdir('data')

View File

@@ -49,11 +49,9 @@ dummy_deps = [
] ]
dummy_sources = files( dummy_sources = files(
[ 'calls-dummy-call.c',
'calls-dummy-call.c', 'calls-dummy-call.h', 'calls-dummy-origin.c',
'calls-dummy-origin.c', 'calls-dummy-origin.h', 'calls-dummy-provider.c',
'calls-dummy-provider.c', 'calls-dummy-provider.h'
]
) )
calls_dummy = shared_module( calls_dummy = shared_module(
@@ -63,5 +61,5 @@ calls_dummy = shared_module(
include_directories: src_include, include_directories: src_include,
link_with: libcalls, link_with: libcalls,
install: true, install: true,
install_dir: dummy_install_dir install_dir: dummy_install_dir,
) )

View File

@@ -48,13 +48,7 @@ mm_deps = [
dependency('libpeas-2'), dependency('libpeas-2'),
] ]
mm_sources = files( mm_sources = files('calls-mm-call.c', 'calls-mm-origin.c', 'calls-mm-provider.c')
[
'calls-mm-call.c', 'calls-mm-call.h',
'calls-mm-origin.c', 'calls-mm-origin.h',
'calls-mm-provider.c', 'calls-mm-provider.h'
]
)
calls_mm = shared_module( calls_mm = shared_module(
'mm', 'mm',
@@ -63,5 +57,5 @@ calls_mm = shared_module(
include_directories: src_include, include_directories: src_include,
link_with: libcalls, link_with: libcalls,
install: true, install: true,
install_dir: mm_install_dir install_dir: mm_install_dir,
) )

View File

@@ -32,20 +32,17 @@ foreach iface: dbus_interfaces
'gdbo-' + iface, 'gdbo-' + iface,
iface + '.xml', iface + '.xml',
interface_prefix: 'org.ofono.', interface_prefix: 'org.ofono.',
namespace: 'GDBO' namespace: 'GDBO',
) )
gdbofono_src += src gdbofono_src += src
gdbofono_headers += src[1] gdbofono_headers += src[1]
endforeach endforeach
gdbofono_deps = [ gdbofono_deps = [dependency('gio-2.0'), dependency('gio-unix-2.0')]
dependency('gio-2.0'),
dependency('gio-unix-2.0'),
]
gdbofono_lib = static_library( gdbofono_lib = static_library(
'gdbofono', 'gdbofono',
gdbofono_src, gdbofono_src,
include_directories: top_include, include_directories: top_include,
dependencies: gdbofono_deps dependencies: gdbofono_deps,
) )

View File

@@ -48,22 +48,18 @@ ofono_deps = [
] ]
ofono_sources = files( ofono_sources = files(
[ 'calls-ofono-call.c',
'calls-ofono-call.c', 'calls-ofono-call.h', 'calls-ofono-origin.c',
'calls-ofono-origin.c', 'calls-ofono-origin.h', 'calls-ofono-provider.c',
'calls-ofono-provider.c', 'calls-ofono-provider.h'
]
) )
calls_ofono = shared_module( calls_ofono = shared_module(
'ofono', 'ofono',
ofono_sources, gdbofono_headers, ofono_sources,
gdbofono_headers,
dependencies: ofono_deps, dependencies: ofono_deps,
include_directories: [ include_directories: [src_include, include_directories('.')],
src_include,
include_directories('.')
],
link_with: [gdbofono_lib, libcalls], link_with: [gdbofono_lib, libcalls],
install: true, install: true,
install_dir: ofono_install_dir install_dir: ofono_install_dir,
) )

View File

@@ -53,36 +53,29 @@ sip_deps = [
] ]
sip_sources = files( sip_sources = files(
[ 'calls-sdp-crypto-context.c',
'calls-sdp-crypto-context.c', 'calls-sdp-crypto-context.h', 'calls-sip-account-widget.c',
'calls-sip-account-widget.c', 'calls-sip-account-widget.h', 'calls-sip-call.c',
'calls-sip-call.c', 'calls-sip-call.h', 'calls-sip-media-manager.c',
'calls-sip-media-manager.c', 'calls-sip-media-manager.h', 'calls-sip-media-pipeline.c',
'calls-sip-media-pipeline.c', 'calls-sip-media-pipeline.h', 'calls-sip-origin.c',
'calls-sip-origin.c', 'calls-sip-origin.h', 'calls-sip-provider.c',
'calls-sip-provider.c', 'calls-sip-provider.h', 'calls-sip-util.c',
'calls-sip-util.c', 'calls-sip-util.h', 'calls-srtp-utils.c',
'calls-srtp-utils.c', 'calls-srtp-utils.h', 'gst-rfc3551.c',
'gst-rfc3551.c', 'gst-rfc3551.h',
]
) )
pipeline_enum_headers = [ pipeline_enum_headers = ['calls-sip-media-pipeline.h']
'calls-sip-media-pipeline.h',
]
pipeline_enums = gnome.mkenums_simple('calls-media-pipeline-enums', pipeline_enums = gnome.mkenums_simple(
sources: pipeline_enum_headers) 'calls-media-pipeline-enums',
sources: pipeline_enum_headers,
)
sip_sources += pipeline_enums sip_sources += pipeline_enums
sip_enum_headers = [ sip_enum_headers = ['calls-sdp-crypto-context.h', 'calls-sip-util.h']
'calls-sdp-crypto-context.h',
'calls-sip-util.h',
]
sip_enums = gnome.mkenums_simple('calls-sip-enums', sip_enums = gnome.mkenums_simple('calls-sip-enums', sources: sip_enum_headers)
sources: sip_enum_headers,
)
sip_sources += sip_enums sip_sources += sip_enums
@@ -102,5 +95,5 @@ calls_sip = shared_module(
include_directories: src_include, include_directories: src_include,
link_with: libcalls, link_with: libcalls,
install: true, install: true,
install_dir: sip_install_dir install_dir: sip_install_dir,
) )

View File

@@ -20,7 +20,9 @@
# #
if get_option('tests') if not get_option('tests')
subdir_done()
endif
test_env = [ test_env = [
'G_DEBUG=gc-friendly,fatal-warnings', 'G_DEBUG=gc-friendly,fatal-warnings',
@@ -35,14 +37,9 @@ test_env = [
'CALLS_PLUGIN_DIR=@0@/plugins'.format(meson.project_build_root()), 'CALLS_PLUGIN_DIR=@0@/plugins'.format(meson.project_build_root()),
] ]
test_cflags = [ test_cflags = ['-DFOR_TESTING', '-Wno-error=deprecated-declarations']
'-DFOR_TESTING',
'-Wno-error=deprecated-declarations',
]
test_link_args = [ test_link_args = ['-fPIC']
'-fPIC',
]
tests = [ tests = [
['provider', []], ['provider', []],
@@ -58,23 +55,20 @@ foreach test : tests
test_sources = [] test_sources = []
foreach base : setup_bases foreach base : setup_bases
test_sources += [ 'setup-' + base + '.c', test_sources += ['setup-' + base + '.c', 'setup-' + base + '.h']
'setup-' + base + '.h' ]
endforeach endforeach
test_sources += [ 'test-' + name + '.c', test_sources += ['test-' + name + '.c', 'common.h']
'common.h' ]
t = executable(name, test_sources, t = executable(
name,
test_sources,
dummy_sources, dummy_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes, dummy_include],
calls_includes,
dummy_include,
]
) )
test(name, t, env: test_env) test(name, t, env: test_env)
endforeach endforeach
@@ -83,63 +77,56 @@ endforeach
test_sources = ['test-media.c'] test_sources = ['test-media.c']
test_sources += sip_sources test_sources += sip_sources
t = executable('media', test_sources, t = executable(
'media',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps], dependencies: [calls_deps, sip_deps],
include_directories : [ include_directories: [calls_includes, sip_include],
calls_includes,
sip_include,
]
) )
test('media', t, env: test_env) test('media', t, env: test_env)
test_sources = ['test-sip.c'] test_sources = ['test-sip.c']
test_sources += sip_sources test_sources += sip_sources
t = executable('sip', test_sources, t = executable(
'sip',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps], dependencies: [calls_deps, sip_deps],
include_directories : [ include_directories: [calls_includes, sip_include],
calls_includes,
sip_include,
]
) )
test('sip', t, env: test_env) test('sip', t, env: test_env)
test_sources = ['test-srtp.c'] test_sources = ['test-srtp.c']
test_sources += sip_sources test_sources += sip_sources
t = executable('srtp', test_sources, t = executable(
'srtp',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps], dependencies: [calls_deps, sip_deps],
include_directories : [ include_directories: [calls_includes, sip_include],
calls_includes,
sip_include,
]
) )
test('srtp', t, env: test_env) test('srtp', t, env: test_env)
test_sources = ['test-sdp-crypto.c'] test_sources = ['test-sdp-crypto.c']
test_sources += sip_sources test_sources += sip_sources
t = executable('sdp-crypto', test_sources, t = executable(
'sdp-crypto',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps], dependencies: [calls_deps, sip_deps],
include_directories : [ include_directories: [calls_includes, sip_include],
calls_includes,
sip_include,
]
) )
test('sdp-crypto', t, env: test_env) test('sdp-crypto', t, env: test_env)
endif

View File

@@ -1,14 +1,18 @@
generated_dbus_sources = [] generated_dbus_sources = []
# DBus server protocols # DBus server protocols
generated_dbus_sources += gnome.gdbus_codegen('calls-call-dbus', generated_dbus_sources += gnome.gdbus_codegen(
'calls-call-dbus',
'org.gnome.Calls.Call.xml', 'org.gnome.Calls.Call.xml',
docbook: 'calls', docbook: 'calls',
interface_prefix: 'org.gnome', interface_prefix: 'org.gnome',
object_manager: true, object_manager: true,
namespace: 'CallsDBus') namespace: 'CallsDBus',
generated_dbus_sources += gnome.gdbus_codegen('calls-emergency-call-dbus', )
generated_dbus_sources += gnome.gdbus_codegen(
'calls-emergency-call-dbus',
'org.gnome.Calls.EmergencyCalls.xml', 'org.gnome.Calls.EmergencyCalls.xml',
docbook: 'calls', docbook: 'calls',
interface_prefix: 'org.gnome.Calls', interface_prefix: 'org.gnome.Calls',
namespace: 'CallsDBus') namespace: 'CallsDBus',
)

View File

@@ -29,7 +29,8 @@ subdir('dbus')
src_include = include_directories('.') src_include = include_directories('.')
calls_includes = [top_include, src_include] calls_includes = [top_include, src_include]
calls_deps = [ dependency('gmobile', version: '>= 0.3.0'), calls_deps = [
dependency('gmobile', version: '>= 0.3.0'),
dependency('gobject-2.0', version: '>= 2.74'), dependency('gobject-2.0', version: '>= 2.74'),
dependency('gtk4', version: '>= @0@'.format(gtk_version)), dependency('gtk4', version: '>= @0@'.format(gtk_version)),
dependency('libadwaita-1', version: '>= 1.6'), dependency('libadwaita-1', version: '>= 1.6'),
@@ -40,19 +41,13 @@ calls_deps = [ dependency('gmobile', version: '>= 0.3.0'),
dependency('folks'), dependency('folks'),
dependency('libcallaudio-0.1'), dependency('libcallaudio-0.1'),
dependency('libsecret-1'), dependency('libsecret-1'),
libcall_ui_dep libcall_ui_dep,
] ]
calls_vala_deps = [
dependency('libebook-contacts-1.2'),
dependency('folks'),
]
calls_vala_sources = files ( calls_vala_deps = [dependency('libebook-contacts-1.2'), dependency('folks')]
[
'calls-phone-number-query.vala', calls_vala_sources = files('calls-phone-number-query.vala')
]
)
calls_vala = static_library( calls_vala = static_library(
'calls-vala', 'calls-vala',
@@ -63,16 +58,16 @@ calls_vala = static_library (
calls_enum_headers = files( calls_enum_headers = files(
[
'calls-account.h', 'calls-account.h',
'calls-call.h', 'calls-call.h',
'calls-manager.h', 'calls-manager.h',
'calls-ringer.h', 'calls-ringer.h',
'calls-ussd.h', 'calls-ussd.h',
]
) )
calls_enum_sources = gnome.mkenums_simple('enum-types', calls_enum_sources = gnome.mkenums_simple(
sources : calls_enum_headers) 'enum-types',
sources: calls_enum_headers,
)
calls_resources = gnome.compile_resources( calls_resources = gnome.compile_resources(
'calls-resources', 'calls-resources',
@@ -88,64 +83,61 @@ calls_generated_sources = [
generated_dbus_sources, generated_dbus_sources,
] ]
calls_sources = files([ calls_sources = files(
'calls-account.c', 'calls-account.h', 'calls-account-overview.c',
'calls-account-overview.c', 'calls-account-overview.h', 'calls-account-provider.c',
'calls-account-provider.c', 'calls-account-provider.h', 'calls-account-row.c',
'calls-account-row.c', 'calls-account-row.h', 'calls-account.c',
'calls-application.c', 'calls-application.h', 'calls-application.c',
'calls-best-match.c', 'calls-best-match.h', 'calls-best-match.c',
'calls-call.c', 'calls-call.h', 'calls-call-record-row.c',
'calls-call-record.c', 'calls-call-record.h', 'calls-call-record.c',
'calls-call-record-row.c', 'calls-call-record-row.h', 'calls-call-selector-item.c',
'calls-call-selector-item.c', 'calls-call-selector-item.h', 'calls-call-window.c',
'calls-call-window.c', 'calls-call-window.h', 'calls-call.c',
'calls-contacts-box.c', 'calls-contacts-box.h', 'calls-contacts-box.c',
'calls-contacts-provider.c', 'calls-contacts-provider.h', 'calls-contacts-provider.c',
'calls-contacts-row.c', 'calls-contacts-row.h', 'calls-contacts-row.c',
'calls-dbus-manager.c', 'calls-dbus-manager.h', 'calls-dbus-manager.c',
'calls-emergency-calls-manager.c', 'calls-emergency-calls-manager.h', 'calls-emergency-call-types.c',
'calls-emergency-call-types.c', 'calls-emergency-call-types.h', 'calls-emergency-calls-manager.c',
'calls-history-box.c', 'calls-history-box.h', 'calls-history-box.c',
'calls-in-app-notification.c', 'calls-in-app-notification.h', 'calls-in-app-notification.c',
'calls-log.c', 'calls-log.h', 'calls-log.c',
'calls-main-window.c', 'calls-main-window.h', 'calls-main-window.c',
'calls-manager.c', 'calls-manager.h', 'calls-manager.c',
'calls-message-source.c', 'calls-message-source.h', 'calls-message-source.c',
'calls-network-watch.c', 'calls-network-watch.h', 'calls-network-watch.c',
'calls-new-call-box.c', 'calls-new-call-box.h', 'calls-new-call-box.c',
'calls-notifier.c', 'calls-notifier.h', 'calls-notifier.c',
'calls-origin.c', 'calls-origin.h', 'calls-origin.c',
'calls-plugin.c', 'calls-plugin.h', 'calls-plugin-manager.c',
'calls-plugin-manager.c', 'calls-plugin-manager.h', 'calls-plugin.c',
'calls-provider.c', 'calls-provider.h', 'calls-provider.c',
'calls-record-store.c', 'calls-record-store.h', 'calls-record-store.c',
'calls-ringer.c', 'calls-ringer.h', 'calls-ringer.c',
'calls-secret-store.c', 'calls-secret-store.h', 'calls-secret-store.c',
'calls-settings.c', 'calls-settings.h', 'calls-service-providers.c',
'calls-service-providers.c', 'calls-service-providers.h', 'calls-settings.c',
'calls-ui-call-data.c', 'calls-ui-call-data.h', 'calls-ui-call-data.c',
'calls-ussd.c', 'calls-ussd.h', 'calls-ussd.c',
'calls-util.c', 'calls-util.h', 'calls-util.c',
]) + calls_generated_sources ) + calls_generated_sources
calls_config_data = config_data calls_config_data = config_data
config_h = configure_file( config_h = configure_file(
output: 'calls-config.h', output: 'calls-config.h',
configuration: calls_config_data configuration: calls_config_data,
) )
version_h = vcs_tag( version_h = vcs_tag(fallback: '', input: 'version.h.in', output: 'version.h')
fallback: '',
input: 'version.h.in',
output: 'version.h',
)
calls_sources += [version_h] calls_sources += [version_h]
libcalls = static_library( libcalls = static_library(
'calls', calls_sources, 'calls',
calls_sources,
install: false, install: false,
dependencies: calls_deps, dependencies: calls_deps,
link_with: calls_vala, link_with: calls_vala,

View File

@@ -1,4 +1,6 @@
if get_option('tests') if not get_option('tests')
subdir_done()
endif
test_env = [ test_env = [
'G_DEBUG=gc-friendly,fatal-warnings', 'G_DEBUG=gc-friendly,fatal-warnings',
@@ -13,18 +15,20 @@ test_env = [
'FOLKS_BACKENDS_ALLOWED=key-file', 'FOLKS_BACKENDS_ALLOWED=key-file',
'FOLKS_PRIMARY_STORE=key-file', 'FOLKS_PRIMARY_STORE=key-file',
'CALLS_RECORD_DIR=@0@/tests/record-db'.format(meson.project_build_root()), 'CALLS_RECORD_DIR=@0@/tests/record-db'.format(meson.project_build_root()),
'CALLS_SIP_ACCOUNT_FILE=@0@/tests/sip-account.cfg'.format(meson.project_build_root()), 'CALLS_SIP_ACCOUNT_FILE=@0@/tests/sip-account.cfg'.format(
meson.project_build_root(),
),
] ]
test_cflags = [ test_cflags = [
'-DFOR_TESTING', '-DFOR_TESTING',
'-Wno-error=deprecated-declarations', '-Wno-error=deprecated-declarations',
'-DTEST_DATABASE="@0@"'.format(meson.current_source_dir() / 'data' / 'serviceproviders.xml'), '-DTEST_DATABASE="@0@"'.format(
meson.current_source_dir() / 'data' / 'serviceproviders.xml',
),
] ]
test_link_args = [ test_link_args = ['-fPIC']
'-fPIC',
]
dbus_service_conf = configuration_data() dbus_service_conf = configuration_data()
dbus_service_conf.set('CALLS_BUILD_DIR', '@0@'.format(builddir)) dbus_service_conf.set('CALLS_BUILD_DIR', '@0@'.format(builddir))
@@ -32,8 +36,10 @@ dbus_service_conf.set('CALLS_BUILD_DIR_STR', '"@0@"'.format(builddir))
dbus_service_conf.set('CALLS_DBUS_NAME', '"org.gnome.Calls"') dbus_service_conf.set('CALLS_DBUS_NAME', '"org.gnome.Calls"')
dbus_service_conf.set('CALLS_DBUS_OBJECT_PATH', '"/org/gnome/Calls"') dbus_service_conf.set('CALLS_DBUS_OBJECT_PATH', '"/org/gnome/Calls"')
dbus_config_h = configure_file(output : 'calls-dbus-config.h', dbus_config_h = configure_file(
configuration : dbus_service_conf) output: 'calls-dbus-config.h',
configuration: dbus_service_conf,
)
test_includes = include_directories('.') test_includes = include_directories('.')
@@ -41,139 +47,137 @@ subdir('mock')
subdir('services') subdir('services')
test_sources = ['test-emergency-call-types.c'] test_sources = ['test-emergency-call-types.c']
t = executable('emergency-call-types', test_sources, t = executable(
'emergency-call-types',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes,
]
) )
test('emergency-call-types', t, env: test_env) test('emergency-call-types', t, env: test_env)
test_sources = ['test-service-providers.c'] test_sources = ['test-service-providers.c']
t = executable('service-providers', test_sources, t = executable(
'service-providers',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes,
]
) )
test('service-providers', t, env: test_env) test('service-providers', t, env: test_env)
test_sources = ['test-manager.c'] test_sources = ['test-manager.c']
t = executable('manager', test_sources, t = executable(
'manager',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes
]
) )
test('manager', t, env: test_env, depends: calls_plugins) test('manager', t, env: test_env, depends: calls_plugins)
test_sources = ['test-plugins.c'] test_sources = ['test-plugins.c']
t = executable('plugins', test_sources, t = executable(
'plugins',
test_sources,
calls_sources, calls_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes
]
) )
test('plugins', t, env: test_env, depends: calls_plugins) test('plugins', t, env: test_env, depends: calls_plugins)
test_sources = ['test-util.c'] test_sources = ['test-util.c']
t = executable('util', test_sources, t = executable(
'util',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes,
]
) )
test('util', t, env: test_env) test('util', t, env: test_env)
test_sources = ['test-ui-call.c', 'mock-call.c', 'mock-call.h'] test_sources = ['test-ui-call.c', 'mock-call.c', 'mock-call.h']
t = executable('ui-call', test_sources, t = executable(
'ui-call',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes
]
) )
test('ui-call', t, env: test_env) test('ui-call', t, env: test_env)
test_sources = [ test_sources = ['mock-call.c', 'mock-call.h', 'test-ringer.c']
'mock-call.c', 'mock-call.h',
'test-ringer.c'
]
t = executable('ringer', test_sources, t = executable(
'ringer',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls, libfeedback], link_with: [calls_vala, libcalls, libfeedback],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes,
]
) )
test('ringer', t, env: test_env) test('ringer', t, env: test_env)
test_sources = ['test-contacts.c'] test_sources = ['test-contacts.c']
t = executable('contacts', test_sources, t = executable(
'contacts',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes,
]
) )
test('contacts', t, env: test_env) test('contacts', t, env: test_env)
test_sources = ['test-settings.c'] test_sources = ['test-settings.c']
t = executable('settings', test_sources, t = executable(
'settings',
test_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes,
]
) )
test('settings', t, env: test_env) test('settings', t, env: test_env)
test_sources = ['test-dbus.c'] test_sources = ['test-dbus.c']
t = executable('dbus', test_sources, generated_dbus_sources, t = executable(
'dbus',
test_sources,
generated_dbus_sources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes,
]
) )
test('dbus', t, env: test_env) test('dbus', t, env: test_env)
@@ -181,23 +185,23 @@ dbus_run_session = find_program('dbus-run-session')
if dbus_run_session.found() if dbus_run_session.found()
test_sources = ['test-application.c'] test_sources = ['test-application.c']
t = executable('application', test_sources, calls_resources, t = executable(
'application',
test_sources,
calls_resources,
c_args: test_cflags, c_args: test_cflags,
link_args: test_link_args, link_args: test_link_args,
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes],
calls_includes,
]
) )
test('application', test(
'application',
dbus_run_session, dbus_run_session,
args: t.full_path(), args: t.full_path(),
env: test_env, env: test_env,
timeout: 300, timeout: 300,
depends: t depends: t,
) )
endif endif
endif

View File

@@ -2,14 +2,9 @@ libfeedback_libdir = get_option('libdir')
libfeedback_link_args = [] libfeedback_link_args = []
libfeedback_symbols_file = 'libfeedback.syms' libfeedback_symbols_file = 'libfeedback.syms'
lfb_enum_headers = files([ lfb_enum_headers = files('lfb-event.h')
'lfb-event.h',
])
libfeedback_headers = [ libfeedback_headers = ['libfeedback.h', 'lfb-event.h']
'libfeedback.h',
'lfb-event.h',
]
libfeedback_sources = [ libfeedback_sources = [
'lfb-enums.c', 'lfb-enums.c',
@@ -22,15 +17,9 @@ gio = dependency('gio-2.0', version: '>=2.50.0')
glib = dependency('glib-2.0', version: '>=2.50.0') glib = dependency('glib-2.0', version: '>=2.50.0')
gobject = dependency('gobject-2.0', version: '>=2.50.0') gobject = dependency('gobject-2.0', version: '>=2.50.0')
libfeedback_deps = [ libfeedback_deps = [gio, glib, gobject]
gio,
glib,
gobject,
]
libfeedback_c_args = [ libfeedback_c_args = ['-DG_LOG_DOMAIN="libfeedback"']
'-DG_LOG_DOMAIN="libfeedback"',
]
libtype = 'shared_library' libtype = 'shared_library'
libfeedback = build_target( libfeedback = build_target(

View File

@@ -1,4 +1,6 @@
t = executable('calls-dbus-server', 'calls-server.c', t = executable(
'calls-dbus-server',
'calls-server.c',
dbus_config_h, dbus_config_h,
calls_sources, calls_sources,
c_args: test_cflags, c_args: test_cflags,
@@ -6,10 +8,7 @@ t = executable('calls-dbus-server', 'calls-server.c',
pie: true, pie: true,
link_with: [calls_vala, libcalls], link_with: [calls_vala, libcalls],
dependencies: calls_deps, dependencies: calls_deps,
include_directories : [ include_directories: [calls_includes, test_includes],
calls_includes,
test_includes,
]
) )
service_file = 'org.gnome.Calls.service' service_file = 'org.gnome.Calls.service'
@@ -17,4 +16,5 @@ service_file = 'org.gnome.Calls.service'
service = configure_file( service = configure_file(
input: service_file + '.in', input: service_file + '.in',
output: service_file, output: service_file,
configuration : dbus_service_conf) configuration: dbus_service_conf,
)