[gedit-plugins/tchaik/4-meson-port] Port to meson build system
- From: Martin Blanchard <mablanch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins/tchaik/4-meson-port] Port to meson build system
- Date: Wed, 27 Mar 2019 14:34:43 +0000 (UTC)
commit 97bb6cda75dd0281055243773a508c29ba9b1033
Author: Martin Blanchard <tchaik gmx com>
Date: Tue Feb 5 21:36:23 2019 +0000
Port to meson build system
The meson build system focuses on speed an ease of use,
which helps speeding up the software development.
https://gitlab.gnome.org/GNOME/gedit-plugins/issues/4
Closes GNOME/gedit-plugins#4
build-aux/meson/post_install.py | 24 +++++
help/LINGUAS | 29 ++++++
help/meson.build | 24 +++++
meson.build | 156 +++++++++++++++++++++++++++++++++
meson_options.txt | 19 ++++
plugins/bookmarks/meson.build | 57 ++++++++++++
plugins/bookmarks/messages/meson.build | 7 ++
plugins/bracketcompletion/meson.build | 41 +++++++++
plugins/charmap/meson.build | 37 ++++++++
plugins/codecomment/meson.build | 41 +++++++++
plugins/colorpicker/meson.build | 41 +++++++++
plugins/colorschemer/meson.build | 50 +++++++++++
plugins/commander/meson.build | 46 ++++++++++
plugins/drawspaces/meson.build | 73 +++++++++++++++
plugins/findinfiles/meson.build | 71 +++++++++++++++
plugins/git/meson.build | 37 ++++++++
plugins/joinlines/meson.build | 41 +++++++++
plugins/meson.build | 48 ++++++++++
plugins/multiedit/meson.build | 37 ++++++++
plugins/smartspaces/meson.build | 41 +++++++++
plugins/synctex/meson.build | 37 ++++++++
plugins/terminal/meson.build | 49 +++++++++++
plugins/textsize/meson.build | 37 ++++++++
plugins/translate/meson.build | 56 ++++++++++++
plugins/wordcompletion/meson.build | 71 +++++++++++++++
plugins/zeitgeist/meson.build | 48 ++++++++++
po/meson.build | 7 ++
27 files changed, 1225 insertions(+)
---
diff --git a/build-aux/meson/post_install.py b/build-aux/meson/post_install.py
new file mode 100755
index 0000000..84e1de0
--- /dev/null
+++ b/build-aux/meson/post_install.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+libdir = sys.argv[1]
+datadir = sys.argv[2]
+
+# Packaging tools define DESTDIR and this isn't needed for them
+if 'DESTDIR' not in os.environ:
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas',
+ os.path.join(datadir, 'glib-2.0', 'schemas')])
+
+ print('Compiling python modules...')
+ subprocess.call([sys.executable, '-m', 'compileall', '-f', '-q',
+ os.path.join(libdir, 'gedit', 'plugins'),
+ os.path.join(datadir, 'gedit', 'plugins')])
+
+ print('Compiling python modules (optimized versions) ...')
+ subprocess.call([sys.executable, '-O', '-m', 'compileall', '-f', '-q',
+ os.path.join(libdir, 'gedit', 'plugins'),
+ os.path.join(datadir, 'gedit', 'plugins')])
diff --git a/help/LINGUAS b/help/LINGUAS
new file mode 100644
index 0000000..144785c
--- /dev/null
+++ b/help/LINGUAS
@@ -0,0 +1,29 @@
+ar
+bg
+ca
+cs
+da
+de
+el
+es
+eu
+fi
+fr
+gl
+hu
+it
+ja
+ko
+lv
+oc
+pl
+pt_BR
+ru
+sl
+sv
+te
+th
+uk
+zh_CN
+zh_HK
+zh_TW
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..e7fe938
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,24 @@
+gedit_help_sources = [
+ 'bookmarks.page',
+ 'bracket-comp.page',
+ 'character-map.page',
+ 'code-comment.page',
+ 'color-picker.page',
+ 'commander.page',
+ 'dashboard.page',
+ 'draw-spaces.page',
+ 'git.page',
+ 'join-split-lines.page',
+ 'legal-plugins.xml',
+ 'multi-edit.page',
+ 'terminal.page',
+ 'text-size.page',
+ 'translate.page',
+ 'word-completion.page',
+ 'zeitgeist-dataprovider.page',
+]
+
+gnome.yelp(
+ 'gedit',
+ sources: gedit_help_sources,
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..12b4789
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,156 @@
+project(
+ 'gedit-plugins', 'c',
+ version: '3.32.0',
+ meson_version: '>=0.50.0',
+ license: 'GPL2'
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+python = import('python')
+
+# Versioning
+version = meson.project_version()
+version_arr = version.split('.')
+version_major = version_arr[0]
+version_minor = version_arr[1]
+version_micro = version_arr[2]
+
+api_version = '3.14'
+
+package_name = meson.project_name()
+package_string = '@0@-@1@'.format(package_name, api_version)
+
+# Paths
+rootdir = include_directories('.')
+
+srcdir = meson.current_source_dir()
+builddir = meson.current_build_dir()
+
+prefix = get_option('prefix')
+
+bindir = join_paths(prefix, get_option('bindir'))
+includedir = join_paths(prefix, get_option('includedir'))
+libdir = join_paths(prefix, get_option('libdir'))
+libexecdir = join_paths(prefix, get_option('libexecdir'))
+datadir = join_paths(prefix, get_option('datadir'))
+
+pkglibdir = join_paths(libdir, 'gedit')
+pkgdatadir = join_paths(datadir, 'gedit')
+
+appstreamdir = join_paths(datadir, 'metainfo')
+dbusdir = join_paths(datadir, 'dbus-1')
+glibdir = join_paths(datadir, 'glib-2.0')
+localedir = join_paths(datadir, 'locale')
+
+# Dependencies
+libpeas_req = '>= 1.14.1'
+gedit_req = '>= 3.16'
+appstream_req = '>= 0.12.1'
+zeitgeist_req = '>= 0.9.12'
+
+libpeas_dep = dependency('libpeas-1.0', version: libpeas_req)
+gedit_dep = dependency('gedit', version: gedit_req)
+
+appstream_dep = dependency('appstream', version: appstream_req, required: false)
+zeitgeist_dep = dependency('zeitgeist-2.0', version: zeitgeist_req, required: false)
+
+# Configurations
+config_h = configuration_data()
+config_h.set_quoted('PACKAGE_NAME', package_name)
+config_h.set_quoted('PACKAGE_STRING', package_string)
+config_h.set_quoted('PACKAGE_VERSION', version)
+config_h.set_quoted('GETTEXT_PACKAGE', package_name)
+config_h.set_quoted('LOCALEDIR', localedir)
+config_h.set_quoted('LIBDIR', libdir)
+config_h.set_quoted('DATADIR', datadir)
+config_h.set_quoted('VERSION', version)
+
+config_h.set('GEDIT_MAJOR_VERSION', version_major)
+config_h.set('GEDIT_MINOR_VERSION', version_minor)
+config_h.set('GEDIT_MICRO_VERSION', version_micro)
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h
+)
+
+# Options
+active_plugins = []
+extra_languages = []
+all_plugins = {
+ 'bookmarks': {'language': 'c'},
+ 'bracketcompletion': {'language': 'python'},
+ 'charmap': {'language': 'python'},
+ 'codecomment': {'language': 'python'},
+ 'colorpicker': {'language': 'python'},
+ 'colorschemer': {'language': 'python'},
+ 'commander': {'language': 'python'},
+ 'drawspaces': {'language': 'c'},
+ 'findinfiles': {'language': 'vala'},
+ 'git': {'language': 'python'},
+ 'joinlines': {'language': 'python'},
+ 'multiedit': {'language': 'python'},
+ 'smartspaces': {'language': 'python'},
+ 'synctex': {'language': 'python'},
+ 'terminal': {'language': 'python'},
+ 'textsize': {'language': 'python'},
+ 'translate': {'language': 'python'},
+ 'wordcompletion': {'language': 'c'},
+ 'zeitgeist': {'language': 'c'},
+}
+
+foreach plugin_name, plugin_metadata : all_plugins
+ if get_option('plugin_@0@'.format(plugin_name))
+ active_plugins += plugin_name
+
+ plugin_language = plugin_metadata.get('language')
+ if plugin_language != 'c'
+ extra_languages += plugin_language
+ endif
+ endif
+endforeach
+
+if 'python' in extra_languages
+ python3 = python.find_installation('python3')
+endif
+
+if 'vala' in extra_languages
+ add_languages('vala', required: true)
+ valac = meson.get_compiler('vala')
+endif
+
+install_metainfo = appstream_dep.found()
+
+subdir('po')
+subdir('plugins')
+subdir('help')
+
+summary = [
+ '',
+ '------',
+ 'gedit-plugins @0@ (@1@)'.format(version, api_version),
+ '',
+ ' AppData: @0@'.format(install_metainfo),
+ '',
+ 'Plugins:']
+foreach plugin_name : active_plugins
+ summary += ' ' + plugin_name
+endforeach
+summary += [
+ '',
+ 'Directories:',
+ ' prefix: @0@'.format(prefix),
+ ' libdir: @0@'.format(libdir),
+ ' datadir: @0@'.format(datadir),
+ '',
+ '------',
+]
+
+meson.add_install_script(
+ 'build-aux/meson/post_install.py',
+ libdir, datadir,
+)
+
+message('\n'.join(summary))
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..330ea0f
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,19 @@
+option('plugin_bookmarks', type: 'boolean')
+option('plugin_bracketcompletion', type: 'boolean')
+option('plugin_charmap', type: 'boolean')
+option('plugin_codecomment', type: 'boolean')
+option('plugin_colorpicker', type: 'boolean')
+option('plugin_colorschemer', type: 'boolean')
+option('plugin_commander', type: 'boolean')
+option('plugin_drawspaces', type: 'boolean')
+option('plugin_findinfiles', type: 'boolean', value: false)
+option('plugin_git', type: 'boolean')
+option('plugin_joinlines', type: 'boolean')
+option('plugin_multiedit', type: 'boolean')
+option('plugin_smartspaces', type: 'boolean')
+option('plugin_synctex', type: 'boolean')
+option('plugin_terminal', type: 'boolean')
+option('plugin_textsize', type: 'boolean')
+option('plugin_translate', type: 'boolean')
+option('plugin_wordcompletion', type: 'boolean')
+option('plugin_zeitgeist', type: 'boolean')
diff --git a/plugins/bookmarks/meson.build b/plugins/bookmarks/meson.build
new file mode 100644
index 0000000..5bfd7ca
--- /dev/null
+++ b/plugins/bookmarks/meson.build
@@ -0,0 +1,57 @@
+libbookmarks_sources = files(
+ 'gedit-bookmarks-app-activatable.c',
+ 'gedit-bookmarks-plugin.c',
+)
+
+libbookmarks_deps = [
+ gedit_dep,
+]
+
+libbookmarks_c_args = [
+ '-DHAVE_CONFIG_H',
+]
+
+subdir('messages')
+
+libbookmarks_sha = shared_module(
+ 'bookmarks',
+ sources: libbookmarks_sources,
+ include_directories: rootdir,
+ dependencies: libbookmarks_deps,
+ c_args: libbookmarks_c_args,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+bookmarks_plugin_in = configure_file(
+ input: 'bookmarks.plugin.desktop.in.in',
+ output: 'bookmarks.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'bookmarks.plugin',
+ input: bookmarks_plugin_in,
+ output: 'bookmarks.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-bookmarks.metainfo.xml',
+ input: 'gedit-bookmarks.metainfo.xml.in',
+ output: 'gedit-bookmarks.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/bookmarks/messages/meson.build b/plugins/bookmarks/messages/meson.build
new file mode 100644
index 0000000..accdcf9
--- /dev/null
+++ b/plugins/bookmarks/messages/meson.build
@@ -0,0 +1,7 @@
+libbookmarks_sources += files(
+ 'gedit-bookmarks-message-add.c',
+ 'gedit-bookmarks-message-goto-next.c',
+ 'gedit-bookmarks-message-goto-previous.c',
+ 'gedit-bookmarks-message-remove.c',
+ 'gedit-bookmarks-message-toggle.c',
+)
diff --git a/plugins/bracketcompletion/meson.build b/plugins/bracketcompletion/meson.build
new file mode 100644
index 0000000..028c970
--- /dev/null
+++ b/plugins/bracketcompletion/meson.build
@@ -0,0 +1,41 @@
+bracketcompletion_sources = files(
+ 'bracketcompletion.py',
+)
+
+install_data(
+ bracketcompletion_sources,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+bracketcompletion_plugin_in = configure_file(
+ input: 'bracketcompletion.plugin.desktop.in.in',
+ output: 'bracketcompletion.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'bracketcompletion.plugin',
+ input: bracketcompletion_plugin_in,
+ output: 'bracketcompletion.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-bracketcompletion.metainfo.xml',
+ input: 'gedit-bracketcompletion.metainfo.xml.in',
+ output: 'gedit-bracketcompletion.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/charmap/meson.build b/plugins/charmap/meson.build
new file mode 100644
index 0000000..f5b1d2d
--- /dev/null
+++ b/plugins/charmap/meson.build
@@ -0,0 +1,37 @@
+install_subdir(
+ 'charmap',
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+charmap_plugin_in = configure_file(
+ input: 'charmap.plugin.desktop.in.in',
+ output: 'charmap.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'charmap.plugin',
+ input: charmap_plugin_in,
+ output: 'charmap.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-charmap.metainfo.xml',
+ input: 'gedit-charmap.metainfo.xml.in',
+ output: 'gedit-charmap.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/codecomment/meson.build b/plugins/codecomment/meson.build
new file mode 100644
index 0000000..0cf9cd8
--- /dev/null
+++ b/plugins/codecomment/meson.build
@@ -0,0 +1,41 @@
+codecomment_sources = files(
+ 'codecomment.py',
+)
+
+install_data(
+ codecomment_sources,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+codecomment_plugin_in = configure_file(
+ input: 'codecomment.plugin.desktop.in.in',
+ output: 'codecomment.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'codecomment.plugin',
+ input: codecomment_plugin_in,
+ output: 'codecomment.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-codecomment.metainfo.xml',
+ input: 'gedit-codecomment.metainfo.xml.in',
+ output: 'gedit-codecomment.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/colorpicker/meson.build b/plugins/colorpicker/meson.build
new file mode 100644
index 0000000..0e5ec4d
--- /dev/null
+++ b/plugins/colorpicker/meson.build
@@ -0,0 +1,41 @@
+colorpicker_sources = files(
+ 'colorpicker.py',
+)
+
+install_data(
+ colorpicker_sources,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+colorpicker_plugin_in = configure_file(
+ input: 'colorpicker.plugin.desktop.in.in',
+ output: 'colorpicker.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'colorpicker.plugin',
+ input: colorpicker_plugin_in,
+ output: 'colorpicker.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-colorpicker.metainfo.xml',
+ input: 'gedit-colorpicker.metainfo.xml.in',
+ output: 'gedit-colorpicker.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/colorschemer/meson.build b/plugins/colorschemer/meson.build
new file mode 100644
index 0000000..a7e9d55
--- /dev/null
+++ b/plugins/colorschemer/meson.build
@@ -0,0 +1,50 @@
+install_subdir(
+ 'schemer',
+ exclude_files: 'Makefile.am',
+ strip_directory : true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ 'colorschemer',
+ )
+)
+
+install_data(
+ 'schemer.ui',
+ install_dir: join_paths(
+ pkgdatadir,
+ 'plugins',
+ 'colorschemer',
+ 'ui',
+ )
+)
+
+colorschemer_plugin_in = configure_file(
+ input: 'colorschemer.plugin.desktop.in.in',
+ output: 'colorschemer.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'colorschemer.plugin',
+ input: colorschemer_plugin_in,
+ output: 'colorschemer.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-colorschemer.metainfo.xml',
+ input: 'gedit-colorschemer.metainfo.xml.in',
+ output: 'gedit-colorschemer.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/commander/meson.build b/plugins/commander/meson.build
new file mode 100644
index 0000000..0db6675
--- /dev/null
+++ b/plugins/commander/meson.build
@@ -0,0 +1,46 @@
+install_subdir(
+ 'commander',
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+install_subdir(
+ 'modules',
+ install_dir: join_paths(
+ pkgdatadir,
+ 'plugins',
+ 'commander',
+ )
+)
+
+commander_plugin_in = configure_file(
+ input: 'commander.plugin.desktop.in.in',
+ output: 'commander.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'commander.plugin',
+ input: commander_plugin_in,
+ output: 'commander.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-commander.metainfo.xml',
+ input: 'gedit-commander.metainfo.xml.in',
+ output: 'gedit-commander.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/drawspaces/meson.build b/plugins/drawspaces/meson.build
new file mode 100644
index 0000000..e059b0b
--- /dev/null
+++ b/plugins/drawspaces/meson.build
@@ -0,0 +1,73 @@
+libdrawspaces_sources = files(
+ 'gedit-drawspaces-app-activatable.c',
+ 'gedit-drawspaces-view-activatable.c',
+ 'gedit-drawspaces-window-activatable.c',
+)
+
+libdrawspaces_deps = [
+ gedit_dep,
+]
+
+libdrawspaces_c_args = [
+ '-DHAVE_CONFIG_H',
+]
+
+libdrawspaces_res = gnome.compile_resources(
+ 'gedit-drawspaces-resources',
+ 'gedit-drawspaces.gresource.xml',
+)
+
+libdrawspaces_sources += [
+ libdrawspaces_res.get(0),
+]
+
+libdrawspaces_sha = shared_module(
+ 'drawspaces',
+ sources: libdrawspaces_sources,
+ include_directories: rootdir,
+ dependencies: libdrawspaces_deps,
+ c_args: libdrawspaces_c_args,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+drawspaces_plugin_in = configure_file(
+ input: 'drawspaces.plugin.desktop.in.in',
+ output: 'drawspaces.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'drawspaces.plugin',
+ input: drawspaces_plugin_in,
+ output: 'drawspaces.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+install_data(
+ 'org.gnome.gedit.plugins.drawspaces.gschema.xml',
+ install_dir: join_paths(
+ glibdir,
+ 'schemas',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-drawspaces.metainfo.xml',
+ input: 'gedit-drawspaces.metainfo.xml.in',
+ output: 'gedit-drawspaces.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/findinfiles/meson.build b/plugins/findinfiles/meson.build
new file mode 100644
index 0000000..625bfba
--- /dev/null
+++ b/plugins/findinfiles/meson.build
@@ -0,0 +1,71 @@
+libfindinfiles_sources = files(
+ 'dialog.vala',
+ 'job.vala',
+ 'matcher.vala',
+ 'plugin.vala',
+ 'result-panel.vala',
+)
+
+libfindinfiles_deps = [
+ valac.find_library('config', dirs: vapi_dir),
+ valac.find_library('posix'),
+ libpeas_dep,
+ gedit_dep,
+]
+
+libfindinfiles_c_args = [
+ '-DGETTEXT_PACKAGE="@0@"'.format(package_name),
+ '-DGP_LOCALEDIR="@0@"'.format(localedir),
+]
+
+libfindinfiles_res = gnome.compile_resources(
+ 'findinfiles-resources',
+ 'findinfiles.gresource.xml',
+)
+
+libfindinfiles_sources += [
+ libfindinfiles_res.get(0),
+]
+
+libfindinfiles_sha = shared_module(
+ 'findinfiles',
+ sources: libfindinfiles_sources,
+ include_directories: rootdir,
+ dependencies: libfindinfiles_deps,
+ c_args: libfindinfiles_c_args,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+findinfiles_plugin_in = configure_file(
+ input: 'findinfiles.plugin.desktop.in.in',
+ output: 'findinfiles.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'findinfiles.plugin',
+ input: findinfiles_plugin_in,
+ output: 'findinfiles.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-findinfiles.metainfo.xml',
+ input: 'gedit-findinfiles.metainfo.xml.in',
+ output: 'gedit-findinfiles.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/git/meson.build b/plugins/git/meson.build
new file mode 100644
index 0000000..0206995
--- /dev/null
+++ b/plugins/git/meson.build
@@ -0,0 +1,37 @@
+install_subdir(
+ 'git',
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+git_plugin_in = configure_file(
+ input: 'git.plugin.desktop.in.in',
+ output: 'git.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'git.plugin',
+ input: git_plugin_in,
+ output: 'git.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-git.metainfo.xml',
+ input: 'gedit-git.metainfo.xml.in',
+ output: 'gedit-git.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/joinlines/meson.build b/plugins/joinlines/meson.build
new file mode 100644
index 0000000..46b6fbc
--- /dev/null
+++ b/plugins/joinlines/meson.build
@@ -0,0 +1,41 @@
+joinlines_sources = files(
+ 'joinlines.py',
+)
+
+install_data(
+ joinlines_sources,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+joinlines_plugin_in = configure_file(
+ input: 'joinlines.plugin.desktop.in.in',
+ output: 'joinlines.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'joinlines.plugin',
+ input: joinlines_plugin_in,
+ output: 'joinlines.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-joinlines.metainfo.xml',
+ input: 'gedit-joinlines.metainfo.xml.in',
+ output: 'gedit-joinlines.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/meson.build b/plugins/meson.build
new file mode 100644
index 0000000..a9ca375
--- /dev/null
+++ b/plugins/meson.build
@@ -0,0 +1,48 @@
+msgfmt_plugin_cmd = [
+ find_program('msgfmt'),
+ '--desktop',
+ '--keyword=Name',
+ '--keyword=Description',
+ '--template=@INPUT@',
+ '-d', join_paths(srcdir, 'po'),
+ '--output=@OUTPUT@'
+]
+
+msgfmt_appstream_cmd = [
+ find_program('msgfmt'),
+ '--xml',
+ '--template=@INPUT@',
+ '-d', join_paths(srcdir, 'po'),
+ '--output=@OUTPUT@'
+]
+
+plugin_in = configuration_data()
+plugin_in.set('VERSION', version)
+
+gpdefs_py = configuration_data()
+gpdefs_py.set('PACKAGE', package_name)
+gpdefs_py.set('PACKAGE_STRING', package_string)
+gpdefs_py.set('GETTEXT_PACKAGE', package_name)
+gpdefs_py.set('VERSION', version)
+
+gpdefs_py.set('prefix', prefix)
+
+configure_file(
+ input: 'gpdefs.py.in',
+ output: 'gpdefs.py',
+ configuration: gpdefs_py,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+vapi_dir = join_paths(
+ srcdir,
+ 'plugins',
+)
+
+foreach plugin_name : active_plugins
+ subdir(plugin_name)
+endforeach
diff --git a/plugins/multiedit/meson.build b/plugins/multiedit/meson.build
new file mode 100644
index 0000000..d3e38da
--- /dev/null
+++ b/plugins/multiedit/meson.build
@@ -0,0 +1,37 @@
+install_subdir(
+ 'multiedit',
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+multiedit_plugin_in = configure_file(
+ input: 'multiedit.plugin.desktop.in.in',
+ output: 'multiedit.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'multiedit.plugin',
+ input: multiedit_plugin_in,
+ output: 'multiedit.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-multiedit.metainfo.xml',
+ input: 'gedit-multiedit.metainfo.xml.in',
+ output: 'gedit-multiedit.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/smartspaces/meson.build b/plugins/smartspaces/meson.build
new file mode 100644
index 0000000..b115d4d
--- /dev/null
+++ b/plugins/smartspaces/meson.build
@@ -0,0 +1,41 @@
+smartspaces_sources = files(
+ 'smartspaces.py',
+)
+
+install_data(
+ smartspaces_sources,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+smartspaces_plugin_in = configure_file(
+ input: 'smartspaces.plugin.desktop.in.in',
+ output: 'smartspaces.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'smartspaces.plugin',
+ input: smartspaces_plugin_in,
+ output: 'smartspaces.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-smartspaces.metainfo.xml',
+ input: 'gedit-smartspaces.metainfo.xml.in',
+ output: 'gedit-smartspaces.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/synctex/meson.build b/plugins/synctex/meson.build
new file mode 100644
index 0000000..060097a
--- /dev/null
+++ b/plugins/synctex/meson.build
@@ -0,0 +1,37 @@
+install_subdir(
+ 'synctex',
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+synctex_plugin_in = configure_file(
+ input: 'synctex.plugin.desktop.in.in',
+ output: 'synctex.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'synctex.plugin',
+ input: synctex_plugin_in,
+ output: 'synctex.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-synctex.metainfo.xml',
+ input: 'gedit-synctex.metainfo.xml.in',
+ output: 'gedit-synctex.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/terminal/meson.build b/plugins/terminal/meson.build
new file mode 100644
index 0000000..ac7e30c
--- /dev/null
+++ b/plugins/terminal/meson.build
@@ -0,0 +1,49 @@
+terminal_sources = files(
+ 'terminal.py',
+)
+
+install_data(
+ terminal_sources,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+terminal_plugin_in = configure_file(
+ input: 'terminal.plugin.desktop.in.in',
+ output: 'terminal.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'terminal.plugin',
+ input: terminal_plugin_in,
+ output: 'terminal.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+install_data(
+ 'org.gnome.gedit.plugins.terminal.gschema.xml',
+ install_dir: join_paths(
+ glibdir,
+ 'schemas',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-terminal.metainfo.xml',
+ input: 'gedit-terminal.metainfo.xml.in',
+ output: 'gedit-terminal.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/textsize/meson.build b/plugins/textsize/meson.build
new file mode 100644
index 0000000..5d5e3a8
--- /dev/null
+++ b/plugins/textsize/meson.build
@@ -0,0 +1,37 @@
+install_subdir(
+ 'textsize',
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+textsize_plugin_in = configure_file(
+ input: 'textsize.plugin.desktop.in.in',
+ output: 'textsize.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'textsize.plugin',
+ input: textsize_plugin_in,
+ output: 'textsize.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-textsize.metainfo.xml',
+ input: 'gedit-textsize.metainfo.xml.in',
+ output: 'gedit-textsize.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/translate/meson.build b/plugins/translate/meson.build
new file mode 100644
index 0000000..0a099fd
--- /dev/null
+++ b/plugins/translate/meson.build
@@ -0,0 +1,56 @@
+install_subdir(
+ 'translate',
+ exclude_directories: ['ui'],
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+install_data(
+ 'translate/ui/preferences.ui',
+ install_dir: join_paths(
+ pkgdatadir,
+ 'plugins',
+ 'translate',
+ 'ui',
+ )
+)
+
+translate_plugin_in = configure_file(
+ input: 'translate.plugin.desktop.in.in',
+ output: 'translate.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'translate.plugin',
+ input: translate_plugin_in,
+ output: 'translate.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+install_data(
+ 'org.gnome.gedit.plugins.translate.gschema.xml',
+ install_dir: join_paths(
+ glibdir,
+ 'schemas',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-translate.metainfo.xml',
+ input: 'gedit-translate.metainfo.xml.in',
+ output: 'gedit-translate.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/wordcompletion/meson.build b/plugins/wordcompletion/meson.build
new file mode 100644
index 0000000..a6e9b85
--- /dev/null
+++ b/plugins/wordcompletion/meson.build
@@ -0,0 +1,71 @@
+libwordcompletion_sources = files(
+ 'gedit-word-completion-plugin.c',
+)
+
+libwordcompletion_deps = [
+ gedit_dep,
+]
+
+libwordcompletion_c_args = [
+ '-DHAVE_CONFIG_H',
+]
+
+libwordcompletion_res = gnome.compile_resources(
+ 'gedit-word-completion-resources',
+ 'gedit-word-completion.gresource.xml',
+)
+
+libwordcompletion_sources += [
+ libwordcompletion_res.get(0),
+]
+
+libwordcompletion_sha = shared_module(
+ 'wordcompletion',
+ sources: libwordcompletion_sources,
+ include_directories: rootdir,
+ dependencies: libwordcompletion_deps,
+ c_args: libwordcompletion_c_args,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+wordcompletion_plugin_in = configure_file(
+ input: 'wordcompletion.plugin.desktop.in.in',
+ output: 'wordcompletion.plugin.desktop.in',
+ configuration: plugin_in,
+ install: false,
+)
+
+custom_target(
+ 'wordcompletion.plugin',
+ input: wordcompletion_plugin_in,
+ output: 'wordcompletion.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+install_data(
+ 'org.gnome.gedit.plugins.wordcompletion.gschema.xml',
+ install_dir: join_paths(
+ glibdir,
+ 'schemas',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-wordcompletion.metainfo.xml',
+ input: 'gedit-wordcompletion.metainfo.xml.in',
+ output: 'gedit-wordcompletion.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/plugins/zeitgeist/meson.build b/plugins/zeitgeist/meson.build
new file mode 100644
index 0000000..2349843
--- /dev/null
+++ b/plugins/zeitgeist/meson.build
@@ -0,0 +1,48 @@
+libzeitgeist_sources = files(
+ 'gedit-zeitgeist-plugin.c',
+)
+
+libzeitgeist_deps = [
+ gedit_dep,
+ zeitgeist_dep,
+]
+
+libzeitgeist_c_args = [
+ '-DHAVE_CONFIG_H',
+]
+
+libzeitgeist_sha = shared_module(
+ 'zeitgeist',
+ sources: libzeitgeist_sources,
+ include_directories: rootdir,
+ dependencies: libzeitgeist_deps,
+ c_args: libzeitgeist_c_args,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+custom_target(
+ 'zeitgeist.plugin',
+ input: 'zeitgeist.plugin.desktop.in',
+ output: 'zeitgeist.plugin',
+ command: msgfmt_plugin_cmd,
+ install: true,
+ install_dir: join_paths(
+ pkglibdir,
+ 'plugins',
+ )
+)
+
+if install_metainfo
+ custom_target(
+ 'gedit-zeitgeist.metainfo.xml',
+ input: 'gedit-zeitgeist.metainfo.xml.in',
+ output: 'gedit-zeitgeist.metainfo.xml',
+ command: msgfmt_appstream_cmd,
+ install: true,
+ install_dir: appstreamdir,
+ )
+endif
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..0e5cd0b
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,7 @@
+i18n.gettext(
+ package_name,
+ preset: 'glib',
+ args: [
+ '--keyword=Description',
+ ]
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]