diff options
Diffstat (limited to 'plugins/bootimg')
-rw-r--r-- | plugins/bootimg/Makefile.am | 16 | ||||
-rw-r--r-- | plugins/bootimg/core.c | 7 | ||||
-rw-r--r-- | plugins/bootimg/python/Makefile.am | 15 | ||||
-rw-r--r-- | plugins/bootimg/python/format.c | 7 |
4 files changed, 20 insertions, 25 deletions
diff --git a/plugins/bootimg/Makefile.am b/plugins/bootimg/Makefile.am index ada1e4e..623c555 100644 --- a/plugins/bootimg/Makefile.am +++ b/plugins/bootimg/Makefile.am @@ -35,15 +35,17 @@ PYTHON3_SUBDIRS = python endif -libbootimg_la_SOURCES = \ - core.h core.c \ - bootimg-def.h \ - format-int.h format-int.c \ +libbootimg_la_SOURCES = \ + core.h core.c \ + bootimg-def.h \ + format-int.h format-int.c \ format.h format.c -libbootimg_la_LIBADD = \ +libbootimg_la_LIBADD = \ $(PYTHON3_LIBADD) +libbootimg_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libbootimg_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -55,8 +57,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libbootimg_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/bootimg/core.c b/plugins/bootimg/core.c index 9c4bc45..25b21db 100644 --- a/plugins/bootimg/core.c +++ b/plugins/bootimg/core.c @@ -24,18 +24,17 @@ #include "core.h" -#include <config.h> #include <core/global.h> #include <plugins/self.h> #include "format.h" -#ifdef HAVE_PYTHON3_BINDINGS +#ifdef INCLUDE_PYTHON3_BINDINGS # include "python/module.h" #endif -#ifdef HAVE_PYTHON3_BINDINGS +#ifdef INCLUDE_PYTHON3_BINDINGS # define PG_REQ RL("PyChrysalide") #else # define PG_REQ NO_REQ @@ -65,7 +64,7 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin) { bool result; /* Bilan à retourner */ -#ifdef HAVE_PYTHON3_BINDINGS +#ifdef INCLUDE_PYTHON3_BINDINGS result = add_format_bootimg_module_to_python_module(); #else result = true; diff --git a/plugins/bootimg/python/Makefile.am b/plugins/bootimg/python/Makefile.am index 1f11581..d39a521 100644 --- a/plugins/bootimg/python/Makefile.am +++ b/plugins/bootimg/python/Makefile.am @@ -1,20 +1,15 @@ noinst_LTLIBRARIES = libbootimgpython.la -libbootimgpython_la_SOURCES = \ - format.h format.c \ - module.h module.c \ +libbootimgpython_la_SOURCES = \ + format.h format.c \ + module.h module.c \ translate.h translate.c -libbootimgpython_la_LDFLAGS = +libbootimgpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libbootimgpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/bootimg/python/format.c b/plugins/bootimg/python/format.c index d5e32d3..273daee 100644 --- a/plugins/bootimg/python/format.c +++ b/plugins/bootimg/python/format.c @@ -95,7 +95,7 @@ static PyObject *py_bootimg_format_new(PyTypeObject *type, PyObject *args, PyObj if (first_time) { - status = register_class_for_dynamic_pygobject(gtype, type, base); + status = register_class_for_dynamic_pygobject(gtype, type); if (!status) { @@ -395,7 +395,10 @@ bool register_python_bootimg_format(PyObject *module) dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_BOOTIMG_FORMAT, type, get_python_known_format_type())) + if (!ensure_python_known_format_is_registered()) + return false; + + if (!register_class_for_pygobject(dict, G_TYPE_BOOTIMG_FORMAT, type)) return false; return true; |