Port to meson (#258)

* Port to meson

* plugin generation script: swtich to meson, update to python3, switch to libpeas, add some extra options, and cleanup

* clean up some build warnings

* kill xed-bugreport.sh with fire: it isn't used anymore, and probably doesn't even work

* update gzip command to avoid warnings on some systems and move appdata.xml to /usr/share/metainfo/ as that's where it's supposed to go now

* POTFILES.in: fix path that changed in the meson port, which was causing makepot to fail
This commit is contained in:
Stephen Collins
2018-11-19 04:09:52 -07:00
committed by Clement Lefebvre
parent 39cadaa36e
commit 6e36dc4a5f
117 changed files with 1284 additions and 1910 deletions

View File

@@ -1,49 +0,0 @@
# Word completion plugin
plugindir = $(XED_PLUGINS_LIBS_DIR)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(XED_CFLAGS) \
$(ENCHANT_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS)
plugin_LTLIBRARIES = libwordcompletion.la
libwordcompletion_la_SOURCES = \
xed-wordcompletion-plugin.h \
xed-wordcompletion-plugin.c
libwordcompletion_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
libwordcompletion_la_LIBADD = $(XED_LIBS) $(ENCHANT_LIBS)
plugin_in_files = wordcompletion.plugin.desktop.in
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
uidir = $(XED_PLUGINS_DATA_DIR)/wordcompletion
ui_DATA = xed-wordcompletion-configure.ui
@INTLTOOL_XML_NOMERGE_RULE@
wordcompletion_gschema_in = org.x.editor.plugins.wordcompletion.gschema.xml.in
gsettings_SCHEMAS = $(wordcompletion_gschema_in:.xml.in=.xml)
@GSETTINGS_RULES@
EXTRA_DIST = \
$(plugin_in_files) \
$(wordcompletion_gschema_in)
CLEANFILES = \
$(plugin_DATA) \
$(gsettings_SCHEMAS)
DISTCLEANFILES = \
$(plugin_DATA)
dist-hook:
cd $(distdir); rm -f $(BUILT_SOURCES)
-include $(top_srcdir)/git.mk

View File

@@ -0,0 +1,43 @@
wordcompletion_sources = [
'xed-wordcompletion-plugin.h',
'xed-wordcompletion-plugin.c'
]
wordcompletion_deps = [
config_h,
gio,
glib,
gtksourceview,
libpeas,
libpeas_gtk
]
library(
'wordcompletion',
wordcompletion_sources,
link_with: libxed,
dependencies: wordcompletion_deps,
include_directories: include_dirs,
install_rpath: join_paths(prefix, libdir, 'xed'),
install: true,
install_dir: join_paths(libdir, 'xed', 'plugins')
)
wordcompletion_desktop = custom_target(
'wordcompletion_desktop',
input: 'wordcompletion.plugin.desktop.in',
output: 'wordcompletion.plugin',
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: pluginslibdir,
)
install_data(
'xed-wordcompletion-configure.ui',
install_dir: join_paths(pluginsdatadir, 'wordcompletion')
)
install_data(
'org.x.editor.plugins.wordcompletion.gschema.xml',
install_dir: schema_dir
)

View File

@@ -19,16 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "xed-wordcompletion-plugin.h"
#include <glib/gi18n-lib.h>
#include <glib.h>
#include <gio/gio.h>
#include <xed/xed-debug.h>
#include <xed/xed-window.h>
#include <xed/xed-window-activatable.h>
@@ -39,6 +33,8 @@
#include <gtksourceview/gtksource.h>
#include <gtksourceview/completion-providers/words/gtksourcecompletionwords.h>
#include "xed-wordcompletion-plugin.h"
#define WINDOW_PROVIDER "XedWordCompletionPluginProvider"
#define WORDCOMPLETION_SETTINGS_BASE "org.x.editor.plugins.wordcompletion"