summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-07-25 22:28:38 +0200
committerIñigo Martínez <inigomartinez@gmail.com>2018-01-17 21:28:19 +0100
commitc37713b1bac27dc9ca510e840fe96e43b0690f2b (patch)
tree4728812afdcb8bb1011a2b0f9af7f0fdc2c3f536
parentcfbf9e672d8f071dd282eeb1ce6b438149cfc5d8 (diff)
downloadgnome-control-center-wip/inigomartinez/meson.tar.gz
build: Port to meson build systemwip/inigomartinez/meson
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
-rw-r--r--Makefile.am9
-rw-r--r--data/icons/Makefile.am1
-rw-r--r--data/icons/meson.build19
-rw-r--r--man/Makefile.am4
-rw-r--r--man/meson.build26
-rw-r--r--meson.build281
-rw-r--r--meson_options.txt8
-rw-r--r--meson_post_install.py19
-rw-r--r--panels/Makefile.am2
-rw-r--r--panels/background/Makefile.am2
-rw-r--r--panels/background/meson.build125
-rw-r--r--panels/bluetooth/Makefile.am2
-rw-r--r--panels/bluetooth/meson.build41
-rw-r--r--panels/color/Makefile.am2
-rw-r--r--panels/color/icons/Makefile.am2
-rw-r--r--panels/color/icons/meson.build21
-rw-r--r--panels/color/meson.build62
-rw-r--r--panels/common/Makefile.am2
-rw-r--r--panels/common/meson.build123
-rw-r--r--panels/datetime/Makefile.am4
-rw-r--r--panels/datetime/icons/meson.build19
-rw-r--r--panels/datetime/meson.build214
-rw-r--r--panels/datetime/po-timezones/Makefile.am2
-rw-r--r--panels/datetime/po-timezones/meson.build73
-rw-r--r--panels/display/Makefile.am2
-rw-r--r--panels/display/icons/meson.build18
-rw-r--r--panels/display/meson.build67
-rw-r--r--panels/info/Makefile.am2
-rw-r--r--panels/info/meson.build114
-rw-r--r--panels/keyboard/Makefile.am3
-rw-r--r--panels/keyboard/meson.build103
-rw-r--r--panels/meson.build45
-rw-r--r--panels/mouse/Makefile.am2
-rw-r--r--panels/mouse/meson.build71
-rw-r--r--panels/network/Makefile.am2
-rw-r--r--panels/network/connection-editor/Makefile.am2
-rw-r--r--panels/network/connection-editor/meson.build52
-rw-r--r--panels/network/meson.build78
-rw-r--r--panels/network/wireless-security/Makefile.am2
-rw-r--r--panels/network/wireless-security/meson.build98
-rw-r--r--panels/notifications/Makefile.am2
-rw-r--r--panels/notifications/meson.build45
-rw-r--r--panels/online-accounts/Makefile.am2
-rw-r--r--panels/online-accounts/icons/Makefile.am2
-rw-r--r--panels/online-accounts/icons/meson.build15
-rw-r--r--panels/online-accounts/meson.build47
-rw-r--r--panels/power/Makefile.am2
-rw-r--r--panels/power/icons/Makefile.am2
-rw-r--r--panels/power/icons/meson.build15
-rw-r--r--panels/power/meson.build54
-rw-r--r--panels/printers/Makefile.am2
-rw-r--r--panels/printers/meson.build98
-rw-r--r--panels/privacy/Makefile.am2
-rw-r--r--panels/privacy/meson.build39
-rw-r--r--panels/region/Makefile.am2
-rw-r--r--panels/region/meson.build60
-rw-r--r--panels/search/Makefile.am2
-rw-r--r--panels/search/meson.build48
-rw-r--r--panels/sharing/Makefile.am2
-rw-r--r--panels/sharing/meson.build100
-rw-r--r--panels/sound/Makefile.am3
-rw-r--r--panels/sound/data/icons/Makefile.am2
-rw-r--r--panels/sound/data/icons/meson.build69
-rw-r--r--panels/sound/data/sounds/Makefile.am2
-rw-r--r--panels/sound/data/sounds/meson.build31
-rw-r--r--panels/sound/data/symbolic-icons/Makefile.am1
-rw-r--r--panels/sound/data/symbolic-icons/meson.build13
-rw-r--r--panels/sound/meson.build67
-rw-r--r--panels/universal-access/Makefile.am2
-rw-r--r--panels/universal-access/meson.build52
-rw-r--r--panels/user-accounts/Makefile.am1
-rw-r--r--panels/user-accounts/meson.build170
-rw-r--r--panels/wacom/Makefile.am2
-rw-r--r--panels/wacom/calibrator/Makefile.am2
-rw-r--r--panels/wacom/calibrator/meson.build36
-rw-r--r--panels/wacom/meson.build104
-rw-r--r--po/meson.build1
-rw-r--r--search-provider/Makefile.am2
-rw-r--r--search-provider/meson.build49
-rw-r--r--shell/Makefile.am4
-rw-r--r--shell/appdata/Makefile.am4
-rw-r--r--shell/appdata/meson.build10
-rw-r--r--shell/completions/meson.build12
-rw-r--r--shell/meson.build130
m---------subprojects/gvc0
m---------subprojects/libgd0
-rwxr-xr-xupdate-from-gsd.in10
-rwxr-xr-xupdate-from-gsd.sh2
-rwxr-xr-xupdate-from-nma.in19
89 files changed, 3035 insertions, 30 deletions
diff --git a/Makefile.am b/Makefile.am
index 0e9898072..05fc13dd3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,14 @@ MAINTAINERCLEANFILES = \
`find "$(srcdir)" -type f -name Makefile.in -print`
EXTRA_DIST = \
- MAINTAINERS
+ MAINTAINERS \
+ meson.build \
+ meson_options.txt \
+ meson_post_install.py \
+ update-from-gsd.in \
+ update-from-gsd.sh \
+ update-from-nma.in \
+ po/meson.build
AM_DISTCHECK_CONFIGURE_FLAGS = --disable-update-mimedb --enable-gtk-doc --disable-maintainer-mode
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index e3b950e79..9d6d435f8 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -24,6 +24,7 @@ EXTRA_DIST = \
$(public_icons) \
$(private_icons) \
$(noinst_DATA) \
+ meson.build \
$(NULL)
###############################################################################
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 000000000..56fa96791
--- /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_icondir, 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'hicolor_apps_symbolic_gnome-control-center-symbolic.svg',
+ install_dir: join_paths(control_center_icondir, 'hicolor', 'symbolic', 'apps')
+)
diff --git a/man/Makefile.am b/man/Makefile.am
index 7f651fb5b..440e4d3c8 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 000000000..cab3fa945
--- /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 000000000..1f8b92db7
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,281 @@
+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_icondir = join_paths(control_center_datadir, 'icons')
+
+control_center_gettext = meson.project_name() + '-2.0'
+
+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_gettext]
+]
+
+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')
+]
+
+# 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 = []
+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
+
+# 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')
+
+# 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')
+
+# IBus support
+enable_ibus = get_option('ibus')
+if enable_ibus
+ ibus_dep = dependency('ibus-1.0', version: '>= 1.5.2')
+endif
+config_h.set('HAVE_IBUS', enable_ibus,
+ description: 'Defined if IBus support is enabled')
+
+# 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')
+
+# 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')
+
+# wayland
+enable_wayland = get_option('wayland')
+if enable_wayland
+ wayland_deps = [
+ dependency('gdk-wayland-3.0'),
+ dependency('gudev-1.0')
+ ]
+endif
+
+# Check for info panel
+gnome_session_libexecdir = get_option('gnome_session_libexecdir')
+if gnome_session_libexecdir == ''
+ gnome_session_libexecdir = control_center_libexecdir
+endif
+
+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
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h
+)
+
+meson.add_install_script(
+ 'meson_post_install.py',
+ control_center_datadir
+)
+
+output = meson.project_name() + ' was configured with the following options:\n'
+output += '** gnome-bluetooth (Bluetooth panel): ' + enable_bluetooth.to_string() + '\n'
+output += '** Cheese (Users panel webcam support): ' + enable_cheese.to_string() + '\n'
+output += '** IBus (Region panel IBus support): ' + enable_ibus.to_string() + '\n'
+output += '** NetworkManager (Network panel): ' + enable_network_manager.to_string() + '\n'
+output += '** wacom (Wacom tablet panel): ' + enable_wacom.to_string() + '\n'
+output += '** Wayland: ' + enable_wayland.to_string() + '\n'
+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 000000000..69e7b064e
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,8 @@
+option('bluetooth', type: 'boolean', value: true, description: 'build with Bluetooth support')
+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('wacom', type: 'boolean', value: true, description: 'build with Wacom support')
+option('wayland', type: 'boolean', value: true, description: 'build with Wayland support')
+option('gnome_session_libexecdir', type: 'string', value: '', description: 'Directory for gnome-session\'s libexecdir')
+option('documentation', type: 'boolean', value: false, description: 'build documentation')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 000000000..ce8560b2a
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+import glob
+import os
+import re
+import subprocess
+import sys
+
+icondir = os.path.join(sys.argv[1], '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])
diff --git a/panels/Makefile.am b/panels/Makefile.am
index 507cd2f54..b5d95342a 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 ccb80172f..c06503e65 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 000000000..5ac5a6b67
--- /dev/null
+++ b/panels/background/meson.build
@@ -0,0 +1,125 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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_icondir, 'hicolor', 'scalable', 'categories')
+)
+
+install_data(
+ 'slideshow-emblem.svg',
+ install_dir: join_paths(control_center_icondir, 'hicolor', 'scalable', 'emblems')
+)
+
+install_data(
+ 'noise-texture-light.png',
+ install_dir: join_paths(control_center_pkgdatadir, 'pixmaps')
+)
+
+common_sources = []
+
+enums = 'gdesktop-enums-types'
+enums_header = files(
+ gsettings_desktop_dep.get_pkgconfig_variable('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-@0@-resources'.format(cappletname),
+ cappletname + '.gresource.xml',
+ 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-background-panel.c')
+
+panels_libs += 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 9117fc25d..2598470ab 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 000000000..573185ed8
--- /dev/null
+++ b/panels/bluetooth/meson.build
@@ -0,0 +1,41 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-bluetooth-panel.c')
+
+resource_data = files('bluetooth.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [gnome_bluetooth_dep]
+
+cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+panels_libs += 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 a003f8a49..bb670ed96 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 c00093389..9f51a77b1 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 000000000..fe149cb15
--- /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_icondir, 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-color.svg',
+ install_dir: join_paths(control_center_icondir, 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/color/meson.build b/panels/color/meson.build
new file mode 100644
index 000000000..2f800244f
--- /dev/null
+++ b/panels/color/meson.build
@@ -0,0 +1,62 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-color-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',
+ 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)
+]
+
+panels_libs += static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+subdir('icons')
diff --git a/panels/common/Makefile.am b/panels/common/Makefile.am
index be0e44a20..c0e6f24a6 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 000000000..561f42cf7
--- /dev/null
+++ b/panels/common/meson.build
@@ -0,0 +1,123 @@
+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-common-resources',
+ 'common.gresource.xml',
+ c_name: 'cc_common',
+ 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
+)
+
+liblanguage_dep = declare_dependency(
+ include_directories: common_inc,
+ link_with: liblanguage
+)
+
+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 = common_sources + files(gsd_sources)
+
+deps = common_deps
+
+if enable_wayland
+ sources += files(gsd_sources_udev)
+
+ deps += wayland_deps
+endif
+
+libdevice = static_library(
+ 'device',
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps
+)
+
+libdevice_dep = declare_dependency(
+ include_directories: common_inc,
+ link_with: libdevice
+)
+
+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: script
+)
diff --git a/panels/datetime/Makefile.am b/panels/datetime/Makefile.am
index a003f0bce..9a5f5093f 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 000000000..cb93b9734
--- /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_icondir, 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-system-time.svg',
+ install_dir: join_paths(control_center_icondir, 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/datetime/meson.build b/panels/datetime/meson.build
new file mode 100644
index 000000000..0ff209d2c
--- /dev/null
+++ b/panels/datetime/meson.build
@@ -0,0 +1,214 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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.@0@.policy'.format(cappletname)
+
+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',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = files(
+ 'cc-datetime-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)
+]
+
+panels_libs += 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-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
+
+subdir('po-timezones')
+subdir('icons')
diff --git a/panels/datetime/po-timezones/Makefile.am b/panels/datetime/po-timezones/Makefile.am
index b508d2129..cb56b489a 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 000000000..3458c8be0
--- /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_gettext + '-timezones', languages: linguas, preset: 'glib')
diff --git a/panels/display/Makefile.am b/panels/display/Makefile.am
index 253b4bb85..b53a07ec2 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 000000000..7cabe54dc
--- /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_icondir, 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-desktop-display.svg',
+ install_dir: join_paths(control_center_icondir, 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/display/meson.build b/panels/display/meson.build
new file mode 100644
index 000000000..f5aab76f0
--- /dev/null
+++ b/panels/display/meson.build
@@ -0,0 +1,67 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-display-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)
+]
+
+panels_libs += static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+subdir('icons')
diff --git a/panels/info/Makefile.am b/panels/info/Makefile.am
index 87cb6ad41..ce2736692 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 000000000..6ed26770b
--- /dev/null
+++ b/panels/info/meson.build
@@ -0,0 +1,114 @@
+panel_names = [
+ 'default-apps',
+ 'info-overview',
+ 'removable-media'
+]
+
+panels_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
+
+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',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ polkit_gobject_dep,
+ dependency('libgtop-2.0')
+]
+
+panels_libs += static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+test_name = 'test-info-cleanup'
+
+sources = files(
+ 'info-cleanup.c',
+ test_name + '.c'
+)
+
+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: script
+)
diff --git a/panels/keyboard/Makefile.am b/panels/keyboard/Makefile.am
index ad05b8903..696307e15 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 000000000..e2f79bc28
--- /dev/null
+++ b/panels/keyboard/meson.build
@@ -0,0 +1,103 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-keyboard-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',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ gnome_desktop_dep,
+ x11_dep
+]
+
+cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+panels_libs += 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 000000000..d02714733
--- /dev/null
+++ b/panels/meson.build
@@ -0,0 +1,45 @@
+subdir('common')
+
+panels = [
+ 'background',
+ 'color',
+ 'datetime',
+ 'display',
+ 'info',
+ 'keyboard',
+ 'mouse',
+ 'notifications',
+ 'online-accounts',
+ 'power',
+ 'printers',
+ 'privacy',
+ 'region',
+ 'search',
+ 'sharing',
+ 'sound',
+ 'universal-access',
+ 'user-accounts'
+]
+
+if enable_bluetooth
+ panels += 'bluetooth'
+endif
+
+if enable_network_manager
+ panels += 'network'
+endif
+
+if enable_wacom
+ panels += 'wacom'
+endif
+
+panels_list = []
+panels_libs = []
+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 aa86e0ab7..fe01efb1e 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 000000000..c4ee3f179
--- /dev/null
+++ b/panels/mouse/meson.build
@@ -0,0 +1,71 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'cc-mouse-panel.c',
+ 'cc-mouse-caps-helper.c',
+ 'gnome-mouse-properties.c',
+ 'gnome-mouse-test.c'
+)
+
+deps = common_deps + [
+ gnome_settings_dep,
+ libdevice_dep,
+ x11_dep,
+ xi_dep
+]
+
+cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+panels_libs += static_library(
+ cappletname + '-properties',
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+test_name = 'test-gnome-mouse-test'
+
+sources = common_sources + files(
+ 'gnome-mouse-test.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 fb2b891b9..ee368a88b 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 dc7866230..d384b0d3d 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 000000000..86913dc02
--- /dev/null
+++ b/panels/network/connection-editor/meson.build
@@ -0,0 +1,52 @@
+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',
+ c_name: c_name.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+ce_cflags = 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: ce_cflags,
+ link_with: libwireless_security
+)
diff --git a/panels/network/meson.build b/panels/network/meson.build
new file mode 100644
index 000000000..f9b4f7e57
--- /dev/null
+++ b/panels/network/meson.build
@@ -0,0 +1,78 @@
+deps = common_deps + network_manager_deps + [
+ polkit_gobject_dep,
+ dependency('gmodule-2.0')
+]
+
+subdir('wireless-security')
+subdir('connection-editor')
+
+panel_names = [
+ cappletname,
+ 'wifi'
+]
+
+panels_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-network-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',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+panels_libs += 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 2e8d49076..d6d925299 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 000000000..47def7a63
--- /dev/null
+++ b/panels/network/wireless-security/meson.build
@@ -0,0 +1,98 @@
+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',
+ c_name: name.underscorify(),
+ dependencies: files(nm_resource_data),
+ export: true
+)
+
+libwireless_security = static_library(
+ name,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps
+)
+
+'''
+# DISABLED
+# 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: script
+)
+'''
diff --git a/panels/notifications/Makefile.am b/panels/notifications/Makefile.am
index 03fc75579..9eda62e6e 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 000000000..b332eac10
--- /dev/null
+++ b/panels/notifications/meson.build
@@ -0,0 +1,45 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-notifications-panel.c',
+ 'cc-edit-dialog.c'
+)
+
+resource_data = files(
+ 'edit-dialog.ui',
+ 'notifications.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+panels_libs += 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 ed553f5e3..6ad371cbc 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 10789e2a0..e0899663e 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 000000000..7184824e6
--- /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_icondir, 'hicolor', icon_size, 'apps')
+ )
+endforeach
diff --git a/panels/online-accounts/meson.build b/panels/online-accounts/meson.build
new file mode 100644
index 000000000..1b196b050
--- /dev/null
+++ b/panels/online-accounts/meson.build
@@ -0,0 +1,47 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-online-accounts-panel.c')
+
+resource_data = files('online-accounts.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ 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)
+
+panels_libs += static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+subdir('icons')
diff --git a/panels/power/Makefile.am b/panels/power/Makefile.am
index 1edad419d..fc8131d8a 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 78ee00b26..2c42044ca 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 000000000..8165371ea
--- /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_icondir, 'hicolor', icon_size, 'apps')
+ )
+endforeach
diff --git a/panels/power/meson.build b/panels/power/meson.build
new file mode 100644
index 000000000..4262fa937
--- /dev/null
+++ b/panels/power/meson.build
@@ -0,0 +1,54 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-power-panel.c')
+
+resource_data = files('power.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ gnome_settings_dep,
+ upower_glib_dep
+]
+
+cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+if enable_bluetooth
+ deps += gnome_bluetooth_dep
+endif
+
+if enable_network_manager
+ deps += network_manager_deps
+endif
+
+panels_libs += static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+subdir('icons')
diff --git a/panels/printers/Makefile.am b/panels/printers/Makefile.am
index 65ecdc3d0..a46577087 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 000000000..82bae7747
--- /dev/null
+++ b/panels/printers/meson.build
@@ -0,0 +1,98 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-printers-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',
+ 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)
+
+panels_libs += 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 ec9e5cc01..73d508459 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 000000000..98fe32595
--- /dev/null
+++ b/panels/privacy/meson.build
@@ -0,0 +1,39 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-privacy-panel.c')
+
+resource_data = files('privacy.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+panels_libs += 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 bdef7694a..c289ce3ea 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 000000000..dcc51891e
--- /dev/null
+++ b/panels/region/meson.build
@@ -0,0 +1,60 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-region-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',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ accounts_dep,
+ gnome_desktop_dep,
+ libgd_dep,
+ liblanguage_dep,
+ polkit_gobject_dep
+]
+
+if enable_ibus
+ deps += ibus_dep
+endif
+
+panels_libs += static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/search/Makefile.am b/panels/search/Makefile.am
index 2041bc0e7..323cb033d 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 000000000..d31ee955e
--- /dev/null
+++ b/panels/search/meson.build
@@ -0,0 +1,48 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-search-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',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags += [
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+panels_libs += 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 ec5cd3fda..24b805d21 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 000000000..7f0bdfb15
--- /dev/null
+++ b/panels/sharing/meson.build
@@ -0,0 +1,100 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-sharing-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',
+ 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)
+]
+
+panels_libs += 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,
+ c_args: cflags,
+ install: true,
+ install_dir: control_center_libexecdir
+)
diff --git a/panels/sound/Makefile.am b/panels/sound/Makefile.am
index fb66d373b..a9a42fd90 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 35e2de2d6..c2884eadc 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 000000000..0c45ed577
--- /dev/null
+++ b/panels/sound/data/icons/meson.build
@@ -0,0 +1,69 @@
+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_icondir, '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 3277593ff..ed0cac5d4 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 000000000..2d9321aa6
--- /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 9f95f49d5..b6ca043c0 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 000000000..0fa3cafa1
--- /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_icondir, 'hicolor', 'scalable', 'status')
+ )
+endforeach
diff --git a/panels/sound/meson.build b/panels/sound/meson.build
new file mode 100644
index 000000000..7acb59c2a
--- /dev/null
+++ b/panels/sound/meson.build
@@ -0,0 +1,67 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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-sound-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'
+)
+
+panels_libs += static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libgvcgtk
+)
+
+subdir('data/icons')
+subdir('data/sounds')
+subdir('data/symbolic-icons')
diff --git a/panels/universal-access/Makefile.am b/panels/universal-access/Makefile.am
index b0efc5ebf..779bb9669 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 000000000..5b193f9d8
--- /dev/null
+++ b/panels/universal-access/meson.build
@@ -0,0 +1,52 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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',
+ c_name: 'cc_' + cappletname.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [m_dep]
+
+cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+panels_libs += 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 bfa782175..b85a01868 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 000000000..5d44f5406
--- /dev/null
+++ b/panels/user-accounts/meson.build
@@ -0,0 +1,170 @@
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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.@0@.policy'.format(cappletname)
+
+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',
+ 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 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,
+ liblanguage_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'))
+]
+
+panels_libs += static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, shell_inc],
+ dependencies: deps,
+ c_args: cflags
+)
+
+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 78e921118..e678abcac 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 38e9e827b..c0df5f5ae 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 000000000..2877904a7
--- /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 000000000..7feea2211
--- /dev/null
+++ b/panels/wacom/meson.build
@@ -0,0 +1,104 @@
+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')
+
+panels_list += cappletname
+desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
+
+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'
+)
+
+deps += libdevice_dep
+
+incs = [
+ top_inc,
+ calibrator_inc
+]
+
+panels_libs += static_library(
+ cappletname + '-properties',
+ sources: sources,
+ include_directories: incs,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: [
+ 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: [
+ libwacom_calibrator_test
+ ]
+)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 000000000..0c924313b
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(control_center_gettext, preset: 'glib')
diff --git a/search-provider/Makefile.am b/search-provider/Makefile.am
index 9330ff95c..a07599cbe 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 000000000..ef24b2f01
--- /dev/null
+++ b/search-provider/meson.build
@@ -0,0 +1,49 @@
+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 = [
+ libpanel_loader,
+ libshell
+]
+
+executable(
+ meson.project_name() + '-search-provider',
+ sources,
+ include_directories: top_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 7f274a1e7..2adc5f279 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 51bc83bb7..29e3d2be6 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 000000000..d480daa13
--- /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 000000000..951d0607d
--- /dev/null
+++ b/shell/completions/meson.build
@@ -0,0 +1,12 @@
+completion_conf = configuration_data()
+completion_conf.set('PANELS', ' '.join(panels_list))
+
+desktop = 'gnome-control-center'
+
+desktop_in = configure_file(
+ input: desktop + '.in',
+ output: desktop,
+ 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 000000000..f6c94de84
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,130 @@
+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 = 'gnome-control-center.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',
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'cc-panel-list.c',
+ 'cc-window.c'
+)
+
+shell_deps = common_deps + [
+ libdevice_dep,
+ libgd_dep,
+ liblanguage_dep,
+ polkit_gobject_dep,
+ x11_dep
+]
+
+if enable_cheese
+ shell_deps += cheese_deps
+endif
+
+executable(
+ meson.project_name(),
+ sources,
+ include_directories: top_inc,
+ dependencies: shell_deps,
+ c_args: cflags,
+ link_with: panels_libs + [libshell],
+ install: true
+)
+
+# 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(
+ 'hostname-helper.c',
+ test_unit + '.c'
+)
+
+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
-Subproject ce8e4880ce31e275c40825c4ed756c791107f81
+Subproject 3093bdb0777db1b1431bede19373ae5eac98acc
diff --git a/subprojects/libgd b/subprojects/libgd
-Subproject 752f65e91ea0d9a2ee8a2d21343bbd97bd0d038
+Subproject cc90107531640bcba6c3c58e5cf6aec94d49876
diff --git a/update-from-gsd.in b/update-from-gsd.in
new file mode 100755
index 000000000..29d06be8d
--- /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 6eccb4cc6..9f2d6b79c 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 000000000..76738b10b
--- /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@"