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:
committed by
Clement Lefebvre
parent
39cadaa36e
commit
6e36dc4a5f
@@ -1,94 +0,0 @@
|
||||
# filebrowser
|
||||
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
xed-file-browser-enum-types.h \
|
||||
xed-file-browser-enum-types.c \
|
||||
xed-file-browser-marshal.h \
|
||||
xed-file-browser-marshal.c
|
||||
|
||||
plugin_LTLIBRARIES = libfilebrowser.la
|
||||
|
||||
NOINST_H_FILES = \
|
||||
xed-file-bookmarks-store.h \
|
||||
xed-file-browser-store.h \
|
||||
xed-file-browser-view.h \
|
||||
xed-file-browser-widget.h \
|
||||
xed-file-browser-error.h \
|
||||
xed-file-browser-utils.h \
|
||||
xed-file-browser-plugin.h \
|
||||
xed-file-browser-messages.h
|
||||
|
||||
libfilebrowser_la_SOURCES = \
|
||||
$(BUILT_SOURCES) \
|
||||
xed-file-bookmarks-store.c \
|
||||
xed-file-browser-store.c \
|
||||
xed-file-browser-view.c \
|
||||
xed-file-browser-widget.c \
|
||||
xed-file-browser-utils.c \
|
||||
xed-file-browser-plugin.c \
|
||||
xed-file-browser-messages.c \
|
||||
$(NOINST_H_FILES)
|
||||
|
||||
libfilebrowser_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libfilebrowser_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
# UI files (if you use ui for your plugin, list those files here)
|
||||
uidir = $(XED_PLUGINS_DATA_DIR)/filebrowser
|
||||
ui_DATA = xed-file-browser-widget-ui.xml
|
||||
|
||||
plugin_in_files = filebrowser.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
|
||||
|
||||
xed-file-browser-enum-types.h: xed-file-browser-enum-types.h.template $(NOINST_H_FILES) $(GLIB_MKENUMS)
|
||||
(cd $(srcdir) && $(GLIB_MKENUMS) --template xed-file-browser-enum-types.h.template $(NOINST_H_FILES)) > $@
|
||||
|
||||
xed-file-browser-enum-types.c: xed-file-browser-enum-types.c.template xed-file-browser-enum-register.c.template $(NOINST_H_FILES) $(GLIB_MKENUMS)
|
||||
$(AM_V_GEN) (cd $(srcdir) && \
|
||||
$(GLIB_MKENUMS) --template xed-file-browser-enum-types.c.template $(NOINST_H_FILES) && \
|
||||
$(GLIB_MKENUMS) --template xed-file-browser-enum-register.c.template $(NOINST_H_FILES)) > $@
|
||||
|
||||
xed-file-browser-marshal.h: xed-file-browser-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=xed_file_browser_marshal > $@
|
||||
|
||||
xed-file-browser-marshal.c: xed-file-browser-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) echo "#include \"xed-file-browser-marshal.h\"" > $@ && \
|
||||
$(GLIB_GENMARSHAL) $< --body --prefix=xed_file_browser_marshal >> $@
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
filebrowser_gschema_in = org.x.editor.plugins.filebrowser.gschema.xml.in
|
||||
gsettings_SCHEMAS = $(filebrowser_gschema_in:.xml.in=.xml)
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(ui_DATA) \
|
||||
$(plugin_in_files) \
|
||||
$(filebrowser_gschema_in) \
|
||||
xed-file-browser-enum-types.h.template \
|
||||
xed-file-browser-enum-types.c.template \
|
||||
xed-file-browser-enum-register.c.template \
|
||||
xed-file-browser-marshal.list
|
||||
|
||||
CLEANFILES = \
|
||||
$(plugin_DATA) \
|
||||
$(gsettings_SCHEMAS_in) \
|
||||
$(gsettings_SCHEMAS) \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
DISTCLEANFILES = \
|
||||
$(plugin_DATA) \
|
||||
$(gsettings_SCHEMAS_in) \
|
||||
$(gsettings_SCHEMAS) \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
73
plugins/filebrowser/meson.build
Normal file
73
plugins/filebrowser/meson.build
Normal file
@@ -0,0 +1,73 @@
|
||||
filebrowser_headers = [
|
||||
'xed-file-bookmarks-store.h',
|
||||
'xed-file-browser-store.h',
|
||||
'xed-file-browser-view.h',
|
||||
'xed-file-browser-widget.h',
|
||||
'xed-file-browser-error.h',
|
||||
'xed-file-browser-utils.h',
|
||||
'xed-file-browser-plugin.h',
|
||||
'xed-file-browser-messages.h'
|
||||
]
|
||||
|
||||
filebrowser_lib_sources = [
|
||||
'xed-file-bookmarks-store.c',
|
||||
'xed-file-browser-store.c',
|
||||
'xed-file-browser-view.c',
|
||||
'xed-file-browser-widget.c',
|
||||
'xed-file-browser-utils.c',
|
||||
'xed-file-browser-plugin.c',
|
||||
'xed-file-browser-messages.c'
|
||||
]
|
||||
|
||||
filebrowser_enums = gnome.mkenums_simple(
|
||||
'xed-file-browser-enum-types',
|
||||
sources : filebrowser_headers,
|
||||
identifier_prefix : 'XedFileBrowser',
|
||||
symbol_prefix : 'xed_file_browser'
|
||||
)
|
||||
|
||||
filebrowser_marshal = gnome.genmarshal(
|
||||
'xed-file-browser-marshal',
|
||||
sources: 'xed-file-browser-marshal.list',
|
||||
prefix: 'xed_file_browser_marshal'
|
||||
)
|
||||
|
||||
filebrowser_deps = [
|
||||
config_h,
|
||||
gio,
|
||||
glib,
|
||||
gmodule,
|
||||
gtk,
|
||||
gtksourceview,
|
||||
libpeas
|
||||
]
|
||||
|
||||
library(
|
||||
'filebrowser',
|
||||
filebrowser_headers + filebrowser_lib_sources + filebrowser_enums + filebrowser_marshal,
|
||||
link_with: libxed,
|
||||
dependencies: filebrowser_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
install_data(
|
||||
'xed-file-browser-widget-ui.xml',
|
||||
install_dir: join_paths(pluginsdatadir, 'filebrowser')
|
||||
)
|
||||
|
||||
filebrowser_desktop = custom_target(
|
||||
'filebrowser_desktop',
|
||||
input: 'filebrowser.plugin.desktop.in',
|
||||
output: 'filebrowser.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
||||
|
||||
install_data(
|
||||
'org.x.editor.plugins.filebrowser.gschema.xml',
|
||||
install_dir: schema_dir
|
||||
)
|
@@ -911,7 +911,7 @@ xed_file_bookmarks_store_get_location (XedFileBookmarksStore *model,
|
||||
}
|
||||
else if (!isfs)
|
||||
{
|
||||
file = g_object_ref (obj);
|
||||
file = G_FILE (g_object_ref (obj));
|
||||
}
|
||||
|
||||
g_object_unref (obj);
|
||||
|
@@ -1,20 +0,0 @@
|
||||
/*** BEGIN file-header ***/
|
||||
void
|
||||
xed_file_browser_enum_and_flag_register_type (GTypeModule * module)
|
||||
{
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* Enumerations from "@filename@" */
|
||||
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN enumeration-production ***/
|
||||
register_@enum_name@ (module);
|
||||
|
||||
/*** END enumeration-production ***/
|
||||
|
||||
/*** BEGIN file-tail ***/
|
||||
}
|
||||
|
||||
/*** END file-tail ***/
|
@@ -1,45 +0,0 @@
|
||||
/*** BEGIN file-header ***/
|
||||
#include "xed-file-browser-enum-types.h"
|
||||
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* enumerations from "@filename@" */
|
||||
#include "@filename@"
|
||||
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
static GType @enum_name@_type = 0;
|
||||
|
||||
static GType
|
||||
register_@enum_name@ (GTypeModule *module)
|
||||
{
|
||||
static const G@Type@Value values[] = {
|
||||
/*** END value-header ***/
|
||||
|
||||
/*** BEGIN value-production ***/
|
||||
{ @VALUENAME@,
|
||||
"@VALUENAME@",
|
||||
"@valuenick@" },
|
||||
/*** END value-production ***/
|
||||
|
||||
/*** BEGIN value-tail ***/
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
@enum_name@_type =
|
||||
g_type_module_register_@type@ (module,
|
||||
"@EnumName@",
|
||||
values);
|
||||
|
||||
return @enum_name@_type;
|
||||
}
|
||||
|
||||
GType
|
||||
@enum_name@_get_type (void)
|
||||
{
|
||||
return @enum_name@_type;
|
||||
}
|
||||
|
||||
/*** END value-tail ***/
|
@@ -1,29 +0,0 @@
|
||||
/*** BEGIN file-header ***/
|
||||
#ifndef __XED_FILE_BROWSER_ENUM_TYPES_H__
|
||||
#define __XED_FILE_BROWSER_ENUM_TYPES_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* Enumerations from "@filename@" */
|
||||
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN enumeration-production ***/
|
||||
#define XED_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
|
||||
GType @enum_name@_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/*** END enumeration-production ***/
|
||||
|
||||
/*** BEGIN file-tail ***/
|
||||
void xed_file_browser_enum_and_flag_register_type (GTypeModule * module);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __XED_FILE_BROWSER_ENUM_TYPES_H__ */
|
||||
/*** END file-tail ***/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
VOID:UINT,STRING
|
||||
VOID:OBJECT,OBJECT
|
||||
BOOL:OBJECT,POINTER
|
||||
BOOL:POINTER
|
||||
BOOL:VOID
|
||||
BOOLEAN:OBJECT,POINTER
|
||||
BOOLEAN:POINTER
|
||||
BOOLEAN:VOID
|
||||
|
@@ -20,10 +20,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gmodule.h>
|
||||
@@ -111,7 +108,6 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBrowserPlugin,
|
||||
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
|
||||
xed_window_activatable_iface_init) \
|
||||
\
|
||||
xed_file_browser_enum_and_flag_register_type (type_module); \
|
||||
_xed_file_browser_store_register_type (type_module); \
|
||||
_xed_file_bookmarks_store_register_type (type_module); \
|
||||
_xed_file_browser_view_register_type (type_module); \
|
||||
|
@@ -19,10 +19,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gio/gio.h>
|
||||
@@ -350,7 +347,7 @@ xed_file_browser_store_class_init (XedFileBrowserStoreClass * klass)
|
||||
g_param_spec_flags ("filter-mode",
|
||||
"Filter Mode",
|
||||
"The filter mode",
|
||||
XED_TYPE_FILE_BROWSER_STORE_FILTER_MODE,
|
||||
XED_FILE_BROWSER_TYPE_STORE_FILTER_MODE,
|
||||
xed_file_browser_store_filter_mode_get_default (),
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
@@ -384,7 +381,7 @@ xed_file_browser_store_class_init (XedFileBrowserStoreClass * klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (XedFileBrowserStoreClass,
|
||||
no_trash), g_signal_accumulator_true_handled, NULL,
|
||||
xed_file_browser_marshal_BOOL__POINTER,
|
||||
xed_file_browser_marshal_BOOLEAN__POINTER,
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
model_signals[RENAME] =
|
||||
g_signal_new ("rename",
|
||||
|
@@ -19,10 +19,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <xed/xed-utils.h>
|
||||
|
||||
|
@@ -947,7 +947,7 @@ xed_file_browser_view_class_init (XedFileBrowserViewClass *klass)
|
||||
g_param_spec_enum ("click-policy",
|
||||
"Click Policy",
|
||||
"The click policy",
|
||||
XED_TYPE_FILE_BROWSER_VIEW_CLICK_POLICY,
|
||||
XED_FILE_BROWSER_TYPE_VIEW_CLICK_POLICY,
|
||||
XED_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
|
||||
|
@@ -19,10 +19,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
@@ -30,7 +27,6 @@
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include <xed/xed-utils.h>
|
||||
|
||||
#include "xed-file-browser-utils.h"
|
||||
@@ -470,7 +466,7 @@ xed_file_browser_widget_class_init (XedFileBrowserWidgetClass *klass)
|
||||
confirm_delete),
|
||||
g_signal_accumulator_true_handled,
|
||||
NULL,
|
||||
xed_file_browser_marshal_BOOL__OBJECT_POINTER,
|
||||
xed_file_browser_marshal_BOOLEAN__OBJECT_POINTER,
|
||||
G_TYPE_BOOLEAN,
|
||||
2,
|
||||
G_TYPE_OBJECT,
|
||||
@@ -483,7 +479,7 @@ xed_file_browser_widget_class_init (XedFileBrowserWidgetClass *klass)
|
||||
confirm_no_trash),
|
||||
g_signal_accumulator_true_handled,
|
||||
NULL,
|
||||
xed_file_browser_marshal_BOOL__POINTER,
|
||||
xed_file_browser_marshal_BOOLEAN__POINTER,
|
||||
G_TYPE_BOOLEAN,
|
||||
1,
|
||||
G_TYPE_POINTER);
|
||||
|
Reference in New Issue
Block a user