[gnome-control-center/wip/inigomartinez/meson: 2/2] build: Port to meson build system
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/inigomartinez/meson: 2/2] build: Port to meson build system
- Date: Wed, 17 Jan 2018 14:59:13 +0000 (UTC)
commit d7be8b5385ca06a4a37131d48b7846141436f3bd
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Tue Jul 25 22:28:38 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=785414
Makefile.am | 6 +-
data/icons/meson.build | 19 ++
man/Makefile.am | 4 +-
man/meson.build | 26 +++
meson.build | 303 ++++++++++++++++++++++++++
meson_options.txt | 8 +
meson_post_install.py | 25 ++
panels/Makefile.am | 2 +
panels/background/Makefile.am | 2 +-
panels/background/meson.build | 128 +++++++++++
panels/bluetooth/Makefile.am | 2 +-
panels/bluetooth/meson.build | 42 ++++
panels/color/Makefile.am | 2 +-
panels/color/icons/Makefile.am | 2 +
panels/color/icons/meson.build | 21 ++
panels/color/meson.build | 63 ++++++
panels/common/Makefile.am | 2 +-
panels/common/meson.build | 117 ++++++++++
panels/datetime/Makefile.am | 4 +-
panels/datetime/icons/meson.build | 19 ++
panels/datetime/meson.build | 217 ++++++++++++++++++
panels/datetime/po-timezones/Makefile.am | 2 +-
panels/datetime/po-timezones/meson.build | 73 ++++++
panels/display/Makefile.am | 2 +-
panels/display/icons/meson.build | 18 ++
panels/display/meson.build | 67 ++++++
panels/info/Makefile.am | 2 +-
panels/info/meson.build | 115 ++++++++++
panels/keyboard/Makefile.am | 3 +-
panels/keyboard/meson.build | 104 +++++++++
panels/meson.build | 44 ++++
panels/mouse/Makefile.am | 2 +-
panels/mouse/meson.build | 72 ++++++
panels/network/Makefile.am | 2 +-
panels/network/connection-editor/Makefile.am | 2 +-
panels/network/connection-editor/meson.build | 56 +++++
panels/network/meson.build | 79 +++++++
panels/network/wireless-security/Makefile.am | 2 +-
panels/network/wireless-security/meson.build | 100 +++++++++
panels/notifications/Makefile.am | 2 +-
panels/notifications/meson.build | 46 ++++
panels/online-accounts/Makefile.am | 2 +-
panels/online-accounts/icons/Makefile.am | 2 +
panels/online-accounts/icons/meson.build | 15 ++
panels/online-accounts/meson.build | 48 ++++
panels/power/Makefile.am | 2 +-
panels/power/icons/Makefile.am | 2 +
panels/power/icons/meson.build | 15 ++
panels/power/meson.build | 55 +++++
panels/printers/Makefile.am | 2 +-
panels/printers/meson.build | 99 +++++++++
panels/privacy/Makefile.am | 2 +-
panels/privacy/meson.build | 40 ++++
panels/region/Makefile.am | 2 +-
panels/region/meson.build | 60 +++++
panels/search/Makefile.am | 2 +-
panels/search/meson.build | 49 ++++
panels/sharing/Makefile.am | 2 +-
panels/sharing/meson.build | 100 +++++++++
panels/sound/Makefile.am | 3 +
panels/sound/data/icons/Makefile.am | 2 +
panels/sound/data/icons/meson.build | 71 ++++++
panels/sound/data/sounds/Makefile.am | 2 +-
panels/sound/data/sounds/meson.build | 31 +++
panels/sound/data/symbolic-icons/Makefile.am | 1 +
panels/sound/data/symbolic-icons/meson.build | 13 +
panels/sound/meson.build | 67 ++++++
panels/universal-access/Makefile.am | 2 +-
panels/universal-access/meson.build | 53 +++++
panels/user-accounts/Makefile.am | 1 +
panels/user-accounts/meson.build | 171 +++++++++++++++
panels/wacom/Makefile.am | 2 +-
panels/wacom/calibrator/Makefile.am | 2 +
panels/wacom/calibrator/meson.build | 36 +++
panels/wacom/meson.build | 105 +++++++++
po/meson.build | 1 +
search-provider/Makefile.am | 2 +-
search-provider/meson.build | 50 +++++
shell/Makefile.am | 4 +-
shell/appdata/Makefile.am | 4 +-
shell/appdata/meson.build | 10 +
shell/completions/meson.build | 10 +
shell/meson.build | 166 ++++++++++++++
subprojects/gvc | 2 +-
subprojects/libgd | 2 +-
update-from-gsd.in | 10 +
update-from-gsd.sh | 2 +-
update-from-nma.in | 19 ++
88 files changed, 3118 insertions(+), 32 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 0e98980..87ded1b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,11 @@ MAINTAINERCLEANFILES = \
`find "$(srcdir)" -type f -name Makefile.in -print`
EXTRA_DIST = \
- MAINTAINERS
+ MAINTAINERS \
+ meson.build \
+ meson_options.txt \
+ meson_post_install.py \
+ po/meson.build
AM_DISTCHECK_CONFIGURE_FLAGS = --disable-update-mimedb --enable-gtk-doc --disable-maintainer-mode
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..fe0f84a
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,19 @@
+icon_sizes = [
+ '16x16',
+ '24x24',
+ '32x32',
+ '48x48',
+ '512x512'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ '_'.join(['hicolor', 'apps', icon_size, 'gnome-control-center.png']),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'hicolor_apps_symbolic_gnome-control-center-symbolic.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'symbolic', 'apps')
+)
diff --git a/man/Makefile.am b/man/Makefile.am
index 7f651fb..440e4d3 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -14,7 +14,9 @@ man_MANS = \
xml_files = $(man_MANS:.1=.xml)
-EXTRA_DIST = $(xml_files)
+EXTRA_DIST = \
+ $(xml_files) \
+ meson.build
DISTCLEANFILES = $(man_MANS)
diff --git a/man/meson.build b/man/meson.build
new file mode 100644
index 0000000..cab3fa9
--- /dev/null
+++ b/man/meson.build
@@ -0,0 +1,26 @@
+xsltproc = find_program('xsltproc', required: false)
+assert(xsltproc.found(), 'xsltproc is required to build documentation')
+
+xsltproc_cmd = [
+ xsltproc,
+ '--output', '@OUTPUT@',
+ '--nonet',
+ '--stringparam', 'man.output.quietly', '1',
+ '--stringparam', 'funcsynopsis.style', 'ansi',
+ '--stringparam', 'man.th.extra1.suppress', '1',
+ '--stringparam', 'man.authors.section.enabled', '0',
+ '--stringparam', 'man.copyright.section.enabled', '0',
+ 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@'
+]
+
+output = meson.project_name() + '.1'
+
+custom_target(
+ output,
+ input: meson.project_name() + '.xml',
+ output: output,
+ command: xsltproc_cmd,
+ install: true,
+ install_dir: join_paths(control_center_mandir, 'man1')
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..0d44f52
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,303 @@
+project(
+ 'gnome-control-center', 'c',
+ version: '3.26.0',
+ license: 'GPL2+',
+ meson_version: '>= 0.43.0'
+)
+
+control_center_prefix = get_option('prefix')
+control_center_bindir = join_paths(control_center_prefix, get_option('bindir'))
+control_center_datadir = join_paths(control_center_prefix, get_option('datadir'))
+control_center_libexecdir = join_paths(control_center_prefix, get_option('libexecdir'))
+control_center_localedir = join_paths(control_center_prefix, get_option('localedir'))
+control_center_mandir = join_paths(control_center_prefix, get_option('mandir'))
+control_center_sysconfdir = join_paths(control_center_prefix, get_option('sysconfdir'))
+
+control_center_pkgdatadir = join_paths(control_center_datadir, meson.project_name())
+
+control_center_desktopdir = join_paths(control_center_datadir, 'applications')
+
+control_center_api_version = '2.0'
+control_center_api_name = '@0@-@1@'.format(meson.project_name(), control_center_api_version)
+
+host_is_linux = host_machine.system().contains('linux')
+host_is_s390 = host_machine.cpu().contains('s390')
+
+cc = meson.get_compiler('c')
+
+config_h = configuration_data()
+
+# defines
+set_defines = [
+ # package
+ ['PACKAGE', meson.project_name()],
+ ['PACKAGE_VERSION', meson.project_version()],
+ ['VERSION', meson.project_version()],
+ # i18n
+ ['GETTEXT_PACKAGE', control_center_api_name]
+]
+
+foreach define: set_defines
+ config_h.set_quoted(define[0], define[1])
+endforeach
+
+config_h.set('USER_DIR_MODE', 0700,
+ description: 'Permissions for creating the user\'s config, cache and data directories')
+
+# compiler flags
+common_flags = ['-DHAVE_CONFIG_H']
+
+# Only add this when optimizing is enabled (default)
+optimized_src = '''
+ #if __OPTIMIZE__ == 0
+ #error No optimization
+ #endif
+'''
+
+control_center_optimized = get_option('buildtype').contains('optimized') and cc.compiles(optimized_src)
+message('whether_optimization is enabled: ' + control_center_optimized.to_string())
+
+if control_center_optimized
+ common_flags += '-Wp,-D_FORTIFY_SOURCE=2'
+endif
+
+if get_option('buildtype').contains('debug')
+ test_cflags = [
+ '-Wcast-align',
+ '-Wmissing-field-initializers',
+ '-Wmissing-declarations',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wno-strict-aliasing',
+ '-Wno-sign-compare'
+ ]
+
+ common_flags += cc.get_supported_arguments(test_cflags)
+endif
+
+add_project_arguments(common_flags, language: 'c')
+
+# Check that we meet the dependencies
+libgvc = subproject(
+ 'gvc',
+ default_options: 'static=true'
+)
+libgvc_dep = libgvc.get_variable('libgvc_dep')
+
+libgd = subproject(
+ 'libgd',
+ default_options: [
+ 'static=true',
+ 'with-view-common=true',
+ 'with-main-view=true'
+ ]
+)
+libgd_dep = libgd.get_variable('libgd_dep')
+
+goa_req_version = '>= 3.25.3'
+pulse_req_version = '>= 2.0'
+
+accounts_dep = dependency('accountsservice', version: '>= 0.6.39')
+clutter_gtk_dep = dependency('clutter-gtk-1.0', required: false)
+colord_dep = dependency('colord', version: '>= 0.1.34')
+gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.23.0')
+gio_dep = dependency('gio-2.0')
+glib_dep = dependency('glib-2.0', version: '>= 2.53.0')
+gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.1.0')
+gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.25.90')
+goa_dep = dependency('goa-1.0', version: goa_req_version)
+gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.27.2')
+libxml_dep = dependency('libxml-2.0')
+polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103')
+pulse_dep = dependency('libpulse', version: pulse_req_version)
+pulse_mainloop_dep = dependency('libpulse-mainloop-glib', version: pulse_req_version)
+upower_glib_dep = dependency('upower-glib', version: '>= 0.99.0')
+x11_dep = dependency('x11')
+xi_dep = dependency('xi', version: '>= 1.2')
+
+m_dep = cc.find_library('m')
+
+common_deps = [
+ gio_dep,
+ glib_dep,
+ gsettings_desktop_dep,
+ dependency('gio-unix-2.0'),
+ dependency('gthread-2.0'),
+ dependency('gtk+-3.0', version: '>= 3.22.0')
+]
+
+# udev
+udev_dep = dependency('gudev-1.0', required: false)
+
+# network manager
+enable_network_manager = get_option('network_manager')
+if enable_network_manager
+ network_manager_deps = [
+ dependency('libnm', version: '>= 1.2.0'),
+ dependency('libnma', version: '>= 1.2.0'),
+ dependency('mm-glib', version: '>= 0.7')
+ ]
+
+ network_manager_dep = dependency('NetworkManager')
+ nm_vpn_config_dir = join_paths(network_manager_dep.get_pkgconfig_variable('configdir'), 'VPN')
+ nm_vpn_module_dir = network_manager_dep.get_pkgconfig_variable('plugindir')
+endif
+
+config_h.set('BUILD_NETWORK', enable_network_manager,
+ description: 'Define to 1 to build the Network panel')
+config_h.set('HAVE_NETWORK_MANAGER', enable_network_manager,
+ description: 'Define to 1 if NetworkManager is available')
+
+# Check for gnome-bluetooth
+enable_bluetooth = get_option('bluetooth')
+if enable_bluetooth
+ assert(not host_is_s390, 'Bluetooth panel will not be built (no USB support on this platform). Use
-Dbluetooth=false to build without it.')
+ gnome_bluetooth_dep = dependency('gnome-bluetooth-1.0', version: '>= 3.18.2')
+endif
+config_h.set('BUILD_BLUETOOTH', enable_bluetooth,
+ description: 'Define to 1 to build the Bluetooth panel')
+config_h.set('HAVE_BLUETOOTH', enable_bluetooth,
+ description: 'Define to 1 if bluetooth support is available')
+
+# Check for CUPS 1.4 or newer
+cups_dep = dependency('cups', version : '>= 1.4', required: false)
+assert(cups_dep.found(), 'CUPS 1.4 or newer not found')
+
+# https://bugzilla.gnome.org/show_bug.cgi?id=696766
+cups_cflags = []
+# FIXME: This produces a lot of errors
+'''
+if cups_dep.version().version_compare('>= 1.6')
+ cups_cflags += '-D_PPD_DEPRECATED=""'
+endif
+'''
+
+# cups headers
+check_headers = [
+ ['HAVE_CUPS_CUPS_H', 'cups/cups.h'],
+ ['HAVE_CUPS_PPD_H', 'cups/ppd.h']
+]
+
+foreach header: check_headers
+ assert(cc.has_header(header[1], args: cups_cflags), 'CUPS headers not found: ' + header[1])
+endforeach
+
+# Optional dependency for the user accounts panel
+enable_cheese = get_option('cheese')
+if enable_cheese
+ assert(clutter_gtk_dep.found(), 'cheese support requested, but clutter-gtk library is not available. Use
-Dcheese=false to build without it.')
+
+ cheese_deps = [
+ clutter_gtk_dep,
+ dependency('cheese'),
+ dependency('cheese-gtk', version: '>= 3.5.91')
+ ]
+endif
+config_h.set('HAVE_CHEESE', enable_cheese,
+ description: 'Define to 1 to enable cheese webcam support')
+
+# Wacom
+enable_wacom = get_option('wacom')
+if enable_wacom
+ assert(not host_is_s390, 'Wacom panel will not be built (no USB support on this platform). Use
-Dwacom=false to build without it.')
+ assert(clutter_gtk_dep.found(), 'wacom support requested, but clutter-gtk library is not available. Use
-Dwacom=false to build without it.')
+
+ wacom_deps = [
+ clutter_gtk_dep,
+ dependency('clutter-1.0', version: '>= 1.11.3'),
+ dependency('libwacom', version: '>= 0.7')
+ ]
+endif
+config_h.set('BUILD_WACOM', enable_wacom,
+ description: 'Define to 1 to build the Wacom panel')
+config_h.set('HAVE_WACOM', enable_wacom,
+ description: 'Define to 1 is Wacom is supportted')
+
+# Check for info panel
+gnome_session_libexecdir = get_option('gnome_session_libexecdir')
+if gnome_session_libexecdir == ''
+ gnome_session_libexecdir = control_center_libexecdir
+endif
+
+# IBus support
+enable_ibus = get_option('ibus')
+config_h.set('HAVE_IBUS', enable_ibus,
+ description: 'Defined if IBus support is enabled')
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+desktop_conf = configuration_data()
+desktop_conf.set('VERSION', meson.project_version())
+
+po_dir = join_paths(meson.source_root(), 'po')
+
+intltool_merge = find_program('intltool-merge')
+intltool_cache = join_paths(po_dir, '.intltool-merge-cache')
+intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+
+top_inc = include_directories('.')
+shell_inc = include_directories('shell')
+
+update_from_gsd = find_program('update-from-gsd.sh')
+update_from_gsd_in = files('update-from-gsd.in')
+update_from_nma_in = files('update-from-nma.in')
+
+subdir('data/icons')
+subdir('po')
+subdir('panels')
+subdir('shell')
+subdir('search-provider')
+
+if get_option('documentation')
+ subdir('man')
+endif
+
+meson.add_install_script(
+ 'meson_post_install.py',
+ control_center_datadir,
+ get_option('update_mimedb') ? 'update_mimedb' : ''
+)
+
+output = meson.project_name() + ' was configured with the following options:\n'
+
+if enable_network_manager
+ output += '** NetworkManager (Network panel)\n'
+else
+ output += ' Network panel disabled\n'
+endif
+
+if enable_bluetooth
+ output += '** gnome-bluetooth (Bluetooth panel)\n'
+else
+ output += ' Bluetooth panel disabled\n'
+endif
+
+if enable_cheese
+ output += '** Cheese (Users panel webcam support)\n'
+else
+ output += ' Users panel webcam support disabled\n'
+endif
+
+if enable_wacom
+ output += '** wacom (Wacom tablet panel)\n'
+else
+ output += ' Wacom panel disabled\n'
+endif
+
+if enable_ibus
+ output += '** IBus (Region panel IBus support)\n'
+else
+ output += ' Region panel IBus support disabled\n'
+endif
+
+output += '** gnome-session libexecdir: ' + gnome_session_libexecdir + '\n'
+output += 'End options'
+message(output)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..d519c0c
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,8 @@
+option('cheese', type: 'boolean', value: true, description: 'build with cheese webcam support')
+option('ibus', type: 'boolean', value: true, description: 'build with IBus support')
+option('network_manager', type: 'boolean', value: true, description: 'build with NetworkManager support')
+option('bluetooth', type: 'boolean', value: true, description: 'build with Bluetooth support')
+option('wacom', type: 'boolean', value: true, description: 'build with Wacom support')
+option('gnome_session_libexecdir', type: 'string', value: '', description: 'Directory for gnome-session\'s
libexecdir')
+option('documentation', type: 'boolean', value: false, description: 'build documentation')
+option('update_mimedb', type: 'boolean', value: true, description: 'update-mime-database after install')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..12a0fdd
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+import glob
+import os
+import re
+import subprocess
+import sys
+
+datadir = sys.argv[1]
+icondir = os.path.join(datadir, 'icons', 'hicolor')
+
+name_pattern = re.compile('hicolor_(?:apps)_(?:\d+x\d+|symbolic)_(.*)')
+search_pattern = '/**/hicolor_*'
+
+[os.rename(file, os.path.join(os.path.dirname(file), name_pattern.search(file).group(1)))
+ for file in glob.glob(icondir + search_pattern, recursive=True)]
+
+if not os.environ.get('DESTDIR'):
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+ if sys.argv[2] == 'update_mimedb':
+ mimedir = os.path.join(datadir, 'mime')
+ print('Update mime database...')
+ subprocess.call(['update-mime-database', mimedir])
diff --git a/panels/Makefile.am b/panels/Makefile.am
index 507cd2f..b5d9534 100644
--- a/panels/Makefile.am
+++ b/panels/Makefile.am
@@ -31,4 +31,6 @@ if BUILD_BLUETOOTH
SUBDIRS += bluetooth
endif
+EXTRA_DIST = meson.build
+
-include $(top_srcdir)/git.mk
diff --git a/panels/background/Makefile.am b/panels/background/Makefile.am
index ccb8017..c06503e 100644
--- a/panels/background/Makefile.am
+++ b/panels/background/Makefile.am
@@ -95,6 +95,6 @@ desktop_in_files = gnome-background-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES) stamp-gdesktop-enums-types.h
-EXTRA_DIST = $(resource_files) background.gresource.xml
+EXTRA_DIST = $(resource_files) background.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/background/meson.build b/panels/background/meson.build
new file mode 100644
index 0000000..ecb27e0
--- /dev/null
+++ b/panels/background/meson.build
@@ -0,0 +1,128 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+install_data(
+ 'slideshow-symbolic.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'categories')
+)
+
+install_data(
+ 'slideshow-emblem.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'emblems')
+)
+
+install_data(
+ 'noise-texture-light.png',
+ install_dir: join_paths(control_center_pkgdatadir, 'pixmaps')
+)
+
+common_sources = []
+
+gdesktop_prefix = gsettings_desktop_dep.get_pkgconfig_variable('prefix')
+
+enums = 'gdesktop-enums-types'
+enums_header = files(
+ gdesktop_prefix + '/include/gsettings-desktop-schemas/gdesktop-enums.h',
+ 'cc-background-item.h'
+)
+
+common_sources += gnome.mkenums(
+ enums + '.h',
+ sources: enums_header,
+ fhead: '#ifndef __GDESKTOP_ENUMS_TYPES_H__\n#define __GDESKTOP_ENUMS_TYPES_H__\n\n#include
<glib-object.h>\n\nG_BEGIN_DECLS\n',
+ fprod: '/* enumerations from "@filename@" */\n',
+ vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define G_DESKTOP_TYPE_@ENUMSHORT@
(@enum_name@_get_type())\n',
+ ftail: 'G_END_DECLS\n\n#endif /* __GDESKTOP_ENUMS_TYPES_H__ */'
+)
+
+common_sources += gnome.mkenums(
+ enums + '.c',
+ sources: enums_header,
+ fhead: '#include <gdesktop-enums.h>\n#include "gdesktop-enums-types.h"\n#include "cc-background-item.h"',
+ fprod: '\n/* enumerations from "@filename@" */',
+ vhead: 'GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static
const G@Type@Value values[] = {',
+ vprod: ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ vtail: ' { 0, NULL, NULL }\n };\n etype = g_@type@_register_static ("@EnumName@", values);\n
}\n return etype;\n}\n'
+)
+
+resource_data = files('background.ui')
+
+common_sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'bg-colors-source.c',
+ 'bg-pictures-source.c',
+ 'bg-source.c',
+ 'bg-wallpapers-source.c',
+ 'cc-background-chooser-dialog.c',
+ 'cc-background-grilo-miner.c',
+ 'cc-background-item.c',
+ 'cc-background-xml.c'
+)
+
+deps = common_deps + [
+ gdk_pixbuf_dep,
+ gnome_desktop_dep,
+ goa_dep,
+ libxml_dep,
+ dependency('cairo-gobject'),
+ dependency('grilo-0.3', version: '>= 0.3.0')
+]
+
+cflags = [
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOME_DESKTOP_USE_UNSTABLE_API'
+]
+
+libbackground_chooser = static_library(
+ cappletname + '-chooser',
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+sources = common_sources + files('cc-' + cappletname + '-panel.c')
+
+libbackground = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libbackground_chooser
+)
+
+test_name = 'test-chooser-dialog'
+
+executable(
+ test_name,
+ test_name + '.c',
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libbackground_chooser
+)
diff --git a/panels/bluetooth/Makefile.am b/panels/bluetooth/Makefile.am
index 9117fc2..2598470 100644
--- a/panels/bluetooth/Makefile.am
+++ b/panels/bluetooth/Makefile.am
@@ -33,6 +33,6 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
CLEANFILES = $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(man_MANS) $(desktop_in_in_files) $(resource_files) bluetooth.gresource.xml
+EXTRA_DIST = $(man_MANS) $(desktop_in_in_files) $(resource_files) bluetooth.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/bluetooth/meson.build b/panels/bluetooth/meson.build
new file mode 100644
index 0000000..f8a2e5e
--- /dev/null
+++ b/panels/bluetooth/meson.build
@@ -0,0 +1,42 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('bluetooth.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [gnome_bluetooth_dep]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libbluetooth = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/color/Makefile.am b/panels/color/Makefile.am
index a003f8a..bb670ed 100644
--- a/panels/color/Makefile.am
+++ b/panels/color/Makefile.am
@@ -45,6 +45,6 @@ desktop_in_files = gnome-color-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) color.gresource.xml
+EXTRA_DIST = $(resource_files) color.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/color/icons/Makefile.am b/panels/color/icons/Makefile.am
index c000933..9f51a77 100644
--- a/panels/color/icons/Makefile.am
+++ b/panels/color/icons/Makefile.am
@@ -1,5 +1,7 @@
SUBDIRS = scalable 16x16 22x22 24x24 32x32 48x48 64x64 256x256
+EXTRA_DIST = meson.build
+
if MAINTAINER_MODE
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(pkgdatadir)/icons/hicolor
diff --git a/panels/color/icons/meson.build b/panels/color/icons/meson.build
new file mode 100644
index 0000000..da2e7e2
--- /dev/null
+++ b/panels/color/icons/meson.build
@@ -0,0 +1,21 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+ '48x48',
+ '64x64',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'preferences-color.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-color.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/color/meson.build b/panels/color/meson.build
new file mode 100644
index 0000000..05f15f0
--- /dev/null
+++ b/panels/color/meson.build
@@ -0,0 +1,63 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-color-calibrate.c',
+ 'cc-color-cell-renderer-text.c',
+ 'cc-color-common.c',
+ 'cc-color-device.c',
+ 'cc-color-profile.c'
+)
+
+resource_data = files(
+ 'color-calibrate.ui',
+ 'color.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ colord_dep,
+ gnome_desktop_dep,
+ m_dep,
+ dependency('colord-gtk', version: '>= 0.1.24'),
+ dependency('libsoup-2.4')
+]
+
+cflags = [
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+ '-DBINDIR="@0@"'.format(control_center_bindir)
+]
+
+libcolor = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/common/Makefile.am b/panels/common/Makefile.am
index 7d0eaad..26da17c 100644
--- a/panels/common/Makefile.am
+++ b/panels/common/Makefile.am
@@ -79,7 +79,7 @@ cc-common-resources.h: common.gresource.xml $(resource_files)
rulesdir = $(datadir)/polkit-1/rules.d/
rules_DATA = gnome-control-center.rules
-EXTRA_DIST = $(rules_DATA) $(resource_files) common.gresource.xml
+EXTRA_DIST = $(rules_DATA) $(resource_files) common.gresource.xml meson.build
CLEANFILES = $(BUILT_SOURCES) $(GSD_COMMON_ENUM_FILES)
INPUTDIR=$(top_srcdir)/../gnome-settings-daemon/plugins/common/
diff --git a/panels/common/meson.build b/panels/common/meson.build
new file mode 100644
index 0000000..7c67e0e
--- /dev/null
+++ b/panels/common/meson.build
@@ -0,0 +1,117 @@
+common_inc = include_directories('.')
+
+common_sources = []
+
+enums = 'gsd-common-enums'
+enums_header = files('gsd-device-manager.h')
+
+common_sources += gnome.mkenums(
+ enums + '.h',
+ sources: enums_header,
+ fhead: '#ifndef GSD_COMMON_ENUMS_H\n#define GSD_COMMON_ENUMS_H\n\n#include
<glib-object.h>\n\nG_BEGIN_DECLS\n',
+ fprod: '/* enumerations from "@filename@" */\n',
+ vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GSD_TYPE_@ENUMSHORT@
(@enum_name@_get_type())\n',
+ ftail: 'G_END_DECLS\n\n#endif /* !GSD_COMMON_ENUMS_H */'
+)
+
+common_sources += gnome.mkenums(
+ enums + '.c',
+ sources: enums_header,
+ fhead: '#include "gsd-device-manager.h"\n#include "gsd-common-enums.h"\n',
+ fprod: '\n/* enumerations from "@filename@" */',
+ vhead: 'GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static
const G@Type@Value values[] = {',
+ vprod: ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ vtail: ' { 0, NULL, NULL }\n };\n etype = g_@type@_register_static ("@EnumName@", values);\n
}\n return etype;\n}\n'
+)
+
+sources = common_sources + files(
+ 'cc-common-language.c',
+ 'cc-language-chooser.c',
+ 'cc-util.c'
+)
+
+resource_data = files('language-chooser.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ gnome_desktop_dep,
+ dependency('fontconfig')
+]
+
+liblanguage = static_library(
+ 'language',
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps
+)
+
+gsd_headers = [
+ 'gsd-device-manager.h',
+ 'gsd-device-manager-udev.h',
+ 'gsd-device-manager-x11.h',
+ 'gsd-input-helper.h'
+]
+
+gsd_sources_udev = ['gsd-device-manager-udev.c']
+
+gsd_sources = [
+ 'gsd-device-manager.c',
+ 'gsd-device-manager-x11.c',
+ 'gsd-input-helper.c'
+]
+
+sources = files(gsd_sources) + common_sources
+
+deps = common_deps
+
+if udev_dep.found()
+ sources += files(gsd_sources_udev)
+
+ deps += [
+ udev_dep,
+ dependency('gdk-wayland-3.0', required: false)
+ ]
+endif
+
+libdevice = static_library(
+ 'device',
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps
+)
+
+install_data(
+ 'gnome-control-center.rules',
+ install_dir: join_paths(control_center_datadir, 'polkit-1', 'rules.d')
+)
+
+# FIXME: workaround for updating different sources code
+input_dir = join_paths(meson.source_root(), '..', 'gnome-settings-daemon', 'plugins', 'common')
+
+script_conf = configuration_data()
+script_conf.set('program', update_from_gsd.path())
+script_conf.set('input_dir', input_dir)
+script_conf.set('working_dir', meson.current_source_dir())
+script_conf.set('source_files', ' '.join(gsd_sources + gsd_sources_udev + gsd_headers))
+script_conf.set('source_message', 'common: Update from gnome-settings-daemon')
+
+script_name = 'update-common-from-gsd'
+
+script = configure_file(
+ input: update_from_gsd_in,
+ output: script_name + '.sh',
+ configuration: script_conf
+)
+
+run_target(
+ script_name,
+ command: [find_program(join_paths(meson.current_build_dir(), script_name + '.sh'))]
+)
diff --git a/panels/datetime/Makefile.am b/panels/datetime/Makefile.am
index a003f0b..9a5f509 100644
--- a/panels/datetime/Makefile.am
+++ b/panels/datetime/Makefile.am
@@ -109,6 +109,8 @@ EXTRA_DIST = \
timedated1-interface.xml \
$(polkit_in_files) \
$(resource_files) \
- datetime.gresource.xml
+ datetime.gresource.xml \
+ meson.build \
+ icons/meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/datetime/icons/meson.build b/panels/datetime/icons/meson.build
new file mode 100644
index 0000000..f8f0cf1
--- /dev/null
+++ b/panels/datetime/icons/meson.build
@@ -0,0 +1,19 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '32x32',
+ '48x48',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'preferences-system-time.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-system-time.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/datetime/meson.build b/panels/datetime/meson.build
new file mode 100644
index 0000000..6b57d8b
--- /dev/null
+++ b/panels/datetime/meson.build
@@ -0,0 +1,217 @@
+subdir('po-timezones')
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+polkit = 'org.gnome.controlcenter.' + cappletname + '.policy'
+
+custom_target(
+ polkit,
+ input: polkit + '.in',
+ output: polkit,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+resource_data = files(
+ 'data/bg_dim.png',
+ 'data/bg.png',
+ 'data/cc.png',
+ 'data/pin.png',
+ 'data/timezone_0_dim.png',
+ 'data/timezone_0.png',
+ 'data/timezone_10.5_dim.png',
+ 'data/timezone_10.5.png',
+ 'data/timezone_-10_dim.png',
+ 'data/timezone_10_dim.png',
+ 'data/timezone_-10.png',
+ 'data/timezone_10.png',
+ 'data/timezone_11.5_dim.png',
+ 'data/timezone_11.5.png',
+ 'data/timezone_-11_dim.png',
+ 'data/timezone_11_dim.png',
+ 'data/timezone_-11.png',
+ 'data/timezone_11.png',
+ 'data/timezone_12.75_dim.png',
+ 'data/timezone_12.75.png',
+ 'data/timezone_12_dim.png',
+ 'data/timezone_12.png',
+ 'data/timezone_13_dim.png',
+ 'data/timezone_13.png',
+ 'data/timezone_14_dim.png',
+ 'data/timezone_14.png',
+ 'data/timezone_-1_dim.png',
+ 'data/timezone_1_dim.png',
+ 'data/timezone_-1.png',
+ 'data/timezone_1.png',
+ 'data/timezone_-2_dim.png',
+ 'data/timezone_2_dim.png',
+ 'data/timezone_-2.png',
+ 'data/timezone_2.png',
+ 'data/timezone_-3.5_dim.png',
+ 'data/timezone_3.5_dim.png',
+ 'data/timezone_-3.5.png',
+ 'data/timezone_3.5.png',
+ 'data/timezone_-3_dim.png',
+ 'data/timezone_3_dim.png',
+ 'data/timezone_-3.png',
+ 'data/timezone_3.png',
+ 'data/timezone_-4.5_dim.png',
+ 'data/timezone_4.5_dim.png',
+ 'data/timezone_-4.5.png',
+ 'data/timezone_4.5.png',
+ 'data/timezone_-4_dim.png',
+ 'data/timezone_4_dim.png',
+ 'data/timezone_-4.png',
+ 'data/timezone_4.png',
+ 'data/timezone_-5.5_dim.png',
+ 'data/timezone_5.5_dim.png',
+ 'data/timezone_-5.5.png',
+ 'data/timezone_5.5.png',
+ 'data/timezone_5.75_dim.png',
+ 'data/timezone_5.75.png',
+ 'data/timezone_-5_dim.png',
+ 'data/timezone_5_dim.png',
+ 'data/timezone_-5.png',
+ 'data/timezone_5.png',
+ 'data/timezone_6.5_dim.png',
+ 'data/timezone_6.5.png',
+ 'data/timezone_-6_dim.png',
+ 'data/timezone_6_dim.png',
+ 'data/timezone_-6.png',
+ 'data/timezone_6.png',
+ 'data/timezone_-7_dim.png',
+ 'data/timezone_7_dim.png',
+ 'data/timezone_-7.png',
+ 'data/timezone_7.png',
+ 'data/timezone_8.5_dim.png',
+ 'data/timezone_8.5.png',
+ 'data/timezone_8.75_dim.png',
+ 'data/timezone_8.75.png',
+ 'data/timezone_-8_dim.png',
+ 'data/timezone_8_dim.png',
+ 'data/timezone_-8.png',
+ 'data/timezone_8.png',
+ 'data/timezone_-9.5_dim.png',
+ 'data/timezone_9.5_dim.png',
+ 'data/timezone_-9.5.png',
+ 'data/timezone_9.5.png',
+ 'data/timezone_-9_dim.png',
+ 'data/timezone_9_dim.png',
+ 'data/timezone_-9.png',
+ 'data/timezone_9.png',
+ 'backward',
+ 'big.ui',
+ 'datetime.ui',
+ 'little.ui',
+ 'middle.ui',
+ 'ydm.ui'
+)
+
+resources = gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-timezone-map.c',
+ 'date-endian.c',
+ 'tz.c'
+)
+
+gdbus = 'timedated'
+gdbus_iface_xml = gdbus + '1-interface.xml'
+
+# This requires running d-bus session and accessible timedate1 daemon
+# FIXME: need to find a way how to filter out unnecessary d-bus stuff (introspectable, properties)
+#timedated1-interface.xml:
+# gdbus introspect \
+# --xml \
+# --system \
+# --dest org.freedesktop.timedate1 \
+# --object-path /org/freedesktop/timedate1 \
+# > timedated1-interface.xml
+'''
+gdbus_iface = custom_target(
+ gdbus_iface_xml,
+ output: gdbus_iface_xml,
+ capture: true,
+ command: [
+ find_program('gdbus'),
+ 'introspect',
+ '--xml',
+ '--system',
+ '--dest', 'org.freedesktop.timedate1',
+ '--object-path', '/org/freedesktop/timedate1'
+ ],
+)
+'''
+
+sources += gnome.gdbus_codegen(
+ gdbus,
+ gdbus_iface_xml,
+ interface_prefix: 'org.freedesktop.'
+)
+
+deps = common_deps + [
+ gdk_pixbuf_dep,
+ gnome_desktop_dep,
+ polkit_gobject_dep
+]
+
+cflags = [
+ '-DGNOMECC_DATA_DIR="@0@"'.format(control_center_pkgdatadir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libdatetime = static_library(
+ cappletname,
+ sources: sources + resources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+test_cflags = '-DSRCDIR="@0@"'.format(meson.current_source_dir())
+
+test_units = [
+ # test name, test name + '.c' + extra_sources, extra_deps, extra cflags
+ # FIXME: The test does not work due to missing timezones
+ #['test-timezone', ['cc-timezone-map.c', 'tz.c'] + resources, [m_dep], []],
+ ['test-timezone-gfx', ['tz.c'] + resources, [m_dep], [test_cflags]],
+ ['test-endianess', ['date-endian.c'], [], []]
+]
+
+foreach unit: test_units
+ exe = executable(
+ unit[0],
+ [unit[0] + '.c'] + unit[1],
+ include_directories: top_inc,
+ dependencies: deps + unit[2],
+ c_args: cflags + unit[3]
+ )
+
+ test(unit[0], exe)
+endforeach
diff --git a/panels/datetime/po-timezones/Makefile.am b/panels/datetime/po-timezones/Makefile.am
index b508d21..cb56b48 100644
--- a/panels/datetime/po-timezones/Makefile.am
+++ b/panels/datetime/po-timezones/Makefile.am
@@ -28,7 +28,7 @@ install: $(CATALOGS)
fi; \
done
-EXTRA_DIST=$(wildcard *.po)
+EXTRA_DIST=$(wildcard *.po) meson.build
CLEANFILES = $(ALL_CATALOGS)
diff --git a/panels/datetime/po-timezones/meson.build b/panels/datetime/po-timezones/meson.build
new file mode 100644
index 0000000..dca8638
--- /dev/null
+++ b/panels/datetime/po-timezones/meson.build
@@ -0,0 +1,73 @@
+linguas = [
+ 'am',
+ 'ar',
+ 'as',
+ 'ast',
+ 'bg',
+ 'bn',
+ 'bn_IN',
+ 'bs',
+ 'ca',
+ 'cs',
+ 'cy',
+ 'da',
+ 'de',
+ 'el',
+ 'en_GB',
+ 'es',
+ 'et',
+ 'fa',
+ 'fi',
+ 'fr',
+ 'gl',
+ 'gu',
+ 'he',
+ 'hi',
+ 'hr',
+ 'hu',
+ 'id',
+ 'ilo',
+ 'is',
+ 'it',
+ 'ja',
+ 'ka',
+ 'kn',
+ 'ko',
+ 'ku',
+ 'lo',
+ 'lt',
+ 'lv',
+ 'mai',
+ 'mk',
+ 'ml',
+ 'mr',
+ 'ms',
+ 'nb',
+ 'nds',
+ 'nl',
+ 'nn',
+ 'or',
+ 'pa',
+ 'pl',
+ 'pt',
+ 'pt_BR',
+ 'ro',
+ 'ru',
+ 'si',
+ 'sk',
+ 'sl',
+ 'sq',
+ 'sr',
+ 'sr@latin',
+ 'sv',
+ 'ta',
+ 'te',
+ 'tr',
+ 'uk',
+ 'ur',
+ 'vi',
+ 'zh_CN',
+ 'zh_TW'
+]
+
+i18n.gettext(control_center_api_name + '-timezones', languages: linguas, preset: 'glib')
diff --git a/panels/display/Makefile.am b/panels/display/Makefile.am
index 253b4bb..b53a07e 100644
--- a/panels/display/Makefile.am
+++ b/panels/display/Makefile.am
@@ -61,7 +61,7 @@ AM_CPPFLAGS = $(PANEL_CFLAGS) \
-DGNOMELOCALEDIR="\"$(datadir)/locale\""
CLEANFILES = $(Desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) display.gresource.xml
+EXTRA_DIST = $(resource_files) display.gresource.xml meson.build icons/meson.build
if MAINTAINER_MODE
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
diff --git a/panels/display/icons/meson.build b/panels/display/icons/meson.build
new file mode 100644
index 0000000..06289d7
--- /dev/null
+++ b/panels/display/icons/meson.build
@@ -0,0 +1,18 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'preferences-desktop-display.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-desktop-display.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/display/meson.build b/panels/display/meson.build
new file mode 100644
index 0000000..4b52ac4
--- /dev/null
+++ b/panels/display/meson.build
@@ -0,0 +1,67 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+# FIXME: You will need a recent intltool or the patch from this bug
+# http://bugzilla.gnome.org/show_bug.cgi?id=462312
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-display-config.c',
+ 'cc-display-config-dbus.c',
+ 'cc-display-config-manager-dbus.c',
+ 'cc-display-config-manager.c',
+ 'cc-night-light-dialog.c',
+ 'cc-night-light-widget.c',
+ 'scrollarea.c',
+)
+
+resource_data = files(
+ 'display.ui',
+ 'icons/16x16/sunset.png',
+ 'icons/16x16/sunrise.png'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: ['.', 'icons'],
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ colord_dep,
+ gnome_desktop_dep,
+ m_dep,
+ upower_glib_dep
+]
+
+cflags = [
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libdisplay = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/info/Makefile.am b/panels/info/Makefile.am
index 87cb6ad..ce27366 100644
--- a/panels/info/Makefile.am
+++ b/panels/info/Makefile.am
@@ -64,6 +64,6 @@ update-from-gsd:
git commit -m "info: Update from gnome-settings-daemon" $(SPACEFILES)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) info.gresource.xml info-cleanup-test.txt
+EXTRA_DIST = $(resource_files) info.gresource.xml info-cleanup-test.txt meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/info/meson.build b/panels/info/meson.build
new file mode 100644
index 0000000..72a486e
--- /dev/null
+++ b/panels/info/meson.build
@@ -0,0 +1,115 @@
+panel_names = [
+ 'default-apps',
+ 'info-overview',
+ 'removable-media'
+]
+
+panel_list += panel_names
+
+foreach name: panel_names
+ desktop = 'gnome-' + name + '-panel.desktop'
+
+ desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+ )
+
+ custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+ )
+endforeach
+
+common_cflags = [
+ '-DBINDIR="@0@"'.format(control_center_bindir),
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOME_SESSION_DIR="@0@"'.format(gnome_session_libexecdir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+gsd_headers = ['gsd-disk-space-helper.h']
+
+gsd_sources = ['gsd-disk-space-helper.c']
+
+sources = files(gsd_sources) + files(
+ 'cc-info-default-apps-panel.c',
+ 'cc-info-overview-panel.c',
+ 'cc-info-removable-media-panel.c',
+ 'info-cleanup.c'
+)
+
+resource_data = files(
+ 'GnomeLogoVerticalMedium.svg',
+ 'info-default-apps.ui',
+ 'info-overview.ui',
+ 'info-removable-media.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ polkit_gobject_dep,
+ dependency('libgtop-2.0')
+]
+
+libinfo = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: common_cflags
+)
+
+name = 'info-cleanup'
+
+sources = files(
+ name + '.c',
+ 'test-' + name + '.c'
+)
+
+cflags = common_cflags + ['-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir())]
+
+exe = executable(
+ 'test-' + name,
+ sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+test(name, exe)
+
+# FIXME: workaround for updating different sources code
+input_dir = join_paths(meson.source_root(), '..', 'gnome-settings-daemon', 'plugins', 'housekeeping')
+
+script_conf = configuration_data()
+script_conf.set('program', update_from_gsd.path())
+script_conf.set('input_dir', input_dir)
+script_conf.set('working_dir', meson.current_source_dir())
+script_conf.set('source_files', ' '.join(gsd_sources + gsd_headers))
+script_conf.set('source_message', 'info: Update from gnome-settings-daemon')
+
+script_name = 'update-info-from-gsd'
+
+script = configure_file(
+ input: update_from_gsd_in,
+ output: script_name + '.sh',
+ configuration: script_conf
+)
+
+run_target(
+ script_name,
+ command: [find_program(join_paths(meson.current_build_dir(), script_name + '.sh'))]
+)
diff --git a/panels/keyboard/Makefile.am b/panels/keyboard/Makefile.am
index ad05b89..696307e 100644
--- a/panels/keyboard/Makefile.am
+++ b/panels/keyboard/Makefile.am
@@ -70,6 +70,7 @@ EXTRA_DIST = $(xml_in_files) \
gnome-keybindings.loc \
gnome-keybindings.pc.in \
$(resource_files) \
- keyboard.gresource.xml
+ keyboard.gresource.xml \
+ meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/keyboard/meson.build b/panels/keyboard/meson.build
new file mode 100644
index 0000000..7f8e0f2
--- /dev/null
+++ b/panels/keyboard/meson.build
@@ -0,0 +1,104 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+its_data = files(
+ 'gnome-keybindings.its',
+ 'gnome-keybindings.loc'
+)
+
+install_data(
+ its_data,
+ install_dir: join_paths(control_center_datadir, 'gettext', 'its')
+)
+
+pc_conf = configuration_data()
+pc_conf.set('prefix', control_center_prefix)
+pc_conf.set('datarootdir', control_center_datadir)
+pc_conf.set('datadir', control_center_datadir)
+pc_conf.set('PACKAGE', meson.project_name())
+pc_conf.set('VERSION', meson.project_version())
+
+pc = 'gnome-keybindings.pc'
+
+configure_file(
+ input: pc + '.in',
+ output: pc,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'pkgconfig'),
+ configuration: pc_conf
+)
+
+xml_files = [
+ '00-multimedia.xml',
+ '01-input-sources.xml',
+ '01-launchers.xml',
+ '01-screenshot.xml',
+ '01-system.xml',
+ '50-accessibility.xml'
+]
+
+foreach file: xml_files
+ custom_target(
+ file,
+ input: file + '.in',
+ output: file,
+ command: [intltool_merge, '-x', '-u', '--no-translations', '@INPUT@', '@OUTPUT@'],
+ install: true,
+ install_dir: join_paths(control_center_pkgdatadir, 'keybindings')
+ )
+endforeach
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-keyboard-item.c',
+ 'cc-keyboard-manager.c',
+ 'cc-keyboard-option.c',
+ 'cc-keyboard-shortcut-editor.c',
+ 'wm-common.c',
+ 'keyboard-shortcuts.c'
+)
+
+resource_data = files(
+ 'enter-keyboard-shortcut.svg',
+ 'gnome-keyboard-panel.ui',
+ 'shortcut-editor.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ gnome_desktop_dep,
+ x11_dep
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libkeyboard = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/meson.build b/panels/meson.build
new file mode 100644
index 0000000..2ef3038
--- /dev/null
+++ b/panels/meson.build
@@ -0,0 +1,44 @@
+panel_list = []
+
+panels = [
+ 'common',
+ 'background',
+ 'power',
+ 'color',
+ 'display',
+ 'mouse',
+ 'notifications',
+ 'online-accounts',
+ 'region',
+ 'info',
+ 'sound',
+ 'keyboard',
+ 'universal-access',
+ 'user-accounts',
+ 'datetime',
+ 'search',
+ 'privacy',
+ 'sharing',
+ 'printers'
+]
+
+if enable_network_manager
+ panels += 'network'
+endif
+
+if enable_bluetooth
+ panels += 'bluetooth'
+endif
+
+if enable_wacom
+ panels += 'wacom'
+endif
+
+foreach cappletname: panels
+ cflags = [
+ '-DG_LOG_DOMAIN="@0@-cc-panel"'.format(cappletname),
+ '-DPANEL_ID="@0@"'.format(cappletname)
+ ]
+
+ subdir(cappletname)
+endforeach
diff --git a/panels/mouse/Makefile.am b/panels/mouse/Makefile.am
index aa86e0a..fe01efb 100644
--- a/panels/mouse/Makefile.am
+++ b/panels/mouse/Makefile.am
@@ -51,6 +51,6 @@ Desktop_in_files = gnome-mouse-panel.desktop.in
desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(Desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) mouse.gresource.xml
+EXTRA_DIST = $(resource_files) mouse.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/mouse/meson.build b/panels/mouse/meson.build
new file mode 100644
index 0000000..d2c39ee
--- /dev/null
+++ b/panels/mouse/meson.build
@@ -0,0 +1,72 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+resource_data = files(
+ 'gnome-mouse-properties.ui',
+ 'gnome-mouse-test.ui',
+ 'scroll-test-gegl.svg',
+ 'scroll-test.svg'
+)
+
+common_sources = gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-mouse-caps-helper.c',
+ 'gnome-mouse-properties.c',
+ 'gnome-mouse-test.c'
+)
+
+deps = common_deps + [
+ gnome_settings_dep,
+ x11_dep,
+ xi_dep
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libmouse_properties = static_library(
+ cappletname + '-properties',
+ sources: sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libdevice
+)
+
+name = 'gnome-mouse-test'
+
+sources = common_sources + files(
+ name + '.c',
+ 'test-' + name + '.c'
+)
+
+executable(
+ 'test-' + name,
+ sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/network/Makefile.am b/panels/network/Makefile.am
index fb2b891..ee368a8 100644
--- a/panels/network/Makefile.am
+++ b/panels/network/Makefile.am
@@ -60,6 +60,6 @@ desktop_in_files = gnome-network-panel.desktop.in gnome-wifi-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) network.gresource.xml
+EXTRA_DIST = $(resource_files) network.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/network/connection-editor/Makefile.am b/panels/network/connection-editor/Makefile.am
index dc78662..d384b0d 100644
--- a/panels/network/connection-editor/Makefile.am
+++ b/panels/network/connection-editor/Makefile.am
@@ -51,6 +51,6 @@ net-connection-editor-resources.h: connection-editor.gresource.xml $(resource_fi
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name
net_connection_editor $<
EXTRA_DIST = \
- $(resource_files) connection-editor.gresource.xml
+ $(resource_files) connection-editor.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/network/connection-editor/meson.build b/panels/network/connection-editor/meson.build
new file mode 100644
index 0000000..5acd21b
--- /dev/null
+++ b/panels/network/connection-editor/meson.build
@@ -0,0 +1,56 @@
+name = 'connection-editor'
+
+sources = files(
+ 'ce-page-8021x-security.c',
+ 'ce-page-details.c',
+ 'ce-page-ethernet.c',
+ 'ce-page-ip4.c',
+ 'ce-page-ip6.c',
+ 'ce-page-security.c',
+ 'ce-page-vpn.c',
+ 'ce-page-wifi.c',
+ 'ce-page.c',
+ 'net-connection-editor.c',
+ 'ui-helpers.c',
+ 'vpn-helpers.c'
+)
+
+resource_data = files(
+ '8021x-security-page.ui',
+ 'connection-editor.ui',
+ 'details-page.ui',
+ 'ethernet-page.ui',
+ 'ip4-page.ui',
+ 'ip6-page.ui',
+ 'security-page.ui',
+ 'vpn-page.ui',
+ 'wifi-page.ui'
+)
+
+c_name = 'net-' + name
+
+sources += gnome.compile_resources(
+ c_name + '-resources',
+ name + '.gresource.xml',
+ source_dir: '.',
+ c_name: c_name.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = [
+ '-DNM_VPN_CONFIG_DIR="@0@"'.format(nm_vpn_config_dir),
+ '-DNM_VPN_MODULE_DIR="@0@"'.format(nm_vpn_module_dir)
+]
+
+libconnection_editor = static_library(
+ name,
+ sources: sources,
+ include_directories: [
+ top_inc,
+ wireless_security_inc
+ ],
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libwireless_security
+)
diff --git a/panels/network/meson.build b/panels/network/meson.build
new file mode 100644
index 0000000..015f7aa
--- /dev/null
+++ b/panels/network/meson.build
@@ -0,0 +1,79 @@
+deps = common_deps + network_manager_deps + [
+ polkit_gobject_dep,
+ dependency('gmodule-2.0')
+]
+
+subdir('wireless-security')
+subdir('connection-editor')
+
+panel_names = [
+ cappletname,
+ 'wifi'
+]
+
+panel_list += panel_names
+
+foreach name: panel_names
+ desktop = 'gnome-' + name + '-panel.desktop'
+
+ desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+ )
+
+ custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+ )
+endforeach
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-wifi-panel.c',
+ 'net-device.c',
+ 'net-device-ethernet.c',
+ 'net-device-mobile.c',
+ 'net-device-simple.c',
+ 'net-device-wifi.c',
+ 'net-object.c',
+ 'net-proxy.c',
+ 'net-vpn.c',
+ 'network-dialogs.c',
+ 'panel-common.c'
+)
+
+resource_data = files(
+ 'network-ethernet.ui',
+ 'network-mobile.ui',
+ 'network-proxy.ui',
+ 'network-simple.ui',
+ 'network.ui',
+ 'network-vpn.ui',
+ 'network-wifi.ui',
+ 'wifi.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libnetwork = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libconnection_editor
+)
diff --git a/panels/network/wireless-security/Makefile.am b/panels/network/wireless-security/Makefile.am
index 2e8d490..d6d9252 100644
--- a/panels/network/wireless-security/Makefile.am
+++ b/panels/network/wireless-security/Makefile.am
@@ -67,6 +67,6 @@ update-from-nma:
git add $(resource_files) && \
git commit -m "network: Update wireless-security UI from network-manager-applet"
-EXTRA_DIST = $(resource_files) wireless-security.gresource.xml nm-connection-editor-to-network-panel.patch
nm-connection-editor-ui-to-network-panel.patch
+EXTRA_DIST = $(resource_files) wireless-security.gresource.xml nm-connection-editor-to-network-panel.patch
nm-connection-editor-ui-to-network-panel.patch meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/network/wireless-security/meson.build b/panels/network/wireless-security/meson.build
new file mode 100644
index 0000000..55f92e1
--- /dev/null
+++ b/panels/network/wireless-security/meson.build
@@ -0,0 +1,100 @@
+name = 'wireless-security'
+
+wireless_security_inc = include_directories('.')
+
+nm_applet_headers = [
+ 'eap-method.h',
+ 'eap-method-fast.h',
+ 'eap-method-leap.h',
+ 'eap-method-peap.h',
+ 'eap-method-simple.h',
+ 'eap-method-tls.h',
+ 'eap-method-ttls.h',
+ 'helpers.h',
+ 'wireless-security.h',
+ 'ws-leap.h',
+ 'ws-dynamic-wep.h',
+ 'ws-wep-key.h',
+ 'ws-wpa-eap.h',
+ 'ws-wpa-psk.h'
+]
+
+nm_applet_sources = [
+ 'eap-method.c',
+ 'eap-method-fast.c',
+ 'eap-method-leap.c',
+ 'eap-method-peap.c',
+ 'eap-method-simple.c',
+ 'eap-method-tls.c',
+ 'eap-method-ttls.c',
+ 'helpers.c',
+ 'wireless-security.c',
+ 'ws-leap.c',
+ 'ws-dynamic-wep.c',
+ 'ws-wep-key.c',
+ 'ws-wpa-eap.c',
+ 'ws-wpa-psk.c'
+]
+
+sources = files(nm_applet_sources) + files('utils.c')
+
+nm_resource_data = [
+ 'eap-method-fast.ui',
+ 'eap-method-leap.ui',
+ 'eap-method-peap.ui',
+ 'eap-method-simple.ui',
+ 'eap-method-tls.ui',
+ 'eap-method-ttls.ui',
+ 'ws-dynamic-wep.ui',
+ 'ws-leap.ui',
+ 'ws-wep-key.ui',
+ 'ws-wpa-eap.ui',
+ 'ws-wpa-psk.ui'
+]
+
+sources += gnome.compile_resources(
+ name + '-resources',
+ name + '.gresource.xml',
+ source_dir: '.',
+ c_name: name.underscorify(),
+ dependencies: files(nm_resource_data),
+ export: true
+)
+
+# FIXME: is this uidir from ./panels/sharing/Makefile.am?
+cflags = '-DUIDIR="@0@"'.format(control_center_pkgdatadir, 'ui', 'sharing')
+
+libwireless_security = static_library(
+ name,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+# FIXME: workaround for updating different sources code
+input_dir = join_paths(meson.source_root(), '..', 'network-manager-applet', 'src', 'wireless-security')
+
+script_conf = configuration_data()
+script_conf.set('program', update_from_gsd.path())
+script_conf.set('input_dir', input_dir)
+script_conf.set('working_dir', meson.current_source_dir())
+script_conf.set('source_files', ' '.join(nm_applet_sources + nm_applet_headers))
+script_conf.set('source_patch', 'nm-connection-editor-to-network-panel.patch')
+script_conf.set('source_message', 'network: Update wireless-security from network-manager-applet')
+script_conf.set('resource_data', ' '.join(nm_resource_data))
+script_conf.set('resource_patch', 'nm-connection-editor-ui-to-network-panel.patch')
+script_conf.set('resource_message', 'network: Update wireless-security UI from network-manager-applet')
+
+script_name = 'update-from-nma'
+
+script = configure_file(
+ input: update_from_nma_in,
+ output: script_name + '.sh',
+ configuration: script_conf
+)
+
+run_target(
+ script_name,
+ command: [find_program(join_paths(meson.current_build_dir(), script_name + '.sh'))]
+)
diff --git a/panels/notifications/Makefile.am b/panels/notifications/Makefile.am
index 03fc755..9eda62e 100644
--- a/panels/notifications/Makefile.am
+++ b/panels/notifications/Makefile.am
@@ -34,6 +34,6 @@ desktop_in_files = gnome-notifications-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) notifications.gresource.xml
+EXTRA_DIST = $(resource_files) notifications.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/notifications/meson.build b/panels/notifications/meson.build
new file mode 100644
index 0000000..7db452c
--- /dev/null
+++ b/panels/notifications/meson.build
@@ -0,0 +1,46 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-edit-dialog.c'
+)
+
+resource_data = files(
+ 'edit-dialog.ui',
+ 'notifications.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libnotifications = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags
+)
diff --git a/panels/online-accounts/Makefile.am b/panels/online-accounts/Makefile.am
index ed553f5..6ad371c 100644
--- a/panels/online-accounts/Makefile.am
+++ b/panels/online-accounts/Makefile.am
@@ -41,6 +41,6 @@ desktop_in_files = gnome-online-accounts-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) online-accounts.gresource.xml
+EXTRA_DIST = $(resource_files) online-accounts.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/online-accounts/icons/Makefile.am b/panels/online-accounts/icons/Makefile.am
index 10789e2..e089966 100644
--- a/panels/online-accounts/icons/Makefile.am
+++ b/panels/online-accounts/icons/Makefile.am
@@ -1,6 +1,8 @@
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256
+EXTRA_DIST = meson.build
+
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
if MAINTAINER_MODE
diff --git a/panels/online-accounts/icons/meson.build b/panels/online-accounts/icons/meson.build
new file mode 100644
index 0000000..93a340a
--- /dev/null
+++ b/panels/online-accounts/icons/meson.build
@@ -0,0 +1,15 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+ '48x48',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'goa-panel.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
diff --git a/panels/online-accounts/meson.build b/panels/online-accounts/meson.build
new file mode 100644
index 0000000..3e3a531
--- /dev/null
+++ b/panels/online-accounts/meson.build
@@ -0,0 +1,48 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('online-accounts.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ goa_dep,
+ libgd_dep,
+ dependency('goa-backend-1.0', version: goa_req_version)
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libonline_accounts = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/power/Makefile.am b/panels/power/Makefile.am
index 1edad41..fc8131d 100644
--- a/panels/power/Makefile.am
+++ b/panels/power/Makefile.am
@@ -45,6 +45,6 @@ desktop_in_files = gnome-power-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) power.gresource.xml
+EXTRA_DIST = $(resource_files) power.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/power/icons/Makefile.am b/panels/power/icons/Makefile.am
index 78ee00b..2c42044 100644
--- a/panels/power/icons/Makefile.am
+++ b/panels/power/icons/Makefile.am
@@ -1,6 +1,8 @@
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256
+EXTRA_DIST = meson.build
+
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
if MAINTAINER_MODE
diff --git a/panels/power/icons/meson.build b/panels/power/icons/meson.build
new file mode 100644
index 0000000..4e36288
--- /dev/null
+++ b/panels/power/icons/meson.build
@@ -0,0 +1,15 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+ '48x48',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'gnome-power-manager.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
diff --git a/panels/power/meson.build b/panels/power/meson.build
new file mode 100644
index 0000000..20d9d75
--- /dev/null
+++ b/panels/power/meson.build
@@ -0,0 +1,55 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('power.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ gnome_settings_dep,
+ upower_glib_dep
+]
+
+if enable_bluetooth
+ deps += gnome_bluetooth_dep
+endif
+
+if enable_network_manager
+ deps += network_manager_deps
+endif
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libpower = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/printers/Makefile.am b/panels/printers/Makefile.am
index 65ecdc3..a465770 100644
--- a/panels/printers/Makefile.am
+++ b/panels/printers/Makefile.am
@@ -73,7 +73,7 @@ desktop_in_files = gnome-printers-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) printers.gresource.xml
+EXTRA_DIST = $(resource_files) printers.gresource.xml meson.build
noinst_PROGRAMS = $(TEST_PROGS)
TEST_PROGS += test-shift test-canonicalization
diff --git a/panels/printers/meson.build b/panels/printers/meson.build
new file mode 100644
index 0000000..c2fa17e
--- /dev/null
+++ b/panels/printers/meson.build
@@ -0,0 +1,99 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'pp-cups.c',
+ 'pp-details-dialog.c',
+ 'pp-host.c',
+ 'pp-ipp-option-widget.c',
+ 'pp-job.c',
+ 'pp-jobs-dialog.c',
+ 'pp-maintenance-command.c',
+ 'pp-new-printer-dialog.c',
+ 'pp-new-printer.c',
+ 'pp-options-dialog.c',
+ 'pp-ppd-option-widget.c',
+ 'pp-ppd-selection-dialog.c',
+ 'pp-print-device.c',
+ 'pp-printer-entry.c',
+ 'pp-printer.c',
+ 'pp-samba.c',
+ 'pp-utils.c'
+)
+
+resource_data = files(
+ 'authentication-dialog.ui',
+ 'details-dialog.ui',
+ 'jobs-dialog.ui',
+ 'new-printer-dialog.ui',
+ 'options-dialog.ui',
+ 'ppd-selection-dialog.ui',
+ 'printer-entry.ui',
+ 'printers.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ cups_dep,
+ m_dep,
+ polkit_gobject_dep,
+ dependency('smbclient')
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libprinters = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc, shell_inc],
+ dependencies: deps,
+ c_args: cflags
+)
+
+test_units = [
+ 'test-canonicalization',
+ 'test-shift'
+]
+
+sources = files(
+ 'pp-print-device.c',
+ 'pp-utils.c'
+)
+
+cflags = '-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir())
+
+foreach unit: test_units
+ exe = executable(
+ unit,
+ [unit + '.c'] + sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+ )
+
+ test(unit, exe)
+endforeach
diff --git a/panels/privacy/Makefile.am b/panels/privacy/Makefile.am
index ec9e5cc..73d5084 100644
--- a/panels/privacy/Makefile.am
+++ b/panels/privacy/Makefile.am
@@ -33,6 +33,6 @@ desktop_in_files = gnome-privacy-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) privacy.gresource.xml
+EXTRA_DIST = $(resource_files) privacy.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/privacy/meson.build b/panels/privacy/meson.build
new file mode 100644
index 0000000..3b4ecff
--- /dev/null
+++ b/panels/privacy/meson.build
@@ -0,0 +1,40 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('privacy.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libprivacy = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: common_deps,
+ c_args: cflags
+)
diff --git a/panels/region/Makefile.am b/panels/region/Makefile.am
index bdef769..c289ce3 100644
--- a/panels/region/Makefile.am
+++ b/panels/region/Makefile.am
@@ -47,6 +47,6 @@ Desktop_in_files = gnome-region-panel.desktop.in
desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(Desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) region.gresource.xml
+EXTRA_DIST = $(resource_files) region.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/region/meson.build b/panels/region/meson.build
new file mode 100644
index 0000000..e0e1958
--- /dev/null
+++ b/panels/region/meson.build
@@ -0,0 +1,60 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-format-chooser.c',
+ 'cc-ibus-utils.c',
+ 'cc-input-chooser.c',
+ 'cc-input-options.c'
+)
+
+resource_data = files(
+ 'format-chooser.ui',
+ 'input-chooser.ui',
+ 'input-options.ui',
+ 'region.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ accounts_dep,
+ gnome_desktop_dep,
+ libgd_dep,
+ polkit_gobject_dep
+]
+
+if enable_ibus
+ deps += dependency('ibus-1.0', version: '>= 1.5.2')
+endif
+
+libregion = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: deps,
+ link_with: liblanguage
+)
diff --git a/panels/search/Makefile.am b/panels/search/Makefile.am
index 2041bc0..323cb03 100644
--- a/panels/search/Makefile.am
+++ b/panels/search/Makefile.am
@@ -36,6 +36,6 @@ desktop_in_files = gnome-search-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) search.gresource.xml
+EXTRA_DIST = $(resource_files) search.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/search/meson.build b/panels/search/meson.build
new file mode 100644
index 0000000..9c7b32d
--- /dev/null
+++ b/panels/search/meson.build
@@ -0,0 +1,49 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-search-locations-dialog.c'
+)
+
+resource_data = files(
+ 'search-locations-dialog.ui',
+ 'search.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = [
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libsearch = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags
+)
diff --git a/panels/sharing/Makefile.am b/panels/sharing/Makefile.am
index ec5cd3f..24b805d 100644
--- a/panels/sharing/Makefile.am
+++ b/panels/sharing/Makefile.am
@@ -76,6 +76,6 @@ desktop_in_files = gnome-sharing-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(polkit_policy_DATA) $(polkit_policy_in_files)
$(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) sharing.gresource.xml
org.gnome.controlcenter.remote-login-helper.policy.in.in org.gnome.SettingsDaemon.Sharing.xml
+EXTRA_DIST = $(resource_files) sharing.gresource.xml
org.gnome.controlcenter.remote-login-helper.policy.in.in org.gnome.SettingsDaemon.Sharing.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/sharing/meson.build b/panels/sharing/meson.build
new file mode 100644
index 0000000..0864681
--- /dev/null
+++ b/panels/sharing/meson.build
@@ -0,0 +1,100 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+polkit_conf = configuration_data()
+polkit_conf.set('libexecdir', control_center_libexecdir)
+
+polkit = 'org.gnome.controlcenter.remote-login-helper.policy'
+
+polkit_in = configure_file(
+ input: polkit + '.in.in',
+ output: polkit + '.in',
+ configuration: polkit_conf
+)
+
+custom_target(
+ polkit,
+ input: polkit_in,
+ output: polkit,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-media-sharing.c',
+ 'cc-remote-login.c',
+ 'cc-sharing-networks.c',
+ 'cc-sharing-switch.c',
+ 'file-share-properties.c',
+ 'vino-preferences.c'
+)
+
+resource_data = files(
+ 'networks.ui',
+ 'sharing.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+settings_daemon = 'org.gnome.SettingsDaemon'
+gdbus = settings_daemon + '.Sharing'
+
+sources += gnome.gdbus_codegen(
+ gdbus,
+ gdbus + '.xml',
+ interface_prefix: settings_daemon + '.',
+ namespace: 'Gsd'
+)
+
+cflags = [
+ '-DLIBEXECDIR="@0@"'.format(control_center_libexecdir),
+ '-DSYSCONFDIR="@0@"'.format(control_center_sysconfdir)
+]
+
+libsharing = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags
+)
+
+name = 'cc-remote-login-helper'
+
+deps = [
+ gio_dep,
+ glib_dep
+]
+
+executable(
+ name,
+ name + '.c',
+ include_directories: top_inc,
+ dependencies: deps,
+ install: true,
+ install_dir: control_center_libexecdir
+)
diff --git a/panels/sound/Makefile.am b/panels/sound/Makefile.am
index fb66d37..a9a42fd 100644
--- a/panels/sound/Makefile.am
+++ b/panels/sound/Makefile.am
@@ -64,6 +64,9 @@ CLEANFILES = \
$(BUILT_SOURCES) \
$(NULL)
+EXTRA_DIST = \
+ meson.build
+
MAINTAINERCLEANFILES = \
*~ \
Makefile.in
diff --git a/panels/sound/data/icons/Makefile.am b/panels/sound/data/icons/Makefile.am
index 35e2de2..c2884ea 100644
--- a/panels/sound/data/icons/Makefile.am
+++ b/panels/sound/data/icons/Makefile.am
@@ -9,4 +9,6 @@ SUBDIRS = \
48x48 \
$(NULL)
+EXTRA_DIST = meson.build
+
-include $(top_srcdir)/git.mk
diff --git a/panels/sound/data/icons/meson.build b/panels/sound/data/icons/meson.build
new file mode 100644
index 0000000..99063e4
--- /dev/null
+++ b/panels/sound/data/icons/meson.build
@@ -0,0 +1,71 @@
+apps_files = [
+ 'multimedia-volume-control.png',
+ 'multimedia-volume-control.svg'
+]
+
+device_files = [
+ 'audio-headset.svg'
+]
+
+status_files = [
+ 'audio-input-microphone-high.png',
+ 'audio-input-microphone-low.png',
+ 'audio-input-microphone-medium.png',
+ 'audio-input-microphone-muted.png'
+]
+
+scalable_device_files = [
+ 'audio-speaker-center-back.svg',
+ 'audio-speaker-center-back-testing.svg',
+ 'audio-speaker-center.svg',
+ 'audio-speaker-center-testing.svg',
+ 'audio-speaker-left-back.svg',
+ 'audio-speaker-left-back-testing.svg',
+ 'audio-speaker-left-side.svg',
+ 'audio-speaker-left-side-testing.svg',
+ 'audio-speaker-left.svg',
+ 'audio-speaker-left-testing.svg',
+ 'audio-speaker-mono.svg',
+ 'audio-speaker-mono-testing.svg',
+ 'audio-speaker-right-back.svg',
+ 'audio-speaker-right-back-testing.svg',
+ 'audio-speaker-right-side.svg',
+ 'audio-speaker-right-side-testing.svg',
+ 'audio-speaker-right.svg',
+ 'audio-speaker-right-testing.svg',
+ 'audio-speaker-testing.svg',
+ 'audio-subwoofer.svg',
+ 'audio-subwoofer-testing.svg'
+]
+
+icon_sizes = [
+ ['16x16', [apps_files, device_files, status_files]],
+ ['22x22', [apps_files, [], status_files]],
+ ['24x24', [['multimedia-volume-control.png'], device_files, status_files]],
+ ['32x32', [apps_files, device_files, status_files]],
+ ['48x48', [['multimedia-volume-control.png'], device_files, []]],
+ ['scalable', [['multimedia-volume-control.svg'], scalable_device_files, []]]
+]
+
+foreach icon_size: icon_sizes
+ foreach file: icon_size[1][0]
+ install_data(
+ join_paths(icon_size[0], 'apps', file),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size[0], 'apps')
+ )
+ endforeach
+
+ foreach file: icon_size[1][1]
+ install_data(
+ join_paths(icon_size[0], 'devices', file),
+ install_dir: join_paths(control_center_pkgdatadir, 'icons', 'hicolor', icon_size[0], 'devices')
+ )
+ endforeach
+
+ foreach file: icon_size[1][2]
+ install_data(
+ join_paths(icon_size[0], 'status', file),
+ install_dir: join_paths(control_center_pkgdatadir, 'icons', 'hicolor', icon_size[0], 'status')
+ )
+ endforeach
+endforeach
diff --git a/panels/sound/data/sounds/Makefile.am b/panels/sound/data/sounds/Makefile.am
index 3277593..ed0cac5 100644
--- a/panels/sound/data/sounds/Makefile.am
+++ b/panels/sound/data/sounds/Makefile.am
@@ -17,7 +17,7 @@ metadata_DATA = $(metadata_in_files:.xml.in=.xml)
noinst_DATA = gnome-sounds-default.xml.in
CLEANFILES = gnome-sounds-default.xml gnome-sounds-default.xml.in
-EXTRA_DIST = $(sound_DATA) gnome-sounds-default.xml.in.in
+EXTRA_DIST = $(sound_DATA) gnome-sounds-default.xml.in.in meson.build
gnome-sounds-default.xml.in: gnome-sounds-default.xml.in.in Makefile
$(AM_V_GEN)sed -e 's^\@datadir\@^$(datadir)^g' < $(srcdir)/gnome-sounds-default.xml.in.in >
gnome-sounds-default.xml.in.tmp \
diff --git a/panels/sound/data/sounds/meson.build b/panels/sound/data/sounds/meson.build
new file mode 100644
index 0000000..2d9321a
--- /dev/null
+++ b/panels/sound/data/sounds/meson.build
@@ -0,0 +1,31 @@
+sound_data = files(
+ 'bark.ogg',
+ 'drip.ogg',
+ 'glass.ogg',
+ 'sonar.ogg'
+)
+
+install_data(
+ sound_data,
+ install_dir: join_paths(control_center_datadir, 'sounds', 'gnome', 'default', 'alerts')
+)
+
+metadata_conf = configuration_data()
+metadata_conf.set('datadir', control_center_datadir)
+
+metadata = 'gnome-sounds-default.xml'
+
+metadata_in = configure_file(
+ input: metadata + '.in.in',
+ output: metadata + '.in',
+ configuration: metadata_conf
+)
+
+custom_target(
+ metadata,
+ input: metadata_in,
+ output: metadata,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_pkgdatadir, 'sounds')
+)
diff --git a/panels/sound/data/symbolic-icons/Makefile.am b/panels/sound/data/symbolic-icons/Makefile.am
index 9f95f49..b6ca043 100644
--- a/panels/sound/data/symbolic-icons/Makefile.am
+++ b/panels/sound/data/symbolic-icons/Makefile.am
@@ -5,6 +5,7 @@ SUBDIRS = scalable
EXTRA_DIST = \
src \
r.rb \
+ meson.build \
$(NULL)
-include $(top_srcdir)/git.mk
diff --git a/panels/sound/data/symbolic-icons/meson.build b/panels/sound/data/symbolic-icons/meson.build
new file mode 100644
index 0000000..131fb09
--- /dev/null
+++ b/panels/sound/data/symbolic-icons/meson.build
@@ -0,0 +1,13 @@
+status_files = [
+ 'audio-input-microphone-high-symbolic.svg',
+ 'audio-input-microphone-low-symbolic.svg',
+ 'audio-input-microphone-medium-symbolic.svg',
+ 'audio-input-microphone-muted-symbolic.svg'
+]
+
+foreach file: status_files
+ install_data(
+ join_paths('scalable', 'status', file),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'status')
+ )
+endforeach
diff --git a/panels/sound/meson.build b/panels/sound/meson.build
new file mode 100644
index 0000000..f70ba99
--- /dev/null
+++ b/panels/sound/meson.build
@@ -0,0 +1,67 @@
+subdir('data/icons')
+subdir('data/sounds')
+subdir('data/symbolic-icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: 'data/' + desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+deps = common_deps + [
+ libgvc_dep,
+ libxml_dep,
+ m_dep,
+ pulse_dep,
+ pulse_mainloop_dep,
+ dependency('libcanberra-gtk3', version: '>= 0.13')
+]
+
+cflags = [
+ '-DGLADEDIR="@0@"'.format(control_center_pkgdatadir),
+ '-DICON_DATA_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'icons')),
+ '-DLIBEXECDIR="@0@"'.format(control_center_libexecdir),
+ '-DLOCALE_DIR="@0@"'.format(control_center_localedir),
+ '-DSOUND_DATA_DIR="@0@"'.format(join_paths(control_center_datadir, 'sounds')),
+ '-DSOUND_SET_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'sounds'))
+]
+
+libgvcgtk = static_library(
+ 'gvcgtk',
+ sources: 'gvc-channel-bar.c',
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'gvc-balance-bar.c',
+ 'gvc-combo-box.c',
+ 'gvc-level-bar.c',
+ 'gvc-mixer-dialog.c',
+ 'gvc-sound-theme-chooser.c',
+ 'gvc-speaker-test.c',
+ 'sound-theme-file-utils.c'
+)
+
+libsound = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libgvcgtk
+)
diff --git a/panels/universal-access/Makefile.am b/panels/universal-access/Makefile.am
index b0efc5e..779bb96 100644
--- a/panels/universal-access/Makefile.am
+++ b/panels/universal-access/Makefile.am
@@ -35,6 +35,6 @@ desktop_in_files = gnome-universal-access-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) universal-access.gresource.xml
+EXTRA_DIST = $(resource_files) universal-access.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/universal-access/meson.build b/panels/universal-access/meson.build
new file mode 100644
index 0000000..7956ac9
--- /dev/null
+++ b/panels/universal-access/meson.build
@@ -0,0 +1,53 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-ua-panel.c',
+ 'zoom-options.c'
+)
+
+resource_data = files(
+ 'left_ptr_24px.png',
+ 'left_ptr_32px.png',
+ 'left_ptr_48px.png',
+ 'left_ptr_64px.png',
+ 'left_ptr_96px.png',
+ 'uap.ui',
+ 'zoom-options.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-ua-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [m_dep]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libuniversal_access = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/user-accounts/Makefile.am b/panels/user-accounts/Makefile.am
index bfa7821..b85a018 100644
--- a/panels/user-accounts/Makefile.am
+++ b/panels/user-accounts/Makefile.am
@@ -116,6 +116,7 @@ EXTRA_DIST = \
$(polkit_in_files) \
$(resource_files) \
user-accounts.gresource.xml \
+ meson.build \
$(NULL)
CLEANFILES = \
diff --git a/panels/user-accounts/meson.build b/panels/user-accounts/meson.build
new file mode 100644
index 0000000..ebd04d6
--- /dev/null
+++ b/panels/user-accounts/meson.build
@@ -0,0 +1,171 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: 'data/' + desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+image_data = files(
+ 'data/faces/astronaut.jpg',
+ 'data/faces/baseball.png',
+ 'data/faces/butterfly.png',
+ 'data/faces/cat-eye.jpg',
+ 'data/faces/chess.jpg',
+ 'data/faces/coffee.jpg',
+ 'data/faces/dice.jpg',
+ 'data/faces/energy-arc.jpg',
+ 'data/faces/fish.jpg',
+ 'data/faces/flake.jpg',
+ 'data/faces/flower.jpg',
+ 'data/faces/grapes.jpg',
+ 'data/faces/guitar.jpg',
+ 'data/faces/launch.jpg',
+ 'data/faces/leaf.jpg',
+ 'data/faces/lightning.jpg',
+ 'data/faces/penguin.jpg',
+ 'data/faces/puppy.jpg',
+ 'data/faces/sky.jpg',
+ 'data/faces/soccerball.png',
+ 'data/faces/sunflower.jpg',
+ 'data/faces/sunset.jpg',
+ 'data/faces/tennis-ball.png',
+ 'data/faces/yellow-rose.jpg'
+)
+
+install_data(
+ image_data,
+ install_dir: join_paths(control_center_datadir, 'pixmaps', 'faces')
+)
+
+polkit = 'org.gnome.controlcenter.' + cappletname + '.policy'
+
+custom_target(
+ polkit,
+ input: polkit + '.in',
+ output: polkit,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+common_sources = files(
+ 'pw-utils.c',
+ 'um-account-dialog.c',
+ 'um-realm-manager.c',
+ 'um-utils.c'
+)
+
+resource_data = files(
+ 'data/icons/left-index-finger.png',
+ 'data/icons/left-little-finger.png',
+ 'data/icons/left-middle-finger.png',
+ 'data/icons/left-ring-finger.png',
+ 'data/icons/left-thumb.png',
+ 'data/icons/print_error.png',
+ 'data/icons/print_ok.png',
+ 'data/icons/right-index-finger.png',
+ 'data/icons/right-little-finger.png',
+ 'data/icons/right-middle-finger.png',
+ 'data/icons/right-ring-finger.png',
+ 'data/icons/right-thumb.png',
+ 'data/account-dialog.ui',
+ 'data/account-fingerprint.ui',
+ 'data/carousel.css',
+ 'data/carousel.ui',
+ 'data/history-dialog.ui',
+ 'data/join-dialog.ui',
+ 'data/password-dialog.ui',
+ 'data/user-accounts-dialog.css',
+ 'data/user-accounts-dialog.ui'
+)
+
+common_sources += gnome.compile_resources(
+ 'um-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'um',
+ dependencies: resource_data,
+ export: true
+)
+
+realmd_namespace = 'org.freedesktop.realmd'
+
+common_sources += gnome.gdbus_codegen(
+ 'um-realm-generated',
+ 'data/' + realmd_namespace + '.xml',
+ interface_prefix: realmd_namespace + '.',
+ namespace: 'UmRealm',
+ object_manager: true,
+ annotations: ['org.freedesktop.realmd.Realm', 'org.gtk.GDBus.C.Name', 'Common']
+)
+
+sources = common_sources + files(
+ 'cc-crop-area.c',
+ 'run-passwd.c',
+ 'um-account-type.c',
+ 'um-carousel.c',
+ 'um-cell-renderer-user-image.c',
+ 'um-fingerprint-dialog.c',
+ 'um-history-dialog.c',
+ 'um-password-dialog.c',
+ 'um-photo-dialog.c',
+ 'um-user-image.c',
+ 'um-user-panel.c'
+)
+
+# Kerberos kerberos support
+krb_dep = dependency('krb5', required: false)
+assert(krb_dep.found(), 'kerberos libraries not found in your path')
+
+deps = common_deps + [
+ accounts_dep,
+ gdk_pixbuf_dep,
+ gnome_desktop_dep,
+ libgd_dep,
+ krb_dep,
+ m_dep,
+ polkit_gobject_dep,
+ dependency('pwquality', version: '>= 1.2.2')
+]
+
+if enable_cheese
+ deps += cheese_deps
+endif
+
+cflags = [
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+ '-DHAVE_LIBPWQUALITY',
+ '-DUM_PIXMAP_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'pixmaps'))
+]
+
+libuser_accounts = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc, shell_inc],
+ dependencies: deps,
+ c_args: cflags,
+ link_with: liblanguage
+)
+
+name = 'frob-account-dialog'
+
+sources = common_sources + files(name + '.c')
+
+executable(
+ name,
+ sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/wacom/Makefile.am b/panels/wacom/Makefile.am
index 78e9211..e678abc 100644
--- a/panels/wacom/Makefile.am
+++ b/panels/wacom/Makefile.am
@@ -86,6 +86,6 @@ desktop_in_files = gnome-wacom-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(Desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) wacom.gresource.xml
+EXTRA_DIST = $(resource_files) wacom.gresource.xml meson.build
-include $(top_srcdir)/git.mk
diff --git a/panels/wacom/calibrator/Makefile.am b/panels/wacom/calibrator/Makefile.am
index 38e9e82..c0df5f5 100644
--- a/panels/wacom/calibrator/Makefile.am
+++ b/panels/wacom/calibrator/Makefile.am
@@ -44,4 +44,6 @@ test_calibrator_SOURCES = \
test_calibrator_CPPFLAGS = $(AM_CPPFLAGS)
test_calibrator_LDADD = $(PANEL_LIBS) $(WACOM_PANEL_LIBS) $(LIBM)
+EXTRA_DIST = meson.build
+
-include $(top_srcdir)/git.mk
diff --git a/panels/wacom/calibrator/meson.build b/panels/wacom/calibrator/meson.build
new file mode 100644
index 0000000..2877904
--- /dev/null
+++ b/panels/wacom/calibrator/meson.build
@@ -0,0 +1,36 @@
+calibrator_inc = include_directories('.')
+
+common_sources = files(
+ 'calibrator.c',
+ 'calibrator-gui.c',
+ 'cc-clock-actor.c',
+ 'cc-target-actor.c'
+)
+
+calibrator_deps = deps + [m_dep]
+
+libwacom_calibrator = static_library(
+ cappletname + '-calibrator',
+ sources: common_sources,
+ include_directories: top_inc,
+ dependencies: calibrator_deps,
+ c_args: cflags
+)
+
+libwacom_calibrator_test = static_library(
+ cappletname + '-calibrator-test',
+ sources: common_sources,
+ include_directories: top_inc,
+ dependencies: calibrator_deps,
+ c_args: test_cflags
+)
+
+sources = common_sources + files('main.c')
+
+executable(
+ 'test-calibrator',
+ sources,
+ include_directories: top_inc,
+ dependencies: calibrator_deps,
+ c_args: cflags
+)
diff --git a/panels/wacom/meson.build b/panels/wacom/meson.build
new file mode 100644
index 0000000..c4099b4
--- /dev/null
+++ b/panels/wacom/meson.build
@@ -0,0 +1,105 @@
+deps = wacom_deps + [
+ gnome_desktop_dep,
+ gnome_settings_dep,
+ x11_dep,
+ xi_dep
+]
+
+cflags = ['-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)]
+
+test_cflags = cflags + ['-DFAKE_AREA']
+
+subdir('calibrator')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+common_sources = files(
+ 'cc-tablet-tool-map.c',
+ 'cc-wacom-button-row.c',
+ 'cc-wacom-device.c',
+ 'cc-wacom-mapping-panel.c',
+ 'cc-wacom-nav-button.c',
+ 'cc-wacom-page.c',
+ 'cc-wacom-stylus-page.c',
+ 'cc-wacom-tool.c',
+ 'gsd-wacom-key-shortcut-button.c'
+)
+
+resource_data = files(
+ 'button-mapping.ui',
+ 'gnome-wacom-properties.ui',
+ 'wacom-stylus-airbrush.svg',
+ 'wacom-stylus-art-pen.svg',
+ 'wacom-stylus-classic.svg',
+ 'wacom-stylus-inking.svg',
+ 'wacom-stylus-no-eraser.svg',
+ 'wacom-stylus-page.ui',
+ 'wacom-stylus.svg',
+ 'wacom-tablet-cintiq.svg',
+ 'wacom-tablet-pc.svg',
+ 'wacom-tablet.svg'
+)
+
+common_sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-drawing-area.c'
+)
+
+incs = [
+ top_inc,
+ common_inc,
+ calibrator_inc
+]
+
+libwacom_properties = static_library(
+ cappletname + '-properties',
+ sources: sources,
+ include_directories: incs,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: [
+ libdevice,
+ libwacom_calibrator
+ ]
+)
+
+name = 'test-wacom'
+
+sources = common_sources + files(name + '.c')
+
+executable(
+ name,
+ sources,
+ include_directories: incs,
+ dependencies: deps,
+ c_args: test_cflags,
+ link_with: [
+ libdevice,
+ libwacom_calibrator_test
+ ]
+)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..ac7bc95
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(control_center_api_name, preset: 'glib')
diff --git a/search-provider/Makefile.am b/search-provider/Makefile.am
index 9330ff9..a07599c 100644
--- a/search-provider/Makefile.am
+++ b/search-provider/Makefile.am
@@ -46,7 +46,7 @@ service_in_files = \
org.gnome.ControlCenter.SearchProvider.service: org.gnome.ControlCenter.SearchProvider.service.in Makefile
$(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
-EXTRA_DIST = $(service_in_files) org.gnome.ShellSearchProvider2.xml
+EXTRA_DIST = $(service_in_files) org.gnome.ShellSearchProvider2.xml meson.build
searchproviderdir = $(datadir)/gnome-shell/search-providers
dist_searchprovider_DATA = gnome-control-center-search-provider.ini
diff --git a/search-provider/meson.build b/search-provider/meson.build
new file mode 100644
index 0000000..0fd8699
--- /dev/null
+++ b/search-provider/meson.build
@@ -0,0 +1,50 @@
+service_conf = configuration_data()
+service_conf.set('libexecdir', control_center_libexecdir)
+
+service = 'org.gnome.ControlCenter.SearchProvider.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
+
+install_data(
+ 'gnome-control-center-search-provider.ini',
+ install_dir: join_paths(control_center_datadir, 'gnome-shell', 'search-providers')
+)
+
+sources = files(
+ 'cc-search-provider.c',
+ 'control-center-search-provider.c'
+)
+
+# The upstream for the DBus interface definition is
+# at http://git.gnome.org/browse/gnome-shell/plain/data/org.gnome.ShellSearchProvider2.xml
+sources += gnome.gdbus_codegen(
+ 'cc-shell-search-provider-generated',
+ 'org.gnome.ShellSearchProvider2.xml',
+ interface_prefix: 'org.gnome.',
+ namespace: 'Cc'
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libs = [
+ liblanguage,
+ libpanel_loader,
+ libshell
+]
+
+executable(
+ meson.project_name() + '-search-provider',
+ sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: shell_deps,
+ c_args: cflags,
+ link_with: libs,
+ install: true,
+ install_dir: control_center_libexecdir
+)
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 7f274a1..2adc5f2 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -144,7 +144,9 @@ EXTRA_DIST = \
panel-list.ui \
window.ui \
$(resource_files) \
- list-panel.sh
+ list-panel.sh \
+ meson.build \
+ completions/meson.build
CLEANFILES = $(BUILT_SOURCES) $(completion_DATA) $(servicefile_DATA)
DISTCLEANFILES = gnome-control-center.desktop gnome-control-center.desktop.in
diff --git a/shell/appdata/Makefile.am b/shell/appdata/Makefile.am
index 51bc83b..29e3d2b 100644
--- a/shell/appdata/Makefile.am
+++ b/shell/appdata/Makefile.am
@@ -6,7 +6,9 @@ appdata_in_files = \
test:
-EXTRA_DIST = $(appdata_in_files)
+EXTRA_DIST = \
+ $(appdata_in_files) \
+ meson.build
CLEANFILES = \
gnome-control-center.appdata.xml
diff --git a/shell/appdata/meson.build b/shell/appdata/meson.build
new file mode 100644
index 0000000..d480daa
--- /dev/null
+++ b/shell/appdata/meson.build
@@ -0,0 +1,10 @@
+appdata = 'gnome-control-center.appdata.xml'
+
+custom_target(
+ appdata,
+ input: appdata + '.in',
+ output: appdata,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'metainfo')
+)
diff --git a/shell/completions/meson.build b/shell/completions/meson.build
new file mode 100644
index 0000000..cb2c1be
--- /dev/null
+++ b/shell/completions/meson.build
@@ -0,0 +1,10 @@
+completion_conf = configuration_data()
+completion_conf.set('PANELS', ' '.join(panel_list))
+
+desktop_in = configure_file(
+ input: meson.project_name() + '.in',
+ output: meson.project_name(),
+ configuration: completion_conf,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'bash-completion', 'completions')
+)
diff --git a/shell/meson.build b/shell/meson.build
new file mode 100644
index 0000000..699e042
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,166 @@
+subdir('appdata')
+subdir('completions')
+
+service_conf = configuration_data()
+service_conf.set('bindir', control_center_bindir)
+
+service = 'org.gnome.ControlCenter.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
+
+desktop = meson.project_name() + '.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+cflags = ['-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)]
+
+libshell = static_library(
+ 'shell',
+ sources: 'cc-shell-model.c',
+ include_directories: [top_inc, common_inc],
+ dependencies: common_deps,
+ c_args: cflags
+)
+
+common_sources = files(
+ 'cc-application.c',
+ 'cc-editable-entry.c',
+ 'cc-hostname-entry.c',
+ 'cc-panel-loader.c',
+ 'cc-panel.c',
+ 'cc-shell-category-view.c',
+ 'cc-shell-item-view.c',
+ 'cc-shell-log.c',
+ 'cc-shell.c',
+ 'hostname-helper.c',
+ 'list-box-helper.c',
+ 'main.c'
+)
+
+resource_data = files(
+ 'help-overlay.ui',
+ 'panel-list.ui',
+ 'window.ui'
+)
+
+common_sources += gnome.compile_resources(
+ 'resources',
+ meson.project_name() + '.gresource.xml',
+ source_dir: '.',
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'cc-panel-list.c',
+ 'cc-window.c'
+)
+
+shell_deps = common_deps + [
+ libgd_dep,
+ polkit_gobject_dep,
+ x11_dep
+]
+
+if enable_cheese
+ shell_deps += cheese_deps
+endif
+
+libs = [
+ liblanguage,
+ libdevice,
+ libbackground,
+ libpower,
+ libcolor,
+ libdisplay,
+ libmouse_properties,
+ libnotifications,
+ libonline_accounts,
+ libregion,
+ libinfo,
+ libsound,
+ libkeyboard,
+ libuniversal_access,
+ libuser_accounts,
+ libdatetime,
+ libsearch,
+ libprivacy,
+ libsharing,
+ libprinters,
+ libshell
+]
+
+if enable_wacom
+ libs += libwacom_properties
+endif
+
+if enable_network_manager
+ libs += libnetwork
+endif
+
+if enable_bluetooth
+ libs += libbluetooth
+endif
+
+executable(
+ meson.project_name(),
+ sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: shell_deps,
+ c_args: cflags,
+ link_with: libs,
+ install: true,
+ install_dir: control_center_bindir
+)
+
+# Because it is confusing and somewhat problematic to directly add and compile
+# cc-panel-loader.o by another directory (i.e. the shell search provider), we
+# have to create a library and link it there, just like libshell.la.
+libpanel_loader = static_library(
+ 'panel_loader',
+ sources: 'cc-panel-loader.c',
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags + ['-DCC_PANEL_LOADER_NO_GTYPES']
+)
+
+test_unit = 'test-hostname'
+
+sources = files(
+ test_unit + '.c',
+ 'hostname-helper.c'
+)
+
+cflags = cflags + [
+ '-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
+ '-DTEST_TOPSRCDIR="@0@"'.format(meson.source_root())
+]
+
+exe = executable(
+ test_unit,
+ sources,
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags
+)
+
+test(test_unit, exe)
diff --git a/subprojects/gvc b/subprojects/gvc
index ce8e488..3093bdb 160000
--- a/subprojects/gvc
+++ b/subprojects/gvc
@@ -1 +1 @@
-Subproject commit ce8e4880ce31e275c40825c4ed756c791107f810
+Subproject commit 3093bdb0777db1b1431bede19373ae5eac98accd
diff --git a/subprojects/libgd b/subprojects/libgd
index 752f65e..cc90107 160000
--- a/subprojects/libgd
+++ b/subprojects/libgd
@@ -1 +1 @@
-Subproject commit 752f65e91ea0d9a2ee8a2d21343bbd97bd0d038a
+Subproject commit cc90107531640bcba6c3c58e5cf6aec94d498763
diff --git a/update-from-gsd.in b/update-from-gsd.in
new file mode 100755
index 0000000..29d06be
--- /dev/null
+++ b/update-from-gsd.in
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd @working_dir@
+
+export FILES="@source_files@"
+export DIR="@input_dir@"
+
+@program@ &&
+git add @source_files@ &&
+git commit -m "@source_message@"
diff --git a/update-from-gsd.sh b/update-from-gsd.sh
index 6eccb4c..9f2d6b7 100755
--- a/update-from-gsd.sh
+++ b/update-from-gsd.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
function die() {
echo $*
diff --git a/update-from-nma.in b/update-from-nma.in
new file mode 100755
index 0000000..76738b1
--- /dev/null
+++ b/update-from-nma.in
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+cd @working_dir@
+
+export FILES="@source_files@"
+export DIR="@input_dir@"
+
+@program@ &&
+patch -p4 < @source_patch@ &&
+git add @source_files@ &&
+git commit -m "@source_message@"
+
+export FILES="@resource_data@"
+export DIR="@input_dir@"
+
+@program@ &&
+patch -p4 < @resource_patch@ &&
+git add @resource_data@ &&
+git commit -m "@resource_message@"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]