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 = i18n.merge_file(
input : 'org.gnome.Calls.desktop.in',
output : 'org.gnome.Calls.desktop',
type : 'desktop',
po_dir : po_dir,
install : true,
install_dir : join_paths(datadir, 'applications')
input: 'org.gnome.Calls.desktop.in',
output: 'org.gnome.Calls.desktop',
type: 'desktop',
po_dir: po_dir,
install: true,
install_dir: join_paths(datadir, 'applications'),
)
desktop_daemon_file = i18n.merge_file(
input : 'org.gnome.Calls-daemon.desktop.in',
output : 'org.gnome.Calls-daemon.desktop',
type : 'desktop',
po_dir : po_dir,
install : true,
install_dir : join_paths(sysconfdir, 'xdg/autostart')
input: 'org.gnome.Calls-daemon.desktop.in',
output: 'org.gnome.Calls-daemon.desktop',
type: 'desktop',
po_dir: po_dir,
install: true,
install_dir: join_paths(sysconfdir, 'xdg/autostart'),
)
service_data = configuration_data()
@@ -29,42 +29,36 @@ service_data.set('bindir', full_bindir)
# DBus service
service_file = 'org.gnome.Calls.service'
configure_file(
input : service_file + '.in',
output : service_file,
configuration : service_data,
install : true,
install_dir : full_servicedir,
input: service_file + '.in',
output: service_file,
configuration: service_data,
install: true,
install_dir: full_servicedir,
)
# Systemd user service
systemd_unit = 'calls-daemon.service'
configure_file(
input : systemd_unit + '.in',
output : systemd_unit,
configuration : service_data,
install : true,
install_dir : systemd_user_unit_dir,
input: systemd_unit + '.in',
output: systemd_unit,
configuration: service_data,
install: true,
install_dir: systemd_user_unit_dir,
)
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file',
test(
'Validate desktop file',
desktop_utils,
args: [
desktop_file.full_path()
],
depends: [
desktop_file,
],
args: [desktop_file.full_path()],
depends: [desktop_file],
)
test('Validate daemon desktop file',
test(
'Validate daemon desktop file',
desktop_utils,
args: [
desktop_daemon_file.full_path()
],
depends: [
desktop_daemon_file,
],
args: [desktop_daemon_file.full_path()],
depends: [desktop_daemon_file],
)
endif
@@ -75,52 +69,44 @@ metainfo_file = i18n.merge_file(
output: 'org.gnome.Calls.metainfo.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(datadir, 'metainfo')
install_dir: join_paths(datadir, 'metainfo'),
)
appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
test('Validate metainfo file', appstreamcli,
args: ['validate',
'--pedantic',
'--no-net',
metainfo_file
])
test(
'Validate metainfo file',
appstreamcli,
args: ['validate', '--pedantic', '--no-net', metainfo_file],
)
endif
# Icons
install_data(
'org.gnome.Calls.svg',
install_dir: join_paths(
datadir,
'icons',
'hicolor',
'scalable',
'apps'
)
install_dir: join_paths(datadir, 'icons', 'hicolor', 'scalable', 'apps'),
)
install_data(
'org.gnome.Calls-symbolic.svg',
install_dir: join_paths(
datadir,
'icons',
'hicolor',
'symbolic',
'apps'
)
install_dir: join_paths(datadir, 'icons', 'hicolor', 'symbolic', 'apps'),
)
schema_src = 'org.gnome.Calls.gschema.xml'
compiled = gnome.compile_schemas(build_by_default: true,
depend_files: files(schema_src))
compiled = gnome.compile_schemas(
build_by_default: true,
depend_files: files(schema_src),
)
install_data(schema_src,
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
install_data(
schema_src,
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas'),
)
compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found()
test('Validate schema file', compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()]
test(
'Validate schema file',
compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()],
)
endif

View File

@@ -1,57 +1,67 @@
if get_option('gtk_doc')
subdir('xml')
subdir('xml')
glib_prefix = dependency('glib-2.0').get_variable(pkgconfig : 'prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
glib_prefix = dependency('glib-2.0').get_variable(pkgconfig: 'prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
# only build the shared library for gtk-doc
calls_vala_doc_lib = library('calls-vala-doc',
calls_vala_sources,
dependencies: calls_vala_deps)
calls_doc_lib = library('calls-doc',
[calls_sources, gdbofono_src],
include_directories: calls_includes,
link_with: calls_vala_doc_lib,
dependencies: calls_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])
# only build the shared library for gtk-doc
calls_vala_doc_lib = library(
'calls-vala-doc',
calls_vala_sources,
dependencies: calls_vala_deps,
)
calls_doc_lib = library(
'calls-doc',
[calls_sources, gdbofono_src],
include_directories: calls_includes,
link_with: calls_vala_doc_lib,
dependencies: calls_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',
main_xml: 'calls-docs.xml',
src_dir: [
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'src/dbus'),
join_paths(meson.project_build_root(), 'plugins/provider/ofono/libgdbofono'),
],
dependencies: calls_doc_deps,
scan_args: [
'--rebuild-types',
],
fixxref_args: [
'--html-dir=@0@'.format(docpath),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gi')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gtk3')),
],
install_dir: 'calls',
install: true)
gnome.gtkdoc(
'calls',
main_xml: 'calls-docs.xml',
src_dir: [
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'src/dbus'),
join_paths(
meson.project_build_root(),
'plugins/provider/ofono/libgdbofono',
),
],
dependencies: calls_doc_deps,
scan_args: ['--rebuild-types'],
fixxref_args: [
'--html-dir=@0@'.format(docpath),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gi')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gtk3')),
],
install_dir: 'calls',
install: true,
)
endif
rst2man = find_program('rst2man', 'rst2man.py', required: false)
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
if get_option('manpages') and rst2man.found()
custom_target('man-gnome-calls',
custom_target(
'man-gnome-calls',
input: 'gnome-calls.rst',
output: 'gnome-calls.1',
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_URL', 'https://gitlab.gnome.org/GNOME/calls')
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(
'calls',
'c', 'vala',
'c',
'vala',
version: '49.1.1',
license: 'GPLv3+',
meson_version: '>= 1.0',
default_options: [
'warning_level=1',
'buildtype=debugoptimized',
'c_std=gnu11'
]
'c_std=gnu11',
],
)
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')
mbpi_dep = dependency('mobile-broadband-provider-info')
libcall_ui_dep = dependency('call-ui',
fallback: ['libcall-ui', 'libcall_ui_dep'],
libcall_ui_dep = dependency(
'call-ui',
fallback: ['libcall-ui', 'libcall_ui_dep'],
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_VERSION', calls_version)
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')
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.set('ABS_BUILDDIR', meson.current_build_dir())
run_data.set('ABS_SRCDIR', meson.current_source_dir())
configure_file(
input: 'run.in',
output: 'run',
configuration: run_data)
configure_file(input: 'run.in', output: 'run', configuration: run_data)
cc = meson.get_compiler('c')
@@ -142,24 +148,23 @@ if get_option('buildtype') != 'plain'
test_c_args += '-fstack-protector-strong'
endif
foreach arg: test_c_args
foreach arg : test_c_args
if cc.has_multi_arguments(arg)
global_c_args += arg
endif
endforeach
add_project_arguments(
global_c_args,
language: 'c'
)
add_project_arguments(global_c_args, language: 'c')
summary({
'Build documentation': get_option('gtk_doc'),
'Build manpages': get_option('manpages'),
'Build tests': get_option('tests'),
'Use gstreamers debug API': get_option('gst_debug'),
'Directory for systemd user units': systemd_user_unit_dir,
})
summary(
{
'Build documentation': get_option('gtk_doc'),
'Build manpages': get_option('manpages'),
'Build tests': get_option('tests'),
'Use gstreamers debug API': get_option('gst_debug'),
'Directory for systemd user units': systemd_user_unit_dir,
},
)
subdir('po')
subdir('data')
@@ -169,7 +174,7 @@ subdir('tests')
subdir('doc')
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)

View File

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

View File

@@ -48,13 +48,7 @@ mm_deps = [
dependency('libpeas-2'),
]
mm_sources = files(
[
'calls-mm-call.c', 'calls-mm-call.h',
'calls-mm-origin.c', 'calls-mm-origin.h',
'calls-mm-provider.c', 'calls-mm-provider.h'
]
)
mm_sources = files('calls-mm-call.c', 'calls-mm-origin.c', 'calls-mm-provider.c')
calls_mm = shared_module(
'mm',
@@ -63,5 +57,5 @@ calls_mm = shared_module(
include_directories: src_include,
link_with: libcalls,
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_headers = []
foreach iface: dbus_interfaces
foreach iface : dbus_interfaces
src = gnome.gdbus_codegen(
'gdbo-' + iface,
iface + '.xml',
interface_prefix: 'org.ofono.',
namespace: 'GDBO'
namespace: 'GDBO',
)
gdbofono_src += src
gdbofono_headers += src[1]
endforeach
gdbofono_deps = [
dependency('gio-2.0'),
dependency('gio-unix-2.0'),
]
gdbofono_deps = [dependency('gio-2.0'), dependency('gio-unix-2.0')]
gdbofono_lib = static_library(
'gdbofono',
gdbofono_src,
include_directories: top_include,
dependencies: gdbofono_deps
dependencies: gdbofono_deps,
)

View File

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

View File

@@ -53,36 +53,29 @@ sip_deps = [
]
sip_sources = files(
[
'calls-sdp-crypto-context.c', 'calls-sdp-crypto-context.h',
'calls-sip-account-widget.c', 'calls-sip-account-widget.h',
'calls-sip-call.c', 'calls-sip-call.h',
'calls-sip-media-manager.c', 'calls-sip-media-manager.h',
'calls-sip-media-pipeline.c', 'calls-sip-media-pipeline.h',
'calls-sip-origin.c', 'calls-sip-origin.h',
'calls-sip-provider.c', 'calls-sip-provider.h',
'calls-sip-util.c', 'calls-sip-util.h',
'calls-srtp-utils.c', 'calls-srtp-utils.h',
'gst-rfc3551.c', 'gst-rfc3551.h',
]
'calls-sdp-crypto-context.c',
'calls-sip-account-widget.c',
'calls-sip-call.c',
'calls-sip-media-manager.c',
'calls-sip-media-pipeline.c',
'calls-sip-origin.c',
'calls-sip-provider.c',
'calls-sip-util.c',
'calls-srtp-utils.c',
'gst-rfc3551.c',
)
pipeline_enum_headers = [
'calls-sip-media-pipeline.h',
]
pipeline_enum_headers = ['calls-sip-media-pipeline.h']
pipeline_enums = gnome.mkenums_simple('calls-media-pipeline-enums',
sources: pipeline_enum_headers)
pipeline_enums = gnome.mkenums_simple(
'calls-media-pipeline-enums',
sources: pipeline_enum_headers,
)
sip_sources += pipeline_enums
sip_enum_headers = [
'calls-sdp-crypto-context.h',
'calls-sip-util.h',
]
sip_enum_headers = ['calls-sdp-crypto-context.h', 'calls-sip-util.h']
sip_enums = gnome.mkenums_simple('calls-sip-enums',
sources: sip_enum_headers,
)
sip_enums = gnome.mkenums_simple('calls-sip-enums', sources: sip_enum_headers)
sip_sources += sip_enums
@@ -102,5 +95,5 @@ calls_sip = shared_module(
include_directories: src_include,
link_with: libcalls,
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 = [
'G_DEBUG=gc-friendly,fatal-warnings',
@@ -35,19 +37,14 @@ test_env = [
'CALLS_PLUGIN_DIR=@0@/plugins'.format(meson.project_build_root()),
]
test_cflags = [
'-DFOR_TESTING',
'-Wno-error=deprecated-declarations',
]
test_cflags = ['-DFOR_TESTING', '-Wno-error=deprecated-declarations']
test_link_args = [
'-fPIC',
]
test_link_args = ['-fPIC']
tests = [
[ 'provider', [] ],
[ 'origin', [ 'provider' ] ],
[ 'call', [ 'provider', 'origin' ] ],
['provider', []],
['origin', ['provider']],
['call', ['provider', 'origin']],
]
foreach test : tests
@@ -58,88 +55,78 @@ foreach test : tests
test_sources = []
foreach base : setup_bases
test_sources += [ 'setup-' + base + '.c',
'setup-' + base + '.h' ]
test_sources += ['setup-' + base + '.c', 'setup-' + base + '.h']
endforeach
test_sources += [ 'test-' + name + '.c',
'common.h' ]
test_sources += ['test-' + name + '.c', 'common.h']
t = executable(name, test_sources,
dummy_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
dummy_include,
]
)
t = executable(
name,
test_sources,
dummy_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes, dummy_include],
)
test(name, t, env: test_env)
endforeach
test_sources = [ 'test-media.c' ]
test_sources = ['test-media.c']
test_sources += sip_sources
t = executable('media', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps],
include_directories : [
calls_includes,
sip_include,
]
)
t = executable(
'media',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps],
include_directories: [calls_includes, sip_include],
)
test('media', t, env: test_env)
test_sources = [ 'test-sip.c' ]
test_sources = ['test-sip.c']
test_sources += sip_sources
t = executable('sip', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps],
include_directories : [
calls_includes,
sip_include,
]
)
t = executable(
'sip',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps],
include_directories: [calls_includes, sip_include],
)
test('sip', t, env: test_env)
test_sources = [ 'test-srtp.c' ]
test_sources = ['test-srtp.c']
test_sources += sip_sources
t = executable('srtp', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps],
include_directories : [
calls_includes,
sip_include,
]
)
t = executable(
'srtp',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps],
include_directories: [calls_includes, sip_include],
)
test('srtp', t, env: test_env)
test_sources = [ 'test-sdp-crypto.c' ]
test_sources = ['test-sdp-crypto.c']
test_sources += sip_sources
t = executable('sdp-crypto', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps],
include_directories : [
calls_includes,
sip_include,
]
)
t = executable(
'sdp-crypto',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: [calls_deps, sip_deps],
include_directories: [calls_includes, sip_include],
)
test('sdp-crypto', t, env: test_env)
endif

View File

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

View File

@@ -1,14 +1,18 @@
generated_dbus_sources = []
# DBus server protocols
generated_dbus_sources += gnome.gdbus_codegen('calls-call-dbus',
'org.gnome.Calls.Call.xml',
docbook: 'calls',
interface_prefix: 'org.gnome',
object_manager: true,
namespace: 'CallsDBus')
generated_dbus_sources += gnome.gdbus_codegen('calls-emergency-call-dbus',
'org.gnome.Calls.EmergencyCalls.xml',
docbook: 'calls',
interface_prefix: 'org.gnome.Calls',
namespace: 'CallsDBus')
generated_dbus_sources += gnome.gdbus_codegen(
'calls-call-dbus',
'org.gnome.Calls.Call.xml',
docbook: 'calls',
interface_prefix: 'org.gnome',
object_manager: true,
namespace: 'CallsDBus',
)
generated_dbus_sources += gnome.gdbus_codegen(
'calls-emergency-call-dbus',
'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')
src_include = include_directories('.')
calls_includes = [ top_include, src_include ]
calls_includes = [top_include, src_include]
calls_deps = [ dependency('gmobile', version: '>= 0.3.0'),
dependency('gobject-2.0', version: '>= 2.74'),
dependency('gtk4', version: '>= @0@'.format(gtk_version)),
dependency('libadwaita-1', version: '>= 1.6'),
dependency('libfeedback-0.0'),
dependency('libpeas-2'),
dependency('gom-1.0'),
dependency('libebook-contacts-1.2'),
dependency('folks'),
dependency('libcallaudio-0.1'),
dependency('libsecret-1'),
libcall_ui_dep
]
calls_vala_deps = [
calls_deps = [
dependency('gmobile', version: '>= 0.3.0'),
dependency('gobject-2.0', version: '>= 2.74'),
dependency('gtk4', version: '>= @0@'.format(gtk_version)),
dependency('libadwaita-1', version: '>= 1.6'),
dependency('libfeedback-0.0'),
dependency('libpeas-2'),
dependency('gom-1.0'),
dependency('libebook-contacts-1.2'),
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_sources,
vala_header : 'calls-vala.h',
dependencies : calls_vala_deps,
vala_header: 'calls-vala.h',
dependencies: calls_vala_deps,
)
calls_enum_headers = files(
[
'calls-account.h',
'calls-call.h',
'calls-manager.h',
'calls-ringer.h',
'calls-ussd.h',
]
'calls-account.h',
'calls-call.h',
'calls-manager.h',
'calls-ringer.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',
'calls.gresources.xml',
source_dir: ['ui', '../data'],
c_name: 'call',
dependencies: metainfo_file,
'calls-resources',
'calls.gresources.xml',
source_dir: ['ui', '../data'],
c_name: 'call',
dependencies: metainfo_file,
)
calls_generated_sources = [
@@ -88,78 +83,75 @@ calls_generated_sources = [
generated_dbus_sources,
]
calls_sources = files([
'calls-account.c', 'calls-account.h',
'calls-account-overview.c', 'calls-account-overview.h',
'calls-account-provider.c', 'calls-account-provider.h',
'calls-account-row.c', 'calls-account-row.h',
'calls-application.c', 'calls-application.h',
'calls-best-match.c', 'calls-best-match.h',
'calls-call.c', 'calls-call.h',
'calls-call-record.c', 'calls-call-record.h',
'calls-call-record-row.c', 'calls-call-record-row.h',
'calls-call-selector-item.c', 'calls-call-selector-item.h',
'calls-call-window.c', 'calls-call-window.h',
'calls-contacts-box.c', 'calls-contacts-box.h',
'calls-contacts-provider.c', 'calls-contacts-provider.h',
'calls-contacts-row.c', 'calls-contacts-row.h',
'calls-dbus-manager.c', 'calls-dbus-manager.h',
'calls-emergency-calls-manager.c', 'calls-emergency-calls-manager.h',
'calls-emergency-call-types.c', 'calls-emergency-call-types.h',
'calls-history-box.c', 'calls-history-box.h',
'calls-in-app-notification.c', 'calls-in-app-notification.h',
'calls-log.c', 'calls-log.h',
'calls-main-window.c', 'calls-main-window.h',
'calls-manager.c', 'calls-manager.h',
'calls-message-source.c', 'calls-message-source.h',
'calls-network-watch.c', 'calls-network-watch.h',
'calls-new-call-box.c', 'calls-new-call-box.h',
'calls-notifier.c', 'calls-notifier.h',
'calls-origin.c', 'calls-origin.h',
'calls-plugin.c', 'calls-plugin.h',
'calls-plugin-manager.c', 'calls-plugin-manager.h',
'calls-provider.c', 'calls-provider.h',
'calls-record-store.c', 'calls-record-store.h',
'calls-ringer.c', 'calls-ringer.h',
'calls-secret-store.c', 'calls-secret-store.h',
'calls-settings.c', 'calls-settings.h',
'calls-service-providers.c', 'calls-service-providers.h',
'calls-ui-call-data.c', 'calls-ui-call-data.h',
'calls-ussd.c', 'calls-ussd.h',
'calls-util.c', 'calls-util.h',
]) + calls_generated_sources
calls_sources = files(
'calls-account-overview.c',
'calls-account-provider.c',
'calls-account-row.c',
'calls-account.c',
'calls-application.c',
'calls-best-match.c',
'calls-call-record-row.c',
'calls-call-record.c',
'calls-call-selector-item.c',
'calls-call-window.c',
'calls-call.c',
'calls-contacts-box.c',
'calls-contacts-provider.c',
'calls-contacts-row.c',
'calls-dbus-manager.c',
'calls-emergency-call-types.c',
'calls-emergency-calls-manager.c',
'calls-history-box.c',
'calls-in-app-notification.c',
'calls-log.c',
'calls-main-window.c',
'calls-manager.c',
'calls-message-source.c',
'calls-network-watch.c',
'calls-new-call-box.c',
'calls-notifier.c',
'calls-origin.c',
'calls-plugin-manager.c',
'calls-plugin.c',
'calls-provider.c',
'calls-record-store.c',
'calls-ringer.c',
'calls-secret-store.c',
'calls-service-providers.c',
'calls-settings.c',
'calls-ui-call-data.c',
'calls-ussd.c',
'calls-util.c',
) + calls_generated_sources
calls_config_data = config_data
config_h = configure_file(
output: 'calls-config.h',
configuration: calls_config_data
configuration: calls_config_data,
)
version_h = vcs_tag(
fallback: '',
input: 'version.h.in',
output: 'version.h',
)
version_h = vcs_tag(fallback: '', input: 'version.h.in', output: 'version.h')
calls_sources += [ version_h ]
calls_sources += [version_h]
libcalls = static_library(
'calls', calls_sources,
'calls',
calls_sources,
install: false,
dependencies : calls_deps,
dependencies: calls_deps,
link_with: calls_vala,
include_directories: src_include,
)
executable (
executable(
'gnome-calls',
calls_resources,
'main.c',
dependencies : calls_deps,
export_dynamic : true,
include_directories : calls_includes,
install : true,
link_with : [calls_vala, libcalls],
c_args : '-Wno-error=deprecated-declarations',
dependencies: calls_deps,
export_dynamic: true,
include_directories: calls_includes,
install: true,
link_with: [calls_vala, libcalls],
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 = [
'G_DEBUG=gc-friendly,fatal-warnings',
@@ -13,18 +15,20 @@ test_env = [
'FOLKS_BACKENDS_ALLOWED=key-file',
'FOLKS_PRIMARY_STORE=key-file',
'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 = [
'-DFOR_TESTING',
'-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 = [
'-fPIC',
]
test_link_args = ['-fPIC']
dbus_service_conf = configuration_data()
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_OBJECT_PATH', '"/org/gnome/Calls"')
dbus_config_h = configure_file(output : 'calls-dbus-config.h',
configuration : dbus_service_conf)
dbus_config_h = configure_file(
output: 'calls-dbus-config.h',
configuration: dbus_service_conf,
)
test_includes = include_directories('.')
subdir('mock')
subdir('services')
test_sources = [ 'test-emergency-call-types.c' ]
t = executable('emergency-call-types', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
]
)
test_sources = ['test-emergency-call-types.c']
t = executable(
'emergency-call-types',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('emergency-call-types', t, env: test_env)
test_sources = [ 'test-service-providers.c' ]
t = executable('service-providers', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
]
)
test_sources = ['test-service-providers.c']
t = executable(
'service-providers',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('service-providers', t, env: test_env)
test_sources = [ 'test-manager.c' ]
test_sources = ['test-manager.c']
t = executable('manager', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes
]
)
t = executable(
'manager',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('manager', t, env: test_env, depends: calls_plugins)
test_sources = [ 'test-plugins.c' ]
test_sources = ['test-plugins.c']
t = executable('plugins', test_sources,
calls_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes
]
)
t = executable(
'plugins',
test_sources,
calls_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('plugins', t, env: test_env, depends: calls_plugins)
test_sources = [ 'test-util.c' ]
t = executable('util', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
]
)
test_sources = ['test-util.c']
t = executable(
'util',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('util', t, env: test_env)
test_sources = [ 'test-ui-call.c', 'mock-call.c', 'mock-call.h' ]
t = executable('ui-call', test_sources,
c_args : test_cflags,
link_args : test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies : calls_deps,
include_directories : [
calls_includes
]
)
test_sources = ['test-ui-call.c', 'mock-call.c', 'mock-call.h']
t = executable(
'ui-call',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('ui-call', t, env: test_env)
test_sources = [
'mock-call.c', 'mock-call.h',
'test-ringer.c'
]
test_sources = ['mock-call.c', 'mock-call.h', 'test-ringer.c']
t = executable('ringer', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls, libfeedback],
dependencies: calls_deps,
include_directories : [
calls_includes,
]
)
t = executable(
'ringer',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls, libfeedback],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('ringer', t, env: test_env)
test_sources = [ 'test-contacts.c' ]
t = executable('contacts', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
]
)
test_sources = ['test-contacts.c']
t = executable(
'contacts',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('contacts', t, env: test_env)
test_sources = [ 'test-settings.c' ]
t = executable('settings', test_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
]
)
test_sources = ['test-settings.c']
t = executable(
'settings',
test_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('settings', t, env: test_env)
test_sources = ['test-dbus.c']
t = executable('dbus', test_sources, generated_dbus_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
]
)
t = executable(
'dbus',
test_sources,
generated_dbus_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test('dbus', t, env: test_env)
dbus_run_session = find_program('dbus-run-session')
if dbus_run_session.found ()
test_sources = [ 'test-application.c' ]
t = executable('application', test_sources, calls_resources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
]
)
test('application',
dbus_run_session,
args: t.full_path(),
env: test_env,
timeout : 300,
depends: t
)
endif
if dbus_run_session.found()
test_sources = ['test-application.c']
t = executable(
'application',
test_sources,
calls_resources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes],
)
test(
'application',
dbus_run_session,
args: t.full_path(),
env: test_env,
timeout: 300,
depends: t,
)
endif

View File

@@ -2,14 +2,9 @@ libfeedback_libdir = get_option('libdir')
libfeedback_link_args = []
libfeedback_symbols_file = 'libfeedback.syms'
lfb_enum_headers = files([
'lfb-event.h',
])
lfb_enum_headers = files('lfb-event.h')
libfeedback_headers = [
'libfeedback.h',
'lfb-event.h',
]
libfeedback_headers = ['libfeedback.h', 'lfb-event.h']
libfeedback_sources = [
'lfb-enums.c',
@@ -18,35 +13,29 @@ libfeedback_sources = [
'lfb-event.c',
]
gio = dependency('gio-2.0', version: '>=2.50.0')
glib = dependency('glib-2.0', version: '>=2.50.0')
gobject = dependency('gobject-2.0', version: '>=2.50.0')
gio = dependency('gio-2.0', version: '>=2.50.0')
glib = dependency('glib-2.0', version: '>=2.50.0')
gobject = dependency('gobject-2.0', version: '>=2.50.0')
libfeedback_deps = [
gio,
glib,
gobject,
]
libfeedback_deps = [gio, glib, gobject]
libfeedback_c_args = [
'-DG_LOG_DOMAIN="libfeedback"',
]
libfeedback_c_args = ['-DG_LOG_DOMAIN="libfeedback"']
libtype = 'shared_library'
libfeedback = build_target(
'feedback-0',
libfeedback_sources,
soversion : 0,
c_args : libfeedback_c_args,
dependencies : libfeedback_deps,
link_args : [],
install : false,
target_type : libtype,
soversion: 0,
c_args: libfeedback_c_args,
dependencies: libfeedback_deps,
link_args: [],
install: false,
target_type: libtype,
)
libfeedback_inc = include_directories('.')
libfeedback_dep = declare_dependency(
link_with : libfeedback,
link_with: libfeedback,
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',
dbus_config_h,
calls_sources,
c_args : test_cflags,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
include_directories : [
calls_includes,
test_includes,
]
)
t = executable(
'calls-dbus-server',
'calls-server.c',
dbus_config_h,
calls_sources,
c_args: test_cflags,
link_args: test_link_args,
pie: true,
link_with: [calls_vala, libcalls],
dependencies: calls_deps,
include_directories: [calls_includes, test_includes],
)
service_file = 'org.gnome.Calls.service'
service = configure_file (
input : service_file + '.in',
output : service_file,
configuration : dbus_service_conf)
service = configure_file(
input: service_file + '.in',
output: service_file,
configuration: dbus_service_conf,
)