From bca3b80da6b3653ada9e0546a3fd053cdc4651d0 Mon Sep 17 00:00:00 2001 From: zhuyaliang <15132211195@163.com> Date: Thu, 19 Oct 2023 11:41:29 +0800 Subject: Add meson build support --- capplets/about-me/meson.build | 41 +++++ capplets/accessibility/at-properties/meson.build | 49 ++++++ capplets/appearance/data/meson.build | 46 ++++++ capplets/appearance/meson.build | 50 ++++++ capplets/common/meson.build | 46 ++++++ capplets/default-applications/icons/meson.build | 15 ++ capplets/default-applications/meson.build | 54 +++++++ capplets/display/meson.build | 60 ++++++++ capplets/keybindings/meson.build | 70 +++++++++ capplets/keyboard/meson.build | 42 +++++ capplets/meson.build | 13 ++ capplets/mouse/meson.build | 36 +++++ capplets/network/meson.build | 35 +++++ capplets/system-info/meson.build | 37 +++++ capplets/time-admin/data/meson.build | 15 ++ capplets/time-admin/meson.build | 2 + capplets/time-admin/src/meson.build | 29 ++++ capplets/windows/meson.build | 36 +++++ font-viewer/meson.build | 54 +++++++ help/LINGUAS | 113 ++++++++++++++ help/meson.build | 22 +++ man/meson.build | 17 +++ meson.build | 186 +++++++++++++++++++++++ meson_options.txt | 2 + meson_post_install.py | 19 +++ po/meson.build | 6 + shell/meson.build | 60 ++++++++ typing-break/meson.build | 57 +++++++ 28 files changed, 1212 insertions(+) create mode 100644 capplets/about-me/meson.build create mode 100644 capplets/accessibility/at-properties/meson.build create mode 100644 capplets/appearance/data/meson.build create mode 100644 capplets/appearance/meson.build create mode 100644 capplets/common/meson.build create mode 100644 capplets/default-applications/icons/meson.build create mode 100644 capplets/default-applications/meson.build create mode 100644 capplets/display/meson.build create mode 100644 capplets/keybindings/meson.build create mode 100644 capplets/keyboard/meson.build create mode 100644 capplets/meson.build create mode 100644 capplets/mouse/meson.build create mode 100644 capplets/network/meson.build create mode 100644 capplets/system-info/meson.build create mode 100644 capplets/time-admin/data/meson.build create mode 100644 capplets/time-admin/meson.build create mode 100644 capplets/time-admin/src/meson.build create mode 100644 capplets/windows/meson.build create mode 100644 font-viewer/meson.build create mode 100644 help/LINGUAS create mode 100644 help/meson.build create mode 100644 man/meson.build create mode 100644 meson.build create mode 100644 meson_options.txt create mode 100644 meson_post_install.py create mode 100644 po/meson.build create mode 100644 shell/meson.build create mode 100644 typing-break/meson.build diff --git a/capplets/about-me/meson.build b/capplets/about-me/meson.build new file mode 100644 index 00000000..690eab0b --- /dev/null +++ b/capplets/about-me/meson.build @@ -0,0 +1,41 @@ +desktop = 'mate-about-me.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'e-image-chooser.c', + 'mate-about-me.c', + 'mate-about-me-fingerprint.c', + 'mate-about-me-password.c' +) + +sources += gnome.compile_resources( + 'mate-about-me-resources', + 'org.mate.mcc.am.gresource.xml', + c_name: 'about_me', + export: true +) + +cflags += [ + '-DDATADIR="@0@"'.format(mcc_datadir), + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), + '-DMATECC_PIXMAP_DIR="@0@"'.format(mcc_pixmaps), + '-DMATELOCALEDIR="@0@"'.format(mcc_localedir), +] + +executable( + 'mate-about-me', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) diff --git a/capplets/accessibility/at-properties/meson.build b/capplets/accessibility/at-properties/meson.build new file mode 100644 index 00000000..f3f70ee2 --- /dev/null +++ b/capplets/accessibility/at-properties/meson.build @@ -0,0 +1,49 @@ +desktop = 'mate-at-properties.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'main.c', + 'dm-util.c' +) + +sources += gnome.compile_resources( + 'mate-at-properties-resources', + 'org.mate.mcc.accessibility.at.gresource.xml', + c_name: 'accessibility', + export: true +) + +cflags += [ + '-DDATADIR="@0@"'.format(mcc_datadir), + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), + '-DPIXMAPDIR="@0@"'.format(mcc_pixmaps), + '-DMATELOCALEDIR="@0@"'.format(mcc_localedir), +] + +executable( + 'mate-at-properties', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) + +install_data ( + 'at-startup.png', + install_dir : mcc_pixmaps +) + +install_data ( + 'at-support.png', + install_dir : mcc_pixmaps +) diff --git a/capplets/appearance/data/meson.build b/capplets/appearance/data/meson.build new file mode 100644 index 00000000..fe2a7b43 --- /dev/null +++ b/capplets/appearance/data/meson.build @@ -0,0 +1,46 @@ +desktops = [ + 'mate-appearance-properties.desktop', + 'mate-theme-installer.desktop' +] + +foreach desktop: desktops + i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir + ) +endforeach + +icons = [ + 'gtk-theme-thumbnailing.png', + 'icon-theme-thumbnailing.png', + 'mouse-cursor-normal-large.png', + 'mouse-cursor-normal.png', + 'mouse-cursor-white-large.png', + 'mouse-cursor-white.png', + 'subpixel-bgr.png', + 'subpixel-rgb.png', + 'subpixel-vbgr.png', + 'subpixel-vrgb.png', + 'theme-thumbnailing.png', + 'window-theme-thumbnailing.png' +] + +foreach icon: icons + install_data ( + icon, + install_dir : mcc_pixmaps + ) +endforeach + + i18n.merge_file( + input: 'mate-theme-package.xml.in', + output: 'mate-theme-package.xml', + type: 'xml', + po_dir: po_dir, + install: true, + install_dir: mcc_mime, + ) diff --git a/capplets/appearance/meson.build b/capplets/appearance/meson.build new file mode 100644 index 00000000..f75c33d9 --- /dev/null +++ b/capplets/appearance/meson.build @@ -0,0 +1,50 @@ +sources = files( + 'appearance-desktop.c', + 'appearance-font.c', + 'appearance-main.c', + 'appearance-style.c', + 'appearance-support.c', + 'appearance-themes.c', + 'appearance-ui.c', + 'mate-wp-info.c', + 'mate-wp-item.c', + 'mate-wp-xml.c', + 'theme-installer.c', + 'theme-save.c', + 'theme-util.c' +) + +sources += gnome.compile_resources( + 'mate-appearance-properties-resources', + 'org.mate.mcc.appearance.gresource.xml', + c_name: 'appearance', + export: true +) + +cflags += [ + '-DDATADIR="@0@"'.format(mcc_datadir), + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), + '-DMATECC_PIXMAP_DIR="@0@"'.format(mcc_pixmaps), + '-DMATELOCALEDIR="@0@"'.format(mcc_localedir), + '-DBACKGROUND_DATADIR="@0@"'.format(mcc_background), + '-DWALLPAPER_DATADIR="@0@"'.format(mcc_wallpaperdir), + '-DMATE_DESKTOP_USE_UNSTABLE_API', +] + +deps = [ + common_deps, + libxml_dep, + accounts_dep +] + +executable( + 'mate-appearance-properties', + sources : sources, + include_directories: config_inc, + dependencies : [deps, libcommon_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) + +subdir('data') diff --git a/capplets/common/meson.build b/capplets/common/meson.build new file mode 100644 index 00000000..17f8f91f --- /dev/null +++ b/capplets/common/meson.build @@ -0,0 +1,46 @@ +common_inc = include_directories('.') +cflags = [ + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), + '-DMATEDATADIR="@0@"'.format(mcc_datadir), + '-DMATELOCALEDIR="@0@"'.format(mcc_localedir), + '-DGTK_ENGINE_DIR="/usr/lib/gtk-3.0/3.0.0/theming-engines"', + '-DG_LOG_DOMAIN="capplet-common"', + '-DINSTALL_PREFIX="@0@"'.format(mcc_prefix), + '-DPIXMAP_DIR="@0@"'.format(mcc_pixmaps), +] + +sources = [ + 'activate-settings-daemon.c', + 'capplet-util.c', + 'dconf-util.c', + 'file-transfer-dialog.c', + 'mate-theme-apply.c', + 'mate-theme-info.c', + 'gtkrc-utils.c', + 'theme-thumbnail.c', + 'wm-common.c', +] +gmodule_dep = cc.find_library('gmodule-2.0') +libcommon = static_library( + 'common', + sources: sources, + include_directories: config_inc, + dependencies: [common_deps,gmodule_dep], + c_args: cflags, + #link_args: ldflags, + install: false, +) + +libcommon_dep = declare_dependency( + include_directories: common_inc, + link_with: libcommon +) + +executable( + 'mate-theme-test', + sources : 'mate-theme-test.c', + dependencies : [common_deps, libcommon_dep], + include_directories: config_inc, + c_args : cflags, + install : false, +) diff --git a/capplets/default-applications/icons/meson.build b/capplets/default-applications/icons/meson.build new file mode 100644 index 00000000..4311ee95 --- /dev/null +++ b/capplets/default-applications/icons/meson.build @@ -0,0 +1,15 @@ +categories_icons = [ + ['16x16', 'instant-messaging.png'], + ['22x22', 'instant-messaging.png'], + ['24x24', 'instant-messaging.png'], + ['32x32', 'instant-messaging.png'], + ['48x48', 'instant-messaging.png'], + ['256x256', 'instant-messaging.png'], +] + +foreach icon: categories_icons + install_data( + join_paths(icon[0], 'categories', icon[1]), + install_dir: join_paths(mcc_icondir, 'hicolor', icon[0], 'categories') + ) +endforeach diff --git a/capplets/default-applications/meson.build b/capplets/default-applications/meson.build new file mode 100644 index 00000000..3c85cf49 --- /dev/null +++ b/capplets/default-applications/meson.build @@ -0,0 +1,54 @@ +desktop = 'mate-default-applications-properties.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'mate-da-capplet.c' +) + +sources += gnome.compile_resources( + 'mate-default-applications-properties-resources', + 'org.mate.mcc.da.gresource.xml', + c_name: 'default_applications', + export: true +) + +cflags += [ + '-DAPPLICATIONSDIR="@0@"'.format(mcc_desktopdir), +] + +executable( + 'mate-default-applications-properties', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) + +pc_conf = configuration_data() +pc_conf.set('prefix', mcc_prefix) +pc_conf.set('datarootdir', mcc_datadir) +pc_conf.set('datadir', mcc_datadir) +pc_conf.set('PACKAGE', meson.project_name()) +pc_conf.set('VERSION', meson.project_version()) + +pc = 'mate-default-applications.pc' + +configure_file( + input: pc + '.in', + output: pc, + install: true, + install_dir: join_paths(mcc_libdir, 'pkgconfig'), + configuration: pc_conf +) + +subdir('icons') diff --git a/capplets/display/meson.build b/capplets/display/meson.build new file mode 100644 index 00000000..26790973 --- /dev/null +++ b/capplets/display/meson.build @@ -0,0 +1,60 @@ +sources = files( + 'xrandr-capplet.c', + 'scrollarea.c', +) + +sources += gnome.compile_resources( + 'mate-display-properties-resources', + 'org.mate.mcc.display.gresource.xml', + c_name: 'display', + export: true +) + +sources += gnome.genmarshal('foo-marshal', prefix : 'foo_marshal', sources : 'foo-marshal.list') +cflags = [ + '-DDATADIR="@0@"'.format(mcc_datadir), + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), + '-DSBINDIR="@0@"'.format(mcc_sbindir), + '-DMATELOCALEDIR="@0@"'.format(mcc_localedir), +] + +executable( + 'mate-display-properties', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) + +executable( + 'mate-display-properties-install-systemwide', + sources : 'mate-display-properties-install-systemwide.c', + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep], + c_args : cflags, + install : true, + install_dir : get_option('sbindir') +) + +desktop = 'mate-display-properties.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +policy = 'org.mate.randr.policy' + +i18n.merge_file( + input: policy + '.in', + output: policy, + po_dir: po_dir, + install: true, + install_dir: mcc_policydir, +) diff --git a/capplets/keybindings/meson.build b/capplets/keybindings/meson.build new file mode 100644 index 00000000..020a412f --- /dev/null +++ b/capplets/keybindings/meson.build @@ -0,0 +1,70 @@ +desktop = 'mate-keybinding.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'mate-keybinding-properties.c', + 'eggcellrendererkeys.c', + 'eggaccelerators.c' +) + +sources += gnome.compile_resources( + 'mate-keybinding-properties-resources', + 'org.mate.mcc.keybindings.gresource.xml', + c_name: 'keybindings', + export: true +) + +cflags += [ + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), +] + +executable( + 'mate-keybinding-properties', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep, dconf_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) + +pc_conf = configuration_data() +pc_conf.set('prefix', mcc_prefix) +pc_conf.set('datarootdir', mcc_datadir) +pc_conf.set('datadir', mcc_datadir) +pc_conf.set('PACKAGE', meson.project_name()) +pc_conf.set('VERSION', meson.project_version()) + +pc = 'mate-keybindings.pc' + +configure_file( + input: pc + '.in', + output: pc, + install: true, + install_dir: join_paths(mcc_libdir, 'pkgconfig'), + configuration: pc_conf +) + +xml_files = [ + '00-multimedia-key.xml', + '01-desktop-key.xml' +] + +foreach file: xml_files + i18n.merge_file( + input: file + '.in', + output: file, + po_dir: po_dir, + data_dirs: its_dir, + install: true, + install_dir: join_paths(mcc_pkgdatadir, 'keybindings') + ) +endforeach diff --git a/capplets/keyboard/meson.build b/capplets/keyboard/meson.build new file mode 100644 index 00000000..22fa4a6f --- /dev/null +++ b/capplets/keyboard/meson.build @@ -0,0 +1,42 @@ +desktop = 'mate-keyboard.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'mate-keyboard-properties.c', + 'mate-keyboard-properties-a11y.c', + 'mate-keyboard-properties-xkb.c', + 'mate-keyboard-properties-xkbmc.c', + 'mate-keyboard-properties-xkblt.c', + 'mate-keyboard-properties-xkbltadd.c', + 'mate-keyboard-properties-xkbot.c', + 'mate-keyboard-properties-xkbpv.c' +) + +sources += gnome.compile_resources( + 'mate-keyboard-properties-resources', + 'org.mate.mcc.keyboard.gresource.xml', + c_name: 'keyboard', + export: true +) + +cflags += [ + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), +] + +executable( + 'mate-keyboard-properties', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep, xklavier_dep, matekbd_dep, matekbdui_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) diff --git a/capplets/meson.build b/capplets/meson.build new file mode 100644 index 00000000..015de1c3 --- /dev/null +++ b/capplets/meson.build @@ -0,0 +1,13 @@ +subdir('common') +subdir('about-me') +subdir('accessibility/at-properties') +subdir('appearance') +subdir('default-applications') +subdir('display') +subdir('keybindings') +subdir('keyboard') +subdir('mouse') +subdir('network') +subdir('system-info') +subdir('time-admin') +subdir('windows') diff --git a/capplets/mouse/meson.build b/capplets/mouse/meson.build new file mode 100644 index 00000000..dfa9072e --- /dev/null +++ b/capplets/mouse/meson.build @@ -0,0 +1,36 @@ +desktop = 'mate-settings-mouse.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'mate-mouse-properties.c', + 'msd-input-helper.c' +) + +sources += gnome.compile_resources( + 'mate-mouse-properties-resources', + 'org.mate.mcc.mouse.gresource.xml', + c_name: 'mouse', + export: true +) + +cflags = [ + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), +] + +executable( + 'mate-mouse-properties', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep, xi_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) diff --git a/capplets/network/meson.build b/capplets/network/meson.build new file mode 100644 index 00000000..5fa40544 --- /dev/null +++ b/capplets/network/meson.build @@ -0,0 +1,35 @@ +desktop = 'mate-network-properties.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'mate-network-properties.c', +) + +sources += gnome.compile_resources( + 'mate-network-properties-resources', + 'org.mate.mcc.network.gresource.xml', + c_name: 'network', + export: true +) + +cflags += [ + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), +] + +executable( + 'mate-network-properties', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) diff --git a/capplets/system-info/meson.build b/capplets/system-info/meson.build new file mode 100644 index 00000000..85707452 --- /dev/null +++ b/capplets/system-info/meson.build @@ -0,0 +1,37 @@ +desktop = 'mate-system-info.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'main.c', + 'mate-system-info.c', + 'info-cleanup.c' +) + +sources += gnome.compile_resources( + 'mate-system-info-resources', + 'system-info.gresource.xml', + c_name: 'mate_system_info', + export: true +) + +cflags += [ + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), +] + +executable( + 'mate-system-info', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep, gtop_dep, udisks2_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) diff --git a/capplets/time-admin/data/meson.build b/capplets/time-admin/data/meson.build new file mode 100644 index 00000000..28645e14 --- /dev/null +++ b/capplets/time-admin/data/meson.build @@ -0,0 +1,15 @@ +desktop = 'mate-time-admin.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +install_subdir( + 'map', + install_dir: join_paths(mcc_datadir, 'mate-time-admin') +) diff --git a/capplets/time-admin/meson.build b/capplets/time-admin/meson.build new file mode 100644 index 00000000..f1503770 --- /dev/null +++ b/capplets/time-admin/meson.build @@ -0,0 +1,2 @@ +subdir('src') +subdir('data') diff --git a/capplets/time-admin/src/meson.build b/capplets/time-admin/src/meson.build new file mode 100644 index 00000000..59247248 --- /dev/null +++ b/capplets/time-admin/src/meson.build @@ -0,0 +1,29 @@ +sources = files( + 'main.c', + 'time-map.c', + 'time-share.c', + 'time-tool.c', + 'time-zone.c' +) + +sources += gnome.compile_resources( + 'mate-time-admin-resources', + 'org.mate.mcc.ta.gresource.xml', + c_name: 'time_admin', + export: true +) + +cflags += [ + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), + '-DTIMPZONEDIR="@0@"'.format(mcc_timezonedir), +] + +executable( + 'mate-time-admin', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep, polkit_dep, m_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) diff --git a/capplets/windows/meson.build b/capplets/windows/meson.build new file mode 100644 index 00000000..b60720eb --- /dev/null +++ b/capplets/windows/meson.build @@ -0,0 +1,36 @@ +desktop = 'mate-window-properties.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +sources = files( + 'mate-metacity-support.c', + 'mate-window-properties.c' +) + +sources += gnome.compile_resources( + 'mate-window-properties-resources', + 'org.mate.mcc.windows.gresource.xml', + c_name: 'window_properties', + export: true +) + +cflags += [ + '-DMATECC_DATA_DIR="@0@"'.format(mcc_pkgdatadir), +] + +executable( + 'mate-window-properties', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, libcommon_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) diff --git a/font-viewer/meson.build b/font-viewer/meson.build new file mode 100644 index 00000000..6a85f8af --- /dev/null +++ b/font-viewer/meson.build @@ -0,0 +1,54 @@ +cflags = [ + '-DDIRECTORY_DIR="@0@"'.format(mcc_directorydir), + '-DMATELOCALEDIR="@0@"'.format(mcc_localedir), +] + +libm = cc.find_library('libm', required: false) +deps = [ + common_deps, + pango_dep, + fontconfig_dep, + libm, +] +executable( + 'mate-font-viewer', + sources : [ + 'sushi-font-loader.c', + 'font-model.c', + 'font-utils.c', + 'gd-main-toolbar.c', + 'sushi-font-widget.c', + 'font-view.c' + ], + include_directories : config_inc, + dependencies : deps, + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) + +executable( + 'mate-thumbnail-font', + sources : [ + 'sushi-font-loader.c', + 'font-thumbnailer.c', + 'totem-resources.c', + ], + include_directories : config_inc, + dependencies : deps, + c_args : cflags, + install : true, +) + +i18n.merge_file( + input: 'mate-font-viewer.desktop.in', + output: 'mate-font-viewer.desktop', + type: 'desktop', + po_dir: join_paths(meson.project_source_root(), 'po'), + install: true, + install_dir: mcc_desktopdir, +) + +install_data('mate-font-viewer.thumbnailer', + install_dir : join_paths(mcc_datadir, 'thumbnailers'), +) diff --git a/help/LINGUAS b/help/LINGUAS new file mode 100644 index 00000000..460c980e --- /dev/null +++ b/help/LINGUAS @@ -0,0 +1,113 @@ +af +am +ar +as +ast +az +be +bg +bn +bn_IN +br +bs +ca +ca@valencia +cmn +crh +cs +cy +da +de +dz +el +en_AU +en_CA +en_GB +eo +es +es_AR +es_CL +es_CO +es_MX +et +eu +fa +fi +fr +fr_CA +frp +fur +fy +ga +gl +gu +ha +he +hi +hr +hu +hy +id +ie +ig +is +it +ja +ka +kab +kk +kn +ko +ku +ku_IQ +ky +li +lt +lv +mai +mg +mk +ml +mn +mr +ms +nb +nds +ne +nl +nn +nso +oc +or +pa +pl +ps +pt +pt_BR +ro +ru +rw +si +sk +sl +sq +sr +sr@latin +sv +ta +te +th +tk +tr +ug +uk +ur +uz +vi +wa +xh +yo +zh_CN +zh_HK +zh_TW +zu diff --git a/help/meson.build b/help/meson.build new file mode 100644 index 00000000..516a127d --- /dev/null +++ b/help/meson.build @@ -0,0 +1,22 @@ +mcc_help_sources = [ + 'config-accessibility-keyboard.xml', + 'config-background.xml', + 'config-behavior.xml', + 'config-cds.xml', + 'config-default-apps.xml', + 'config-file-type.xml', + 'config-hints.xml', + 'config-html.xml', + 'config-kbd.xml', + 'config-keybindings.xml', + 'config-mouse.xml', + 'config-screensaver.xml', + 'config-themes.xml', + 'index.docbook', + 'legal.xml', +] + +gnome.yelp( + 'mate-control-center', + sources: mcc_help_sources, +) diff --git a/man/meson.build b/man/meson.build new file mode 100644 index 00000000..db004f13 --- /dev/null +++ b/man/meson.build @@ -0,0 +1,17 @@ +install_man([ + 'mate-about-me.1', + 'mate-appearance-properties.1', + 'mate-at-properties.1', + 'mate-control-center.1', + 'mate-default-applications-properties.1', + 'mate-display-properties.1', + 'mate-display-properties-install-systemwide.1', + 'mate-font-viewer.1', + 'mate-keybinding-properties.1', + 'mate-keyboard-properties.1', + 'mate-mouse-properties.1', + 'mate-network-properties.1', + 'mate-thumbnail-font.1', + 'mate-typing-monitor.1', + 'mate-window-properties.1', +]) diff --git a/meson.build b/meson.build new file mode 100644 index 00000000..b23502d0 --- /dev/null +++ b/meson.build @@ -0,0 +1,186 @@ +project( + 'mate-control-center', 'c', + version : '1.27.0', + meson_version : '>= 0.57.0' +) + +mcc_prefix = get_option('prefix') +mcc_bindir = join_paths(mcc_prefix, get_option('bindir')) +mcc_sbindir = join_paths(mcc_prefix, get_option('sbindir')) +mcc_datadir = join_paths(mcc_prefix, get_option('datadir')) +mcc_libexecdir = join_paths(mcc_prefix, get_option('libexecdir')) +mcc_libdir = join_paths(mcc_prefix, get_option('libdir')) +mcc_localedir = join_paths(mcc_prefix, get_option('localedir')) +mcc_mandir = join_paths(mcc_prefix, get_option('mandir')) +mcc_sysconfdir = join_paths(mcc_prefix, get_option('sysconfdir')) + +mcc_pkgdatadir = join_paths(mcc_datadir, meson.project_name()) +mcc_pixmaps = join_paths(mcc_pkgdatadir, 'pixmaps') +mcc_background = join_paths(mcc_datadir, 'backgrounds') +mcc_wallpaperdir = join_paths(mcc_datadir, 'mate-background-properties') +mcc_desktopdir = join_paths(mcc_datadir, 'applications') +mcc_icondir = join_paths(mcc_datadir, 'icons') +mcc_schemadir = join_paths (mcc_datadir, 'glib-2.0', 'schemas') +mcc_policydir = join_paths (mcc_datadir, 'polkit-1', 'actions') +mcc_timezonedir = join_paths (mcc_datadir, 'mate-time-admin', 'map') +mcc_directorydir = join_paths(mcc_datadir, 'desktop-directories') +mcc_mime = join_paths(mcc_datadir, 'mime', 'packages') +mcc_gettext = meson.project_name() + '-2.0' + +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()], + ['XCURSOR_ICONDIR', mcc_icondir], + # i18n + ['GETTEXT_PACKAGE', mcc_gettext] +] + +foreach define: set_defines + config_h.set_quoted(define[0], define[1]) +endforeach + +common_flags = ['-DHAVE_CONFIG_H'] + +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') + +gtk_dep = dependency('gtk+-3.0', version: '>= 3.22.0') +gio_dep = dependency('gio-2.0') +glib_dep = dependency('glib-2.0', version: '>= 2.64.0') +mate_desktop_dep = dependency('mate-desktop-2.0', version: '>= 1.27.1') +marco_dep = dependency('libmarco-private', version: '>= 1.17.0') +menu_dep = dependency('libmate-menu', version: '>= 1.21.0') +libxml_dep = dependency('libxml-2.0') +pango_dep = dependency('pango') +xcursor_dep = dependency('xcursor') +dconf_dep = dependency('dconf', version: '>= 0.13.4') +fontconfig_dep = dependency('fontconfig') +gtop_dep = dependency('libgtop-2.0') +udisks2_dep = dependency('udisks2') +polkit_dep = dependency('polkit-gobject-1') +matekbd_dep = dependency('libmatekbd', version: '>=1.17.0') +matekbdui_dep = dependency('libmatekbdui', version: '>=1.17.0') +xklavier_dep = dependency('libxklavier', version: '>= 5.2') +x11_dep = dependency('x11', version: '>= 1.8') +xi_dep = dependency('xi', version: '>= 1.5') +xext_dep = dependency('xext') +xscrnsaver_dep = dependency('xscrnsaver') +m_dep = cc.find_library('m') + +enable_accountsservice = get_option('accountsservice') +accounts_dep = dependency('accountsservice', version: '>= 0.6.39', required: enable_accountsservice) +config_h.set10('HAVE_ACCOUNTSSERVICE', accounts_dep.found()) + +common_deps = [ + gio_dep, + xcursor_dep, + x11_dep, + glib_dep, + marco_dep, + mate_desktop_dep, + accounts_dep, + dependency('gio-unix-2.0'), + dependency('gthread-2.0'), + gtk_dep, +] + +enable_libappindicator = get_option('libappindicator') +if enable_libappindicator == 'yes' + appindicator = true + ayatana = false +elif enable_libappindicator == 'auto' + if dependency('ayatana-appindicator3-0.1', required : false).found() + appindicator = false + ayatana = true + elif dependency('appindicator3-0.1', required : false).found() + appindicator = true + ayatana = false + else + error ('Neither Ayatana AppIndicator nor Ubuntu AppIndicator library is present, but you enabled AppIndicator support.') + endif +else + appindicator = false + ayatana = true +endif +appindicator_dep = dependency('appindicator3-0.1', version: '>= 0.0.13', required: appindicator) +ayatana_dep = dependency('ayatana-appindicator3-0.1', version: '>= 0.0.13', required: ayatana) +config_h.set('HAVE_UBUNTU_APPINDICATOR', appindicator) +gnome = import('gnome') +i18n = import('i18n') +pkg = import('pkgconfig') + +po_dir = join_paths(meson.project_source_root(), 'po') +its_dir = join_paths(meson.project_source_root()) +config_inc = include_directories('.') + +schema_data = configuration_data() +schema_data.set('GETTEXT_PACKAGE', meson.project_name()) +configure_file( + input : 'org.mate.control-center.keybinding.gschema.xml.in', + output : 'org.mate.control-center.keybinding.gschema.xml', + configuration : schema_data, + install : true, + install_dir : join_paths(mcc_datadir, 'glib-2.0', 'schemas') +) +configure_file( + input : 'org.mate.control-center.gschema.xml.in', + output : 'org.mate.control-center.gschema.xml', + configuration : schema_data, + install : true, + install_dir : join_paths(mcc_datadir, 'glib-2.0', 'schemas') +) + +subdir('po') +subdir('man') +subdir('help') +subdir('font-viewer') +subdir('capplets') +subdir('typing-break') +subdir('shell') + +gnome.post_install( + glib_compile_schemas: true, + gtk_update_icon_cache: true, +) + +configure_file( + output: 'config.h', + configuration: config_h +) + +meson.add_install_script( + 'meson_post_install.py', + mcc_datadir +) + +summary = [ + 'configuration summary:', + '', + ' project: @0@ @1@'.format(meson.project_name(), meson.project_version()), + ' prefix: @0@'.format(mcc_prefix), + 'accountsservice supports: @0@'.format(accounts_dep.found()), + ' Ayatana AppIndicator: @0@'.format(ayatana), + ' Ubuntu AppIndicator: @0@'.format(appindicator), + '' +] +message('\n'.join(summary)) diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..f192b472 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,2 @@ +option('accountsservice', type: 'feature', value: 'auto', description: 'enable accountsservice') +option('libappindicator', type: 'string', value: 'auto', description: 'enable libappindicator') diff --git a/meson_post_install.py b/meson_post_install.py new file mode 100644 index 00000000..02a57a21 --- /dev/null +++ b/meson_post_install.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import os +import subprocess +import sys + +gsettingsschemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas') +icondir = os.path.join(sys.argv[1], 'icons', 'hicolor') +mimedir = os.path.join(sys.argv[1], 'mime') + +if not os.environ.get('DESTDIR'): + print('Compiling gsettings schemas...') + subprocess.call(['glib-compile-schemas', gsettingsschemadir]) + + print('Update icon cache...') + subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir]) + + print('Update mime database...') + subprocess.call(['update-mime-database', '-V', mimedir]) diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 00000000..964935b7 --- /dev/null +++ b/po/meson.build @@ -0,0 +1,6 @@ +i18n.gettext(meson.project_name(), + preset : 'glib', + args: [ + '--default-domain=' + meson.project_name() + ] +) diff --git a/shell/meson.build b/shell/meson.build new file mode 100644 index 00000000..e39e55e3 --- /dev/null +++ b/shell/meson.build @@ -0,0 +1,60 @@ +directory_desktop = 'matecc.directory' +desktop = 'matecc.desktop' + +i18n.merge_file( + type: 'desktop', + input: desktop + '.in', + output: desktop, + po_dir: po_dir, + install: true, + install_dir: mcc_desktopdir +) + +i18n.merge_file( + type: 'desktop', + input: directory_desktop + '.desktop.in', + output: directory_desktop, + po_dir: po_dir, + install: true, + install_dir: join_paths(mcc_datadir, 'desktop-directories') +) + +sources = files( + 'application-tile.c', + 'app-resizer.c', + 'app-shell.c', + 'bookmark-agent.c', + 'control-center.c', + 'double-click-detector.c', + 'libslab-utils.c', + 'mate-utils.c', + 'nameplate-tile.c', + 'search-bar.c', + 'shell-window.c', + 'slab-mate-util.c', + 'slab-section.c', + 'themed-icon.c', + 'tile-action.c', + 'tile.c' +) + +sources += gnome.genmarshal('nld-marshal', prefix : 'nld_marshal', sources : 'nld-marshal.list' ) +cflags = [ + '-DDATADIR="@0@"'.format(mcc_datadir), + '-DMATELOCALEDIR="@0@"'.format(mcc_localedir), +] + +executable( + 'mate-control-center', + sources : sources, + include_directories: config_inc, + dependencies : [common_deps, menu_dep], + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) + +install_data ( + 'matecc.menu', + install_dir : join_paths(get_option('sysconfdir'), 'xdg', 'menus') +) diff --git a/typing-break/meson.build b/typing-break/meson.build new file mode 100644 index 00000000..29033b95 --- /dev/null +++ b/typing-break/meson.build @@ -0,0 +1,57 @@ +cflags = [ + '-DIMAGEDIR="@0@"'.format(mcc_directorydir), + '-DMATELOCALEDIR="@0@"'.format(mcc_pixmaps), +] + +deps = [ + gtk_dep, + glib_dep, + mate_desktop_dep, + x11_dep, + xext_dep, + xscrnsaver_dep, + m_dep +] +deps += [appindicator_dep,ayatana_dep] +executable( + 'mate-typing-monitor', + sources : [ + 'drw-break-window.c', + 'drw-monitor.c', + 'drwright.c', + 'drw-selection.c', + 'drw-timer.c', + 'drw-utils.c', + 'main.c' + ], + include_directories : config_inc, + dependencies : deps, + c_args : cflags, + install : true, + install_dir : get_option('bindir') +) + +install_data( + 'mate-typing-monitor.png', + install_dir: join_paths(mcc_icondir, 'hicolor', '48x48', 'apps') +) + +install_data( + 'mate-typing-monitor.svg', + install_dir: join_paths(mcc_icondir, 'hicolor', 'scalable', 'apps') +) + +icons = [ + 'bar-disabled.png', + 'bar-green.png', + 'bar.png', + 'bar-red.png', + 'ocean-stripes.png' +] + +foreach icon: icons + install_data( + icon, + install_dir : mcc_pixmaps + ) +endforeach -- cgit v1.2.1