[gnome-online-accounts/wip/inigomartinez/meson: 2/3] build: Port to meson build system
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/wip/inigomartinez/meson: 2/3] build: Port to meson build system
- Date: Wed, 13 Sep 2017 16:29:20 +0000 (UTC)
commit 8c7c500c97725afea3dde190debb1e7e950a3b90
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Mon Sep 11 11:41:58 2017 +0200
build: Port to meson build system
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
https://bugzilla.gnome.org/show_bug.cgi?id=787634
Makefile.am | 6 +
data/Makefile.am | 1 +
data/icons/Makefile.am | 2 +
data/icons/meson.build | 34 +++
data/meson.build | 37 +++
doc/Makefile.am | 1 +
doc/meson.build | 64 +++++
meson.build | 570 +++++++++++++++++++++++++++++++++++++++++++
meson_options.txt | 33 +++
meson_post_install.py | 16 ++
po/meson.build | 1 +
src/Makefile.am | 2 +
src/daemon/Makefile.am | 4 +-
src/daemon/meson.build | 21 ++
src/examples/Makefile.am | 2 +
src/examples/meson.build | 22 ++
src/goa/Makefile.am | 1 +
src/goa/goaconfig.h.in | 17 ++
src/goa/meson.build | 141 +++++++++++
src/goabackend/Makefile.am | 2 +
src/goabackend/meson.build | 202 +++++++++++++++
src/goaidentity/Makefile.am | 2 +
src/goaidentity/meson.build | 90 +++++++
src/meson.build | 19 ++
24 files changed, 1289 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 11e7b87..a3beaf3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,12 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
DISTCHECK_CONFIGURE_FLAGS=--enable-introspection --enable-gtk-doc --enable-telepathy
+EXTRA_DIST = \
+ meson.build \
+ meson_options.txt \
+ meson_post_install.py \
+ po/meson.build
+
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
diff --git a/data/Makefile.am b/data/Makefile.am
index e4277bc..b32f6f6 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -28,6 +28,7 @@ EXTRA_DIST = \
dbus-interfaces.xml \
org.gnome.Identity.service.in \
org.gnome.OnlineAccounts.service.in \
+ meson.build \
$(NULL)
DISTCLEANFILES = \
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index f610e85..f707a16 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,6 +1,8 @@
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 96x96 256x256
+EXTRA_DIST = meson.build
+
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
update-icon-cache:
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..866e2f9
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,34 @@
+icon_data = [
+ 'goa-account-facebook.png',
+ 'goa-account-flickr.png',
+ 'goa-account-foursquare.png',
+ 'goa-account-google.png',
+ 'goa-account-msn.png',
+ 'goa-account-owncloud.png',
+ 'goa-account.png',
+ 'goa-account-pocket.png',
+ 'goa-account-todoist.png'
+]
+
+icon_data_256 = ['goa-account.png']
+
+icons = [
+ ['16x16', icon_data],
+ ['22x22', icon_data],
+ ['24x24', icon_data],
+ ['32x32', icon_data],
+ ['48x48', icon_data],
+ ['96x96', icon_data],
+ ['256x256', icon_data_256]
+]
+
+foreach icon: icons
+ icon_dir = join_paths(goa_datadir, 'icons', 'hicolor', icon[0], 'apps')
+
+ foreach data: icon[1]
+ install_data(
+ join_paths(icon[0], data),
+ install_dir: icon_dir
+ )
+ endforeach
+endforeach
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..c2096ab
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,37 @@
+subdir('icons')
+
+if enable_backend
+ schema_conf = configuration_data()
+ schema_conf.set('GETTEXT_PACKAGE', goa_name)
+
+ schema = 'org.gnome.online-accounts.gschema.xml'
+
+ configure_file(
+ input: schema + '.in',
+ output: schema,
+ install: true,
+ install_dir: join_paths(goa_datadir, 'glib-2.0', 'schemas'),
+ configuration: schema_conf
+ )
+endif
+
+services = ['org.gnome.OnlineAccounts.service']
+
+if have_kerberos
+ services += 'org.gnome.Identity.service'
+endif
+
+foreach service: services
+ service_conf = configuration_data()
+ service_conf.set('libexecdir', goa_libexecdir)
+
+ configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(goa_datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+ )
+endforeach
+
+dbus_interfaces = files('dbus-interfaces.xml')
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 0631321..a266ca0 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -56,6 +56,7 @@ expand_content_files = \
$(NULL)
extra_files = \
+ meson.build \
$(NULL)
man_MANS =
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..83abc20
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,64 @@
+if enable_gtk_doc
+ # FIXME: workaround due to problems when generating a new goa.types file
+ install_data(
+ 'goa.types',
+ install_dir: meson.current_build_dir()
+ )
+
+ version_conf = configuration_data()
+ version_conf.set('VERSION', goa_version)
+
+ version_xml = 'version.xml'
+
+ configure_file(
+ input: version_xml + '.in',
+ output: version_xml,
+ configuration: version_conf
+ )
+
+ if enable_backend
+ dep = libgoa_backend_dep
+ else
+ dep = libgoa_dep
+ endif
+
+ doc_path = join_paths(goa_datadir, 'gtk-doc', 'html', goa_short_name)
+
+ gnome.gtkdoc(
+ goa_short_name,
+ main_xml: goa_short_name + '-docs.xml',
+ src_dir: src_inc,
+ dependencies: dep,
+ mkdb_args: [
+ '--name-space=' + goa_short_name,
+ '--sgml-mode',
+ '--output-format=xml'
+ ],
+ gobject_typesfile: goa_short_name + '.types',
+ install: true,
+ install_dir: doc_path
+ )
+endif
+
+if get_option('enable-documentation')
+ xsltproc_cmd = [
+ find_program('xsltproc'),
+ '--output', '@OUTPUT@',
+ '--nonet',
+ '--stringparam', 'man.output.quietly', '1',
+ '--stringparam', 'funcsynopsis.style', 'ansi',
+ 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@'
+ ]
+
+ man = 'goa-daemon'
+
+ custom_target(
+ man + '.8',
+ input: man + '.xml',
+ output: man + '.8',
+ command: xsltproc_cmd,
+ install: true,
+ install_dir: join_paths(goa_mandir, 'man8')
+ )
+endif
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..a5e4d4c
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,570 @@
+project(
+ 'GNOME Online Accounts', 'c',
+ version: '3.26.0',
+ license: 'LGPL2+',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'warning_level=1'
+ ],
+ meson_version: '>= 0.43.0'
+)
+
+goa_name = 'gnome-online-accounts'
+
+goa_version = meson.project_version()
+version_array = goa_version.split('.')
+goa_major_version = version_array[0].to_int()
+goa_minor_version = version_array[1].to_int()
+goa_micro_version = version_array[2].to_int()
+
+goa_short_name = 'goa'
+goa_api_version = '1.0'
+goa_api_name = '@0@-@1@'.format(goa_short_name, goa_api_version)
+goa_backend_api_name = '@0@-backend-@1@'.format(goa_short_name, goa_api_version)
+
+goa_gir_name = 'Goa'
+goa_gir_version = '1.0'
+
+goa_prefix = get_option('prefix')
+goa_bindir = join_paths(goa_prefix, get_option('bindir'))
+goa_datadir = join_paths(goa_prefix, get_option('datadir'))
+goa_includedir = join_paths(goa_prefix, get_option('includedir'))
+goa_libdir = join_paths(goa_prefix, get_option('libdir'))
+goa_libexecdir = join_paths(goa_prefix, get_option('libexecdir'))
+goa_localedir = join_paths(goa_prefix, get_option('localedir'))
+goa_localstatedir = join_paths(goa_prefix, get_option('localstatedir'))
+goa_mandir = join_paths(goa_prefix, get_option('mandir'))
+goa_sbindir = join_paths(goa_prefix, get_option('sbindir'))
+goa_sysconfdir = join_paths(goa_prefix, get_option('sysconfdir'))
+
+goa_pkgdatadir = join_paths(goa_datadir, goa_name)
+goa_pkgincludedir = join_paths(goa_includedir, goa_api_name)
+goa_pkglibdir = join_paths(goa_libdir, goa_api_name)
+
+# Before making a release, the LT_VERSION string should be modified.
+# The string is of the form C:R:A.
+# - If interfaces have been changed or added, but binary compatibility has
+# been preserved, change to C+1:0:A+1
+# - If binary compatibility has been broken (eg removed or changed interfaces)
+# change to C+1:0:0
+# - If the interface is the same as the previous version, change to C:R+1:A
+#
+# libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
+goa_libversion = '0.0.0'
+goa_backend_libversion = '1.0.0'
+
+goa_debug = get_option('buildtype').contains('debug')
+
+cc = meson.get_compiler('c')
+
+config_h = configuration_data()
+
+# quoted defines
+set_defines = [
+ # package
+ ['PACKAGE', goa_name],
+ ['PACKAGE_BUGREPORT', 'https://bugzilla.gnome.org/enter_bug.cgi?product=' + goa_name],
+ ['PACKAGE_NAME', meson.project_name()],
+ ['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), goa_version)],
+ ['PACKAGE_TARNAME', goa_name],
+ ['PACKAGE_URL', 'https://wiki.gnome.org/Projects/GnomeOnlineAccounts'],
+ ['PACKAGE_VERSION', goa_version],
+ ['VERSION', goa_version],
+ # i18n
+ ['GETTEXT_PACKAGE', goa_name]
+]
+
+foreach define: set_defines
+ config_h.set_quoted(define[0], define[1])
+endforeach
+
+# version values
+config_h.set('GOA_MAJOR_VERSION', goa_major_version)
+config_h.set('GOA_MINOR_VERSION', goa_minor_version)
+config_h.set('GOA_MICRO_VERSION', goa_micro_version)
+
+# debug options
+config_h.set('GNOME_ENABLE_DEBUG', goa_debug)
+config_h.set('NDEBUG', not goa_debug)
+
+# headers
+check_headers = [
+ ['HAVE_DLFCN_H', 'dlfcn.h'],
+ ['HAVE_INTTYPES_H', 'inttypes.h'],
+ ['HAVE_LOCALE_H', 'locale.h'],
+ ['HAVE_MEMORY_H', 'memory.h'],
+ ['HAVE_STDINT_H', 'stdint.h'],
+ ['HAVE_STDLIB_H', 'stdlib.h'],
+ ['HAVE_STRINGS_H', 'strings.h'],
+ ['HAVE_STRING_H', 'string.h'],
+ ['HAVE_SYS_STAT_H', 'sys/stat.h'],
+ ['HAVE_SYS_TYPES_H', 'sys/types.h'],
+ ['HAVE_UNISTD_H', 'unistd.h']
+]
+
+foreach header: check_headers
+ config_h.set(header[0], cc.has_header(header[1]))
+endforeach
+
+# functions
+check_functions = [
+ # i18n
+ ['HAVE_DCGETTEXT', 'dcgettext'],
+ ['HAVE_GETTEXT', 'gettext'],
+ ['HAVE_ICONV', 'iconv']
+]
+
+if host_machine.system().contains('darwin')
+ check_functions += [
+ ['HAVE_CFLOCALECOPYCURRENT', 'CFLocaleCopyCurrent'],
+ ['HAVE_CFPREFERENCESCOPYAPPVALUE', 'CFPreferencesCopyAppValue']
+ ]
+endif
+
+foreach func: check_functions
+ config_h.set(func[0], cc.has_function(func[1]))
+endforeach
+
+# symbols
+check_symbols = [
+ # i18n
+ ['HAVE_LC_MESSAGES', 'locale.h', 'LC_MESSAGES'],
+ ['HAVE_BIND_TEXTDOMAIN_CODESET', 'libintl.h', 'bind_textdomain_codeset']
+]
+
+foreach symbol: check_symbols
+ config_h.set(symbol[0], cc.has_header_symbol(symbol[1], symbol[2]))
+endforeach
+
+# compiler flags
+common_flags = [
+ '-DHAVE_CONFIG_H',
+ '-DPACKAGE_LIBEXEC_DIR="@0@"'.format(goa_libexecdir),
+ '-DPACKAGE_SYSCONF_DIR="@0@"'.format(goa_sysconfdir),
+ '-DPACKAGE_DATA_DIR="@0@"'.format(goa_pkgdatadir),
+ '-DPACKAGE_BIN_DIR="@0@"'.format(goa_bindir),
+ '-DPACKAGE_LOCALSTATE_DIR="@0@"'.format(goa_localstatedir),
+ '-DPACKAGE_LOCALE_DIR="@0@"'.format(goa_localedir),
+ '-DPACKAGE_LIB_DIR="@0@"'.format(goa_libdir),
+ '-D_POSIX_PTHREAD_SEMANTICS',
+ '-D_REENTRANT'
+]
+compiler_flags = []
+
+if goa_debug
+ test_flags = [
+ '-Werror=format=2',
+ '-Werror=implicit-function-declaration',
+ '-Werror=init-self',
+ '-Werror=missing-include-dirs',
+ '-Werror=missing-prototypes',
+ '-Werror=pointer-arith',
+ '-Werror=return-type',
+ '-Wnested-externs',
+ '-Wstrict-prototypes'
+ ]
+
+ foreach flag: test_flags
+ if cc.has_argument(flag)
+ compiler_flags += [flag]
+ endif
+ endforeach
+endif
+
+add_project_arguments(common_flags + compiler_flags, language: 'c')
+
+# Libraries
+# introspection support
+enable_introspection = get_option('enable-introspection')
+have_gir = false
+
+if enable_introspection != 'no'
+ gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.6.7', required: (enable_introspection ==
'yes'))
+ have_gir = gir_dep.found()
+endif
+
+# Telepathy
+enable_telepathy = get_option('enable-telepathy')
+config_h.set('GOA_TELEPATHY_ENABLED', enable_telepathy,
+ description: 'Enable Telepathy data provider')
+
+enable_backend = get_option('enable-backend')
+config_h.set('GOA_BACKEND_ENABLED', enable_backend,
+ description: 'Enable goabackend library')
+
+enable_inspector = get_option('enable-inspector')
+config_h.set('GOA_INSPECTOR_ENABLED', enable_inspector,
+ description: 'Enable a WebKitWebInspector for the embedded web view')
+
+template_file = get_option('with-template-file').strip()
+config_h.set_quoted('GOA_TEMPLATE_FILE', template_file,
+ description: 'Path to the template file')
+
+# service providers
+goa_name_desc = 'ProviderType and extension point name'
+
+# Microsoft Exchange
+enable_exchange = get_option('enable-exchange')
+if enable_exchange
+ config_h.set_quoted('GOA_EXCHANGE_NAME', 'exchange', description: goa_name_desc)
+endif
+config_h.set('GOA_EXCHANGE_ENABLED', enable_exchange,
+ description: 'Enable Microsoft Exchange data provider')
+
+enable_flickr = get_option('enable-flickr')
+if enable_flickr
+ config_h.set_quoted('GOA_FLICKR_NAME', 'flickr', description: goa_name_desc)
+
+ flickr_consumer_key = get_option('with-flickr-consumer-key').strip()
+ if flickr_consumer_key == ''
+ flickr_consumer_key = 'ed00ad7e0869897506e23c0d18e34d01'
+ endif
+ config_h.set_quoted('GOA_FLICKR_CONSUMER_KEY', flickr_consumer_key,
+ description: 'Flickr OAuth 1.0 consumer key')
+
+ flickr_consumer_secret = get_option('with-flickr-consumer-secret').strip()
+ if flickr_consumer_secret == ''
+ flickr_consumer_secret = 'ebd556dd187188b1'
+ endif
+ config_h.set_quoted('GOA_FLICKR_CONSUMER_SECRET', flickr_consumer_secret,
+ description: 'Flickr OAuth 1.0 consumer secret')
+endif
+
+config_h.set('GOA_FLICKR_ENABLED', enable_flickr,
+ description: 'Enable Flickr data provider')
+
+# Foursquare
+enable_foursquare = get_option('enable-foursquare')
+if enable_foursquare
+ config_h.set_quoted('GOA_FOURSQUARE_NAME', 'foursquare', description: goa_name_desc)
+
+ foursquare_client_id = get_option('with-foursquare-client-id').strip()
+ if foursquare_client_id == ''
+ foursquare_client_id = 'MBNU2NES5HASNDQJ25YPFGG2UGRZHPI3IYTNJGE0KIWT2HCF'
+ endif
+ config_h.set_quoted('GOA_FOURSQUARE_CLIENT_ID', foursquare_client_id,
+ description: 'Foursquare OAuth 2.0 client id')
+endif
+
+config_h.set('GOA_FOURSQUARE_ENABLED', enable_foursquare,
+ description: 'Enable Foursquare data provider')
+
+# Google
+enable_google = get_option('enable-google')
+if enable_google
+ config_h.set_quoted('GOA_GOOGLE_NAME', 'google', description: goa_name_desc)
+
+ google_client_id = get_option('with-google-client-id').strip()
+ if google_client_id == ''
+ google_client_id = '44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s.apps.googleusercontent.com'
+ endif
+ config_h.set_quoted('GOA_GOOGLE_CLIENT_ID', google_client_id,
+ description: 'Google OAuth 2.0 client id')
+
+ google_client_secret = get_option('with-google-client-secret').strip()
+ if google_client_secret == ''
+ google_client_secret = '-gMLuQyDiI0XrQS_vx_mhuYF'
+ endif
+ config_h.set_quoted('GOA_GOOGLE_CLIENT_SECRET', google_client_secret,
+ description: 'Google OAuth 2.0 client secret')
+endif
+
+config_h.set('GOA_GOOGLE_ENABLED', enable_google,
+ description: 'Enable Google data provider')
+
+# IMAP/SMTP
+enable_imap_smtp = get_option('enable-imap-smtp')
+if enable_imap_smtp
+ config_h.set_quoted('GOA_IMAP_SMTP_NAME', 'imap_smtp', description: goa_name_desc)
+endif
+
+config_h.set('GOA_IMAP_SMTP_ENABLED', enable_imap_smtp,
+ description: 'Enable IMAP/SMTP data provider')
+
+# Media Server
+enable_media_server = get_option('enable-media-server')
+if enable_media_server
+ config_h.set_quoted('GOA_MEDIA_SERVER_NAME', 'media-server', description: goa_name_desc)
+endif
+
+config_h.set('GOA_MEDIA_SERVER_ENABLED', enable_media_server,
+ description: 'Enable Media Server provider')
+
+# ownCloud
+enable_owncloud = get_option('enable-owncloud')
+if enable_owncloud
+ config_h.set_quoted('GOA_OWNCLOUD_NAME', 'owncloud', description: goa_name_desc)
+endif
+
+config_h.set('GOA_OWNCLOUD_ENABLED', enable_owncloud,
+ description: 'Enable ownCloud data provider')
+
+
+# Facebook
+enable_facebook = get_option('enable-facebook')
+if enable_facebook
+ config_h.set_quoted('GOA_FACEBOOK_NAME', 'facebook', description: goa_name_desc)
+
+ facebook_client_id = get_option('with-facebook-client-id').strip()
+ if facebook_client_id == ''
+ facebook_client_id = '297654143624603'
+ endif
+ config_h.set_quoted('GOA_FACEBOOK_CLIENT_ID', facebook_client_id,
+ description: 'Facebook OAuth 2.0 client id')
+endif
+
+config_h.set('GOA_FACEBOOK_ENABLED', enable_facebook,
+ description: 'Enable Facebook data provider')
+
+# Todoist
+enable_todoist = get_option('enable-todoist')
+if enable_todoist
+ config_h.set_quoted('GOA_TODOIST_NAME', 'todoist', description: goa_name_desc)
+
+ todoist_client_id = get_option('with-todoist-client-id').strip()
+ if todoist_client_id == ''
+ todoist_client_id = '2e41575c1dd74f98ad7cfb178e1ba3dd'
+ endif
+ config_h.set_quoted('GOA_TODOIST_CLIENT_ID', todoist_client_id,
+ description: 'Todoist OAuth 2.0 client id')
+
+ todoist_client_secret = get_option('with-todoist-client-secret').strip()
+ if todoist_client_secret == ''
+ todoist_client_secret = '3e59831ffdd64633918d19aa0a1efd2b'
+ endif
+ config_h.set_quoted('GOA_TODOIST_CLIENT_SECRET', todoist_client_secret,
+ description: 'Todoist client secret')
+endif
+
+config_h.set('GOA_TODOIST_ENABLED', enable_todoist,
+ description: 'Enable Todoist data provider')
+
+# Windows Live
+enable_windows_live = get_option('enable-windows-live')
+if enable_windows_live
+ config_h.set_quoted('GOA_WINDOWS_LIVE_NAME', 'windows_live', description: goa_name_desc)
+
+ windows_live_client_id = get_option('with-windows-live-client-id').strip()
+ if windows_live_client_id == ''
+ windows_live_client_id = '0000000044067703'
+ endif
+ config_h.set_quoted('GOA_WINDOWS_LIVE_CLIENT_ID', windows_live_client_id,
+ description: 'Windows Live OAuth 2.0 client id')
+endif
+
+config_h.set('GOA_WINDOWS_LIVE_ENABLED', enable_windows_live,
+ description: 'Enable Windows Live data provider')
+
+# Pocket
+enable_pocket = get_option('enable-pocket')
+if enable_pocket
+ config_h.set_quoted('GOA_POCKET_NAME', 'pocket', description: goa_name_desc)
+
+ pocket_client_id = get_option('with-pocket-client-id').strip()
+ if pocket_client_id == ''
+ pocket_client_id = '16630-40b25246b56e8ad5310b2883'
+ endif
+ config_h.set_quoted('GOA_POCKET_CLIENT_ID', pocket_client_id,
+ description: 'Pocket OAuth 2.0 client id')
+endif
+
+config_h.set('GOA_POCKET_ENABLED', enable_pocket,
+ description: 'Enable Pocket data provider')
+
+# Kerberos
+enable_kerberos = get_option('enable-kerberos')
+have_kerberos = false
+
+if enable_kerberos != 'no'
+ krb5_dep = dependency('krb5', required: false)
+ if krb5_dep.found()
+ gcr_dep = dependency('gcr-3', required: false)
+ have_kerberos = gcr_dep.found()
+
+ if have_kerberos
+ config_h.set_quoted('GOA_KERBEROS_NAME', 'kerberos', description: goa_name_desc)
+ config_h.set('GCR_API_SUBJECT_TO_CHANGE', true,
+ description: 'Define to use the GCR API')
+ endif
+ endif
+
+ assert(have_kerberos or enable_kerberos != 'yes', 'kerberos support requested, but not available')
+endif
+
+config_h.set('GOA_KERBEROS_ENABLED', enable_kerberos,
+ description: 'Enable Kerberos data provider')
+
+# Last.fm
+enable_lastfm = get_option('enable-lastfm')
+if enable_lastfm
+ config_h.set_quoted('GOA_LASTFM_NAME', 'lastfm', description: goa_name_desc)
+
+ lastfm_client_id = get_option('with-lastfm-client-id').strip()
+ if lastfm_client_id == ''
+ lastfm_client_id = '7a2461fe34c9c8124fb28ac750ba12fa'
+ endif
+ config_h.set_quoted('GOA_LASTFM_CLIENT_ID', lastfm_client_id,
+ description: 'LastFM client id')
+
+ lastfm_client_secret = get_option('with-lastfm-client-secret').strip()
+ if lastfm_client_secret == ''
+ lastfm_client_secret = '49ec391644459c417f3afe57ca246c5a'
+ endif
+ config_h.set_quoted('GOA_LASTFM_CLIENT_SECRET', lastfm_client_secret,
+ description: 'LastFM client secret')
+endif
+
+config_h.set('GOA_LASTFM_ENABLED', enable_todoist,
+ description: 'Enable LastFM data provider')
+
+# Optional timerfd support
+timerfd_support = '''
+ #include <sys/timerfd.h>
+ #include <unistd.h>
+ int
+ main (void)
+ {
+ struct itimerspec timer_spec = { 0 };
+ timerfd_settime (timerfd_create (CLOCK_MONOTONIC, TFD_CLOEXEC),
+ TFD_TIMER_ABSTIME,
+ &timer_spec,
+ NULL);
+
+ return 0;
+ };
+'''
+
+have_timerfd = cc.compiles(timerfd_support)
+message('timerfd support: ' + have_timerfd.to_string())
+config_h.set('HAVE_TIMERFD', have_timerfd,
+ description: 'have timerfd support')
+
+if have_timerfd
+ # libc headers tend to trail kernel support
+ # so compensate if necessary
+ timerfd_cancel_on_set_support = '''
+ #include <sys/timerfd.h>
+ #include <unistd.h>
+ int
+ main (void)
+ {
+ struct itimerspec timer_spec = { 0 };
+ timerfd_settime (timerfd_create (CLOCK_MONOTONIC, TFD_CLOEXEC),
+ TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET,
+ &timer_spec,
+ NULL);
+
+ return 0;
+ };
+ '''
+ have_timerfd_cancel_on_set = cc.compiles(timerfd_cancel_on_set_support)
+ message('timerfd cancel-on-set support ' + have_timerfd_cancel_on_set.to_string())
+ if not have_timerfd_cancel_on_set
+ config_h.set('TFD_TIMER_CANCEL_ON_SET', '(1 << 1)',
+ description: 'have timerfd cancel on set support')
+ endif
+endif
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+top_inc = include_directories('.')
+
+subdir('data')
+subdir('src')
+
+enable_gtk_doc = get_option('enable-gtk-doc')
+if enable_backend
+ subdir('doc')
+endif
+
+subdir('po')
+
+meson.add_install_script(
+ 'meson_post_install.py',
+ goa_datadir,
+ enable_backend ? 'compile-schemas' : ''
+)
+
+output = '\n gnome-online-accounts ' + goa_version + '\n'
+output += ' =============================\n'
+output += ' prefix: ' + goa_prefix + '\n'
+output += ' libdir: ' + goa_libdir + '\n'
+output += ' libexecdir: ' + goa_libexecdir + '\n'
+output += ' bindir: ' + goa_bindir + '\n'
+output += ' sbindir: ' + goa_sbindir + '\n'
+output += ' datadir: ' + goa_datadir + '\n'
+output += ' sysconfdir: ' + goa_sysconfdir + '\n'
+output += ' localstatedir: ' + goa_localstatedir + '\n\n'
+output += ' compiler: ' + cc.get_id() + '\n'
+output += ' cflags: ' + ' '.join(compiler_flags) + '\n\n'
+output += ' backend: ' + enable_backend.to_string() + '\n'
+output += ' inspector: ' + enable_inspector.to_string() + '\n'
+output += ' introspection: ' + have_gir.to_string() + '\n'
+output += ' template file: ' + template_file + '\n\n'
+
+output += ' Flickr provider: ' + enable_flickr.to_string()
+if enable_flickr
+ output += ' (OAuth 1.0, key:' + flickr_consumer_key + ')'
+endif
+output += '\n'
+
+output += ' Foursquare provider: ' + enable_foursquare.to_string()
+if enable_foursquare
+ output += ' (id:' + foursquare_client_id + ')'
+endif
+output += '\n'
+
+output += ' Google provider: ' + enable_google.to_string()
+if enable_google
+ output += ' (OAuth 2.0, id:' + google_client_id + ' secret:' + google_client_secret + ')'
+endif
+output += '\n'
+
+output += ' IMAP/SMTP provider: ' + enable_imap_smtp.to_string() + '\n'
+output += ' Media Server provider: ' + enable_media_server.to_string() + '\n'
+output += ' Microsoft Exchange provider: ' + enable_exchange.to_string() + '\n'
+output += ' ownCloud provider: ' + enable_owncloud.to_string() + '\n'
+output += ' Kerberos provider: ' + have_kerberos.to_string() + '\n'
+
+output += ' Facebook provider: ' + enable_facebook.to_string()
+if enable_facebook
+ output += ' (OAuth 2.0, id:' + facebook_client_id + ')'
+endif
+output += '\n'
+
+output += ' Todoist provider: ' + enable_todoist.to_string()
+if enable_todoist
+ output += ' (OAuth 2.0, id:' + todoist_client_id + ' secret:' + todoist_client_secret + ')'
+endif
+output += '\n'
+
+output += ' Windows Live provider: ' + enable_windows_live.to_string()
+if enable_windows_live
+ output += ' (OAuth 2.0, id:' + windows_live_client_id + ')'
+endif
+output += '\n'
+
+output += ' Telepathy provider: ' + enable_telepathy.to_string() + '\n'
+
+output += ' Pocket provider: ' + enable_pocket.to_string()
+if enable_pocket
+ output += ' (id:' + pocket_client_id + ')'
+endif
+output += '\n'
+
+output += ' Last.fm provider: ' + enable_lastfm.to_string()
+if enable_lastfm
+ output += ' (id:' + lastfm_client_id + ' secret:' + lastfm_client_secret + ')'
+endif
+output += '\n\n'
+
+output += ' Debug mode: ' + goa_debug.to_string() + '\n'
+output += ' Building api docs: ' + enable_gtk_doc.to_string()
+message(output)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..c3fe1ab
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,33 @@
+option('enable-telepathy', type: 'boolean', value: false, description: 'Enable Telepathy IM provider')
+option('enable-backend', type: 'boolean', value: false, description: 'Enable goabackend library')
+option('enable-inspector', type: 'boolean', value: false, description: 'Enable a WebKitWebInspector for the
embedded web view')
+option('enable-exchange', type: 'boolean', value: true, description: 'Enable Microsoft Exchange provider')
+option('enable-flickr', type: 'boolean', value: true, description: 'Enable Flickr provider')
+option('enable-foursquare', type: 'boolean', value: true, description: 'Enable Foursquare provider')
+option('enable-google', type: 'boolean', value: true, description: 'Enable Google provider')
+option('enable-imap-smtp', type: 'boolean', value: true, description: 'Enable IMAP/SMTP provider')
+option('enable-media-server', type: 'boolean', value: true, description: 'Enable Media Server provider')
+option('enable-owncloud', type: 'boolean', value: true, description: 'Enable ownCloud provider')
+option('enable-facebook', type: 'boolean', value: true, description: 'Enable Facebook provider')
+option('enable-todoist', type: 'boolean', value: true, description: 'Enable Todoist provider')
+option('enable-windows-live', type: 'boolean', value: true, description: 'Enable Windows Live provider')
+option('enable-pocket', type: 'boolean', value: true, description: 'Enable Pocket provider')
+option('enable-kerberos', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable
kerberos provider')
+option('enable-lastfm', type: 'boolean', value: true, description: 'Enable Last.fm provider')
+option('with-flickr-consumer-key', type: 'string', value: '', description: 'Flickr OAuth 1.0 consumer key')
+option('with-flickr-consumer-secret', type: 'string', value: '', description: 'Flickr OAuth 1.0 consumer
secret')
+option('with-foursquare-client-id', type: 'string', value: '', description: 'Foursquare OAuth 2.0 client id')
+option('with-google-client-id', type: 'string', value: '', description: 'Google OAuth 2.0 client id')
+option('with-google-client-secret', type: 'string', value: '', description: 'Google OAuth 2.0 client secret')
+option('with-facebook-client-id', type: 'string', value: '', description: 'Facebook OAuth 2.0 client id')
+option('with-todoist-client-id', type: 'string', value: '', description: 'Todoist OAuth 2.0 client id')
+option('with-todoist-client-secret', type: 'string', value: '', description: 'Todoist client secret')
+option('with-windows-live-client-id', type: 'string', value: '', description: 'Windows Live OAuth 2.0 client
id')
+option('with-pocket-client-id', type: 'string', value: '', description: 'Pocket OAuth 2.0 client id')
+option('with-lastfm-client-id', type: 'string', value: '', description: 'Last.fm client id')
+option('with-lastfm-client-secret', type: 'string', value: '', description: 'Last.fm client secret')
+option('with-template-file', type: 'string', value: '', description: 'Path to the template file')
+option('enable-documentation', type: 'boolean', value: false, description: 'enable man pages and HTML')
+option('enable-gtk-doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
+option('enable-introspection', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description:
'Enable GObject Introspection (depends on GObject)')
+option('enable-vala', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'build Vala
binding')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..ada3077
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+
+import glob
+import os
+import subprocess
+import sys
+
+if not os.environ.get('DESTDIR'):
+ icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+ if sys.argv[2] == 'compile-schemas':
+ schemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
+ 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..adb016f
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(goa_name, preset: 'glib')
diff --git a/src/Makefile.am b/src/Makefile.am
index 772ce59..8d725a9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,4 +7,6 @@ if BUILD_BACKEND
SUBDIRS += goaidentity goabackend daemon examples
endif
+EXTRA_DIST = meson.build
+
-include $(top_srcdir)/git.mk
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index 5f9a231..ee12fa8 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -21,7 +21,9 @@ AM_CPPFLAGS = \
$(NULL)
BUILT_SOURCES = $(NULL)
-EXTRA_DIST = $(NULL)
+EXTRA_DIST = \
+ meson.build \
+ $(NULL)
libexec_PROGRAMS = goa-daemon
diff --git a/src/daemon/meson.build b/src/daemon/meson.build
new file mode 100644
index 0000000..1a57537
--- /dev/null
+++ b/src/daemon/meson.build
@@ -0,0 +1,21 @@
+sources = files(
+ 'goadaemon.c',
+ 'main.c'
+)
+
+cflags = [
+ '-DG_LOG_DOMAIN="goa-daemon"',
+ '-DGOA_API_IS_SUBJECT_TO_CHANGE',
+ '-DGOA_BACKEND_API_IS_SUBJECT_TO_CHANGE',
+ '-DGOA_BACKEND_COMPILATION'
+]
+
+executable(
+ 'goa-daemon',
+ sources + [backend_enums],
+ include_directories: common_incs,
+ dependencies: libgoa_backend_dep,
+ c_args: cflags,
+ install: true,
+ install_dir: goa_libexecdir
+)
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index 155814e..2247383 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -41,6 +41,8 @@ add_pocket_CFLAGS = $(GLIB_CFLAGS) $(REST_CFLAGS)
add_pocket_LDADD = $(GLIB_LIBS) $(REST_LIBS) ../goa/libgoa-1.0.la
endif
+EXTRA_DIST = meson.build
+
clean-local :
rm -f *~
diff --git a/src/examples/meson.build b/src/examples/meson.build
new file mode 100644
index 0000000..f98d6fd
--- /dev/null
+++ b/src/examples/meson.build
@@ -0,0 +1,22 @@
+programs = [
+ # program name, deps
+ ['list-accounts', [libgoa_dep]],
+ ['lastfm-shout', [libgoa_dep, rest_dep]]
+]
+
+if enable_backend
+ programs += [
+ ['introspect-providers', [gtk_dep, libgoa_backend_dep]],
+ ['list-providers', [gtk_dep, libgoa_backend_dep]],
+ ['add-pocket', [libgoa_dep, rest_dep]]
+ ]
+endif
+
+foreach program: programs
+ executable(
+ program[0],
+ program[0] + '.c',
+ include_directories: common_incs,
+ dependencies: program[1]
+ )
+endforeach
diff --git a/src/goa/Makefile.am b/src/goa/Makefile.am
index 653372e..080c9c3 100644
--- a/src/goa/Makefile.am
+++ b/src/goa/Makefile.am
@@ -25,6 +25,7 @@ AM_CPPFLAGS = \
# ----------------------------------------------------------------------------------------------------
+EXTRA_DIST += meson.build goaconfig.h.in
DISTCLEANFILES += goaconfig-stamp goaconfig.h
BUILT_SOURCES += goaconfig-stamp
configexecincludedir = $(libdir)/goa-1.0/include
diff --git a/src/goa/goaconfig.h.in b/src/goa/goaconfig.h.in
new file mode 100644
index 0000000..65f800c
--- /dev/null
+++ b/src/goa/goaconfig.h.in
@@ -0,0 +1,17 @@
+/* goaconfig.h
+ *
+ * This is a generated file. Please modify 'goaconfig.h.in'
+ */
+
+#ifndef __GOA_CONFIG_H__
+#define __GOA_CONFIG_H__
+
+G_BEGIN_DECLS
+
+#define GOA_MAJOR_VERSION @GOA_MAJOR_VERSION@
+#define GOA_MINOR_VERSION @GOA_MINOR_VERSION@
+#define GOA_MICRO_VERSION @GOA_MICRO_VERSION@
+
+G_END_DECLS
+
+#endif /* __GOA_CONFIG_H__ */
diff --git a/src/goa/meson.build b/src/goa/meson.build
new file mode 100644
index 0000000..81b08d9
--- /dev/null
+++ b/src/goa/meson.build
@@ -0,0 +1,141 @@
+goa_inc = include_directories('.')
+
+enum_headers = files('goaenums.h')
+
+headers = enum_headers + files(
+ 'goaclient.h',
+ 'goaerror.h',
+ 'goa.h',
+ 'goaversion.h'
+)
+
+install_headers(
+ headers,
+ install_dir: join_paths(goa_pkgincludedir, 'goa')
+)
+
+config_conf = configuration_data()
+config_conf.set('GOA_MAJOR_VERSION', goa_major_version)
+config_conf.set('GOA_MINOR_VERSION', goa_minor_version)
+config_conf.set('GOA_MICRO_VERSION', goa_micro_version)
+
+config = 'goaconfig.h'
+
+config_header = configure_file(
+ input: config + '.in',
+ output: config,
+ install: true,
+ install_dir: join_paths(goa_pkglibdir, 'include'),
+ configuration: config_conf
+)
+
+sources = files(
+ 'goaclient.c',
+ 'goaerror.c',
+ 'goaversion.c'
+)
+
+dbus = 'goa-generated'
+
+# FIXME: docbook argument depends on:
+# https://github.com/mesonbuild/meson/pull/2302
+sources += gnome.gdbus_codegen(
+ dbus,
+ dbus_interfaces,
+ interface_prefix: 'org.gnome.OnlineAccounts.',
+ namespace: 'Goa',
+ object_manager: true,
+ docbook: dbus + '-doc',
+ # FIXME: missing install parameters
+ #install: true,
+ #install_dir: join_paths(goa_pkgincludedir, 'goa')
+)
+
+enum = 'goaenumtypes'
+
+sources += gnome.mkenums(
+ enum,
+ sources: enum_headers,
+ c_template: enum + '.c.template',
+ h_template: enum + '.h.template',
+ install_header: true,
+ install_dir: join_paths(goa_pkgincludedir, 'goa')
+)
+
+glib_req_version = '>= 2.52'
+
+deps = [
+ dependency('gio-2.0', version: glib_req_version),
+ dependency('gio-unix-2.0', version: glib_req_version),
+ dependency('glib-2.0', version: glib_req_version)
+]
+
+cflags = [
+ '-DG_LOG_DOMAIN="Goa"',
+ '-DGOA_COMPILATION'
+]
+
+libgoa = shared_library(
+ goa_api_name,
+ sources: sources + [config_header],
+ version: goa_libversion,
+ include_directories: common_incs,
+ dependencies: deps,
+ c_args: cflags,
+ install: true,
+ install_dir: goa_libdir
+)
+
+libgoa_dep = declare_dependency(
+ link_with: libgoa,
+ include_directories: goa_inc,
+ dependencies: deps
+)
+
+pkg.generate(
+ libraries: libgoa,
+ version: goa_version,
+ name: 'Goa',
+ description: 'GNOME Online Accounts Library',
+ filebase: goa_api_name,
+ subdirs: goa_api_name,
+ requires: 'gio-2.0',
+ variables: 'exec_prefix=' + goa_libexecdir,
+ install_dir: join_paths(goa_libdir, 'pkgconfig')
+)
+
+if have_gir
+ gir_sources = sources + headers
+
+ gir_extra_args = cflags + [
+ '--c-include=goa/goa.h',
+ '--warn-all'
+ ]
+
+ gir_dir = join_paths(goa_datadir, 'gir-' + goa_gir_version)
+ typelib_dir = join_paths(goa_libdir, 'girepository-' + goa_gir_version)
+
+ libgoa_gir = gnome.generate_gir(
+ libgoa,
+ sources: gir_sources,
+ includes: 'Gio-2.0',
+ nsversion: goa_api_version,
+ namespace: goa_gir_name,
+ export_packages: goa_api_name,
+ extra_args: gir_extra_args,
+ install: true,
+ install_dir_gir: gir_dir,
+ install_dir_typelib: typelib_dir
+ )
+
+ if get_option('enable-vala') != 'no'
+ gnome.generate_vapi(
+ goa_api_name,
+ sources: libgoa_gir[0],
+ metadata_dirs: meson.current_source_dir(),
+ packages: 'gio-2.0',
+ install: true,
+ install_dir: join_paths(goa_datadir, 'vala', 'vapi')
+ )
+ endif
+endif
diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am
index 7d6340a..465875f 100644
--- a/src/goabackend/Makefile.am
+++ b/src/goabackend/Makefile.am
@@ -26,6 +26,8 @@ AM_CPPFLAGS = \
# ----------------------------------------------------------------------------------------------------
+EXTRA_DIST += meson.build
+
goabackendenumtypes.h: goabackendenums.h goabackendenumtypes.h.template
$(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
cd $(srcdir) && glib-mkenums --template goabackendenumtypes.h.template goabackendenums.h ) > \
diff --git a/src/goabackend/meson.build b/src/goabackend/meson.build
new file mode 100644
index 0000000..8a4ae68
--- /dev/null
+++ b/src/goabackend/meson.build
@@ -0,0 +1,202 @@
+enum_headers = files('goabackendenums.h')
+
+headers = enum_headers + files(
+ 'goabackend.h',
+ 'goaprovider.h'
+)
+
+install_headers(
+ headers,
+ install_dir: join_paths(goa_pkgincludedir, 'goabackend')
+)
+
+enum = 'goabackendenumtypes'
+
+backend_enums = gnome.mkenums(
+ enum,
+ sources: enum_headers,
+ c_template: enum + '.c.template',
+ h_template: enum + '.h.template',
+ install_header: true,
+ install_dir: join_paths(goa_pkgincludedir, 'goabackend')
+)
+
+sources = identity_manager_error_src + files(
+ 'goabackendinit.c',
+ 'goadlnaservermanager.c',
+ 'goaewsclient.c',
+ 'goaexchangeprovider.c',
+ 'goafacebookprovider.c',
+ 'goaflickrprovider.c',
+ 'goafoursquareprovider.c',
+ 'goagoogleprovider.c',
+ 'goahttpclient.c',
+ 'goaimapauthlogin.c',
+ 'goaimapsmtpprovider.c',
+ 'goalastfmprovider.c',
+ 'goamailauth.c',
+ 'goamailclient.c',
+ 'goamediaserverprovider.c',
+ 'goaoauth2provider.c',
+ 'goaoauthprovider.c',
+ 'goaobjectskeletonutils.c',
+ 'goaowncloudprovider.c',
+ 'goapocketprovider.c',
+ 'goaprovider.c',
+ 'goaproviderfactory.c',
+ 'goarestproxy.c',
+ 'goasmtpauth.c',
+ 'goasouplogger.c',
+ 'goatodoistprovider.c',
+ 'goautils.c',
+ 'goawebview.c',
+ 'goawindowsliveprovider.c',
+ 'nautilus-floating-bar.c'
+)
+
+dbus = 'goadleynaservermanager'
+
+sources += gnome.gdbus_codegen(
+ dbus,
+ dbus + '.xml',
+ interface_prefix: 'com.intel.dLeynaServer.',
+ namespace: 'DleynaServer'
+)
+
+dbus = 'goadleynaservermediadevice'
+
+sources += gnome.gdbus_codegen(
+ dbus,
+ dbus + '.xml',
+ interface_prefix: 'com.intel.dLeynaServer.',
+ namespace: 'DleynaServer'
+)
+
+incs = common_incs
+
+deps = [
+ libgoa_dep,
+ rest_dep,
+ webkit_gtk_dep,
+ dependency('json-glib-1.0'),
+ dependency('libsecret-1'),
+ dependency('libsoup-2.4', version: '>= 2.42'),
+ dependency('libxml-2.0')
+]
+
+cflags = [
+ '-DG_LOG_DOMAIN="GoaBackend"',
+ '-DGOA_API_IS_SUBJECT_TO_CHANGE',
+ '-DGOA_BACKEND_COMPILATION',
+ '-DPACKAGE_WEB_EXTENSIONS_DIR="@0@"'.format(join_paths(goa_pkglibdir, 'web-extensions'))
+]
+
+if have_kerberos
+ sources += files('goakerberosprovider.c')
+
+ incs += goaidentity_inc
+
+ deps += [gcr_dep]
+endif
+
+if enable_telepathy
+ sources += files(
+ 'goatelepathyfactory.c',
+ 'goatelepathyprovider.c',
+ 'goatpaccountlinker.c'
+ )
+
+ # FIXME: This won't work unless telepathy-accounts-widgets meson port is accepted:
+ # https://bugzilla.gnome.org/show_bug.cgi?id=786969
+ telepathy_accounts_widgets = subproject(
+ 'telepathy-accounts-widgets',
+ default_options: [
+ 'enable-settings=false',
+ 'enable-gudev=no',
+ 'with-cheese=no',
+ 'enable-ubuntu-online-accounts=no',
+ # install the data together with the rest of GOA's data
+ 'with-pkgdatadir=' + goa_pkgdatadir,
+ # GOA ships its icons directly in ${datadir}/icons (usually /usr/share/icons/) and not
+ # in its own data directory
+ 'with-icondir=' + join_paths(goa_datadir, 'icons'),
+ # Change the name of tpaw's .mo files to avoid conflicts with other packages using tp-aw
+ 'with-gettext-package=' + goa_name + '-tpaw',
+ # Disable the installation of the GSettings schema to avoid multiple components shipping
+ # the same file. See https://bugzilla.gnome.org/show_bug.cgi?id=706803
+ 'enable-settings=false'
+ ]
+ )
+ telepathy_accounts_widgets_dep = telepathy_accounts_widgets.get_variable('libtp_account_widgets_dep')
+
+ deps += [
+ telepathy_accounts_widgets_dep,
+ dependency('telepathy-glib')
+ ]
+endif
+
+libgoa_backend = shared_library(
+ goa_backend_api_name,
+ sources + [
+ backend_enums,
+ config_header,
+ identity_dbus,
+ realmd_dbus
+ ],
+ version: goa_backend_libversion,
+ include_directories: incs,
+ dependencies: deps,
+ c_args: cflags,
+ install: true,
+ install_dir: goa_libdir
+)
+
+libgoa_backend_dep = declare_dependency(
+ link_with: libgoa_backend,
+ include_directories: include_directories('.'),
+ dependencies: deps
+)
+
+pkg.generate(
+ libraries: libgoa_backend,
+ version: goa_version,
+ name: 'Goa Backends',
+ description: 'Backends for GNOME Online Accounts Library',
+ filebase: goa_backend_api_name,
+ subdirs: goa_api_name,
+ requires: [
+ goa_api_name,
+ 'gtk+-3.0'
+ ],
+ variables: 'exec_prefix=' + goa_libexecdir,
+ install_dir: join_paths(goa_libdir, 'pkgconfig')
+)
+
+sources = files(
+ 'goawebextension.c',
+ 'goawebextensionmain.c'
+)
+
+deps = [
+ rest_dep,
+ webkit_gtk_dep
+]
+
+test_ldflag = '-Wl,--no-undefined'
+ldflags = []
+
+if host_machine.system().contains('linux') and cc.has_argument(test_ldflag)
+ ldflags += test_ldflag
+endif
+
+libgoa_web_extension = shared_module(
+ 'goawebextension',
+ sources + [config_header],
+ include_directories: common_incs + [goa_inc],
+ dependencies: deps,
+ c_args: cflags,
+ link_args: ldflags,
+ link_with: libgoa_backend,
+ install: true,
+ install_dir: join_paths(goa_pkglibdir, 'web-extensions')
+)
diff --git a/src/goaidentity/Makefile.am b/src/goaidentity/Makefile.am
index 0187b2e..08f7c5f 100644
--- a/src/goaidentity/Makefile.am
+++ b/src/goaidentity/Makefile.am
@@ -22,6 +22,8 @@ AM_CPPFLAGS = \
$(WARN_CFLAGS) \
$(NULL)
+EXTRA_DIST += meson.build
+
identity_headers = \
goaalarm.h \
goaidentity.h \
diff --git a/src/goaidentity/meson.build b/src/goaidentity/meson.build
new file mode 100644
index 0000000..b93eceb
--- /dev/null
+++ b/src/goaidentity/meson.build
@@ -0,0 +1,90 @@
+goaidentity_inc = include_directories('.')
+
+headers = files(
+ 'goaalarm.h',
+ 'goaidentity.h',
+ 'goaidentityinquiry.h',
+ 'goaidentityinquiryprivate.h',
+ 'goaidentityservice.h',
+ 'goaidentitymanagerprivate.h',
+ 'goaidentitymanager.h',
+ 'goaidentitymanagererror.h',
+ 'goaidentityutils.h',
+ 'goakerberosidentity.h',
+ 'goakerberosidentityinquiry.h',
+ 'goakerberosidentitymanager.h'
+)
+
+dbus = 'org.gnome.Identity'
+
+identity_dbus = gnome.gdbus_codegen(
+ dbus,
+ dbus + '.xml',
+ interface_prefix: dbus + '.',
+ namespace: 'GoaIdentityService',
+ object_manager: true,
+ annotations: [dbus, 'org.gtk.GDBus.C.Name', 'Identity']
+)
+
+dbus = 'org.freedesktop.realmd'
+
+realmd_dbus = gnome.gdbus_codegen(
+ dbus,
+ dbus + '.xml',
+ interface_prefix: dbus + '.',
+ namespace: 'GoaRealm',
+ object_manager: true,
+ annotations: [dbus + '.Realm', 'org.gtk.GDBus.C.Name', 'Common']
+)
+
+identity_manager_error_src = files('goaidentitymanagererror.c')
+
+sources = identity_manager_error_src + files(
+ 'goaalarm.c',
+ 'goaidentity.c',
+ 'goaidentityinquiry.c',
+ 'goaidentityservice.c',
+ 'goaidentitymanager.c',
+ 'goaidentityutils.c',
+ 'goakerberosidentity.c',
+ 'goakerberosidentityinquiry.c',
+ 'goakerberosidentitymanager.c',
+ 'main.c'
+)
+
+enum = 'goaidentityenumtypes'
+
+sources += gnome.mkenums(
+ enum,
+ sources: headers,
+ c_template: enum + '.c.in',
+ h_template: enum + '.h.in'
+)
+
+deps = [
+ gcr_dep,
+ gtk_dep,
+ krb5_dep,
+ libgoa_dep
+]
+
+cflags = [
+ '-DG_LOG_DOMAIN="libgoaidentity"',
+ '-DGOA_COMPILATION',
+ '-DGOA_API_IS_SUBJECT_TO_CHANGE',
+ '-DGOA_BACKEND_API_IS_SUBJECT_TO_CHANGE'
+]
+
+executable(
+ 'goa-identity-service',
+ sources + [
+ config_header,
+ identity_dbus,
+ realmd_dbus
+ ],
+ include_directories: common_incs,
+ dependencies: deps,
+ c_args: cflags,
+ install: true,
+ install_dir: goa_libexecdir
+)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..7a0fee8
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,19 @@
+src_inc = include_directories('.')
+
+common_incs = [top_inc, src_inc]
+
+subdir('goa')
+
+if enable_backend
+ gtk_dep = dependency('gtk+-3.0', version: '>= 3.19.12')
+ rest_dep = dependency('rest-0.7')
+ webkit_gtk_dep = dependency('webkit2gtk-4.0', version: '>= 2.7.2')
+
+ if have_kerberos
+ subdir('goaidentity')
+ endif
+
+ subdir('goabackend')
+ subdir('daemon')
+ subdir('examples')
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]