summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Samoilov <[email protected]>2026-08-02 01:27:47 +0400
committerGitHub <[email protected]>2026-08-01 21:27:47 +0000
commit1b527834cdca36b3971b63720b8ffb38b4fd57ba (patch)
treeec2f1a4e2f21e620d354c52bd26819d5d6c76346
parent09df5771a28035d781c22677bf2273d551f02a50 (diff)
downloadmate-panel-1b527834cdca36b3971b63720b8ffb38b4fd57ba.tar.bz2
mate-panel-1b527834cdca36b3971b63720b8ffb38b4fd57ba.tar.xz
Add Meson support (#1571)HEADmaster
* Add Meson support * Fix libegg submodule configure * generate schemas before install
-rw-r--r--.gitignore86
-rw-r--r--applets/clock/meson.build241
-rw-r--r--applets/fish/meson.build138
-rw-r--r--applets/meson.build4
-rw-r--r--applets/notification_area/libstatus-notifier-watcher/meson.build12
-rw-r--r--applets/notification_area/meson.build162
-rw-r--r--applets/notification_area/status-notifier/meson.build40
-rw-r--r--applets/notification_area/system-tray/meson.build23
-rw-r--r--applets/wncklet/meson.build164
-rw-r--r--data/meson.build64
-rw-r--r--doc/meson.build1
-rw-r--r--doc/reference/mate-panel-applet/meson.build22
-rw-r--r--doc/reference/meson.build1
-rw-r--r--help/mate-clock/meson.build21
-rw-r--r--help/mate-fish/meson.build21
-rw-r--r--help/meson.build2
-rw-r--r--icons/meson.build53
-rw-r--r--libmate-panel-applet/meson.build145
-rw-r--r--man/meson.build5
-rw-r--r--mate-panel/libmate-panel-applet-private/meson.build47
-rw-r--r--mate-panel/libpanel-util/meson.build33
-rw-r--r--mate-panel/meson.build355
-rw-r--r--meson.build318
-rw-r--r--meson_options.txt60
-rw-r--r--po/meson.build6
25 files changed, 2024 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..615554d2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,86 @@
+# Build artifacts
+*.o
+*.lo
+*.la
+.deps/
+.libs/
+*.gcda
+*.gcno
+*.orig
+*.rej
+*.tab.c
+*~
+.*.sw[nop]
+.dirstamp
+/build/
+/build-inproc/
+/builddir/
+/meson-private/
+/Makefile
+/Makefile.in
+
+# Autotools generated
+/ABOUT-NLS
+/GPATH
+/GRTAGS
+/GSYMS
+/GTAGS
+/ID
+/INSTALL
+/TAGS
+/aclocal.m4
+/autom4te.cache/
+/compile
+/config.cache
+/config.guess
+/config.h
+/config.h.in
+/config.log
+/config.lt
+/config.rpath
+/config.status
+/config.status.lineno
+/config.sub
+/configure
+/configure.lineno
+/depcomp
+/gtk-doc.make
+/install-sh
+/intltool-extract.in
+/intltool-merge.in
+/intltool-update.in
+/libtool
+/ltmain.sh
+/m4/
+/missing
+/mkinstalldirs
+/omf.make
+/so_locations
+/stamp-h1
+/tags
+/xmldocs.make
+
+# Generated data
+/data/Makefile
+/data/Makefile.in
+/data/org.mate.panel.enums.xml
+/data/*.gschema.xml
+/data/*.valid
+
+# gettext/po generated
+/po/*.gmo
+/po/*.header
+/po/*.mo
+/po/*.sed
+/po/*.sin
+/po/.intltool-merge-cache
+/po/Makefile
+/po/Makefile.in
+/po/Makefile.in.in
+/po/Makefile.in.in~
+/po/Makevars.template
+/po/POTFILES
+/po/Rules-quot
+/po/mate-panel.pot
+/po/stamp-it
+/po/stamp-po
diff --git a/applets/clock/meson.build b/applets/clock/meson.build
new file mode 100644
index 00000000..c0db5a17
--- /dev/null
+++ b/applets/clock/meson.build
@@ -0,0 +1,241 @@
+clock_enum_headers = ['clock-utils.h']
+
+clock_typebuiltins_h = custom_target('clock-typebuiltins.h',
+ input: clock_enum_headers,
+ output: 'clock-typebuiltins.h',
+ command: [
+ glib_mkenums,
+ '--fhead', '#ifndef __CLOCK_TYPEBUILTINS_H__\n',
+ '--fhead', '#define __CLOCK_TYPEBUILTINS_H__ 1\n\n',
+ '--fhead', '#ifdef __cplusplus\nextern "C" {\n#endif\n\n',
+ '--ftail', '#ifdef __cplusplus\n}\n#endif\n\n',
+ '--ftail', '#endif /* __CLOCK_TYPEBUILTINS_H__ */\n',
+ '--fprod', '\n/* --- @filename@ --- */',
+ '--eprod', '#define CLOCK_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n',
+ '--eprod', 'GType @enum_name@_get_type (void);\n',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ ],
+)
+
+clock_typebuiltins_c = custom_target('clock-typebuiltins.c',
+ input: clock_enum_headers,
+ output: 'clock-typebuiltins.c',
+ command: [
+ glib_mkenums,
+ '--fhead', '#include <glib-object.h>\n',
+ '--fhead', '#include "clock-typebuiltins.h"\n\n',
+ '--fprod', '\n/* enumerations from "@filename@" */',
+ '--fprod', '\n#include "@filename@"\n',
+ '--vhead', 'static const GEnumValue _@enum_name@_values[] = {',
+ '--vprod', ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ '--vtail', ' { 0, NULL, NULL }\n};\n\n',
+ '--vtail', 'GType\n@enum_name@_get_type (void)\n{\n',
+ '--vtail', ' static GType type = 0;\n\n',
+ '--vtail', ' if (!type)\n',
+ '--vtail', ' type = g_enum_register_static ("@EnumName@", _@enum_name@_values);\n\n',
+ '--vtail', ' return type;\n}\n\n',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ ],
+)
+
+clock_marshal = gnome.genmarshal('clock-marshallers',
+ sources: 'clock-marshallers.list',
+ prefix: '_clock_marshal',
+ internal: true,
+)
+
+clock_resource_deps = files(
+ 'clock.ui',
+ 'clock-menu.xml',
+ 'pixmaps/clock-face-large.svg',
+ 'pixmaps/clock-face-small.svg',
+ 'pixmaps/clock-face-small-morning.svg',
+ 'pixmaps/clock-face-small-day.svg',
+ 'pixmaps/clock-face-small-evening.svg',
+ 'pixmaps/clock-face-small-night.svg',
+ 'pixmaps/clock-map.png',
+ 'pixmaps/clock-map-location-marker.png',
+ 'pixmaps/clock-map-location-current.png',
+ 'pixmaps/clock-map-location-hilight.png',
+)
+
+clock_resources_c = custom_target('clock-resources.c',
+ input: 'clock.gresource.xml',
+ output: 'clock-resources.c',
+ depend_files: clock_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-source',
+ '--c-name', 'clock',
+ '@INPUT@',
+ ],
+)
+
+clock_resources_h = custom_target('clock-resources.h',
+ input: 'clock.gresource.xml',
+ output: 'clock-resources.h',
+ depend_files: clock_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-header',
+ '--c-name', 'clock',
+ '@INPUT@',
+ ],
+)
+
+clock_built_sources = [
+ clock_marshal,
+ clock_resources_c,
+ clock_resources_h,
+ clock_typebuiltins_c,
+ clock_typebuiltins_h,
+]
+
+# system timezone helper
+libsystem_timezone = static_library('system-timezone',
+ 'system-timezone.c',
+ 'system-timezone.h',
+ dependencies: [gio_dep],
+ c_args: disable_deprecated_flags,
+)
+
+executable('test-system-timezone',
+ 'test-system-timezone.c',
+ dependencies: [gio_dep],
+ link_with: libsystem_timezone,
+ c_args: disable_deprecated_flags,
+)
+
+clock_sources = [
+ 'calendar-window.c',
+ 'calendar-window.h',
+ 'clock.c',
+ 'clock.h',
+ 'clock-face.c',
+ 'clock-face.h',
+ 'clock-location.c',
+ 'clock-location.h',
+ 'clock-location-tile.c',
+ 'clock-location-tile.h',
+ 'clock-map.c',
+ 'clock-map.h',
+ 'clock-sunpos.c',
+ 'clock-sunpos.h',
+ 'clock-utils.c',
+ 'clock-utils.h',
+ 'set-timezone.c',
+ 'set-timezone.h',
+ clock_built_sources,
+]
+
+if have_eds
+ clock_sources += [
+ 'calendar-client.c',
+ 'calendar-client.h',
+ 'calendar-sources.c',
+ 'calendar-sources.h',
+ 'calendar-debug.h',
+ ]
+endif
+
+clock_deps = [
+ pango_dep,
+ gtk_dep,
+ glib_dep,
+ gio_dep,
+ mateweather_dep,
+ mate_desktop_dep,
+ m_dep,
+] + libmate_panel_applet_deps
+
+if have_eds
+ clock_deps += eds_deps
+endif
+
+if have_wayland
+ clock_deps += wayland_deps
+endif
+
+clock_inc_dirs = [
+ include_directories('.'),
+ libmate_panel_applet_inc,
+]
+
+clock_c_args = [
+ '-DMATELOCALEDIR="@0@"'.format(mate_panel_localedir),
+ '-DMATEWEATHER_I_KNOW_THIS_IS_UNSTABLE',
+] + disable_deprecated_flags
+
+if clock_inprocess
+ clock_applet = shared_library('clock-applet',
+ clock_sources,
+ include_directories: clock_inc_dirs,
+ dependencies: clock_deps,
+ c_args: clock_c_args,
+ link_with: [libmate_panel_applet_lib, libsystem_timezone],
+ install: true,
+ install_dir: mate_panel_pkglibdir,
+ )
+ clock_applet_in_process = 'true'
+ clock_applet_location = join_paths(mate_panel_pkglibdir, 'libclock-applet.so')
+else
+ clock_applet = executable('clock-applet',
+ clock_sources,
+ include_directories: clock_inc_dirs,
+ dependencies: clock_deps,
+ c_args: clock_c_args,
+ link_with: [libmate_panel_applet_lib, libsystem_timezone],
+ install: true,
+ install_dir: mate_panel_libexecdir,
+ )
+ clock_applet_in_process = 'false'
+ clock_applet_location = join_paths(mate_panel_libexecdir, 'clock-applet')
+endif
+
+# applet registration file
+clock_applet_desktop_in = configure_file(
+ input: 'org.mate.panel.ClockApplet.mate-panel-applet.desktop.in.in',
+ output: 'org.mate.panel.ClockApplet.mate-panel-applet.desktop.in',
+ configuration: {
+ 'IN_PROCESS': clock_applet_in_process,
+ 'LOCATION': clock_applet_location,
+ 'VERSION': mate_panel_version,
+ },
+)
+
+clock_applet_desktop = i18n.merge_file(
+ input: clock_applet_desktop_in,
+ output: 'org.mate.panel.ClockApplet.mate-panel-applet',
+ type: 'desktop',
+ po_dir: '../../po',
+ install: true,
+ install_dir: mate_panel_appletsdir,
+)
+
+if not clock_inprocess
+ clock_service = configure_file(
+ input: 'org.mate.panel.applet.ClockAppletFactory.service.in',
+ output: 'org.mate.panel.applet.ClockAppletFactory.service',
+ configuration: {
+ 'LOCATION': clock_applet_location,
+ },
+ )
+ install_data(clock_service,
+ install_dir: join_paths(mate_panel_datadir, 'dbus-1', 'services'),
+ )
+endif
+
+# gsettings schema
+clock_gschema = configure_file(
+ input: 'org.mate.panel.applet.clock.gschema.xml.in',
+ output: 'org.mate.panel.applet.clock.gschema.xml',
+ configuration: {'GETTEXT_PACKAGE': mate_panel_gettext_package},
+)
+
+install_data(clock_gschema, install_dir: mate_panel_schemadir)
diff --git a/applets/fish/meson.build b/applets/fish/meson.build
new file mode 100644
index 00000000..59d538e7
--- /dev/null
+++ b/applets/fish/meson.build
@@ -0,0 +1,138 @@
+mate_panel_fishdir = join_paths(mate_panel_pkgdatadir, 'fish')
+
+fish_resource_deps = files(
+ 'fish.ui',
+ 'fish-menu.xml',
+)
+
+fish_resources_c = custom_target('fish-resources.c',
+ input: 'fish.gresource.xml',
+ output: 'fish-resources.c',
+ depend_files: fish_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-source',
+ '--c-name', 'fish',
+ '@INPUT@',
+ ],
+)
+
+fish_resources_h = custom_target('fish-resources.h',
+ input: 'fish.gresource.xml',
+ output: 'fish-resources.h',
+ depend_files: fish_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-header',
+ '--c-name', 'fish',
+ '@INPUT@',
+ ],
+)
+
+fish_built_sources = [
+ fish_resources_c,
+ fish_resources_h,
+]
+
+fish_sources = [
+ 'fish.c',
+ fish_built_sources,
+]
+
+fish_deps = [
+ gtk_dep,
+ cairo_dep,
+ mate_desktop_dep,
+] + libmate_panel_applet_deps
+
+fish_inc_dirs = [
+ include_directories('.'),
+ libmate_panel_applet_inc,
+]
+
+fish_c_args = [
+ '-DMATELOCALEDIR="@0@"'.format(mate_panel_localedir),
+ '-DFISH_ICONDIR="@0@"'.format(mate_panel_fishdir),
+] + disable_deprecated_flags
+
+if fish_inprocess
+ fish_applet = shared_library('fish-applet',
+ fish_sources,
+ include_directories: fish_inc_dirs,
+ dependencies: fish_deps,
+ c_args: fish_c_args,
+ link_with: libmate_panel_applet_lib,
+ install: true,
+ install_dir: mate_panel_pkglibdir,
+ )
+ fish_applet_in_process = 'true'
+ fish_applet_location = join_paths(mate_panel_pkglibdir, 'libfish-applet.so')
+else
+ fish_applet = executable('fish-applet',
+ fish_sources,
+ include_directories: fish_inc_dirs,
+ dependencies: fish_deps,
+ c_args: fish_c_args,
+ link_with: libmate_panel_applet_lib,
+ install: true,
+ install_dir: mate_panel_libexecdir,
+ )
+ fish_applet_in_process = 'false'
+ fish_applet_location = join_paths(mate_panel_libexecdir, 'fish-applet')
+endif
+
+# applet registration file
+fish_applet_desktop_in = configure_file(
+ input: 'org.mate.panel.FishApplet.mate-panel-applet.desktop.in.in',
+ output: 'org.mate.panel.FishApplet.mate-panel-applet.desktop.in',
+ configuration: {
+ 'IN_PROCESS': fish_applet_in_process,
+ 'LOCATION': fish_applet_location,
+ 'VERSION': mate_panel_version,
+ },
+)
+
+fish_applet_desktop = i18n.merge_file(
+ input: fish_applet_desktop_in,
+ output: 'org.mate.panel.FishApplet.mate-panel-applet',
+ type: 'desktop',
+ po_dir: '../../po',
+ install: true,
+ install_dir: mate_panel_appletsdir,
+)
+
+if not fish_inprocess
+ fish_service = configure_file(
+ input: 'org.mate.panel.applet.FishAppletFactory.service.in',
+ output: 'org.mate.panel.applet.FishAppletFactory.service',
+ configuration: {
+ 'LOCATION': fish_applet_location,
+ },
+ )
+ install_data(fish_service,
+ install_dir: join_paths(mate_panel_datadir, 'dbus-1', 'services'),
+ )
+endif
+
+# fish bitmaps
+install_data(
+ 'wanda.png',
+ 'fishanim.png',
+ 'oldwanda.png',
+ 'footguy.png',
+ 'monkey.png',
+ install_dir: mate_panel_fishdir,
+)
+
+# gsettings schema
+fish_gschema = configure_file(
+ input: 'org.mate.panel.applet.fish.gschema.xml.in',
+ output: 'org.mate.panel.applet.fish.gschema.xml',
+ configuration: {'GETTEXT_PACKAGE': mate_panel_gettext_package},
+)
+
+install_data(fish_gschema, install_dir: mate_panel_schemadir)
diff --git a/applets/meson.build b/applets/meson.build
new file mode 100644
index 00000000..21511944
--- /dev/null
+++ b/applets/meson.build
@@ -0,0 +1,4 @@
+subdir('clock')
+subdir('fish')
+subdir('wncklet')
+subdir('notification_area')
diff --git a/applets/notification_area/libstatus-notifier-watcher/meson.build b/applets/notification_area/libstatus-notifier-watcher/meson.build
new file mode 100644
index 00000000..a180a16e
--- /dev/null
+++ b/applets/notification_area/libstatus-notifier-watcher/meson.build
@@ -0,0 +1,12 @@
+libstatus_notifier_watcher = static_library('status-notifier-watcher',
+ 'gf-sn-watcher-v0.c',
+ 'gf-sn-watcher-v0.h',
+ 'gf-status-notifier-watcher.c',
+ 'gf-status-notifier-watcher.h',
+ gnome.gdbus_codegen('gf-sn-watcher-v0-gen',
+ 'org.kde.StatusNotifierWatcher.xml',
+ namespace: 'Gf',
+ ),
+ dependencies: notification_area_deps,
+ c_args: ['-DG_LOG_DOMAIN="status-notifier-watcher"'] + disable_deprecated_flags,
+)
diff --git a/applets/notification_area/meson.build b/applets/notification_area/meson.build
new file mode 100644
index 00000000..74400b21
--- /dev/null
+++ b/applets/notification_area/meson.build
@@ -0,0 +1,162 @@
+notification_area_deps = [
+ gtk_dep,
+ mate_desktop_dep,
+]
+
+notification_area_c_args = [
+ '-DMATELOCALEDIR="@0@"'.format(mate_panel_localedir),
+ '-DG_LOG_DOMAIN="notification-area-applet"',
+ '-DPROVIDE_WATCHER_SERVICE=1',
+] + disable_deprecated_flags
+
+subdir('libstatus-notifier-watcher')
+subdir('status-notifier')
+
+if have_x11
+ subdir('system-tray')
+endif
+
+libtray_sources = [
+ 'na-grid.c',
+ 'na-grid.h',
+ 'na-host.c',
+ 'na-host.h',
+ 'na-item.c',
+ 'na-item.h',
+]
+
+libtray = static_library('tray',
+ libtray_sources + status_notifier_codegen,
+ include_directories: [include_directories('.'), include_directories('status-notifier')],
+ dependencies: notification_area_deps,
+ link_with: [libstatus_notifier, libstatus_notifier_watcher],
+ c_args: notification_area_c_args,
+)
+
+if have_x11
+ libtray_extra_link = libsystem_tray
+ executable('testtray',
+ 'testtray.c',
+ include_directories: include_directories('.'),
+ dependencies: notification_area_deps,
+ link_with: [libtray, libstatus_notifier, libstatus_notifier_watcher, libsystem_tray],
+ c_args: notification_area_c_args,
+ )
+else
+ libtray_extra_link = []
+endif
+
+na_resource_deps = files(
+ 'notification-area-preferences-dialog.ui',
+ 'notification-area-menu.xml',
+)
+
+na_resources_c = custom_target('na-resources.c',
+ input: 'na.gresource.xml',
+ output: 'na-resources.c',
+ depend_files: na_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-source',
+ '--c-name', 'na',
+ '@INPUT@',
+ ],
+)
+
+na_resources_h = custom_target('na-resources.h',
+ input: 'na.gresource.xml',
+ output: 'na-resources.h',
+ depend_files: na_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-header',
+ '--c-name', 'na',
+ '@INPUT@',
+ ],
+)
+
+notification_area_sources = [
+ 'main.c',
+ 'main.h',
+ na_resources_c,
+ na_resources_h,
+]
+
+notification_area_full_deps = notification_area_deps + libmate_panel_applet_deps
+
+notification_area_inc_dirs = [
+ include_directories('.'),
+ libmate_panel_applet_inc,
+]
+
+if notification_area_inprocess
+ notification_area_applet = shared_library('notification-area-applet',
+ notification_area_sources,
+ include_directories: notification_area_inc_dirs,
+ dependencies: notification_area_full_deps,
+ c_args: notification_area_c_args,
+ link_with: [libmate_panel_applet_lib, libtray, libstatus_notifier, libstatus_notifier_watcher] + libtray_extra_link,
+ install: true,
+ install_dir: mate_panel_pkglibdir,
+ )
+ notification_area_applet_in_process = 'true'
+ notification_area_applet_location = join_paths(mate_panel_pkglibdir, 'libnotification-area-applet.so')
+else
+ notification_area_applet = executable('notification-area-applet',
+ notification_area_sources,
+ include_directories: notification_area_inc_dirs,
+ dependencies: notification_area_full_deps,
+ c_args: notification_area_c_args,
+ link_with: [libmate_panel_applet_lib, libtray, libstatus_notifier, libstatus_notifier_watcher] + libtray_extra_link,
+ install: true,
+ install_dir: mate_panel_libexecdir,
+ )
+ notification_area_applet_in_process = 'false'
+ notification_area_applet_location = join_paths(mate_panel_libexecdir, 'notification-area-applet')
+endif
+
+# applet registration file
+notification_area_applet_desktop_in = configure_file(
+ input: 'org.mate.panel.NotificationAreaApplet.mate-panel-applet.desktop.in.in',
+ output: 'org.mate.panel.NotificationAreaApplet.mate-panel-applet.desktop.in',
+ configuration: {
+ 'IN_PROCESS': notification_area_applet_in_process,
+ 'LOCATION': notification_area_applet_location,
+ 'VERSION': mate_panel_version,
+ },
+)
+
+notification_area_applet_desktop = i18n.merge_file(
+ input: notification_area_applet_desktop_in,
+ output: 'org.mate.panel.NotificationAreaApplet.mate-panel-applet',
+ type: 'desktop',
+ po_dir: '../../po',
+ install: true,
+ install_dir: mate_panel_appletsdir,
+)
+
+if not notification_area_inprocess
+ notification_area_service = configure_file(
+ input: 'org.mate.panel.applet.NotificationAreaAppletFactory.service.in',
+ output: 'org.mate.panel.applet.NotificationAreaAppletFactory.service',
+ configuration: {
+ 'LOCATION': notification_area_applet_location,
+ },
+ )
+ install_data(notification_area_service,
+ install_dir: join_paths(mate_panel_datadir, 'dbus-1', 'services'),
+ )
+endif
+
+# gsettings schema
+notification_area_gschema = configure_file(
+ input: 'org.mate.panel.applet.notification-area.gschema.xml.in',
+ output: 'org.mate.panel.applet.notification-area.gschema.xml',
+ configuration: {'GETTEXT_PACKAGE': mate_panel_gettext_package},
+)
+
+install_data(notification_area_gschema, install_dir: mate_panel_schemadir)
diff --git a/applets/notification_area/status-notifier/meson.build b/applets/notification_area/status-notifier/meson.build
new file mode 100644
index 00000000..6f6305a5
--- /dev/null
+++ b/applets/notification_area/status-notifier/meson.build
@@ -0,0 +1,40 @@
+status_notifier_codegen = [
+ gnome.gdbus_codegen('sn-dbus-menu-gen',
+ 'com.canonical.dbusmenu.xml',
+ namespace: 'Sn',
+ ),
+ gnome.gdbus_codegen('sn-host-v0-gen',
+ 'org.kde.StatusNotifierHost.xml',
+ namespace: 'Sn',
+ ),
+ gnome.gdbus_codegen('sn-item-v0-gen',
+ 'org.kde.StatusNotifierItem.xml',
+ namespace: 'Sn',
+ ),
+ gnome.gdbus_codegen('sn-watcher-v0-gen',
+ 'org.kde.StatusNotifierWatcher.xml',
+ namespace: 'Sn',
+ ),
+]
+
+libstatus_notifier = static_library('status-notifier',
+ 'sn-dbus-menu.c',
+ 'sn-dbus-menu.h',
+ 'sn-dbus-menu-item.c',
+ 'sn-dbus-menu-item.h',
+ 'sn-flat-button.c',
+ 'sn-flat-button.h',
+ 'sn-host-v0.c',
+ 'sn-host-v0.h',
+ 'sn-item.c',
+ 'sn-item.h',
+ 'sn-item-v0.c',
+ 'sn-item-v0.h',
+ status_notifier_codegen,
+ include_directories: [include_directories('.'), include_directories('..')],
+ dependencies: notification_area_deps + [m_dep],
+ c_args: [
+ '-DMATELOCALEDIR="@0@"'.format(mate_panel_localedir),
+ '-DG_LOG_DOMAIN="notification-area-applet"',
+ ] + disable_deprecated_flags,
+)
diff --git a/applets/notification_area/system-tray/meson.build b/applets/notification_area/system-tray/meson.build
new file mode 100644
index 00000000..a3add66a
--- /dev/null
+++ b/applets/notification_area/system-tray/meson.build
@@ -0,0 +1,23 @@
+na_marshal = gnome.genmarshal('na-marshal',
+ sources: 'na-marshal.list',
+ prefix: '_na_marshal',
+ internal: true,
+)
+
+libsystem_tray = static_library('system-tray',
+ 'fixedtip.c',
+ 'fixedtip.h',
+ na_marshal,
+ 'na-tray.c',
+ 'na-tray.h',
+ 'na-tray-child.c',
+ 'na-tray-child.h',
+ 'na-tray-manager.c',
+ 'na-tray-manager.h',
+ include_directories: [include_directories('.'), include_directories('..')],
+ dependencies: notification_area_deps + [x11_dep],
+ c_args: [
+ '-DMATELOCALEDIR="@0@"'.format(mate_panel_localedir),
+ '-DG_LOG_DOMAIN="notification-area-applet"',
+ ] + disable_deprecated_flags,
+)
diff --git a/applets/wncklet/meson.build b/applets/wncklet/meson.build
new file mode 100644
index 00000000..2a07cb21
--- /dev/null
+++ b/applets/wncklet/meson.build
@@ -0,0 +1,164 @@
+wncklet_resource_deps = files(
+ 'showdesktop-menu.xml',
+ 'window-list.ui',
+ 'window-list-menu.xml',
+ 'window-menu-menu.xml',
+ 'workspace-switcher.ui',
+ 'workspace-switcher-menu.xml',
+)
+
+wncklet_resources_c = custom_target('wncklet-resources.c',
+ input: 'wncklet.gresource.xml',
+ output: 'wncklet-resources.c',
+ depend_files: wncklet_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-source',
+ '--c-name', 'wncklet',
+ '@INPUT@',
+ ],
+)
+
+wncklet_resources_h = custom_target('wncklet-resources.h',
+ input: 'wncklet.gresource.xml',
+ output: 'wncklet-resources.h',
+ depend_files: wncklet_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-header',
+ '--c-name', 'wncklet',
+ '@INPUT@',
+ ],
+)
+
+wncklet_built_sources = [
+ wncklet_resources_c,
+ wncklet_resources_h,
+]
+
+wncklet_sources = [
+ 'wncklet.c',
+ 'wncklet.h',
+ 'window-menu.c',
+ 'window-menu.h',
+ 'window-list.c',
+ 'window-list.h',
+ 'showdesktop.c',
+ 'showdesktop.h',
+ 'workspace-switcher.c',
+ 'workspace-switcher.h',
+ wncklet_built_sources,
+]
+
+if have_wayland
+ wncklet_sources += [
+ 'wayland-backend.c',
+ 'wayland-backend.h',
+ 'wayland-workspace.c',
+ 'wayland-workspace.h',
+ 'wayland-protocol/wlr-foreign-toplevel-management-unstable-v1-code.c',
+ 'wayland-protocol/wlr-foreign-toplevel-management-unstable-v1-client.h',
+ ]
+endif
+
+wncklet_deps = [
+ gtk_dep,
+ wnck_dep,
+ mate_desktop_dep,
+] + libmate_panel_applet_deps
+
+if have_x11
+ wncklet_deps += x11_dep
+endif
+
+if have_wayland
+ wncklet_deps += wayland_deps + [xfw_dep]
+endif
+
+wncklet_inc_dirs = [
+ include_directories('.'),
+ libmate_panel_applet_inc,
+]
+
+wncklet_c_args = [
+ '-DMATELOCALEDIR="@0@"'.format(mate_panel_localedir),
+] + disable_deprecated_flags
+
+if wncklet_inprocess
+ wncklet_applet = shared_library('wnck-applet',
+ wncklet_sources,
+ include_directories: wncklet_inc_dirs,
+ dependencies: wncklet_deps,
+ c_args: wncklet_c_args,
+ link_with: libmate_panel_applet_lib,
+ install: true,
+ install_dir: mate_panel_pkglibdir,
+ )
+ wncklet_applet_in_process = 'true'
+ wncklet_applet_location = join_paths(mate_panel_pkglibdir, 'libwnck-applet.so')
+else
+ wncklet_applet = executable('wnck-applet',
+ wncklet_sources,
+ include_directories: wncklet_inc_dirs,
+ dependencies: wncklet_deps,
+ c_args: wncklet_c_args,
+ link_with: libmate_panel_applet_lib,
+ install: true,
+ install_dir: mate_panel_libexecdir,
+ )
+ wncklet_applet_in_process = 'false'
+ wncklet_applet_location = join_paths(mate_panel_libexecdir, 'wnck-applet')
+endif
+
+# applet registration file
+wncklet_applet_desktop_in = configure_file(
+ input: 'org.mate.panel.Wncklet.mate-panel-applet.desktop.in.in',
+ output: 'org.mate.panel.Wncklet.mate-panel-applet.desktop.in',
+ configuration: {
+ 'IN_PROCESS': wncklet_applet_in_process,
+ 'LOCATION': wncklet_applet_location,
+ 'VERSION': mate_panel_version,
+ },
+)
+
+wncklet_applet_desktop = i18n.merge_file(
+ input: wncklet_applet_desktop_in,
+ output: 'org.mate.panel.Wncklet.mate-panel-applet',
+ type: 'desktop',
+ po_dir: '../../po',
+ install: true,
+ install_dir: mate_panel_appletsdir,
+)
+
+if not wncklet_inprocess
+ wncklet_service = configure_file(
+ input: 'org.mate.panel.applet.WnckletFactory.service.in',
+ output: 'org.mate.panel.applet.WnckletFactory.service',
+ configuration: {
+ 'LOCATION': wncklet_applet_location,
+ },
+ )
+ install_data(wncklet_service,
+ install_dir: join_paths(mate_panel_datadir, 'dbus-1', 'services'),
+ )
+endif
+
+# gsettings schemas
+foreach schema : [
+ 'org.mate.panel.applet.window-list',
+ 'org.mate.panel.applet.window-list-previews',
+ 'org.mate.panel.applet.workspace-switcher',
+ ]
+ install_data(
+ configure_file(
+ input: schema + '.gschema.xml.in',
+ output: schema + '.gschema.xml',
+ configuration: {'GETTEXT_PACKAGE': mate_panel_gettext_package},
+ ),
+ install_dir: mate_panel_schemadir,
+ )
+endforeach
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 00000000..e87e5e1c
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,64 @@
+# panel layouts
+install_data(
+ 'default.layout',
+ 'fedora.layout',
+ 'linuxmint.layout',
+ 'mageia.layout',
+ 'opensuse.layout',
+ 'ubuntu.layout',
+ install_dir: mate_panel_layoutsdir,
+)
+
+# gsettings enums
+glib_mkenums = find_program('glib-mkenums')
+
+panel_enums = custom_target('org.mate.panel.enums.xml',
+ input: '../mate-panel/panel-enums-gsettings.h',
+ output: 'org.mate.panel.enums.xml',
+ build_by_default: true,
+ install: true,
+ install_dir: mate_panel_schemadir,
+ command: [
+ glib_mkenums,
+ '--comments', '<!-- @comment@ -->',
+ '--fhead', '<schemalist>',
+ '--vhead', ' <@type@ id=\'org.mate.panel.@EnumName@\'>',
+ '--vprod', ' <value nick=\'@valuenick@\' value=\'@valuenum@\'/>',
+ '--vtail', ' </@type@>',
+ '--ftail', '</schemalist>',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ ],
+)
+
+# gsettings schemas
+schemas = []
+foreach schema : [
+ 'org.mate.panel',
+ 'org.mate.panel.object',
+ 'org.mate.panel.toplevel',
+ 'org.mate.panel.menubar',
+ ]
+ schemas += configure_file(
+ input: schema + '.gschema.xml.in',
+ output: schema + '.gschema.xml',
+ configuration: {'GETTEXT_PACKAGE': mate_panel_gettext_package},
+ )
+endforeach
+
+install_data(schemas, install_dir: mate_panel_schemadir)
+
+glib_compile_schemas = find_program('glib-compile-schemas')
+
+gschemas_compiled = custom_target('gschemas.compiled',
+ output: 'gschemas.compiled',
+ input: schemas,
+ build_by_default: true,
+ command: [
+ glib_compile_schemas,
+ meson.current_build_dir(),
+ ],
+)
+
+gnome = import('gnome')
+gnome.post_install(glib_compile_schemas: true)
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 00000000..ead14c40
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1 @@
+subdir('reference')
diff --git a/doc/reference/mate-panel-applet/meson.build b/doc/reference/mate-panel-applet/meson.build
new file mode 100644
index 00000000..61878e88
--- /dev/null
+++ b/doc/reference/mate-panel-applet/meson.build
@@ -0,0 +1,22 @@
+doc_module = 'mate-panel-applet'
+
+gtkdoc_link_dep = declare_dependency(
+ link_with: libmate_panel_applet_lib,
+ include_directories: libmate_panel_applet_inc,
+)
+
+gnome.gtkdoc(doc_module,
+ main_sgml: '@[email protected]'.format(doc_module),
+ src_dir: 'libmate-panel-applet',
+ gobject_typesfile: '@[email protected]'.format(doc_module),
+ ignore_headers: [
+ 'MATE_Panel.h',
+ 'mate-panel-applet-enums.h',
+ 'mate-panel-applet-marshal.h',
+ 'mate-panel-applet-private.h',
+ 'mate-panel-applet-shell.h',
+ ],
+ mkdb_args: '--output-format=xml',
+ dependencies: libmate_panel_applet_deps + [gtkdoc_link_dep],
+ install: true,
+)
diff --git a/doc/reference/meson.build b/doc/reference/meson.build
new file mode 100644
index 00000000..196fd7ce
--- /dev/null
+++ b/doc/reference/meson.build
@@ -0,0 +1 @@
+subdir('mate-panel-applet')
diff --git a/help/mate-clock/meson.build b/help/mate-clock/meson.build
new file mode 100644
index 00000000..d82268e4
--- /dev/null
+++ b/help/mate-clock/meson.build
@@ -0,0 +1,21 @@
+fs = import('fs')
+
+help_id = 'mate-clock'
+help_sources = ['index.docbook', 'legal.xml']
+help_media = ['figures/clock_applet.png']
+
+# discover the locale directories holding a <locale>.po translation file
+langs = []
+foreach entry : run_command('ls', '-1', meson.current_source_dir(), check: true).stdout().strip().split('\n')
+ entry_path = join_paths(meson.current_source_dir(), entry)
+ if entry != 'C' and fs.is_dir(entry_path) and fs.exists(join_paths(entry_path, entry + '.po'))
+ langs += entry
+ endif
+endforeach
+
+gnome.yelp(help_id,
+ sources: help_sources,
+ media: help_media,
+ languages: langs,
+ symlink_media: true,
+)
diff --git a/help/mate-fish/meson.build b/help/mate-fish/meson.build
new file mode 100644
index 00000000..2cf0f3c0
--- /dev/null
+++ b/help/mate-fish/meson.build
@@ -0,0 +1,21 @@
+fs = import('fs')
+
+help_id = 'mate-fish'
+help_sources = ['index.docbook', 'legal.xml']
+help_media = ['figures/fish_applet.png']
+
+# discover the locale directories holding a <locale>.po translation file
+langs = []
+foreach entry : run_command('ls', '-1', meson.current_source_dir(), check: true).stdout().strip().split('\n')
+ entry_path = join_paths(meson.current_source_dir(), entry)
+ if entry != 'C' and fs.is_dir(entry_path) and fs.exists(join_paths(entry_path, entry + '.po'))
+ langs += entry
+ endif
+endforeach
+
+gnome.yelp(help_id,
+ sources: help_sources,
+ media: help_media,
+ languages: langs,
+ symlink_media: true,
+)
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 00000000..a999b5f6
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,2 @@
+subdir('mate-clock')
+subdir('mate-fish')
diff --git a/icons/meson.build b/icons/meson.build
new file mode 100644
index 00000000..eb3023d0
--- /dev/null
+++ b/icons/meson.build
@@ -0,0 +1,53 @@
+icon_names = [
+ 'mate-panel-clock',
+ 'mate-panel-drawer',
+ 'mate-panel-fish',
+ 'mate-panel-force-quit',
+ 'mate-panel-launcher',
+ 'mate-panel-notification-area',
+ 'mate-panel-separator',
+ 'mate-panel',
+ 'mate-panel-window-list',
+ 'mate-panel-window-menu',
+ 'mate-panel-workspace-switcher',
+]
+
+foreach size : ['16x16', '22x22', '24x24', '32x32', '48x48', '64x64', '96x96', '256x256']
+ icons_dir = join_paths(mate_panel_datadir, 'icons', 'hicolor', size, 'apps')
+ install_data(
+ sources: [size + '/mate-panel-clock.png',
+ size + '/mate-panel-drawer.png',
+ size + '/mate-panel-fish.png',
+ size + '/mate-panel-force-quit.png',
+ size + '/mate-panel-launcher.png',
+ size + '/mate-panel-notification-area.png',
+ size + '/mate-panel-separator.png',
+ size + '/mate-panel.png',
+ size + '/mate-panel-window-list.png',
+ size + '/mate-panel-window-menu.png',
+ size + '/mate-panel-workspace-switcher.png'],
+ install_dir: icons_dir,
+ )
+endforeach
+
+install_data(
+ 'scalable/mate-panel-clock.svg',
+ 'scalable/mate-panel-drawer.svg',
+ 'scalable/mate-panel-fish.svg',
+ 'scalable/mate-panel-force-quit.svg',
+ 'scalable/mate-panel-launcher.svg',
+ 'scalable/mate-panel-notification-area.svg',
+ 'scalable/mate-panel-separator.svg',
+ 'scalable/mate-panel.svg',
+ 'scalable/mate-panel-window-list.svg',
+ 'scalable/mate-panel-window-menu.svg',
+ 'scalable/mate-panel-workspace-switcher.svg',
+ install_dir: join_paths(mate_panel_datadir, 'icons', 'hicolor', 'scalable', 'apps'),
+)
+
+gnome = import('gnome')
+
+gnome.post_install(
+ glib_compile_schemas: false,
+ gtk_update_icon_cache: true,
+)
diff --git a/libmate-panel-applet/meson.build b/libmate-panel-applet/meson.build
new file mode 100644
index 00000000..4eb4fe27
--- /dev/null
+++ b/libmate-panel-applet/meson.build
@@ -0,0 +1,145 @@
+libmate_panel_applet_inc = include_directories('.')
+
+glib_mkenums = find_program('glib-mkenums')
+
+# generated marshallers
+libmate_panel_applet_marshal = gnome.genmarshal('mate-panel-applet-marshal',
+ sources: 'mate-panel-applet-marshal.list',
+ prefix: 'mate_panel_applet_marshal',
+)
+
+# generated enumerations
+mate_panel_applet_enum_headers = files('mate-panel-applet.h')
+
+libmate_panel_applet_enums_h = custom_target('mate-panel-applet-enums.h',
+ input: mate_panel_applet_enum_headers,
+ output: 'mate-panel-applet-enums.h',
+ install: true,
+ install_dir: join_paths(get_option('includedir'),
+ 'mate-panel-@0@/libmate-panel-applet'.format(mate_panel_api_version)),
+ command: [
+ glib_mkenums,
+ '--fhead', '#ifndef __MATE_PANEL_APPLET_ENUMS_H__\n#define __MATE_PANEL_APPLET_ENUMS_H__\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n',
+ '--ftail', '#ifdef __cplusplus\n}\n#endif\n\n#endif /* __MATE_PANEL_APPLET_ENUMS_H__ */\n',
+ '--fprod', '\n/* --- @filename@ --- */',
+ '--eprod', '#define PANEL_TYPE_@ENUMNAME@ @enum_name@_get_type()\nGType @enum_name@_get_type (void);\n',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ ],
+)
+
+libmate_panel_applet_enums_c = custom_target('mate-panel-applet-enums.c',
+ input: mate_panel_applet_enum_headers,
+ output: 'mate-panel-applet-enums.c',
+ command: [
+ glib_mkenums,
+ '--fhead', '#include <glib-object.h>\n#include "mate-panel-applet-enums.h"\n',
+ '--fprod', '\n/* enumerations from "@filename@" */\n#include "@filename@"\n',
+ '--vhead', 'static const G@Type@Value _@enum_name@_values[] = {',
+ '--vprod', ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ '--vtail', ' { 0, NULL, NULL }\n};\n\n',
+ '--vtail', 'GType\n@enum_name@_get_type (void)\n{\n',
+ '--vtail', ' static GType type = 0;\n\n',
+ '--vtail', ' if (!type)\n',
+ '--vtail', ' type = g_@type@_register_static ("@EnumName@", _@enum_name@_values);\n\n',
+ '--vtail', ' return type;\n}\n\n',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ ],
+)
+
+libmate_panel_applet_sources = [
+ 'mate-panel-applet.h',
+ 'mate-panel-applet.c',
+ 'mate-panel-applet-factory.h',
+ 'mate-panel-applet-factory.c',
+ 'mate-panel-applet-gsettings.c',
+ 'mate-panel-applet-gsettings.h',
+ 'panel-applet-private.h',
+ libmate_panel_applet_marshal,
+ libmate_panel_applet_enums_c,
+ libmate_panel_applet_enums_h,
+]
+
+if have_x11
+ libmate_panel_applet_sources += ['panel-plug.c', 'panel-plug-private.h']
+endif
+
+libmate_panel_applet_deps_local = libmate_panel_applet_deps
+if have_x11
+ libmate_panel_applet_deps_local += x11_dep
+endif
+
+libmate_panel_applet_lib = library('mate-panel-applet-4',
+ libmate_panel_applet_sources,
+ version: '@0@.@1@.@2@'.format(libmate_panel_applet_current, libmate_panel_applet_age, libmate_panel_applet_revision),
+ include_directories: libmate_panel_applet_inc,
+ dependencies: libmate_panel_applet_deps_local,
+ c_args: disable_deprecated_flags,
+ install: true,
+)
+
+install_headers(
+ 'mate-panel-applet.h',
+ 'mate-panel-applet-gsettings.h',
+ subdir: 'mate-panel-@0@/libmate-panel-applet'.format(mate_panel_api_version),
+)
+
+pkg = import('pkgconfig')
+
+pkg.generate(libmate_panel_applet_lib,
+ filebase: 'libmatepanelapplet-@0@'.format(mate_panel_api_version),
+ name: 'libmate-panel-applet-4',
+ description: 'libmate-panel-applet-4',
+ version: mate_panel_version,
+ requires: ['glib-2.0', 'gio-2.0', 'gtk+-3.0'],
+ subdirs: 'mate-panel-@0@/libmate-panel-applet'.format(mate_panel_api_version),
+ install_dir: join_paths(mate_panel_libdir, 'pkgconfig'),
+)
+
+# test program
+executable('test-dbus-applet',
+ 'test-dbus-applet.c',
+ include_directories: libmate_panel_applet_inc,
+ dependencies: libmate_panel_applet_deps_local,
+ link_with: libmate_panel_applet_lib,
+)
+
+# test applet desktop file (not installed)
+test_applet_desktop = i18n.merge_file(
+ input: 'org.mate.panel.TestApplet.mate-panel-applet.desktop.in',
+ output: 'org.mate.panel.TestApplet.mate-panel-applet',
+ type: 'desktop',
+ po_dir: '../po',
+ install: false,
+)
+
+# introspection
+if enable_introspection.allowed()
+ introspection_sources = [
+ 'mate-panel-applet.c',
+ 'mate-panel-applet.h',
+ 'mate-panel-applet-gsettings.c',
+ 'mate-panel-applet-gsettings.h',
+ ]
+ built_introspection_sources = [
+ libmate_panel_applet_enums_c,
+ libmate_panel_applet_enums_h,
+ ]
+
+ mate_panel_applet_gir = gnome.generate_gir(libmate_panel_applet_lib,
+ sources: introspection_sources + built_introspection_sources,
+ nsversion: mate_panel_gir_version,
+ namespace: mate_panel_gir_ns,
+ symbol_prefix: 'mate_panel_applet',
+ identifier_prefix: 'MatePanelApplet',
+ export_packages: 'libmatepanelapplet-@0@'.format(mate_panel_api_version),
+ includes: ['GObject-2.0', 'Gtk-3.0', 'Gio-2.0'],
+ install: true,
+ extra_args: [
+ '--warn-all',
+ '--strip-prefix=MatePanel',
+ '--add-include-path=@0@'.format(meson.current_source_dir()),
+ ],
+ )
+endif
diff --git a/man/meson.build b/man/meson.build
new file mode 100644
index 00000000..d93ce456
--- /dev/null
+++ b/man/meson.build
@@ -0,0 +1,5 @@
+install_man(
+ 'mate-panel.1',
+ 'mate-desktop-item-edit.1',
+ 'mate-panel-test-applets.1',
+)
diff --git a/mate-panel/libmate-panel-applet-private/meson.build b/mate-panel/libmate-panel-applet-private/meson.build
new file mode 100644
index 00000000..14187815
--- /dev/null
+++ b/mate-panel/libmate-panel-applet-private/meson.build
@@ -0,0 +1,47 @@
+panel_applet_private_inc = include_directories('.')
+
+libmate_panel_applet_private_sources = [
+ 'panel-applets-manager-dbus.c',
+ 'panel-applets-manager-dbus.h',
+ 'panel-applet-container.c',
+ 'panel-applet-container.h',
+ 'panel-applet-frame-dbus.c',
+ 'panel-applet-frame-dbus.h',
+]
+
+libmate_panel_applet_private_mini_sources = [
+ 'panel-applet-mini.c',
+ 'panel-applets-manager-dbus.c',
+ 'panel-applets-manager-dbus.h',
+ 'panel-applet-container.c',
+ 'panel-applet-container.h',
+]
+
+libmate_panel_applet_private_common_args = [
+ '-DDATADIR="@0@"'.format(mate_panel_datadir),
+ '-DMATE_PANEL_APPLETS_DIR="@0@"'.format(mate_panel_appletsdir),
+] + disable_deprecated_flags
+
+libmate_panel_applet_private_inc_dirs = [
+ panel_applet_private_inc,
+ mate_panel_inc,
+ libpanel_util_inc,
+]
+
+libmate_panel_applet_private_deps = panel_deps + [dconf_dep]
+
+libmate_panel_applet_private = static_library('mate-panel-applet-private',
+ libmate_panel_applet_private_sources,
+ panel_marshal,
+ include_directories: libmate_panel_applet_private_inc_dirs,
+ dependencies: libmate_panel_applet_private_deps,
+ c_args: libmate_panel_applet_private_common_args,
+)
+
+libmate_panel_applet_private_mini = static_library('mate-panel-applet-private-mini',
+ libmate_panel_applet_private_mini_sources,
+ panel_marshal,
+ include_directories: libmate_panel_applet_private_inc_dirs,
+ dependencies: libmate_panel_applet_private_deps,
+ c_args: libmate_panel_applet_private_common_args,
+)
diff --git a/mate-panel/libpanel-util/meson.build b/mate-panel/libpanel-util/meson.build
new file mode 100644
index 00000000..6383084c
--- /dev/null
+++ b/mate-panel/libpanel-util/meson.build
@@ -0,0 +1,33 @@
+libpanel_util_sources = [
+ 'panel-cleanup.c',
+ 'panel-cleanup.h',
+ 'panel-color.c',
+ 'panel-color.h',
+ 'panel-error.c',
+ 'panel-error.h',
+ 'panel-glib.c',
+ 'panel-glib.h',
+ 'panel-gtk.c',
+ 'panel-gtk.h',
+ 'panel-icon-chooser.c',
+ 'panel-icon-chooser.h',
+ 'panel-keyfile.c',
+ 'panel-keyfile.h',
+ 'panel-launch.c',
+ 'panel-launch.h',
+ 'panel-list.c',
+ 'panel-list.h',
+ 'panel-session-manager.c',
+ 'panel-session-manager.h',
+ 'panel-show.c',
+ 'panel-show.h',
+ 'panel-xdg.c',
+ 'panel-xdg.h',
+]
+
+libpanel_util = static_library('panel-util',
+ libpanel_util_sources,
+ include_directories: libpanel_util_inc,
+ dependencies: panel_deps + [dconf_dep],
+ c_args: ['-DDATADIR="@0@"'.format(mate_panel_datadir)] + disable_deprecated_flags,
+)
diff --git a/mate-panel/meson.build b/mate-panel/meson.build
new file mode 100644
index 00000000..95af7190
--- /dev/null
+++ b/mate-panel/meson.build
@@ -0,0 +1,355 @@
+mate_panel_inc = include_directories('.')
+mate_submodules_inc = include_directories('mate-submodules')
+libpanel_util_inc = include_directories('libpanel-util')
+
+glib_mkenums = find_program('glib-mkenums')
+glib_compile_resources = find_program('glib-compile-resources')
+
+# --- generated sources ---
+
+# marshallers
+panel_marshal = gnome.genmarshal('panel-marshal',
+ sources: 'panel-marshal.list',
+ prefix: 'panel_marshal',
+)
+
+# enumerations
+panel_enum_headers = [
+ 'panel-enums.h',
+ 'panel-enums-gsettings.h',
+ 'panel-types.h',
+]
+
+panel_typebuiltins_c = custom_target('panel-typebuiltins.c',
+ input: panel_enum_headers,
+ output: 'panel-typebuiltins.c',
+ command: [
+ glib_mkenums,
+ '--fhead', '#include <glib-object.h>\n',
+ '--fhead', '#include "panel-typebuiltins.h"\n\n',
+ '--fprod', '\n/* enumerations from "@filename@" */',
+ '--fprod', '\n#include "@filename@"\n',
+ '--vhead', 'static const GEnumValue _@enum_name@_values[] = {',
+ '--vprod', ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ '--vtail', ' { 0, NULL, NULL }\n};\n\n',
+ '--vtail', 'GType\n@enum_name@_get_type (void)\n{\n',
+ '--vtail', ' static GType type = 0;\n\n',
+ '--vtail', ' if (!type)\n',
+ '--vtail', ' type = g_enum_register_static ("@EnumName@", _@enum_name@_values);\n\n',
+ '--vtail', ' return type;\n}\n\n',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ ],
+)
+
+panel_typebuiltins_h = custom_target('panel-typebuiltins.h',
+ input: panel_enum_headers,
+ output: 'panel-typebuiltins.h',
+ command: [
+ glib_mkenums,
+ '--fhead', '#ifndef __PANEL_TYPEBUILTINS_H__\n',
+ '--fhead', '#define __PANEL_TYPEBUILTINS_H__ 1\n\n',
+ '--fhead', '#ifdef __cplusplus\nextern "C" {\n#endif\n\n',
+ '--ftail', '#ifdef __cplusplus\n}\n#endif\n\n',
+ '--ftail', '#endif /* __PANEL_TYPEBUILTINS_H__ */\n',
+ '--fprod', '\n/* --- @filename@ --- */',
+ '--eprod', '#define PANEL_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n',
+ '--eprod', 'GType @enum_name@_get_type (void);\n',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ ],
+)
+
+# resources
+panel_resource_deps = [
+ 'panel-ditem-editor-dialog.ui',
+ 'panel-properties-dialog.ui',
+ 'panel-run-dialog.ui',
+ '../data/theme/mate-panel.css',
+ '../data/theme/panel-grid-symbolic.svg',
+]
+
+panel_resources_c = custom_target('panel-resources.c',
+ input: 'panel.gresource.xml',
+ output: 'panel-resources.c',
+ depend_files: panel_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-source',
+ '--c-name', 'panel',
+ '@INPUT@',
+ ],
+)
+
+panel_resources_h = custom_target('panel-resources.h',
+ input: 'panel.gresource.xml',
+ output: 'panel-resources.h',
+ depend_files: panel_resource_deps,
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-header',
+ '--c-name', 'panel',
+ '@INPUT@',
+ ],
+)
+
+panel_test_applets_resources_c = custom_target('panel-test-applets-resources.c',
+ input: 'panel-test-applets.gresource.xml',
+ output: 'panel-test-applets-resources.c',
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-source',
+ '--c-name', 'panel',
+ '@INPUT@',
+ ],
+)
+
+panel_test_applets_resources_h = custom_target('panel-test-applets-resources.h',
+ input: 'panel-test-applets.gresource.xml',
+ output: 'panel-test-applets-resources.h',
+ command: [
+ glib_compile_resources,
+ '--target', '@OUTPUT@',
+ '--sourcedir', meson.current_source_dir(),
+ '--generate-header',
+ '--c-name', 'panel',
+ '@INPUT@',
+ ],
+)
+
+# --- sub-libraries ---
+
+# libegg is built from the mate-submodules git submodule, whose working tree
+# is not tracked by this repository. Build it directly from here so that a
+# fresh checkout (with the submodule populated) needs no extra meson files.
+libegg_sources = files(
+ 'mate-submodules/libegg/eggtreemultidnd.c',
+ 'mate-submodules/libegg/eggtreemultidnd.h',
+ 'mate-submodules/libegg/eggdesktopfile.c',
+ 'mate-submodules/libegg/eggdesktopfile.h',
+ 'mate-submodules/libegg/eggsmclient.c',
+ 'mate-submodules/libegg/eggsmclient.h',
+ 'mate-submodules/libegg/eggsmclient-private.h',
+ 'mate-submodules/libegg/eggsmclient-xsmp.c',
+)
+
+libegg = static_library('egg',
+ libegg_sources,
+ dependencies: [ice_dep, sm_dep, gtk_dep, glib_dep],
+ c_args: [
+ '-DEGG_SM_CLIENT_BACKEND_XSMP',
+ '-DG_LOG_DOMAIN="EggSMClient"',
+ ] + disable_deprecated_flags,
+)
+
+subdir('libmate-panel-applet-private')
+subdir('libpanel-util')
+
+# --- programs ---
+
+panel_common_cpp_args = [
+ '-DMATELOCALEDIR="@0@"'.format(mate_panel_localedir),
+ '-DPANELDATADIR="@0@"'.format(mate_panel_pkgdatadir),
+ '-DPANEL_MODULES_DIR="@0@"'.format(mate_panel_modulesdir),
+] + disable_deprecated_flags
+
+panel_common_inc_dirs = [
+ mate_panel_inc,
+ libpanel_util_inc,
+ mate_submodules_inc,
+]
+
+panel_common_deps = panel_deps + [dconf_dep]
+
+panel_sources = [
+ panel_marshal,
+ panel_typebuiltins_c,
+ panel_typebuiltins_h,
+ panel_resources_c,
+ panel_resources_h,
+ 'main.c',
+ 'panel-widget.c',
+ 'button-widget.c',
+ 'panel-session.c',
+ 'panel.c',
+ 'applet.c',
+ 'drawer.c',
+ 'panel-config-global.c',
+ 'panel-util.c',
+ 'panel-properties-dialog.c',
+ 'panel-run-dialog.c',
+ 'menu.c',
+ 'panel-context-menu.c',
+ 'launcher.c',
+ 'panel-applet-frame.c',
+ 'panel-applets-manager.c',
+ 'panel-shell.c',
+ 'panel-background.c',
+ 'panel-stock-icons.c',
+ 'panel-action-button.c',
+ 'panel-menu-bar.c',
+ 'panel-menu-button.c',
+ 'panel-menu-items.c',
+ 'panel-separator.c',
+ 'panel-recent.c',
+ 'panel-toplevel.c',
+ 'panel-frame.c',
+ 'panel-multimonitor.c',
+ 'panel-a11y.c',
+ 'panel-bindings.c',
+ 'panel-layout.c',
+ 'panel-profile.c',
+ 'panel-lockdown.c',
+ 'panel-addto.c',
+ 'panel-ditem-editor.c',
+ 'panel-modules.c',
+ 'panel-applet-info.c',
+ 'panel-reset.c',
+ 'panel-types.h',
+ 'panel-widget.h',
+ 'panel-globals.h',
+ 'button-widget.h',
+ 'panel-session.h',
+ 'panel.h',
+ 'applet.h',
+ 'drawer.h',
+ 'drawer-private.h',
+ 'panel-util.h',
+ 'panel-properties-dialog.h',
+ 'panel-config-global.h',
+ 'panel-run-dialog.h',
+ 'menu.h',
+ 'panel-context-menu.h',
+ 'launcher.h',
+ 'panel-applet-frame.h',
+ 'panel-applets-manager.h',
+ 'panel-shell.h',
+ 'panel-background.h',
+ 'panel-stock-icons.h',
+ 'panel-action-button.h',
+ 'panel-menu-bar.h',
+ 'panel-menu-button.h',
+ 'panel-menu-items.h',
+ 'panel-separator.h',
+ 'panel-recent.h',
+ 'panel-toplevel.h',
+ 'panel-frame.h',
+ 'panel-multimonitor.h',
+ 'panel-a11y.h',
+ 'panel-bindings.h',
+ 'panel-layout.h',
+ 'panel-profile.h',
+ 'panel-enums-gsettings.h',
+ 'panel-enums.h',
+ 'panel-lockdown.h',
+ 'panel-addto.h',
+ 'panel-ditem-editor.h',
+ 'panel-icon-names.h',
+ 'panel-modules.h',
+ 'panel-applet-info.h',
+ 'panel-reset.h',
+ 'panel-schemas.h',
+]
+
+if have_wayland
+ panel_sources += ['wayland-backend.c', 'wayland-backend.h']
+endif
+
+if have_x11
+ panel_sources += [
+ 'xstuff.c',
+ 'panel-xutils.c',
+ 'panel-force-quit.c',
+ 'panel-action-protocol.c',
+ 'panel-struts.c',
+ 'xstuff.h',
+ 'panel-xutils.h',
+ 'panel-force-quit.h',
+ 'panel-action-protocol.h',
+ 'panel-struts.h',
+ ]
+endif
+
+mate_panel_deps = panel_common_deps + [randr_dep]
+if have_x11
+ mate_panel_deps += x11_dep
+endif
+if have_wayland
+ mate_panel_deps += wayland_deps
+endif
+
+executable('mate-panel',
+ panel_sources,
+ include_directories: panel_common_inc_dirs,
+ dependencies: mate_panel_deps,
+ c_args: panel_common_cpp_args + ['-DMATEMENU_I_KNOW_THIS_IS_UNSTABLE'],
+ link_with: [libegg, libmate_panel_applet_private, libpanel_util],
+ export_dynamic: true,
+ install: true,
+)
+
+mate_desktop_item_edit_sources = [
+ 'mate-desktop-item-edit.c',
+ 'panel-ditem-editor.c',
+ panel_resources_c,
+ panel_resources_h,
+ panel_marshal,
+ 'panel-util.c',
+]
+
+if have_x11
+ mate_desktop_item_edit_sources += ['xstuff.c']
+endif
+
+mate_desktop_item_edit_deps = panel_common_deps
+if have_x11
+ mate_desktop_item_edit_deps += x11_dep
+endif
+
+executable('mate-desktop-item-edit',
+ mate_desktop_item_edit_sources,
+ include_directories: panel_common_inc_dirs,
+ dependencies: mate_desktop_item_edit_deps,
+ c_args: panel_common_cpp_args,
+ link_with: libpanel_util,
+ export_dynamic: true,
+ install: true,
+)
+
+mate_panel_test_applets_sources = [
+ panel_marshal,
+ panel_test_applets_resources_c,
+ panel_test_applets_resources_h,
+ 'panel-modules.c',
+ 'panel-applet-info.c',
+ 'panel-applets-manager.c',
+ 'panel-test-applets.c',
+]
+
+executable('mate-panel-test-applets',
+ mate_panel_test_applets_sources,
+ include_directories: panel_common_inc_dirs,
+ dependencies: panel_common_deps,
+ c_args: panel_common_cpp_args + [
+ '-DMATE_PANEL_APPLETS_DIR="@0@"'.format(mate_panel_appletsdir),
+ ],
+ link_with: [libmate_panel_applet_private_mini, libpanel_util],
+ export_dynamic: true,
+ install: true,
+)
+
+# desktop file
+mate_panel_desktop = i18n.merge_file(
+ input: 'mate-panel.desktop.in',
+ output: 'mate-panel.desktop',
+ type: 'desktop',
+ po_dir: '../po',
+ install: true,
+ install_dir: join_paths(mate_panel_datadir, 'applications'),
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..3b8b5ed6
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,318 @@
+project(
+ 'mate-panel',
+ 'c',
+ version: '1.29.0',
+ meson_version: '>= 0.56.0',
+ license: ['GPL-2', 'LGPL-2', 'FDL-1.1'],
+)
+
+# Before making a release, the LT_VERSION string should be modified.
+# The string is of the form C:R:A.
+# - If interfaces have been changed or added, but binary compatibility has
+# been preserved, change to C+1:0:A+1
+# - If binary compatibility has been broken (eg removed or changed interfaces)
+# change to C+1:0:0
+# - If the interface is the same as the previous version, change to C:R+1:A
+libmate_panel_applet_current = 2
+libmate_panel_applet_revision = 0
+libmate_panel_applet_age = 0
+
+mate_panel_version = meson.project_version()
+version_array = mate_panel_version.split('.')
+mate_panel_major_version = version_array[0].to_int()
+mate_panel_minor_version = version_array[1].to_int()
+mate_panel_micro_version = version_array[2].to_int()
+
+mate_panel_api_version = '4.0'
+mate_panel_api_name = 'libmate-panel-applet-@0@'.format(mate_panel_api_version)
+
+mate_panel_gir_ns = 'MatePanelApplet'
+mate_panel_gir_version = mate_panel_api_version
+
+mate_panel_gettext_package = meson.project_name()
+
+mate_panel_prefix = get_option('prefix')
+mate_panel_bindir = join_paths(mate_panel_prefix, get_option('bindir'))
+mate_panel_datadir = join_paths(mate_panel_prefix, get_option('datadir'))
+mate_panel_includedir = join_paths(mate_panel_prefix, get_option('includedir'))
+mate_panel_libdir = join_paths(mate_panel_prefix, get_option('libdir'))
+mate_panel_libexecdir = join_paths(mate_panel_prefix, get_option('libexecdir'))
+mate_panel_localedir = join_paths(mate_panel_prefix, get_option('localedir'))
+mate_panel_pkgdatadir = join_paths(mate_panel_datadir, 'mate-panel')
+mate_panel_pkglibdir = join_paths(mate_panel_libdir, 'mate-panel')
+mate_panel_modulesdir = join_paths(mate_panel_libdir, 'mate-panel', 'modules')
+mate_panel_appletsdir = join_paths(mate_panel_datadir, 'mate-panel', 'applets')
+mate_panel_layoutsdir = join_paths(mate_panel_pkgdatadir, 'layouts')
+mate_panel_schemadir = join_paths(mate_panel_datadir, 'glib-2.0', 'schemas')
+
+cc = meson.get_compiler('c')
+
+# options
+enable_deprecation_flags = get_option('enable-deprecation-flags')
+enable_introspection = get_option('introspection')
+enable_gtk_doc = get_option('gtk-doc')
+enable_help = get_option('help')
+enable_compile_warnings = get_option('compile-warnings')
+
+config_h = configuration_data()
+config_h.set_quoted('GETTEXT_PACKAGE', mate_panel_gettext_package)
+config_h.set_quoted('PACKAGE', meson.project_name())
+config_h.set_quoted('PACKAGE_NAME', meson.project_name())
+config_h.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), mate_panel_version))
+config_h.set_quoted('PACKAGE_TARNAME', meson.project_name())
+config_h.set_quoted('PACKAGE_URL', 'https://mate-desktop.org')
+config_h.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/mate-desktop/mate-panel/issues')
+config_h.set_quoted('PACKAGE_VERSION', mate_panel_version)
+config_h.set_quoted('VERSION', mate_panel_version)
+config_h.set_quoted('MATELOCALEDIR', mate_panel_localedir)
+config_h.set_quoted('DATADIR', mate_panel_datadir)
+config_h.set_quoted('PANELDATADIR', mate_panel_pkgdatadir)
+config_h.set_quoted('PANEL_MODULES_DIR', mate_panel_modulesdir)
+config_h.set_quoted('MATE_PANEL_APPLETS_DIR', mate_panel_appletsdir)
+config_h.set('ENABLE_NLS', 1)
+
+# standard headers
+foreach header : [
+ 'dirent.h',
+ 'dlfcn.h',
+ 'inttypes.h',
+ 'langinfo.h',
+ 'stdint.h',
+ 'stdio.h',
+ 'stdlib.h',
+ 'strings.h',
+ 'string.h',
+ 'sys/stat.h',
+ 'sys/types.h',
+ 'unistd.h',
+ ]
+ if cc.has_header(header)
+ config_h.set('HAVE_' + header.underscorify().to_upper(), 1)
+ endif
+endforeach
+config_h.set('HAVE_NL_LANGINFO', cc.has_function('nl_langinfo'))
+config_h.set('STDC_HEADERS', 1)
+config_h.set('HAVE_STRUCT_DIRENT_D_TYPE',
+ cc.has_member('struct dirent', 'd_type', prefix: '#include <dirent.h>'))
+
+if get_option('enable-debug').enabled()
+ config_h.set('MATE_ENABLE_DEBUG', 1)
+else
+ config_h.set('NDEBUG', 1)
+endif
+
+# compile warnings
+warning_flags = []
+if enable_compile_warnings == 'no'
+ warning_flags = []
+elif enable_compile_warnings == 'minimum'
+ warning_flags = ['-Wall']
+elif enable_compile_warnings == 'yes'
+ warning_flags = ['-Wall', '-Wmissing-prototypes']
+elif enable_compile_warnings == 'maximum' or enable_compile_warnings == 'error'
+ warning_flags = [
+ '-Wall',
+ '-Wmissing-prototypes',
+ '-Wbad-function-cast',
+ '-Wcast-align',
+ '-Wextra',
+ '-Wno-unused-parameter',
+ '-Wformat-nonliteral',
+ '-Wmissing-declarations',
+ '-Wmissing-field-initializers',
+ '-Wnested-externs',
+ '-Wpointer-arith',
+ '-Wredundant-decls',
+ '-Wshadow',
+ '-Wstrict-prototypes',
+ '-Werror=format-security',
+ ]
+ if enable_compile_warnings == 'error'
+ warning_flags += ['-Werror']
+ endif
+endif
+
+foreach flag : warning_flags
+ if cc.has_argument(flag)
+ add_project_arguments(flag, language: 'c')
+ endif
+endforeach
+
+# *_DISABLE_DEPRECATED flags
+disable_deprecated_flags = []
+if enable_deprecation_flags
+ disable_deprecated_flags = [
+ '-DG_DISABLE_DEPRECATED',
+ '-DG_DISABLE_SINGLE_INCLUDES',
+ '-DATK_DISABLE_DEPRECATED',
+ '-DATK_DISABLE_SINGLE_INCLUDES',
+ '-DPANGO_DISABLE_DEPRECATED',
+ '-DPANGO_DISABLE_SINGLE_INCLUDES',
+ '-DGDK_DISABLE_DEPRECATED',
+ '-DGDK_DISABLE_SINGLE_INCLUDES',
+ '-DGDK_PIXBUF_DISABLE_DEPRECATED',
+ '-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES',
+ '-DGTK_DISABLE_DEPRECATED',
+ '-DGTK_DISABLE_SINGLE_INCLUDES',
+ '-DMATE_DISABLE_DEPRECATED',
+ '-DMATE_DISABLE_SINGLE_INCLUDES',
+ '-DLIBGLADE_DISABLE_DEPRECATED',
+ '-DLIBGLADE_DISABLE_SINGLE_INCLUDES',
+ '-DVTE_DISABLE_DEPRECATED',
+ '-DVTE_DISABLE_SINGLE_INCLUDES',
+ '-DWNCK_DISABLE_DEPRECATED',
+ '-DWNCK_DISABLE_SINGLE_INCLUDES',
+ '-DLIBSOUP_DISABLE_DEPRECATED',
+ '-DLIBSOUP_DISABLE_SINGLE_INCLUDES',
+ ]
+endif
+
+add_project_arguments(
+ '-DHAVE_CONFIG_H',
+ '-I' + meson.current_build_dir(),
+ language: 'c',
+)
+
+# dependencies
+glib_dep = dependency('glib-2.0', version: '>= 2.50.0')
+gio_dep = dependency('gio-2.0', version: '>= 2.50.0')
+gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.50.0')
+gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.26.0')
+pango_dep = dependency('pango', version: '>= 1.15.4')
+gtk_dep = dependency('gtk+-3.0', version: '>= 3.24.0')
+cairo_dep = dependency('cairo', version: '>= 1.0.0')
+mate_desktop_dep = dependency('mate-desktop-2.0', version: '>= 1.28.2')
+mate_menu_dep = dependency('libmate-menu', version: '>= 1.21.0')
+dconf_dep = dependency('dconf', version: '>= 0.13.4')
+wnck_dep = dependency('libwnck-3.0', version: '>= 43.0')
+mateweather_dep = dependency('mateweather', version: '>= 1.17.0')
+gmodule_dep = dependency('gmodule-2.0', required: false)
+ice_dep = dependency('ice')
+sm_dep = dependency('sm')
+m_dep = cc.find_library('m', required: false)
+
+# X11 support
+x11_opt = get_option('enable-x11')
+x11_dep = dependency('x11', required: x11_opt)
+have_x11 = x11_dep.found()
+config_h.set('HAVE_X11', have_x11)
+
+# Wayland support
+wayland_opt = get_option('enable-wayland')
+wayland_deps = [
+ dependency('gtk-layer-shell-0', required: wayland_opt),
+ dependency('wayland-client', required: wayland_opt),
+]
+have_wayland = wayland_deps[0].found() and wayland_deps[1].found()
+if have_wayland
+ xfw_dep = dependency('libxfce4windowing-0', version: '>= 4.19.0')
+endif
+config_h.set('HAVE_WAYLAND', have_wayland)
+
+if not have_x11 and not have_wayland
+ if wayland_opt.disabled() and x11_opt.disabled()
+ error('At least one backend must be enabled')
+ else
+ error('No usable backend found, install X11 or Wayland development libraries')
+ endif
+endif
+
+# XRandR extension
+randr_dep = dependency('xrandr', version: '>= 1.3.0', required: false)
+have_randr = randr_dep.found()
+config_h.set('HAVE_RANDR', have_randr)
+
+# Evolution Data Server support for calendar integration
+eds_opt = get_option('enable-eds')
+eds_deps = [
+ dependency('libecal-2.0', version: '>= 3.33.2', required: eds_opt),
+ dependency('libedataserver-1.2', version: '>= 3.5.3', required: eds_opt),
+]
+have_eds = eds_deps[0].found() and eds_deps[1].found()
+config_h.set('HAVE_EDS', have_eds)
+
+# applets to compile in-process
+in_process_applets = get_option('in-process-applets')
+clock_inprocess = false
+fish_inprocess = false
+notification_area_inprocess = false
+wncklet_inprocess = false
+if 'none' in in_process_applets
+ in_process_applets = []
+endif
+if 'all' in in_process_applets
+ in_process_applets = ['clock', 'fish', 'notification-area', 'wncklet']
+endif
+foreach applet : in_process_applets
+ if applet == 'clock'
+ clock_inprocess = true
+ config_h.set('CLOCK_INPROCESS', 1)
+ elif applet == 'fish'
+ fish_inprocess = true
+ config_h.set('FISH_INPROCESS', 1)
+ elif applet == 'notification-area'
+ notification_area_inprocess = true
+ config_h.set('NOTIFICATION_AREA_INPROCESS', 1)
+ elif applet == 'wncklet'
+ wncklet_inprocess = true
+ config_h.set('WNCKLET_INPROCESS', 1)
+ else
+ error('applet @0@ not recognized'.format(applet))
+ endif
+endforeach
+
+panel_deps = [
+ gmodule_dep,
+ gdk_pixbuf_dep,
+ pango_dep,
+ gtk_dep,
+ glib_dep,
+ gio_unix_dep,
+ mate_desktop_dep,
+ gio_dep,
+ mate_menu_dep,
+]
+
+libmate_panel_applet_deps = [
+ gtk_dep,
+ gio_dep,
+ gio_unix_dep,
+]
+
+# top-level include dirs
+panel_inc = include_directories('.')
+
+subdir('po')
+subdir('data')
+subdir('icons')
+subdir('man')
+subdir('libmate-panel-applet')
+subdir('mate-panel')
+subdir('applets')
+
+gtk_doc_dep = dependency('gtk-doc', required: enable_gtk_doc)
+if gtk_doc_dep.found()
+ subdir('doc')
+endif
+
+itstool = find_program('itstool', required: enable_help)
+if enable_help.allowed() and itstool.found()
+ subdir('help')
+endif
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h,
+)
+
+summary({
+ 'Maintainer mode': false,
+ 'Use *_DISABLE_DEPRECATED': enable_deprecation_flags,
+ 'Applets to build in-process': in_process_applets.length() > 0 ? in_process_applets : ['(none)'],
+ 'Wayland support': have_wayland,
+ 'X11 support': have_x11,
+ 'XRandr support': have_randr,
+ 'Evolution Data Server support': have_eds,
+ 'Build introspection support': enable_introspection,
+ 'Build gtk-doc documentation': enable_gtk_doc,
+}, section: 'mate-panel')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..af77de81
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,60 @@
+option('enable-deprecation-flags',
+ type: 'boolean',
+ value: false,
+ description: 'use *_DISABLE_DEPRECATED flags'
+)
+
+option('enable-eds',
+ type: 'feature',
+ value: 'auto',
+ description: 'Enable Evolution Data Server calendar integration'
+)
+
+option('enable-x11',
+ type: 'feature',
+ value: 'auto',
+ description: 'Explicitly enable or disable X11 support'
+)
+
+option('enable-wayland',
+ type: 'feature',
+ value: 'auto',
+ description: 'Explicitly enable or disable Wayland support'
+)
+
+option('in-process-applets',
+ type: 'array',
+ value: ['none'],
+ description: 'list of applets to compile in-process (none, clock, fish, notification-area, wncklet, all)'
+)
+
+option('introspection',
+ type: 'feature',
+ value: 'auto',
+ description: 'Enable introspection for this build'
+)
+
+option('gtk-doc',
+ type: 'feature',
+ value: 'auto',
+ description: 'use gtk-doc to build documentation'
+)
+
+option('help',
+ type: 'feature',
+ value: 'auto',
+ description: 'build the user help documentation'
+)
+
+option('enable-debug',
+ type: 'feature',
+ value: 'disabled',
+ description: 'turn on debugging'
+)
+
+option('compile-warnings',
+ type: 'combo',
+ value: 'yes',
+ choices: ['no', 'minimum', 'yes', 'maximum', 'error'],
+ description: 'Turn on compiler warnings'
+)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 00000000..57ed553d
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,6 @@
+i18n = import('i18n')
+
+i18n.gettext(
+ mate_panel_gettext_package,
+ preset: 'glib',
+)