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

@@ -6,21 +6,21 @@ sysconfdir = get_option('sysconfdir')
# Desktop file # Desktop file
desktop_file = i18n.merge_file( desktop_file = i18n.merge_file(
input : 'org.gnome.Calls.desktop.in', input: 'org.gnome.Calls.desktop.in',
output : 'org.gnome.Calls.desktop', output: 'org.gnome.Calls.desktop',
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(
input : 'org.gnome.Calls-daemon.desktop.in', input: 'org.gnome.Calls-daemon.desktop.in',
output : 'org.gnome.Calls-daemon.desktop', output: 'org.gnome.Calls-daemon.desktop',
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()
@@ -29,42 +29,36 @@ service_data.set('bindir', full_bindir)
# DBus service # DBus service
service_file = 'org.gnome.Calls.service' service_file = 'org.gnome.Calls.service'
configure_file( configure_file(
input : service_file + '.in', input: service_file + '.in',
output : service_file, output: service_file,
configuration : service_data, configuration: service_data,
install : true, install: true,
install_dir : full_servicedir, install_dir: full_servicedir,
) )
# Systemd user service # Systemd user service
systemd_unit = 'calls-daemon.service' systemd_unit = 'calls-daemon.service'
configure_file( configure_file(
input : systemd_unit + '.in', input: systemd_unit + '.in',
output : systemd_unit, output: systemd_unit,
configuration : service_data, configuration: service_data,
install : true, install: true,
install_dir : systemd_user_unit_dir, install_dir: systemd_user_unit_dir,
) )
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

@@ -1,57 +1,67 @@
if get_option('gtk_doc') if get_option('gtk_doc')
subdir('xml') subdir('xml')
glib_prefix = dependency('glib-2.0').get_variable(pkgconfig : 'prefix') glib_prefix = dependency('glib-2.0').get_variable(pkgconfig: 'prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') 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_sources, 'calls-vala-doc',
dependencies: calls_vala_deps) calls_vala_sources,
calls_doc_lib = library('calls-doc', dependencies: calls_vala_deps,
[calls_sources, gdbofono_src], )
include_directories: calls_includes, calls_doc_lib = library(
link_with: calls_vala_doc_lib, 'calls-doc',
dependencies: calls_deps) [calls_sources, gdbofono_src],
calls_doc_deps = declare_dependency(sources: [calls_sources, calls_vala_sources], include_directories: calls_includes,
include_directories: calls_includes, link_with: calls_vala_doc_lib,
link_with: [calls_doc_lib, calls_vala_doc_lib], dependencies: calls_deps,
dependencies: [calls_deps, calls_vala_deps]) )
calls_doc_deps = declare_dependency(
sources: [calls_sources, calls_vala_sources],
include_directories: calls_includes,
link_with: [calls_doc_lib, calls_vala_doc_lib],
dependencies: [calls_deps, calls_vala_deps],
)
gnome.gtkdoc('calls', gnome.gtkdoc(
main_xml: 'calls-docs.xml', 'calls',
src_dir: [ main_xml: 'calls-docs.xml',
join_paths(meson.project_source_root(), 'src'), src_dir: [
join_paths(meson.project_build_root(), 'src'), join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_build_root(), 'src/dbus'), join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'plugins/provider/ofono/libgdbofono'), join_paths(meson.project_build_root(), 'src/dbus'),
], join_paths(
dependencies: calls_doc_deps, meson.project_build_root(),
scan_args: [ 'plugins/provider/ofono/libgdbofono',
'--rebuild-types', ),
], ],
fixxref_args: [ dependencies: calls_doc_deps,
'--html-dir=@0@'.format(docpath), scan_args: ['--rebuild-types'],
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')), fixxref_args: [
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')), '--html-dir=@0@'.format(docpath),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')), '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gi')), '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gtk3')), '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
], '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gi')),
install_dir: 'calls', '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gtk3')),
install: true) ],
install_dir: 'calls',
install: true,
)
endif endif
rst2man = find_program('rst2man', 'rst2man.py', required: false) rst2man = find_program('rst2man', 'rst2man.py', required: false)
if get_option('manpages') and not rst2man.found() if get_option('manpages') and not rst2man.found()
error('No rst2man found, but man pages were explicitly enabled') error('No rst2man found, but man pages were explicitly enabled')
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,8 +56,9 @@ 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(
fallback: ['libcall-ui', 'libcall_ui_dep'], 'call-ui',
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')
@@ -142,24 +148,23 @@ if get_option('buildtype') != 'plain'
test_c_args += '-fstack-protector-strong' test_c_args += '-fstack-protector-strong'
endif endif
foreach arg: test_c_args foreach arg : test_c_args
if cc.has_multi_arguments(arg) if cc.has_multi_arguments(arg)
global_c_args += arg global_c_args += arg
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 manpages': get_option('manpages'), 'Build documentation': get_option('gtk_doc'),
'Build tests': get_option('tests'), 'Build manpages': get_option('manpages'),
'Use gstreamers debug API': get_option('gst_debug'), 'Build tests': get_option('tests'),
'Directory for systemd user units': systemd_user_unit_dir, 'Use gstreamers debug API': get_option('gst_debug'),
}) 'Directory for systemd user units': systemd_user_unit_dir,
},
)
subdir('po') subdir('po')
subdir('data') subdir('data')
@@ -169,7 +174,7 @@ subdir('tests')
subdir('doc') subdir('doc')
gnome.post_install( gnome.post_install(
glib_compile_schemas: true, glib_compile_schemas: true,
gtk_update_icon_cache: true, gtk_update_icon_cache: true,
update_desktop_database: true, update_desktop_database: true,
) )

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

@@ -27,25 +27,22 @@ dbus_interfaces = ['manager', 'modem', 'call', 'ussd']
gdbofono_src = [] gdbofono_src = []
gdbofono_headers = [] gdbofono_headers = []
foreach iface: dbus_interfaces foreach iface : dbus_interfaces
src = gnome.gdbus_codegen( src = gnome.gdbus_codegen(
'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,19 +37,14 @@ 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', []],
[ 'origin', [ 'provider' ] ], ['origin', ['provider']],
[ 'call', [ 'provider', 'origin' ] ], ['call', ['provider', 'origin']],
] ]
foreach test : tests foreach test : tests
@@ -58,88 +55,78 @@ 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(
dummy_sources, name,
c_args : test_cflags, test_sources,
link_args: test_link_args, dummy_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: calls_deps,
dummy_include, include_directories: [calls_includes, dummy_include],
] )
)
test(name, t, env: test_env) test(name, t, env: test_env)
endforeach 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(
c_args : test_cflags, 'media',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: [calls_deps, sip_deps], pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: [calls_deps, sip_deps],
sip_include, include_directories: [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(
c_args : test_cflags, 'sip',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: [calls_deps, sip_deps], pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: [calls_deps, sip_deps],
sip_include, include_directories: [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(
c_args : test_cflags, 'srtp',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: [calls_deps, sip_deps], pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: [calls_deps, sip_deps],
sip_include, include_directories: [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(
c_args : test_cflags, 'sdp-crypto',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: [calls_deps, sip_deps], pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: [calls_deps, sip_deps],
sip_include, include_directories: [calls_includes, sip_include],
] )
)
test('sdp-crypto', t, env: test_env) test('sdp-crypto', t, env: test_env)
endif

View File

@@ -1,2 +1,2 @@
i18n = import('i18n') i18n = import('i18n')
i18n.gettext(calls_name, preset : 'glib') i18n.gettext(calls_name, preset: 'glib')

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(
'org.gnome.Calls.Call.xml', 'calls-call-dbus',
docbook: 'calls', 'org.gnome.Calls.Call.xml',
interface_prefix: 'org.gnome', docbook: 'calls',
object_manager: true, interface_prefix: 'org.gnome',
namespace: 'CallsDBus') object_manager: true,
generated_dbus_sources += gnome.gdbus_codegen('calls-emergency-call-dbus', namespace: 'CallsDBus',
'org.gnome.Calls.EmergencyCalls.xml', )
docbook: 'calls', generated_dbus_sources += gnome.gdbus_codegen(
interface_prefix: 'org.gnome.Calls', 'calls-emergency-call-dbus',
namespace: 'CallsDBus') 'org.gnome.Calls.EmergencyCalls.xml',
docbook: 'calls',
interface_prefix: 'org.gnome.Calls',
namespace: 'CallsDBus',
)

View File

@@ -27,59 +27,54 @@ gnome = import('gnome')
subdir('dbus') 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('gobject-2.0', version: '>= 2.74'), dependency('gmobile', version: '>= 0.3.0'),
dependency('gtk4', version: '>= @0@'.format(gtk_version)), dependency('gobject-2.0', version: '>= 2.74'),
dependency('libadwaita-1', version: '>= 1.6'), dependency('gtk4', version: '>= @0@'.format(gtk_version)),
dependency('libfeedback-0.0'), dependency('libadwaita-1', version: '>= 1.6'),
dependency('libpeas-2'), dependency('libfeedback-0.0'),
dependency('gom-1.0'), dependency('libpeas-2'),
dependency('libebook-contacts-1.2'), dependency('gom-1.0'),
dependency('folks'),
dependency('libcallaudio-0.1'),
dependency('libsecret-1'),
libcall_ui_dep
]
calls_vala_deps = [
dependency('libebook-contacts-1.2'), dependency('libebook-contacts-1.2'),
dependency('folks'), dependency('folks'),
dependency('libcallaudio-0.1'),
dependency('libsecret-1'),
libcall_ui_dep,
] ]
calls_vala_sources = files (
[
'calls-phone-number-query.vala',
]
)
calls_vala = static_library ( calls_vala_deps = [dependency('libebook-contacts-1.2'), dependency('folks')]
calls_vala_sources = files('calls-phone-number-query.vala')
calls_vala = static_library(
'calls-vala', 'calls-vala',
calls_vala_sources, calls_vala_sources,
vala_header : 'calls-vala.h', vala_header: 'calls-vala.h',
dependencies : calls_vala_deps, dependencies: calls_vala_deps,
) )
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',
sources: calls_enum_headers,
) )
calls_enum_sources = gnome.mkenums_simple('enum-types',
sources : calls_enum_headers)
calls_resources = gnome.compile_resources( calls_resources = gnome.compile_resources(
'calls-resources', 'calls-resources',
'calls.gresources.xml', 'calls.gresources.xml',
source_dir: ['ui', '../data'], source_dir: ['ui', '../data'],
c_name: 'call', c_name: 'call',
dependencies: metainfo_file, dependencies: metainfo_file,
) )
calls_generated_sources = [ calls_generated_sources = [
@@ -88,78 +83,75 @@ 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,
include_directories: src_include, include_directories: src_include,
) )
executable ( executable(
'gnome-calls', 'gnome-calls',
calls_resources, calls_resources,
'main.c', 'main.c',
dependencies : calls_deps, dependencies: calls_deps,
export_dynamic : true, export_dynamic: true,
include_directories : calls_includes, include_directories: calls_includes,
install : true, install: true,
link_with : [calls_vala, libcalls], link_with: [calls_vala, libcalls],
c_args : '-Wno-error=deprecated-declarations', c_args: '-Wno-error=deprecated-declarations',
) )

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,172 +36,172 @@ 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('.')
subdir('mock') 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(
c_args : test_cflags, 'emergency-call-types',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: calls_deps,
] include_directories: [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(
c_args : test_cflags, 'service-providers',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: calls_deps,
] include_directories: [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(
c_args : test_cflags, 'manager',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes dependencies: calls_deps,
] include_directories: [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(
calls_sources, 'plugins',
c_args : test_cflags, test_sources,
link_args: test_link_args, calls_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes dependencies: calls_deps,
] include_directories: [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(
c_args : test_cflags, 'util',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: calls_deps,
] include_directories: [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(
c_args : test_cflags, 'ui-call',
link_args : test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies : calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes dependencies: calls_deps,
] include_directories: [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(
c_args : test_cflags, 'ringer',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls, libfeedback], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls, libfeedback],
calls_includes, dependencies: calls_deps,
] include_directories: [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(
c_args : test_cflags, 'contacts',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: calls_deps,
] include_directories: [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(
c_args : test_cflags, 'settings',
link_args: test_link_args, test_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: calls_deps,
] include_directories: [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(
c_args : test_cflags, 'dbus',
link_args: test_link_args, test_sources,
pie: true, generated_dbus_sources,
link_with : [calls_vala, libcalls], c_args: test_cflags,
dependencies: calls_deps, link_args: test_link_args,
include_directories : [ pie: true,
calls_includes, link_with: [calls_vala, libcalls],
] dependencies: calls_deps,
) include_directories: [calls_includes],
)
test('dbus', t, env: test_env) test('dbus', t, env: test_env)
dbus_run_session = find_program('dbus-run-session') 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(
c_args : test_cflags, 'application',
link_args: test_link_args, test_sources,
pie: true, calls_resources,
link_with : [calls_vala, libcalls], c_args: test_cflags,
dependencies: calls_deps, link_args: test_link_args,
include_directories : [ pie: true,
calls_includes, link_with: [calls_vala, libcalls],
] dependencies: calls_deps,
) include_directories: [calls_includes],
test('application', )
dbus_run_session, test(
args: t.full_path(), 'application',
env: test_env, dbus_run_session,
timeout : 300, args: t.full_path(),
depends: t env: test_env,
) timeout: 300,
endif depends: t,
)
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',
@@ -18,35 +13,29 @@ libfeedback_sources = [
'lfb-event.c', 'lfb-event.c',
] ]
gio = dependency('gio-2.0', version: '>=2.50.0') 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(
'feedback-0', 'feedback-0',
libfeedback_sources, libfeedback_sources,
soversion : 0, soversion: 0,
c_args : libfeedback_c_args, c_args: libfeedback_c_args,
dependencies : libfeedback_deps, dependencies: libfeedback_deps,
link_args : [], link_args: [],
install : false, install: false,
target_type : libtype, target_type: libtype,
) )
libfeedback_inc = include_directories('.') libfeedback_inc = include_directories('.')
libfeedback_dep = declare_dependency( libfeedback_dep = declare_dependency(
link_with : libfeedback, link_with: libfeedback,
dependencies: libfeedback_deps, dependencies: libfeedback_deps,
include_directories : libfeedback_inc, include_directories: libfeedback_inc,
) )

View File

@@ -1,20 +1,20 @@
t = executable('calls-dbus-server', 'calls-server.c', t = executable(
dbus_config_h, 'calls-dbus-server',
calls_sources, 'calls-server.c',
c_args : test_cflags, dbus_config_h,
link_args: test_link_args, calls_sources,
pie: true, c_args: test_cflags,
link_with : [calls_vala, libcalls], link_args: test_link_args,
dependencies: calls_deps, pie: true,
include_directories : [ link_with: [calls_vala, libcalls],
calls_includes, dependencies: calls_deps,
test_includes, include_directories: [calls_includes, test_includes],
] )
)
service_file = 'org.gnome.Calls.service' 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,
)