[gnome-builder/wip/gtk4-port] plugins/jhbuild: port jhbuild plugin to C
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/jhbuild: port jhbuild plugin to C
- Date: Tue, 24 May 2022 03:39:42 +0000 (UTC)
commit ea12c0572e22389d2b88d174b89b2f768660180a
Author: Christian Hergert <chergert redhat com>
Date: Mon May 23 20:39:36 2022 -0700
plugins/jhbuild: port jhbuild plugin to C
Straightforward port to C, to remove another PyGObject plugin from the
list of things to port.
src/plugins/jhbuild/gbp-jhbuild-runtime-provider.c | 196 +++++++++++++++++++
src/plugins/jhbuild/gbp-jhbuild-runtime-provider.h | 31 +++
src/plugins/jhbuild/gbp-jhbuild-runtime.c | 214 +++++++++++++++++++++
src/plugins/jhbuild/gbp-jhbuild-runtime.h | 31 +++
src/plugins/jhbuild/jhbuild-plugin.c | 37 ++++
src/plugins/jhbuild/jhbuild.gresource.xml | 6 +
src/plugins/jhbuild/jhbuild.plugin | 13 +-
src/plugins/jhbuild/jhbuild_plugin.py | 134 -------------
src/plugins/jhbuild/meson.build | 20 +-
9 files changed, 533 insertions(+), 149 deletions(-)
---
diff --git a/src/plugins/jhbuild/gbp-jhbuild-runtime-provider.c
b/src/plugins/jhbuild/gbp-jhbuild-runtime-provider.c
new file mode 100644
index 000000000..40e208110
--- /dev/null
+++ b/src/plugins/jhbuild/gbp-jhbuild-runtime-provider.c
@@ -0,0 +1,196 @@
+/* gbp-jhbuild-runtime-provider.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-jhbuild-runtime-provider"
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+
+#include <libide-foundry.h>
+#include <libide-threading.h>
+
+#include "gbp-jhbuild-runtime.h"
+#include "gbp-jhbuild-runtime-provider.h"
+
+struct _GbpJhbuildRuntimeProvider
+{
+ IdeObject parent_instance;
+ GbpJhbuildRuntime *runtime;
+};
+
+static char *
+get_jhbuild_path (void)
+{
+ g_autofree char *local_path = g_build_filename (g_get_home_dir (), ".local", "bin", "jhbuild", NULL);
+ const char *maybe_path[] = { local_path, "jhbuild" };
+
+ for (guint i = 0; i < G_N_ELEMENTS (maybe_path); i++)
+ {
+ g_autoptr(IdeSubprocessLauncher) launcher = NULL;
+ g_autoptr(IdeSubprocess) subprocess = NULL;
+ const char *path = maybe_path[i];
+
+ launcher = ide_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_SILENCE |
G_SUBPROCESS_FLAGS_STDERR_SILENCE);
+ ide_subprocess_launcher_set_run_on_host (launcher, TRUE);
+ ide_subprocess_launcher_set_clear_env (launcher, FALSE);
+ ide_subprocess_launcher_push_argv (launcher, "which");
+ ide_subprocess_launcher_push_argv (launcher, path);
+
+ if (!(subprocess = ide_subprocess_launcher_spawn (launcher, NULL, NULL)))
+ continue;
+
+ if (ide_subprocess_wait_check (subprocess, NULL, NULL))
+ return g_strdup (path);
+ }
+
+ return NULL;
+}
+
+static char *
+get_jhbuild_prefix (const char *jhbuild_bin)
+{
+ g_autoptr(IdeSubprocessLauncher) launcher = NULL;
+ g_autoptr(IdeSubprocess) subprocess = NULL;
+ g_autofree char *stdout_buf = NULL;
+
+ g_assert (jhbuild_bin != NULL);
+
+ launcher = ide_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE |
G_SUBPROCESS_FLAGS_STDERR_SILENCE);
+ ide_subprocess_launcher_push_args (launcher, IDE_STRV_INIT (jhbuild_bin, "run", "sh", "-c", "echo
$JHBUILD_PREFIX"));
+ ide_subprocess_launcher_set_run_on_host (launcher, TRUE);
+ ide_subprocess_launcher_set_clear_env (launcher, FALSE);
+
+ if (!(subprocess = ide_subprocess_launcher_spawn (launcher, NULL, NULL)))
+ return NULL;
+
+ if (!ide_subprocess_communicate_utf8 (subprocess, NULL, NULL, &stdout_buf, NULL, NULL))
+ return NULL;
+
+ if (stdout_buf != NULL)
+ g_strstrip (stdout_buf);
+
+ return g_steal_pointer (&stdout_buf);
+}
+
+static void
+gbp_jhbuild_runtime_provider_load (IdeRuntimeProvider *provider,
+ IdeRuntimeManager *manager)
+{
+ GbpJhbuildRuntimeProvider *self = (GbpJhbuildRuntimeProvider *)provider;
+ g_autofree char *jhbuild_bin = NULL;
+ g_autofree char *jhbuild_prefix = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (IDE_IS_MAIN_THREAD ());
+ g_assert (GBP_IS_JHBUILD_RUNTIME_PROVIDER (self));
+ g_assert (IDE_IS_RUNTIME_MANAGER (manager));
+
+ if (!(jhbuild_bin = get_jhbuild_path ()))
+ {
+ g_debug ("jhbuild not found within path, ignoring");
+ IDE_EXIT;
+ }
+
+ if (!(jhbuild_prefix = get_jhbuild_prefix (jhbuild_bin)))
+ {
+ g_debug ("jhbuild installation not complete, ignoring");
+ IDE_EXIT;
+ }
+
+ self->runtime = g_object_new (GBP_TYPE_JHBUILD_RUNTIME,
+ "parent", IDE_OBJECT (self),
+ "id", "jhbuild",
+ "category", _("Host System"),
+ "display-name", "JHBuild",
+ "executable-path", jhbuild_bin,
+ "install-prefix", jhbuild_prefix,
+ NULL);
+ ide_runtime_manager_add (manager, IDE_RUNTIME (self->runtime));
+
+ IDE_EXIT;
+}
+
+static void
+gbp_jhbuild_runtime_provider_unload (IdeRuntimeProvider *provider,
+ IdeRuntimeManager *manager)
+{
+ GbpJhbuildRuntimeProvider *self = (GbpJhbuildRuntimeProvider *)provider;
+
+ IDE_ENTRY;
+
+ g_assert (IDE_IS_MAIN_THREAD ());
+ g_assert (GBP_IS_JHBUILD_RUNTIME_PROVIDER (self));
+ g_assert (IDE_IS_RUNTIME_MANAGER (manager));
+
+ if (self->runtime != NULL)
+ {
+ ide_runtime_manager_remove (manager, IDE_RUNTIME (self->runtime));
+ ide_clear_and_destroy_object (&self->runtime);
+ }
+
+ IDE_EXIT;
+}
+
+static gboolean
+gbp_jhbuild_runtime_provider_provides (IdeRuntimeProvider *provider,
+ const char *runtime_id)
+{
+ g_assert (IDE_IS_MAIN_THREAD ());
+ g_assert (GBP_IS_JHBUILD_RUNTIME_PROVIDER (provider));
+ g_assert (runtime_id != NULL);
+
+ return ide_str_equal0 (runtime_id, "jhbuild") == 0;
+}
+
+static void
+runtime_provider_iface_init (IdeRuntimeProviderInterface *iface)
+{
+ iface->load = gbp_jhbuild_runtime_provider_load;
+ iface->unload = gbp_jhbuild_runtime_provider_unload;
+ iface->provides = gbp_jhbuild_runtime_provider_provides;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpJhbuildRuntimeProvider, gbp_jhbuild_runtime_provider, IDE_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_RUNTIME_PROVIDER,
runtime_provider_iface_init))
+
+static void
+gbp_jhbuild_runtime_provider_dispose (GObject *object)
+{
+ GbpJhbuildRuntimeProvider *self = (GbpJhbuildRuntimeProvider *)object;
+
+ ide_clear_and_destroy_object (&self->runtime);
+
+ G_OBJECT_CLASS (gbp_jhbuild_runtime_provider_parent_class)->dispose (object);
+}
+
+static void
+gbp_jhbuild_runtime_provider_class_init (GbpJhbuildRuntimeProviderClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->dispose = gbp_jhbuild_runtime_provider_dispose;
+}
+
+static void
+gbp_jhbuild_runtime_provider_init (GbpJhbuildRuntimeProvider *self)
+{
+}
diff --git a/src/plugins/jhbuild/gbp-jhbuild-runtime-provider.h
b/src/plugins/jhbuild/gbp-jhbuild-runtime-provider.h
new file mode 100644
index 000000000..1dc8226b0
--- /dev/null
+++ b/src/plugins/jhbuild/gbp-jhbuild-runtime-provider.h
@@ -0,0 +1,31 @@
+/* gbp-jhbuild-runtime-provider.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-core.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_JHBUILD_RUNTIME_PROVIDER (gbp_jhbuild_runtime_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpJhbuildRuntimeProvider, gbp_jhbuild_runtime_provider, GBP,
JHBUILD_RUNTIME_PROVIDER, IdeObject)
+
+G_END_DECLS
diff --git a/src/plugins/jhbuild/gbp-jhbuild-runtime.c b/src/plugins/jhbuild/gbp-jhbuild-runtime.c
new file mode 100644
index 000000000..a7fcd0dfa
--- /dev/null
+++ b/src/plugins/jhbuild/gbp-jhbuild-runtime.c
@@ -0,0 +1,214 @@
+/* gbp-jhbuild-runtime.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-jhbuild-runtime"
+
+#include "config.h"
+
+#include "gbp-jhbuild-runtime.h"
+
+struct _GbpJhbuildRuntime
+{
+ IdeRuntime runtime;
+ char *executable_path;
+ char *install_prefix;
+};
+
+enum {
+ PROP_0,
+ PROP_EXECUTABLE_PATH,
+ PROP_INSTALL_PREFIX,
+ N_PROPS
+};
+
+G_DEFINE_FINAL_TYPE (GbpJhbuildRuntime, gbp_jhbuild_runtime, IDE_TYPE_RUNTIME)
+
+static GParamSpec *properties [N_PROPS];
+
+static IdeSubprocessLauncher *
+gbp_jhbuild_runtime_create_launcher (IdeRuntime *runtime,
+ GError **error)
+{
+ GbpJhbuildRuntime *self = (GbpJhbuildRuntime *)runtime;
+ g_autoptr(IdeSubprocessLauncher) launcher = NULL;
+
+ g_assert (GBP_IS_JHBUILD_RUNTIME (self));
+
+ launcher = IDE_RUNTIME_CLASS (gbp_jhbuild_runtime_parent_class)->create_launcher (runtime, error);
+
+ if (launcher != NULL)
+ {
+ ide_subprocess_launcher_push_args (launcher, IDE_STRV_INIT (self->executable_path, "run"));
+ ide_subprocess_launcher_set_run_on_host (launcher, TRUE);
+ ide_subprocess_launcher_set_clear_env (launcher, FALSE);
+ }
+
+ return g_steal_pointer (&launcher);
+}
+
+static IdeRunner *
+gbp_jhbuild_runtime_create_runner (IdeRuntime *runtime,
+ IdeBuildTarget *build_target)
+{
+ GbpJhbuildRuntime *self = (GbpJhbuildRuntime *)runtime;
+ g_autoptr(IdeRunner) runner = NULL;
+
+ g_assert (GBP_IS_JHBUILD_RUNTIME (self));
+ g_assert (IDE_IS_BUILD_TARGET (build_target));
+
+ runner = IDE_RUNTIME_CLASS (gbp_jhbuild_runtime_parent_class)->create_runner (runtime, build_target);
+
+ if (runner != NULL)
+ ide_runner_set_run_on_host (runner, TRUE);
+
+ return g_steal_pointer (&runner);
+}
+
+static gboolean
+gbp_jhbuild_runtime_contains_program_in_path (IdeRuntime *runtime,
+ const char *program,
+ GCancellable *cancellable)
+{
+ GbpJhbuildRuntime *self = (GbpJhbuildRuntime *)runtime;
+ g_autoptr(IdeSubprocessLauncher) launcher = NULL;
+ g_autoptr(IdeSubprocess) subprocess = NULL;
+
+ g_assert (GBP_IS_JHBUILD_RUNTIME (self));
+ g_assert (program != NULL);
+ g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+ if (!(launcher = ide_runtime_create_launcher (runtime, NULL)))
+ return FALSE;
+
+ ide_subprocess_launcher_set_flags (launcher,
+ (G_SUBPROCESS_FLAGS_STDOUT_SILENCE |
+ G_SUBPROCESS_FLAGS_STDERR_SILENCE));
+ ide_subprocess_launcher_push_args (launcher, IDE_STRV_INIT ("which", program));
+
+ if (!(subprocess = ide_subprocess_launcher_spawn (launcher, cancellable, NULL)))
+ return FALSE;
+
+ return ide_subprocess_wait_check (subprocess, cancellable, NULL);
+}
+
+static void
+gbp_jhbuild_runtime_prepare_configuration (IdeRuntime *runtime,
+ IdeConfig *config)
+{
+ GbpJhbuildRuntime *self = (GbpJhbuildRuntime *)runtime;
+
+ g_assert (GBP_IS_JHBUILD_RUNTIME (self));
+ g_assert (IDE_IS_CONFIG (config));
+
+ g_object_set (config,
+ "prefix", self->install_prefix,
+ "prefix-set", FALSE,
+ NULL);
+}
+
+static void
+gbp_jhbuild_runtime_finalize (GObject *object)
+{
+ GbpJhbuildRuntime *self = (GbpJhbuildRuntime *)object;
+
+ g_clear_pointer (&self->executable_path, g_free);
+ g_clear_pointer (&self->install_prefix, g_free);
+
+ G_OBJECT_CLASS (gbp_jhbuild_runtime_parent_class)->finalize (object);
+}
+
+static void
+gbp_jhbuild_runtime_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GbpJhbuildRuntime *self = GBP_JHBUILD_RUNTIME (object);
+
+ switch (prop_id)
+ {
+ case PROP_EXECUTABLE_PATH:
+ g_value_set_string (value, self->executable_path);
+ break;
+
+ case PROP_INSTALL_PREFIX:
+ g_value_set_string (value, self->install_prefix);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+gbp_jhbuild_runtime_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GbpJhbuildRuntime *self = GBP_JHBUILD_RUNTIME (object);
+
+ switch (prop_id)
+ {
+ case PROP_EXECUTABLE_PATH:
+ self->executable_path = g_value_dup_string (value);
+ break;
+
+ case PROP_INSTALL_PREFIX:
+ self->install_prefix = g_value_dup_string (value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+gbp_jhbuild_runtime_class_init (GbpJhbuildRuntimeClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ IdeRuntimeClass *runtime_class = IDE_RUNTIME_CLASS (klass);
+
+ object_class->finalize = gbp_jhbuild_runtime_finalize;
+ object_class->get_property = gbp_jhbuild_runtime_get_property;
+ object_class->set_property = gbp_jhbuild_runtime_set_property;
+
+ runtime_class->contains_program_in_path = gbp_jhbuild_runtime_contains_program_in_path;
+ runtime_class->create_launcher = gbp_jhbuild_runtime_create_launcher;
+ runtime_class->create_runner = gbp_jhbuild_runtime_create_runner;
+ runtime_class->prepare_configuration = gbp_jhbuild_runtime_prepare_configuration;
+
+ properties [PROP_EXECUTABLE_PATH] =
+ g_param_spec_string ("executable-path", NULL, NULL,
+ NULL,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ properties [PROP_INSTALL_PREFIX] =
+ g_param_spec_string ("install-prefix", NULL, NULL,
+ NULL,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_properties (object_class, N_PROPS, properties);
+}
+
+static void
+gbp_jhbuild_runtime_init (GbpJhbuildRuntime *self)
+{
+}
diff --git a/src/plugins/jhbuild/gbp-jhbuild-runtime.h b/src/plugins/jhbuild/gbp-jhbuild-runtime.h
new file mode 100644
index 000000000..f9413e8d4
--- /dev/null
+++ b/src/plugins/jhbuild/gbp-jhbuild-runtime.h
@@ -0,0 +1,31 @@
+/* gbp-jhbuild-runtime.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-foundry.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_JHBUILD_RUNTIME (gbp_jhbuild_runtime_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpJhbuildRuntime, gbp_jhbuild_runtime, GBP, JHBUILD_RUNTIME, IdeRuntime)
+
+G_END_DECLS
diff --git a/src/plugins/jhbuild/jhbuild-plugin.c b/src/plugins/jhbuild/jhbuild-plugin.c
new file mode 100644
index 000000000..85152df2b
--- /dev/null
+++ b/src/plugins/jhbuild/jhbuild-plugin.c
@@ -0,0 +1,37 @@
+/* jhbuild-plugin.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "jhbuild-plugin"
+
+#include "config.h"
+
+#include <libpeas/peas.h>
+
+#include <libide-foundry.h>
+
+#include "gbp-jhbuild-runtime-provider.h"
+
+_IDE_EXTERN void
+_gbp_jhbuild_register_types (PeasObjectModule *module)
+{
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_RUNTIME_PROVIDER,
+ GBP_TYPE_JHBUILD_RUNTIME_PROVIDER);
+}
diff --git a/src/plugins/jhbuild/jhbuild.gresource.xml b/src/plugins/jhbuild/jhbuild.gresource.xml
new file mode 100644
index 000000000..b5bbba492
--- /dev/null
+++ b/src/plugins/jhbuild/jhbuild.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/plugins/jhbuild">
+ <file>jhbuild.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/jhbuild/jhbuild.plugin b/src/plugins/jhbuild/jhbuild.plugin
index 726164971..3e1a869e7 100644
--- a/src/plugins/jhbuild/jhbuild.plugin
+++ b/src/plugins/jhbuild/jhbuild.plugin
@@ -1,10 +1,9 @@
[Plugin]
-Authors=Patrick Griffis <tingping tingping se>
+Authors=Patrick Griffis <tingping tingping se>, Christian Hergert <chergert redhat com>
Builtin=true
-Copyright=Copyright © 2016 Patrick Griffis
-Description=Provides support for building with JHBuild
-Loader=python3
-Module=jhbuild_plugin
-Name=JHBuild
-X-Builder-ABI=@PACKAGE_ABI@
+Copyright=Copyright © 2016 Patrick Griffis, Copyright © 2022 Christian Hergert
+Description=Provides integration with JHBuild to build various GNOME projects
+Embedded=_gbp_jhbuild_register_types
+Module=jhbuild
+Name=JHBuild SDK Integration
X-Category=sdks
diff --git a/src/plugins/jhbuild/meson.build b/src/plugins/jhbuild/meson.build
index 35e3f9d8c..f75f812c4 100644
--- a/src/plugins/jhbuild/meson.build
+++ b/src/plugins/jhbuild/meson.build
@@ -1,13 +1,17 @@
if get_option('plugin_jhbuild')
-install_data('jhbuild_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'jhbuild.plugin',
- output: 'jhbuild.plugin',
- configuration: config_h,
- install: true,
- install_dir: plugindir,
+plugins_sources += files([
+ 'jhbuild-plugin.c',
+ 'gbp-jhbuild-runtime.c',
+ 'gbp-jhbuild-runtime-provider.c',
+])
+
+plugin_jhbuild_resources = gnome.compile_resources(
+ 'jhbuild-resources',
+ 'jhbuild.gresource.xml',
+ c_name: 'gbp_jhbuild',
)
+plugins_sources += plugin_jhbuild_resources
+
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]