[folks/wip/nielsdg/meson: 5/5] Add support for the Meson build system
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/wip/nielsdg/meson: 5/5] Add support for the Meson build system
- Date: Tue, 5 Sep 2017 20:04:45 +0000 (UTC)
commit d8358d5f255698e0714821c7bba23f9eeacccca2
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Aug 25 15:41:05 2017 +0200
Add support for the Meson build system
backends/bluez/meson.build | 40 +++++++++
backends/dummy/lib/meson.build | 44 +++++++++
backends/dummy/meson.build | 33 +++++++
backends/eds/lib/meson.build | 46 ++++++++++
backends/eds/meson.build | 36 ++++++++
backends/key-file/meson.build | 31 +++++++
backends/libsocialweb/lib/meson.build | 42 +++++++++
backends/libsocialweb/meson.build | 34 +++++++
backends/meson.build | 39 ++++++++
backends/ofono/meson.build | 34 +++++++
backends/telepathy/lib/meson.build | 85 ++++++++++++++++++
backends/telepathy/meson.build | 36 ++++++++
backends/tracker/lib/meson.build | 44 +++++++++
backends/tracker/meson.build | 35 ++++++++
docs/meson.build | 32 +++++++
folks/meson.build | 111 +++++++++++++++++++++++
meson.build | 155 +++++++++++++++++++++++++++++++++
meson_options.txt | 16 ++++
meson_post_install.py | 15 +++
po/meson.build | 3 +
tests/bluez/meson.build | 36 ++++++++
tests/dummy/meson.build | 24 +++++
tests/eds/meson.build | 75 ++++++++++++++++
tests/key-file/meson.build | 30 +++++++
tests/lib/bluez/meson.build | 15 +++
tests/lib/dummy/meson.build | 19 ++++
tests/lib/eds/meson.build | 21 +++++
tests/lib/key-file/meson.build | 15 +++
tests/lib/libsocialweb/meson.build | 15 +++
tests/lib/meson.build | 75 ++++++++++++++++
tests/lib/tracker/meson.build | 15 +++
tests/libsocialweb/meson.build | 22 +++++
tests/meson.build | 47 ++++++++++
tests/tracker/meson.build | 78 +++++++++++++++++
tools/inspect/meson.build | 41 +++++++++
tools/meson.build | 32 +++++++
36 files changed, 1471 insertions(+), 0 deletions(-)
---
diff --git a/backends/bluez/meson.build b/backends/bluez/meson.build
new file mode 100644
index 0000000..448d87c
--- /dev/null
+++ b/backends/bluez/meson.build
@@ -0,0 +1,40 @@
+folks_bluez_backend_name = 'bluez'
+
+folks_bluez_backend_sources = [
+ 'bluez-backend-factory.vala',
+ 'bluez-backend.vala',
+ 'bluez-persona-store.vala',
+ 'bluez-persona.vala',
+ 'org-bluez-obex-client.vala',
+ 'org-bluez.vala',
+]
+
+folks_bluez_backend_deps = [
+ backend_deps,
+ libebook,
+ libm,
+]
+
+folks_bluez_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_bluez_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_bluez_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_bluez_backend_name),
+]
+
+folks_bluez_backend = library(folks_bluez_backend_name,
+ folks_bluez_backend_sources,
+ dependencies: folks_bluez_backend_deps,
+ vala_args: folks_bluez_backend_vala_flags,
+ c_args: folks_bluez_backend_c_flags,
+ link_with: libfolks_internal,
+)
+
+folks_bluez_backend_dep = declare_dependency(
+ link_with: folks_bluez_backend,
+ include_directories: include_directories('.'),
+)
diff --git a/backends/dummy/lib/meson.build b/backends/dummy/lib/meson.build
new file mode 100644
index 0000000..e4ae108
--- /dev/null
+++ b/backends/dummy/lib/meson.build
@@ -0,0 +1,44 @@
+folks_dummy_backend_name = 'folks-dummy'
+
+folks_dummy_backend_sources = [
+ 'dummy-backend.vala',
+ 'dummy-full-persona.vala',
+ 'dummy-persona-store.vala',
+ 'dummy-persona.vala',
+]
+
+folks_dummy_backend_deps = [
+ backend_deps,
+]
+
+folks_dummy_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_dummy_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_dummy_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_dummy_backend_name),
+]
+
+folks_dummy_backend = library(folks_dummy_backend_name,
+ folks_dummy_backend_sources,
+ dependencies: folks_dummy_backend_deps,
+ vala_args: folks_dummy_backend_vala_flags,
+ c_args: folks_dummy_backend_c_flags,
+ link_with: libfolks_internal,
+)
+
+folks_dummy_backend_dep = declare_dependency(
+ link_with: folks_dummy_backend,
+ include_directories: include_directories('.'),
+)
+
+# Pkg-config file
+configure_file(
+ input: 'folks-dummy.pc.in',
+ output: 'folks-dummy.pc',
+ configuration: pkg_conf,
+ install_dir: pkg_install_dir,
+)
diff --git a/backends/dummy/meson.build b/backends/dummy/meson.build
new file mode 100644
index 0000000..bfd016c
--- /dev/null
+++ b/backends/dummy/meson.build
@@ -0,0 +1,33 @@
+# Backend library
+subdir('lib')
+
+# Backend itself
+dummy_backend_name = 'dummy'
+
+dummy_backend_sources = [
+ 'dummy-backend-factory.vala',
+]
+
+dummy_backend_deps = [
+ backend_deps,
+ folks_dummy_backend_dep,
+]
+
+dummy_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+dummy_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(dummy_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(dummy_backend_name),
+]
+
+dummy_backend = library(dummy_backend_name,
+ dummy_backend_sources,
+ dependencies: dummy_backend_deps,
+ vala_args: dummy_backend_vala_flags,
+ c_args: dummy_backend_c_flags,
+ link_with: libfolks_internal,
+)
diff --git a/backends/eds/lib/meson.build b/backends/eds/lib/meson.build
new file mode 100644
index 0000000..7d87ecc
--- /dev/null
+++ b/backends/eds/lib/meson.build
@@ -0,0 +1,46 @@
+folks_eds_backend_name = 'folks-eds'
+
+folks_eds_backend_sources = [
+ 'edsf-persona-store.vala',
+ 'edsf-persona.vala',
+]
+
+folks_eds_backend_deps = [
+ backend_deps,
+ libebook,
+ libebook_contacts,
+ libedataserver,
+ libxml,
+]
+
+folks_eds_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_eds_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_eds_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_eds_backend_name),
+]
+
+folks_eds_backend = library(folks_eds_backend_name,
+ folks_eds_backend_sources,
+ dependencies: folks_eds_backend_deps,
+ vala_args: folks_eds_backend_vala_flags,
+ c_args: folks_eds_backend_c_flags,
+ link_with: libfolks_internal,
+)
+
+folks_eds_backend_dep = declare_dependency(
+ link_with: folks_eds_backend,
+ include_directories: include_directories('.'),
+)
+
+# Pkg-config file
+configure_file(
+ input: 'folks-eds.pc.in',
+ output: 'folks-eds.pc',
+ configuration: pkg_conf,
+ install_dir: pkg_install_dir,
+)
diff --git a/backends/eds/meson.build b/backends/eds/meson.build
new file mode 100644
index 0000000..5254a42
--- /dev/null
+++ b/backends/eds/meson.build
@@ -0,0 +1,36 @@
+# Backend library
+subdir('lib')
+
+# Backend itself
+folks_eds_backend_name = 'eds'
+
+folks_eds_backend_sources = [
+ 'eds-backend-factory.vala',
+ 'eds-backend.vala',
+]
+
+folks_eds_backend_deps = [
+ backend_deps,
+ libebook,
+ libedataserver,
+ folks_eds_backend_dep,
+]
+
+folks_eds_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_eds_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_eds_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_eds_backend_name),
+]
+
+folks_eds_backend = library('eds',
+ folks_eds_backend_sources,
+ dependencies: folks_eds_backend_deps,
+ vala_args: folks_eds_backend_vala_flags,
+ c_args: folks_eds_backend_c_flags,
+ link_with: libfolks_internal,
+)
diff --git a/backends/key-file/meson.build b/backends/key-file/meson.build
new file mode 100644
index 0000000..3df18c9
--- /dev/null
+++ b/backends/key-file/meson.build
@@ -0,0 +1,31 @@
+folks_keyfile_backend_name = 'key-file'
+
+folks_keyfile_backend_sources = [
+ 'kf-backend-factory.vala',
+ 'kf-backend.vala',
+ 'kf-persona-store.vala',
+ 'kf-persona.vala',
+]
+
+folks_keyfile_backend_deps = [
+ backend_deps,
+]
+
+folks_keyfile_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_keyfile_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_keyfile_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_keyfile_backend_name),
+]
+
+folks_keyfile_backend = library(folks_keyfile_backend_name,
+ folks_keyfile_backend_sources,
+ dependencies: folks_keyfile_backend_deps,
+ vala_args: folks_keyfile_backend_vala_flags,
+ c_args: folks_keyfile_backend_c_flags,
+ link_with: libfolks_internal,
+)
diff --git a/backends/libsocialweb/lib/meson.build b/backends/libsocialweb/lib/meson.build
new file mode 100644
index 0000000..a0cb216
--- /dev/null
+++ b/backends/libsocialweb/lib/meson.build
@@ -0,0 +1,42 @@
+folks_libsocialweb_backend_name = 'folks-libsocialweb'
+
+folks_libsocialweb_backend_sources = [
+ 'swf-persona-store.vala',
+ 'swf-persona.vala',
+]
+
+folks_libsocialweb_backend_deps = [
+ backend_deps,
+]
+
+folks_libsocialweb_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_libsocialweb_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_libsocialweb_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_libsocialweb_backend_name),
+]
+
+folks_libsocialweb_backend = library(folks_libsocialweb_backend_name,
+ folks_libsocialweb_backend_sources,
+ dependencies: folks_libsocialweb_backend_deps,
+ vala_args: folks_libsocialweb_backend_vala_flags,
+ c_args: folks_libsocialweb_backend_c_flags,
+ link_with: libfolks_internal,
+)
+
+folks_libsocialweb_backend_dep = declare_dependency(
+ link_with: folks_libsocialweb_backend,
+ include_directories: include_directories('.'),
+)
+
+# Pkg-config file
+configure_file(
+ input: 'folks-libsocialweb.pc.in',
+ output: 'folks-libsocialweb.pc',
+ configuration: pkg_conf,
+ install_dir: pkg_install_dir,
+)
diff --git a/backends/libsocialweb/meson.build b/backends/libsocialweb/meson.build
new file mode 100644
index 0000000..939c36b
--- /dev/null
+++ b/backends/libsocialweb/meson.build
@@ -0,0 +1,34 @@
+# Backend library
+subdir('lib')
+
+# Backend itself
+libsocialweb_backend_name = 'libsocialweb'
+
+libsocialweb_backend_sources = [
+ 'sw-backend-factory.vala',
+ 'sw-backend.vala',
+]
+
+libsocialweb_backend_deps = [
+ backend_deps,
+ folks_libsocialweb_backend_dep,
+]
+
+libsocialweb_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+libsocialweb_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(libsocialweb_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(libsocialweb_backend_name),
+]
+
+libsocialweb_backend = library(libsocialweb_backend_name,
+ libsocialweb_backend_sources,
+ dependencies: libsocialweb_backend_deps,
+ vala_args: libsocialweb_backend_vala_flags,
+ c_args: libsocialweb_backend_c_flags,
+ link_with: libfolks_internal,
+)
diff --git a/backends/meson.build b/backends/meson.build
new file mode 100644
index 0000000..889324a
--- /dev/null
+++ b/backends/meson.build
@@ -0,0 +1,39 @@
+# Common dependencies
+backend_deps = [
+ libfolks_dep,
+ gobject,
+ gee,
+ gio
+]
+
+# Common flags
+backend_vala_flags = [
+]
+
+# A subdirectory for each type of backend
+subdir('dummy')
+subdir('key-file')
+
+if telepathy_backend_enabled
+ subdir('telepathy')
+endif
+
+if libsocialweb_backend_enabled
+ subdir('libsocialweb')
+endif
+
+if tracker_backend_enabled
+ subdir('tracker')
+endif
+
+if eds_backend_enabled
+ subdir('eds')
+endif
+
+if ofono_backend_enabled
+ subdir('ofono')
+endif
+
+if bluez_backend_enabled
+ subdir('bluez')
+endif
diff --git a/backends/ofono/meson.build b/backends/ofono/meson.build
new file mode 100644
index 0000000..9d95186
--- /dev/null
+++ b/backends/ofono/meson.build
@@ -0,0 +1,34 @@
+folks_ofono_backend_name = 'ofono'
+
+folks_ofono_backend_sources = [
+ 'ofono-backend-factory.vala',
+ 'ofono-backend.vala',
+ 'ofono-persona-store.vala',
+ 'ofono-persona.vala',
+ 'org-ofono.vala',
+]
+
+folks_ofono_backend_deps = [
+ backend_deps,
+ libebook,
+ libedataserver,
+]
+
+folks_ofono_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_ofono_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_ofono_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_ofono_backend_name),
+]
+
+folks_ofono_backend = library(folks_ofono_backend_name,
+ folks_ofono_backend_sources,
+ dependencies: folks_ofono_backend_deps,
+ vala_args: folks_ofono_backend_vala_flags,
+ c_args: folks_ofono_backend_c_flags,
+ link_with: libfolks_internal,
+)
diff --git a/backends/telepathy/lib/meson.build b/backends/telepathy/lib/meson.build
new file mode 100644
index 0000000..e83b3e9
--- /dev/null
+++ b/backends/telepathy/lib/meson.build
@@ -0,0 +1,85 @@
+# Low-level library
+tp_lowlevel_sources = [
+ 'tp-lowlevel.c',
+]
+
+tp_lowlevel_deps = [
+ gio,
+ gobject,
+ telepathy_glib,
+]
+
+tp_lowlevel = library('tp-lowlevel',
+ sources: tp_lowlevel_sources,
+ dependencies: tp_lowlevel_deps,
+)
+
+tp_lowlevel_gir = gnome.generate_gir(tp_lowlevel,
+ sources: [ 'tp-lowlevel.h' ],
+ includes: [ 'GObject-2.0', 'TelepathyGLib-0.12' ],
+ nsversion: api_version, # XXX check this
+ namespace: 'TpLowlevel',
+ identifier_prefix: 'FolksTpLowlevel',
+ extra_args: [
+ '--c-include=tp-lowlevel.h',
+ ],
+)
+
+tp_lowlevel_vapi = gnome.generate_vapi('tp-lowlevel',
+ sources: tp_lowlevel_gir.get(0),
+ packages: [ 'gio-2.0', 'telepathy-glib' ],
+)
+
+# Actual backend library
+folks_telepathy_backend_name = 'folks-telepathy'
+
+folks_telepathy_backend_sources = [
+ 'tpf-logger.vala',
+ 'tpf-persona-store-cache.vala',
+ 'tpf-persona-store.vala',
+ 'tpf-persona.vala',
+]
+
+if zeitgeist_enabled
+ folks_telepathy_backend_sources += 'tp-zeitgeist.vala'
+else
+ folks_telepathy_backend_sources += 'tp-zeitgeist-dummy.vala'
+endif
+
+folks_telepathy_backend_deps = [
+ backend_deps,
+ telepathy_glib,
+ tp_lowlevel_vapi,
+]
+
+folks_telepathy_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_telepathy_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_telepathy_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_telepathy_backend_name),
+]
+
+folks_telepathy_backend = library(folks_telepathy_backend_name,
+ folks_telepathy_backend_sources,
+ dependencies: folks_telepathy_backend_deps,
+ vala_args: folks_telepathy_backend_vala_flags,
+ c_args: folks_telepathy_backend_c_flags,
+ link_with: libfolks_internal,
+)
+
+folks_telepathy_backend_dep = declare_dependency(
+ link_with: folks_telepathy_backend,
+ include_directories: include_directories('.'),
+)
+
+# Pkg-config file
+configure_file(
+ input: 'folks-telepathy.pc.in',
+ output: 'folks-telepathy.pc',
+ configuration: pkg_conf,
+ install_dir: pkg_install_dir,
+)
diff --git a/backends/telepathy/meson.build b/backends/telepathy/meson.build
new file mode 100644
index 0000000..ef95176
--- /dev/null
+++ b/backends/telepathy/meson.build
@@ -0,0 +1,36 @@
+# Backend library
+subdir('lib')
+
+# Backend itself
+telepathy_backend_name = 'telepathy'
+
+telepathy_backend_sources = [
+ 'tp-backend-factory.vala',
+ 'tp-backend.vala',
+]
+
+telepathy_backend_deps = [
+ backend_deps,
+ telepathy_glib,
+ tp_lowlevel_vapi,
+ folks_telepathy_backend_dep,
+]
+
+telepathy_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+telepathy_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(telepathy_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(telepathy_backend_name),
+]
+
+telepathy_backend = library(telepathy_backend_name,
+ telepathy_backend_sources,
+ dependencies: telepathy_backend_deps,
+ vala_args: telepathy_backend_vala_flags,
+ c_args: telepathy_backend_c_flags,
+ link_with: libfolks_internal,
+)
diff --git a/backends/tracker/lib/meson.build b/backends/tracker/lib/meson.build
new file mode 100644
index 0000000..64612fe
--- /dev/null
+++ b/backends/tracker/lib/meson.build
@@ -0,0 +1,44 @@
+folks_tracker_backend_name = 'folks-tracker'
+
+folks_tracker_backend_sources = [
+ 'trf-persona-store.vala',
+ 'trf-persona.vala',
+ 'trf-util.vala',
+]
+
+folks_tracker_backend_deps = [
+ backend_deps,
+ tracker_sparql,
+]
+
+folks_tracker_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+folks_tracker_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(folks_tracker_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(folks_tracker_backend_name),
+]
+
+folks_tracker_backend = library(folks_tracker_backend_name,
+ folks_tracker_backend_sources,
+ dependencies: folks_tracker_backend_deps,
+ vala_args: folks_tracker_backend_vala_flags,
+ c_args: folks_tracker_backend_c_flags,
+ link_with: libfolks_internal,
+)
+
+folks_tracker_backend_dep = declare_dependency(
+ link_with: folks_tracker_backend,
+ include_directories: include_directories('.'),
+)
+
+# Pkg-config file
+configure_file(
+ input: 'folks-tracker.pc.in',
+ output: 'folks-tracker.pc',
+ configuration: pkg_conf,
+ install_dir: pkg_install_dir,
+)
diff --git a/backends/tracker/meson.build b/backends/tracker/meson.build
new file mode 100644
index 0000000..c1ba1eb
--- /dev/null
+++ b/backends/tracker/meson.build
@@ -0,0 +1,35 @@
+# Backend library
+subdir('lib')
+
+# Backend itself
+tracker_backend_name = 'tracker'
+
+tracker_backend_sources = [
+ 'tr-backend-factory.vala',
+ 'tr-backend.vala',
+]
+
+tracker_backend_deps = [
+ backend_deps,
+ tracker_sparql,
+ folks_tracker_backend_dep,
+]
+
+tracker_backend_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+tracker_backend_c_flags = [
+ '-include', 'config.h',
+ '-DBACKEND_NAME="@0@"'.format(tracker_backend_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(tracker_backend_name),
+]
+
+tracker_backend = library(tracker_backend_name,
+ tracker_backend_sources,
+ dependencies: tracker_backend_deps,
+ vala_args: tracker_backend_vala_flags,
+ c_args: tracker_backend_c_flags,
+ link_with: libfolks_internal,
+)
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..2e5c23e
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1,32 @@
+# Specify some common flags
+docs_common_valadoc_flags = [
+ '--force',
+ '--package-version', # XXX
+ '--no-protected',
+ '--driver', # XXX
+]
+
+
+# Now build the documentation for each library
+custom_target ('valadocs',
+ input : libfolks_sources,
+ # output : outdir, XXX
+ command : [ valadoc,
+ docs_common_valadoc_flags,
+ '-o', 'folks',
+ '--doclet=devhelp',
+ '--pkg=gmodule-2.0',
+ '--pkg=gio-2.0',
+ '--pkg=gee-0.8',
+ '--pkg=folks-internal',
+ '--pkg=folks-generics',
+ '--pkg=build-conf',
+ '--wiki=@0@'.format(join_paths(meson.current_source_dir(), 'wiki')),
+ '@INPUT@',
+ ],
+ install : true,
+ install_dir : join_paths(get_option('datadir'), 'devhelp', 'books')
+)
+
+# TODO also a gtk-doc doclet
+# TODO the other libraries
diff --git a/folks/meson.build b/folks/meson.build
new file mode 100644
index 0000000..01a3dc6
--- /dev/null
+++ b/folks/meson.build
@@ -0,0 +1,111 @@
+# Internal library
+libfolks_internal_sources = [
+ 'internal.vala',
+ 'small-set.c',
+]
+
+libfolks_internal_deps = [
+ gobject,
+ gio,
+ gee,
+ posix,
+]
+
+libfolks_internal = library('folks-internal',
+ libfolks_internal_sources,
+ include_directories: include_directories('..'),
+ dependencies: libfolks_internal_deps,
+)
+
+# Core library
+libfolks_sources = [
+ 'abstract-field-details.vala',
+ 'alias-details.vala',
+ 'anti-linkable.vala',
+ 'avatar-cache.vala',
+ 'avatar-details.vala',
+ 'backend-store.vala',
+ 'backend.vala',
+ 'birthday-details.vala',
+ 'debug.vala',
+ 'email-details.vala',
+ 'extended-info.vala',
+ 'favourite-details.vala',
+ 'folks-namespace.vala',
+ 'gender-details.vala',
+ 'group-details.vala',
+ 'im-details.vala',
+ 'individual-aggregator.vala',
+ 'individual.vala',
+ 'interaction-details.vala',
+ 'local-id-details.vala',
+ 'location-details.vala',
+ 'name-details.vala',
+ 'note-details.vala',
+ 'object-cache.vala',
+ 'persona-store.vala',
+ 'persona.vala',
+ 'phone-details.vala',
+ 'postal-address-details.vala',
+ 'potential-match.vala',
+ 'presence-details.vala',
+ 'query.vala',
+ 'role-details.vala',
+ 'search-view.vala',
+ 'simple-query.vala',
+ 'types.vala',
+ 'url-details.vala',
+ 'utils.vala',
+ 'web-service-details.vala',
+]
+
+libfolks_deps = [
+ gobject,
+ gmodule,
+ gio,
+ gee,
+]
+
+libfolks_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--pkg', 'build-conf',
+]
+
+libfolks_c_flags = [
+ '-include', 'config.h',
+ '-DG_LOG_DOMAIN="folks"',
+]
+
+libfolks_lib = library('folks',
+ libfolks_sources,
+ dependencies: libfolks_deps,
+ include_directories: config_h_dir,
+ link_with: libfolks_internal,
+ vala_args: libfolks_vala_flags,
+ c_args: libfolks_c_flags,
+ vala_gir: 'Folks-@0@.gir'.format(api_version),
+)
+
+libfolks_dep = declare_dependency(
+ link_with: libfolks_lib,
+ dependencies: libfolks_deps,
+ include_directories: include_directories('.', '..')
+)
+
+# GSettings
+gschema_file = configure_file(
+ input: 'org.freedesktop.folks.gschema.xml.in',
+ output: 'org.freedesktop.folks.gschema.xml',
+ configuration: conf
+)
+install_data(gschema_file,
+ install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas'),
+)
+
+# Pkg-config file
+configure_file(
+ input: 'folks.pc.in',
+ output: 'folks.pc',
+ configuration: pkg_conf,
+ install_dir: pkg_install_dir,
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..aa42f4a
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,155 @@
+project('folks', [ 'vala', 'c' ],
+ version: '0.11.5.0',
+ license: 'LGPL2.1+', # XXX is this ok?
+ meson_version: '>= 0.37',
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+
+# Add our custom VAPI dir
+# XXX there is not yet a custom VAPI dir :(
+add_project_arguments(
+ ['--vapidir', join_paths(meson.source_root(), 'folks')],
+ language: 'vala'
+)
+
+# Versions
+api_version = '0.6'
+
+# Some variables
+backend_dir = join_paths(meson.source_root(), 'backends')
+config_h_dir = include_directories('.')
+locale_dir = join_paths(get_option('prefix'), get_option('localedir'))
+pkg_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
+installed_tests_dir = join_paths(get_option('libexecdir'), 'installed-tests', 'folks') # XXX check that
final folder (see InstalledTests on the wiki)
+installed_tests_meta_dir = join_paths(get_option('datadir'), 'installed-tests', 'folks') # XXX check that
final folder (see InstalledTests on the wiki)
+po_dir = join_paths(meson.source_root(), 'po')
+
+# Options (see meson_option.txt for more info)
+bluez_backend_enabled = get_option('enable-bluez-backend')
+docs_enabled = get_option('enable-docs')
+eds_backend_enabled = get_option('enable-eds-backend')
+installed_tests_enabled = get_option('enable-installed-tests')
+libsocialweb_backend_enabled = get_option('enable-libsocialweb-backend')
+modular_tests_enabled = get_option('enable-modular-tests')
+ofono_backend_enabled = get_option('enable-ofono-backend')
+telepathy_backend_enabled = get_option('enable-telepathy-backend')
+tracker_backend_enabled = get_option('enable-tracker-backend')
+zeitgeist_enabled = get_option('enable-zeitgeist')
+import_tool_enabled = get_option('enable-import-tool')
+inspect_tool_enabled = get_option('enable-inspect-tool')
+
+# Dependencies
+min_glib_version = '2.40.0'
+min_eds_version = '3.13.90'
+
+valac = meson.get_compiler('vala')
+cc = meson.get_compiler('c')
+
+# FIXME: get rid of the next 2 when our dependencies stop using dbus-1 (GNOME#696177)
+dbus_1 = dependency('dbus-1')
+dbus_glib = dependency('dbus-glib-1')
+gee = dependency('gee-0.8')
+gio = dependency('gio-2.0')
+glib = dependency('glib-2.0', version: '>=' + min_glib_version)
+gmodule = dependency('gmodule-2.0')
+gobject = dependency('gobject-2.0', version: '>=' + min_glib_version)
+libm = cc.find_library('m')
+posix = valac.find_library('posix')
+readline = declare_dependency(
+ dependencies: [
+ cc.find_library('readline'),
+ valac.find_library('readline'),
+ ]
+)
+
+if docs_enabled
+ valadoc = find_program('valadoc')
+endif
+
+if zeitgeist_enabled
+ zeitgeist = dependency('zeitgeist-2.0')
+endif
+
+if telepathy_backend_enabled
+ telepathy_glib = dependency('telepathy-glib', version: '>= 0.19.9')
+ #XXX check for zeitgeist
+endif
+
+if tracker_backend_enabled
+ # XXX what the hell does configure.ac do?
+ tracker_sparql = dependency('tracker-sparql', version: '>= 0.16')
+endif
+
+if eds_backend_enabled
+ libebook = dependency('libebook-1.2', version: '>=' + min_eds_version)
+ libebook_contacts = dependency('libebook-contacts-1.2', version: '>=' + min_eds_version)
+ libedataserver = dependency('libedataserver-1.2', version: '>=' + min_eds_version)
+ libxml = dependency('libxml-2.0')
+endif
+
+if ofono_backend_enabled
+ libebook = dependency('libebook-1.2', version: '>=' + min_eds_version)
+endif
+
+if bluez_backend_enabled
+ libebook = dependency('libebook-1.2', version: '>=' + min_eds_version)
+ # Needed for the BlueZ tests
+ python3 = find_program('python3')
+ #XXX
+endif
+
+if libsocialweb_backend_enabled
+endif
+
+if import_tool_enabled
+ libxml = dependency('libxml-2.0')
+endif
+
+
+# Configuration
+conf = configuration_data()
+conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+conf.set_quoted('LOCALE_DIR', locale_dir)
+conf.set_quoted('PACKAGE_NAME', meson.project_name())
+conf.set_quoted('PACKAGE_STRING', meson.project_name())
+conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+conf.set_quoted('ABS_TOP_SRCDIR', meson.source_root())
+conf.set_quoted('ABS_TOP_BUILDDIR', meson.build_root())
+conf.set_quoted('INSTALLED_TESTS_DIR', installed_tests_dir)
+conf.set_quoted('INSTALLED_TESTS_META_DIR', installed_tests_meta_dir)
+conf.set_quoted('BACKEND_DIR', backend_dir)
+conf.set10('HAVE_BLUEZ', bluez_backend_enabled)
+conf.set10('HAVE_EDS', eds_backend_enabled)
+conf.set10('HAVE_LIBSOCIALWEB', libsocialweb_backend_enabled)
+conf.set10('HAVE_OFONO', ofono_backend_enabled)
+conf.set10('HAVE_TELEPATHY', telepathy_backend_enabled)
+conf.set10('HAVE_TRACKER', tracker_backend_enabled)
+configure_file(output: 'config.h', configuration: conf)
+
+# Configuration for pc.in files
+pkg_conf = configuration_data()
+pkg_conf.set('prefix', get_option('prefix'))
+pkg_conf.set('exec_prefix', '${prefix}')
+pkg_conf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
+pkg_conf.set('bindir', '${prefix}/@0@'.format(get_option('bindir')))
+pkg_conf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
+pkg_conf.set('datarootdir', '${prefix}/@0@'.format(get_option('datadir')))
+pkg_conf.set('datadir', '${datarootdir}')
+pkg_conf.set('VERSION', meson.project_version())
+
+# Post-install scripts
+meson.add_install_script('meson_post_install.py')
+
+# Subfolders
+subdir('folks')
+subdir('backends')
+subdir('tools')
+subdir('po')
+# if modular_tests_enabled
+ subdir('tests')
+# endif
+if docs_enabled
+ subdir('docs')
+endif
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..deb56fb
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,16 @@
+# Backends
+option('enable-bluez-backend', type: 'boolean', value: true, description: 'build the Bluez backend')
+option('enable-eds-backend', type: 'boolean', value: true, description: 'build the EDS backend')
+option('enable-libsocialweb-backend', type: 'boolean', value: false, description: 'build the libsocialweb
backend')
+option('enable-ofono-backend', type: 'boolean', value: true, description: 'build the oFono backend')
+option('enable-telepathy-backend', type: 'boolean', value: true, description: 'build the Telepathy backend')
+option('enable-tracker-backend', type: 'boolean', value: false, description: 'build the Tracker backend')
+option('enable-zeitgeist', type: 'boolean', value: false, description: 'build Zeitgeist support in the
Telepathy backend')
+# Tools
+option('enable-import-tool', type: 'boolean', value: true, description: 'Enable building the meta-contact
import tool')
+option('enable-inspect-tool', type: 'boolean', value: true, description: 'Enable building the data
inspection tool')
+# Test options
+option('enable-modular-tests', type: 'boolean', value: true, description: 'Enable build of test programs')
+option('enable-installed-tests', type: 'boolean', value: false, description: 'Install test programs')
+# Docs
+option('enable-docs', type: 'boolean', value: false, description: 'Enable documentation generation')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..bf320a9
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+install_prefix = os.environ['MESON_INSTALL_PREFIX']
+icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
+schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
+
+if not os.environ.get('DESTDIR'):
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..f904cde
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,3 @@
+i18n.gettext(meson.project_name(),
+ preset: 'glib'
+)
diff --git a/tests/bluez/meson.build b/tests/bluez/meson.build
new file mode 100644
index 0000000..44b54db
--- /dev/null
+++ b/tests/bluez/meson.build
@@ -0,0 +1,36 @@
+# in order from least to most complex
+bluez_tests = [
+ 'device-properties',
+ 'individual-retrieval',
+ 'vcard-parsing',
+]
+
+bluez_tests_deps = [
+ gobject,
+ gio,
+ gee,
+ libebook,
+ libedataserver,
+ libfolks_dep,
+ libfolks_test_dep,
+ libbluez_test_dep,
+ folks_test_dbus,
+ folks_bluez_backend_dep,
+]
+
+bluez_tests_vala_flags = [
+ '--pkg', 'folks-generics',
+ '--debug',
+]
+
+foreach _test: bluez_tests
+
+ test_executable = executable('bluez-'+_test,
+ '@0@.vala'.format(_test),
+ dependencies: bluez_tests_deps,
+ vala_args: bluez_tests_vala_flags,
+ link_with: libfolks_internal,
+ )
+
+ test('[Bluez backend] @0@'.format(_test), test_executable)
+endforeach
diff --git a/tests/dummy/meson.build b/tests/dummy/meson.build
new file mode 100644
index 0000000..0b1c2d9
--- /dev/null
+++ b/tests/dummy/meson.build
@@ -0,0 +1,24 @@
+# in order from least to most complex
+dummy_tests = [
+ 'individual-retrieval',
+ 'add-persona',
+ 'linkable-properties',
+ 'search-view',
+]
+
+dummy_tests_deps = [
+ common_test_deps,
+ dummy_test_lib_dep,
+ folks_dummy_backend_dep,
+]
+
+
+foreach _test: dummy_tests
+ test_executable = executable('dummy-'+_test,
+ '@0@.vala'.format(_test),
+ dependencies: dummy_tests_deps,
+ vala_args: common_test_vala_flags,
+ )
+
+ test('[Dummy backend] @0@'.format(_test), test_executable)
+endforeach
diff --git a/tests/eds/meson.build b/tests/eds/meson.build
new file mode 100644
index 0000000..00b7731
--- /dev/null
+++ b/tests/eds/meson.build
@@ -0,0 +1,75 @@
+eds_tests_deps = [
+ gobject,
+ posix,
+ libebook,
+ libedataserver,
+ libxml,
+ libfolks_dep,
+ libfolks_test_dep,
+ libeds_test_dep,
+ folks_test_dbus,
+ folks_eds_backend_dep,
+]
+
+eds_tests_vala_flags = [
+ '--debug',
+]
+
+
+# First we make the test helpers
+helpers = [
+ 'helper-create-many-contacts',
+ 'helper-delete-contacts',
+ 'helper-prepare-aggregator',
+]
+
+foreach helper: helpers
+ executable(helper,
+ '@0@.vala'.format(helper),
+ dependencies: eds_tests_deps,
+ vala_args: eds_tests_vala_flags,
+ )
+endforeach
+
+# in order from least to most complex
+eds_tests = [
+ 'persona-store-tests',
+ 'individual-retrieval',
+ 'phone-details',
+ 'email-details',
+ 'name-details',
+ 'removing-contacts',
+ 'updating-phones',
+ 'updating-contacts',
+ 'avatar-details',
+ 'add-persona',
+ 'im-details',
+ 'postal-address-details',
+ 'remove-persona',
+ 'set-emails',
+ 'set-im-addresses',
+ 'link-personas',
+ 'add-contacts-stress-test',
+ 'set-properties',
+ 'set-properties-race',
+ 'linkable-properties',
+ 'link-personas-diff-stores',
+ 'store-removed',
+ 'anti-linking',
+ 'enable-disable-stores',
+ 'perf',
+ 'extended-info',
+]
+
+foreach _test: eds_tests
+
+ test_executable = executable('eds-'+_test,
+ '@0@.vala'.format(_test),
+ dependencies: eds_tests_deps,
+ vala_args: eds_tests_vala_flags,
+ )
+
+ test('[EDS backend] @0@'.format(_test), test_executable,
+ is_parallel: false, # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=709119
+ )
+endforeach
diff --git a/tests/key-file/meson.build b/tests/key-file/meson.build
new file mode 100644
index 0000000..57b4a33
--- /dev/null
+++ b/tests/key-file/meson.build
@@ -0,0 +1,30 @@
+# in order from least to most complex
+keyfile_tests = [
+ 'individual-retrieval',
+]
+
+keyfile_tests_deps = [
+ gobject,
+ gio,
+ gee,
+ libfolks_dep,
+ libfolks_test_dep,
+ libkeyfile_test_dep,
+ folks_test_dbus,
+ #folks_keyfile_backend_dep,
+]
+
+keyfile_tests_vala_flags = [
+ '--debug',
+]
+
+foreach _test: keyfile_tests
+
+ test_executable = executable('key-file-'+_test,
+ '@0@.vala'.format(_test),
+ dependencies: keyfile_tests_deps,
+ vala_args: keyfile_tests_vala_flags,
+ )
+
+ test('[Key-file backend] @0@'.format(_test), test_executable)
+endforeach
diff --git a/tests/lib/bluez/meson.build b/tests/lib/bluez/meson.build
new file mode 100644
index 0000000..3b23a18
--- /dev/null
+++ b/tests/lib/bluez/meson.build
@@ -0,0 +1,15 @@
+libbluez_test_sources = [
+ 'test-case.vala',
+ 'backend.vala',
+]
+
+libbluez_test = library('bluez-test',
+ libbluez_test_sources,
+ dependencies: common_test_lib_deps,
+ vala_args: common_test_lib_flags,
+)
+
+libbluez_test_dep = declare_dependency(
+ link_with: libbluez_test,
+ include_directories: include_directories('.'),
+)
diff --git a/tests/lib/dummy/meson.build b/tests/lib/dummy/meson.build
new file mode 100644
index 0000000..ffcfeaa
--- /dev/null
+++ b/tests/lib/dummy/meson.build
@@ -0,0 +1,19 @@
+dummy_test_lib_sources = [
+ 'test-case.vala',
+]
+
+dummy_test_lib_deps = [
+ common_test_lib_deps,
+ folks_dummy_backend_dep,
+]
+
+dummy_test_lib = library('dummy-test',
+ dummy_test_lib_sources,
+ dependencies: dummy_test_lib_deps,
+ vala_args: common_test_lib_flags,
+)
+
+dummy_test_lib_dep = declare_dependency(
+ link_with: dummy_test_lib,
+ include_directories: include_directories('.'),
+)
diff --git a/tests/lib/eds/meson.build b/tests/lib/eds/meson.build
new file mode 100644
index 0000000..ef35689
--- /dev/null
+++ b/tests/lib/eds/meson.build
@@ -0,0 +1,21 @@
+libeds_test_sources = [
+ 'backend.vala',
+ 'test-case.vala',
+]
+
+libeds_test_deps = [
+ common_test_lib_deps,
+ libebook,
+ folks_eds_backend_dep,
+]
+
+libeds_test = library('eds-test',
+ libeds_test_sources,
+ dependencies: libeds_test_deps,
+ vala_args: common_test_lib_flags,
+)
+
+libeds_test_dep = declare_dependency(
+ link_with: libeds_test,
+ include_directories: include_directories('.'),
+)
diff --git a/tests/lib/key-file/meson.build b/tests/lib/key-file/meson.build
new file mode 100644
index 0000000..740b50d
--- /dev/null
+++ b/tests/lib/key-file/meson.build
@@ -0,0 +1,15 @@
+libkeyfile_test_sources = [
+ 'backend.vala',
+ 'test-case.vala',
+]
+
+libkeyfile_test = library('keyfile-test',
+ libkeyfile_test_sources,
+ dependencies: common_test_lib_deps,
+ vala_args: common_test_lib_flags,
+)
+
+libkeyfile_test_dep = declare_dependency(
+ link_with: libkeyfile_test,
+ include_directories: include_directories('.'),
+)
diff --git a/tests/lib/libsocialweb/meson.build b/tests/lib/libsocialweb/meson.build
new file mode 100644
index 0000000..796a396
--- /dev/null
+++ b/tests/lib/libsocialweb/meson.build
@@ -0,0 +1,15 @@
+libsocialweb_test_lib_sources = [
+ 'test-case.vala',
+ 'backend.vala',
+]
+
+libsocialweb_test_lib = library('libsocialweb-test-lib',
+ libsocialweb_test_lib_sources,
+ dependencies: common_test_lib_deps,
+ vala_args: common_test_lib_flags,
+)
+
+libsocialweb_test_lib_dep = declare_dependency(
+ link_with: libsocialweb_test_lib,
+ include_directories: include_directories('.'),
+)
diff --git a/tests/lib/meson.build b/tests/lib/meson.build
new file mode 100644
index 0000000..198155f
--- /dev/null
+++ b/tests/lib/meson.build
@@ -0,0 +1,75 @@
+# The library that is used by the libraries tests
+libfolks_test_sources = [
+ 'disconnection-queue.vala',
+ 'gtestdbus.c',
+ 'haze-remove-directory.c',
+ 'org-freedesktop-dbus-mock.vala',
+ 'test-case-helper.c',
+ 'test-case.vala',
+ 'test-utils.vala',
+]
+
+libfolks_test_deps = [
+ gobject,
+ gio,
+ gee,
+ dbus_glib,
+ libfolks_dep,
+ folks_test_dbus,
+ posix,
+]
+
+libfolks_test_vala_flags = [
+ '--debug',
+ '--pkg', 'build-conf',
+ '-h', 'folks-test-internal.h',
+]
+
+libfolks_test = library('folks-test',
+ libfolks_test_sources,
+ dependencies: libfolks_test_deps,
+ vala_args: libfolks_test_vala_flags,
+)
+
+libfolks_test_dep = declare_dependency(
+ link_with: libfolks_test,
+ include_directories: include_directories('.'),
+)
+
+# Common variables
+common_test_lib_deps = [
+ gobject,
+ libfolks_dep,
+ libfolks_test_dep,
+ folks_test_dbus,
+]
+
+common_test_lib_flags = [
+ '--debug',
+]
+
+# Subdirs
+subdir('dummy')
+subdir('key-file')
+
+if bluez_backend_enabled
+ subdir('bluez')
+endif
+
+# XXX
+# if telepathy_backend_enabled
+# subdir('telepathy/contactlist')
+# subdir('telepathy')
+# endif
+
+if libsocialweb_backend_enabled
+ subdir('libsocialweb')
+endif
+
+if eds_backend_enabled
+ subdir('eds')
+endif
+
+if tracker_backend_enabled
+ subdir('tracker')
+endif
diff --git a/tests/lib/tracker/meson.build b/tests/lib/tracker/meson.build
new file mode 100644
index 0000000..39d021a
--- /dev/null
+++ b/tests/lib/tracker/meson.build
@@ -0,0 +1,15 @@
+tracker_test_lib_sources = [
+ 'test-case.vala',
+ 'backend.vala',
+]
+
+tracker_test_lib = library('tracker-test-lib',
+ tracker_test_lib_sources,
+ dependencies: common_test_lib_deps,
+ vala_args: common_test_lib_flags,
+)
+
+tracker_test_lib_dep = declare_dependency(
+ link_with: tracker_test_lib,
+ include_directories: include_directories('.'),
+)
diff --git a/tests/libsocialweb/meson.build b/tests/libsocialweb/meson.build
new file mode 100644
index 0000000..4f35c3a
--- /dev/null
+++ b/tests/libsocialweb/meson.build
@@ -0,0 +1,22 @@
+# in order from least to most complex
+libsocialweb_tests = [
+ 'dummy-lsw',
+ 'aggregation',
+]
+
+libsocialweb_tests_deps = [
+ common_test_deps,
+ libsocialweb_test_lib_dep,
+ folks_libsocialweb_backend_dep,
+]
+
+
+foreach _test: libsocialweb_tests
+ test_executable = executable('libsocialweb-'+_test,
+ '@0@.vala'.format(_test),
+ dependencies: libsocialweb_tests_deps,
+ vala_args: common_test_vala_flags,
+ )
+
+ test('[Libsocialweb backend] @0@'.format(_test), test_executable)
+endforeach
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..0a992e6
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,47 @@
+# A VAPI for common dbus tests
+folks_test_dbus = valac.find_library('folks-test-dbus',
+ dirs: join_paths(meson.current_source_dir(), 'lib')
+)
+
+# Test data
+# subdir('data')
+# subdir('tools') XXX what needs to happen here?
+
+# Libraries for the tests
+subdir('lib')
+
+# Common variables
+common_test_deps = [
+ libfolks_dep,
+ libfolks_test_dep,
+ folks_test_dbus,
+]
+
+common_test_vala_flags = [
+ '--debug',
+]
+
+# The tests, grouped in a dir by backend
+subdir('dummy')
+subdir('key-file')
+
+if bluez_backend_enabled
+ subdir('bluez')
+endif
+
+# if telepathy_backend_enabled
+# subdir('folks')
+# subdir('telepathy')
+# endif
+
+if libsocialweb_backend_enabled
+ subdir('libsocialweb')
+endif
+
+if eds_backend_enabled
+ subdir('eds')
+endif
+
+if tracker_backend_enabled
+ subdir('tracker')
+endif
diff --git a/tests/tracker/meson.build b/tests/tracker/meson.build
new file mode 100644
index 0000000..cd9f0d0
--- /dev/null
+++ b/tests/tracker/meson.build
@@ -0,0 +1,78 @@
+# in order from least to most complex
+tracker_tests = [
+ 'individual-retrieval',
+ 'name-details-interface',
+ 'avatar-details-interface',
+ 'im-details-interface',
+ 'phone-details-interface',
+ 'email-details-interface',
+ 'url-details-interface',
+ 'favourite-details-interface',
+ 'fullname-updates',
+ 'add-contact',
+ 'default-contact',
+ 'remove-contact',
+ 'nickname-updates',
+ 'family-name-updates',
+ 'given-name-updates',
+ 'additional-names-updates',
+ 'prefix-name-updates',
+ 'suffix-name-updates',
+ 'website-updates',
+ 'favourite-updates',
+ 'emails-updates',
+ 'phones-updates',
+ 'imaddresses-updates',
+ 'role-details-interface',
+ 'birthday-details-interface',
+ 'birthday-updates',
+ 'note-details-interface',
+ 'gender-details-interface',
+ 'postal-address-details-interface',
+ 'avatar-updates',
+ 'add-persona',
+ 'remove-persona',
+ 'set-nickname',
+ 'set-favourite',
+ 'set-phones',
+ 'set-emails',
+ 'set-avatar',
+ 'set-structured-name',
+ 'set-full-name',
+ 'set-urls',
+ 'set-im-addresses',
+ 'set-postal-addresses',
+ 'set-roles',
+ 'set-notes',
+ 'set-birthday',
+ 'set-gender',
+ 'link-personas',
+ 'duplicated-emails',
+ 'duplicated-phones',
+ 'link-personas-via-local-ids',
+ 'match-im-addresses',
+ 'match-email-addresses',
+ 'match-known-emails',
+ 'match-phone-number',
+ 'match-name',
+ 'match-all',
+ 'set-duplicate-email',
+ 'set-null-avatar',
+]
+
+tracker_tests_deps = [
+ common_test_deps,
+ tracker_test_lib_dep,
+ folks_tracker_backend_dep,
+]
+
+
+foreach _test: tracker_tests
+ test_executable = executable('tracker-'+_test,
+ '@0@.vala'.format(_test),
+ dependencies: tracker_tests_deps,
+ vala_args: common_test_vala_flags,
+ )
+
+ test('[Tracker backend] @0@'.format(_test), test_executable)
+endforeach
diff --git a/tools/inspect/meson.build b/tools/inspect/meson.build
new file mode 100644
index 0000000..cd34960
--- /dev/null
+++ b/tools/inspect/meson.build
@@ -0,0 +1,41 @@
+folks_inspect_sources = [
+ 'command-backends.vala',
+ 'command-debug.vala',
+ 'command-help.vala',
+ 'command-individuals.vala',
+ 'command-linking.vala',
+ 'command-persona-stores.vala',
+ 'command-personas.vala',
+ 'command-quit.vala',
+ 'command-search.vala',
+ 'command-set.vala',
+ 'command-signals.vala',
+ 'inspect.vala',
+ 'signal-manager.vala',
+ 'utils.vala',
+]
+
+folks_inspect_deps = [
+ gobject,
+ libfolks_dep,
+ posix,
+ readline,
+ gio,
+ gee,
+]
+
+folks_inspect_vala_flags = [
+ '--pkg', 'build-conf',
+]
+
+folks_inspect_c_flags = [
+ '-include', 'config.h',
+]
+
+folks_inspect = executable('folks-inspect',
+ folks_inspect_sources,
+ dependencies: folks_inspect_deps,
+ vala_args: folks_inspect_vala_flags,
+ c_args: folks_inspect_c_flags,
+ include_directories: config_h_dir,
+)
diff --git a/tools/meson.build b/tools/meson.build
new file mode 100644
index 0000000..c49eeab
--- /dev/null
+++ b/tools/meson.build
@@ -0,0 +1,32 @@
+# folks-inspect
+subdir('inspect')
+
+# folks-import
+folks_import_sources = [
+ 'import.vala',
+ 'import-pidgin.vala',
+]
+
+folks_import_deps = [
+ gee,
+ gobject,
+ glib,
+ libfolks_dep,
+ libxml,
+]
+
+folks_import_vala_flags = [
+ '--pkg', 'build-conf',
+]
+
+folks_import_c_flags = [
+ '-include', 'config.h',
+]
+
+folks_import = executable('folks-import',
+ folks_import_sources,
+ dependencies: folks_import_deps,
+ vala_args: folks_import_vala_flags,
+ c_args: folks_import_c_flags,
+ include_directories: config_h_dir,
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]