summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/7 gnome/gir
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/frameworks/7 gnome/gir')
-rwxr-xr-xtest cases/frameworks/7 gnome/gir/copy.py18
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/dep1.c56
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/dep1.h23
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c124
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h21
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build22
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c124
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h21
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build22
-rw-r--r--test cases/frameworks/7 gnome/gir/dep1/meson.build31
-rw-r--r--test cases/frameworks/7 gnome/gir/meson-sample.c121
-rw-r--r--test cases/frameworks/7 gnome/gir/meson-sample.h24
-rw-r--r--test cases/frameworks/7 gnome/gir/meson-sample2.c45
-rw-r--r--test cases/frameworks/7 gnome/gir/meson-sample2.h21
-rw-r--r--test cases/frameworks/7 gnome/gir/meson.build60
-rw-r--r--test cases/frameworks/7 gnome/gir/prog.c35
-rwxr-xr-xtest cases/frameworks/7 gnome/gir/prog.py11
17 files changed, 779 insertions, 0 deletions
diff --git a/test cases/frameworks/7 gnome/gir/copy.py b/test cases/frameworks/7 gnome/gir/copy.py
new file mode 100755
index 0000000..fa70145
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/copy.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0
+# Copyright © 2021 Intel Corproation
+
+import argparse
+import shutil
+
+def main() -> None:
+ parser = argparse.ArgumentParser()
+ parser.add_argument('src')
+ parser.add_argument('dest')
+ args = parser.parse_args()
+
+ shutil.copy(args.src, args.dest)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep1.c b/test cases/frameworks/7 gnome/gir/dep1/dep1.c
new file mode 100644
index 0000000..8d4ca4b
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/dep1.c
@@ -0,0 +1,56 @@
+#include "dep1.h"
+
+struct _MesonDep1
+{
+ GObject parent_instance;
+};
+
+G_DEFINE_TYPE (MesonDep1, meson_dep1, G_TYPE_OBJECT)
+
+/**
+ * meson_dep1_new:
+ *
+ * Allocates a new #MesonDep1.
+ *
+ * Returns: (transfer full): a #MesonDep1.
+ */
+MesonDep1 *
+meson_dep1_new (void)
+{
+ return g_object_new (MESON_TYPE_DEP1, NULL);
+}
+
+static void
+meson_dep1_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (meson_dep1_parent_class)->finalize (object);
+}
+
+static void
+meson_dep1_class_init (MesonDep1Class *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = meson_dep1_finalize;
+}
+
+static void
+meson_dep1_init (MesonDep1 *self)
+{
+}
+
+/**
+ * meson_dep1_just_return_it:
+ * @dep: a #MesonDep2.
+ *
+ * Returns the #MesonDep2 that is passed in
+ *
+ * Returns: (transfer none): a #MesonDep2
+ */
+MesonDep2*
+meson_dep1_just_return_it (MesonDep1 *self, MesonDep2 *dep)
+{
+ g_return_val_if_fail (MESON_IS_DEP1 (self), NULL);
+
+ return dep;
+}
diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep1.h b/test cases/frameworks/7 gnome/gir/dep1/dep1.h
new file mode 100644
index 0000000..92fc44c
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/dep1.h
@@ -0,0 +1,23 @@
+#ifndef MESON_DEP1_H
+#define MESON_DEP1_H
+
+#if !defined (MESON_TEST)
+#error "MESON_TEST not defined."
+#endif
+
+#include <glib-object.h>
+#include "dep2/dep2.h"
+
+G_BEGIN_DECLS
+
+#define MESON_TYPE_DEP1 (meson_dep1_get_type())
+
+G_DECLARE_FINAL_TYPE (MesonDep1, meson_dep1, MESON, DEP1, GObject)
+
+MesonDep1 *meson_dep1_new (void);
+MesonDep2 *meson_dep1_just_return_it (MesonDep1 *self,
+ MesonDep2 *dep);
+
+G_END_DECLS
+
+#endif /* MESON_DEP1_H */
diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c b/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c
new file mode 100644
index 0000000..754c6d7
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c
@@ -0,0 +1,124 @@
+#include "dep2.h"
+
+struct _MesonDep2
+{
+ GObject parent_instance;
+
+ gchar *msg;
+};
+
+G_DEFINE_TYPE (MesonDep2, meson_dep2, G_TYPE_OBJECT)
+
+enum {
+ PROP_0,
+ PROP_MSG,
+ LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+/**
+ * meson_dep2_new:
+ * @msg: The message to set.
+ *
+ * Allocates a new #MesonDep2.
+ *
+ * Returns: (transfer full): a #MesonDep2.
+ */
+MesonDep2 *
+meson_dep2_new (const gchar *msg)
+{
+ g_return_val_if_fail (msg != NULL, NULL);
+
+ return g_object_new (MESON_TYPE_DEP2,
+ "message", msg,
+ NULL);
+}
+
+static void
+meson_dep2_finalize (GObject *object)
+{
+ MesonDep2 *self = (MesonDep2 *)object;
+
+ g_clear_pointer (&self->msg, g_free);
+
+ G_OBJECT_CLASS (meson_dep2_parent_class)->finalize (object);
+}
+
+static void
+meson_dep2_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ MesonDep2 *self = MESON_DEP2 (object);
+
+ switch (prop_id)
+ {
+ case PROP_MSG:
+ g_value_set_string (value, self->msg);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+meson_dep2_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ MesonDep2 *self = MESON_DEP2 (object);
+
+ switch (prop_id)
+ {
+ case PROP_MSG:
+ self->msg = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+meson_dep2_class_init (MesonDep2Class *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = meson_dep2_finalize;
+ object_class->get_property = meson_dep2_get_property;
+ object_class->set_property = meson_dep2_set_property;
+
+ gParamSpecs [PROP_MSG] =
+ g_param_spec_string ("message",
+ "Message",
+ "The message to print.",
+ NULL,
+ (G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
+}
+
+static void
+meson_dep2_init (MesonDep2 *self)
+{
+}
+
+/**
+ * meson_dep2_return_message:
+ * @self: a #MesonDep2.
+ *
+ * Returns the message.
+ *
+ * Returns: (transfer none): a const gchar*
+ */
+const gchar*
+meson_dep2_return_message (MesonDep2 *self)
+{
+ g_return_val_if_fail (MESON_IS_DEP2 (self), NULL);
+
+ return (const gchar*) self->msg;
+}
diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h b/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h
new file mode 100644
index 0000000..0afea90
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h
@@ -0,0 +1,21 @@
+#ifndef MESON_DEP2_H
+#define MESON_DEP2_H
+
+#if !defined (MESON_TEST)
+#error "MESON_TEST not defined."
+#endif
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define MESON_TYPE_DEP2 (meson_dep2_get_type())
+
+G_DECLARE_FINAL_TYPE (MesonDep2, meson_dep2, MESON, DEP2, GObject)
+
+MesonDep2 *meson_dep2_new (const gchar *msg);
+const gchar *meson_dep2_return_message (MesonDep2 *self);
+
+G_END_DECLS
+
+#endif /* MESON_DEP2_H */
diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build b/test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build
new file mode 100644
index 0000000..4004f22
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build
@@ -0,0 +1,22 @@
+dep2sources = ['dep2.c', 'dep2.h']
+
+dep2lib = shared_library(
+ 'dep2lib',
+ sources : dep2sources,
+ dependencies : gobj,
+ install : true
+)
+
+dep2gir = gnome.generate_gir(
+ dep2lib,
+ sources : dep2sources,
+ nsversion : '1.0',
+ namespace : 'MesonDep2',
+ symbol_prefix : 'meson',
+ identifier_prefix : 'Meson',
+ includes : ['GObject-2.0'],
+ install : true
+)
+
+dep2_dep = declare_dependency(link_with : dep2lib,
+ sources : [dep2gir])
diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c b/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c
new file mode 100644
index 0000000..ee5c5e1
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c
@@ -0,0 +1,124 @@
+#include "dep3.h"
+
+struct _MesonDep3
+{
+ GObject parent_instance;
+
+ gchar *msg;
+};
+
+G_DEFINE_TYPE (MesonDep3, meson_dep3, G_TYPE_OBJECT)
+
+enum {
+ PROP_0,
+ PROP_MSG,
+ LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+/**
+ * meson_dep3_new:
+ * @msg: The message to set.
+ *
+ * Allocates a new #MesonDep3.
+ *
+ * Returns: (transfer full): a #MesonDep3.
+ */
+MesonDep3 *
+meson_dep3_new (const gchar *msg)
+{
+ g_return_val_if_fail (msg != NULL, NULL);
+
+ return g_object_new (MESON_TYPE_DEP3,
+ "message", msg,
+ NULL);
+}
+
+static void
+meson_dep3_finalize (GObject *object)
+{
+ MesonDep3 *self = (MesonDep3 *)object;
+
+ g_clear_pointer (&self->msg, g_free);
+
+ G_OBJECT_CLASS (meson_dep3_parent_class)->finalize (object);
+}
+
+static void
+meson_dep3_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ MesonDep3 *self = MESON_DEP3 (object);
+
+ switch (prop_id)
+ {
+ case PROP_MSG:
+ g_value_set_string (value, self->msg);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+meson_dep3_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ MesonDep3 *self = MESON_DEP3 (object);
+
+ switch (prop_id)
+ {
+ case PROP_MSG:
+ self->msg = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+meson_dep3_class_init (MesonDep3Class *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = meson_dep3_finalize;
+ object_class->get_property = meson_dep3_get_property;
+ object_class->set_property = meson_dep3_set_property;
+
+ gParamSpecs [PROP_MSG] =
+ g_param_spec_string ("message",
+ "Message",
+ "The message to print.",
+ NULL,
+ (G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
+}
+
+static void
+meson_dep3_init (MesonDep3 *self)
+{
+}
+
+/**
+ * meson_dep3_return_message:
+ * @self: a #MesonDep3.
+ *
+ * Returns the message.
+ *
+ * Returns: (transfer none): a const gchar*
+ */
+const gchar*
+meson_dep3_return_message (MesonDep3 *self)
+{
+ g_return_val_if_fail (MESON_IS_DEP3 (self), NULL);
+
+ return (const gchar*) self->msg;
+}
diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h b/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h
new file mode 100644
index 0000000..9883d76
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h
@@ -0,0 +1,21 @@
+#ifndef MESON_DEP3_H
+#define MESON_DEP3_H
+
+#if !defined (MESON_TEST)
+#error "MESON_TEST not defined."
+#endif
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define MESON_TYPE_DEP3 (meson_dep3_get_type())
+
+G_DECLARE_FINAL_TYPE (MesonDep3, meson_dep3, MESON, DEP3, GObject)
+
+MesonDep3 *meson_dep3_new (const gchar *msg);
+const gchar *meson_dep3_return_message (MesonDep3 *self);
+
+G_END_DECLS
+
+#endif /* MESON_DEP3_H */
diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build b/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build
new file mode 100644
index 0000000..1ef7765
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build
@@ -0,0 +1,22 @@
+dep3sources = ['dep3.c', 'dep3.h']
+
+dep3lib = shared_library(
+ 'dep3lib',
+ sources : dep3sources,
+ dependencies : gobj,
+ install : true
+)
+
+dep3gir = gnome.generate_gir(
+ dep3lib,
+ sources : dep3sources,
+ nsversion : '1.0',
+ namespace : 'MesonDep3',
+ symbol_prefix : 'meson',
+ identifier_prefix : 'Meson',
+ includes : ['GObject-2.0'],
+ install : true
+)
+
+dep3_dep = declare_dependency(link_with : dep3lib,
+ sources : [dep3gir])
diff --git a/test cases/frameworks/7 gnome/gir/dep1/meson.build b/test cases/frameworks/7 gnome/gir/dep1/meson.build
new file mode 100644
index 0000000..2f03ede
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/dep1/meson.build
@@ -0,0 +1,31 @@
+subdir('dep2')
+subdir('dep3')
+
+dep1sources = ['dep1.c', 'dep1.h']
+
+# Do not need to link to dep2lib because we don't use any symbols from it
+dep1lib = shared_library(
+ 'dep1lib',
+ sources : dep1sources,
+ dependencies : gobj,
+ install : true
+)
+
+# But the gir does need it because it we use the MesonDep2* structure defined
+# in the header
+dep1gir = gnome.generate_gir(
+ dep1lib,
+ sources : dep1sources,
+ nsversion : '1.0',
+ namespace : 'MesonDep1',
+ symbol_prefix : 'meson',
+ identifier_prefix : 'Meson',
+ header: 'dep1.h',
+ includes : ['GObject-2.0', 'MesonDep2-1.0', dep3gir[0]],
+ dependencies : [dep2_dep],
+ install : true
+)
+
+dep1_dep = declare_dependency(link_with : dep1lib,
+ dependencies : [dep2_dep, dep3_dep],
+ sources : [dep1gir])
diff --git a/test cases/frameworks/7 gnome/gir/meson-sample.c b/test cases/frameworks/7 gnome/gir/meson-sample.c
new file mode 100644
index 0000000..850b850
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/meson-sample.c
@@ -0,0 +1,121 @@
+#include "meson-sample.h"
+
+struct _MesonSample
+{
+ GObject parent_instance;
+
+ gchar *msg;
+};
+
+G_DEFINE_TYPE (MesonSample, meson_sample, G_TYPE_OBJECT)
+
+enum {
+ PROP_0,
+ PROP_MSG,
+ LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+/**
+ * meson_sample_new:
+ *
+ * Allocates a new #MesonSample.
+ *
+ * Returns: (transfer full): a #MesonSample.
+ */
+MesonSample *
+meson_sample_new (void)
+{
+ return g_object_new (MESON_TYPE_SAMPLE, NULL);
+}
+
+static void
+meson_sample_finalize (GObject *object)
+{
+ MesonSample *self = (MesonSample *)object;
+
+ g_clear_pointer (&self->msg, g_free);
+
+ G_OBJECT_CLASS (meson_sample_parent_class)->finalize (object);
+}
+
+static void
+meson_sample_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ MesonSample *self = MESON_SAMPLE (object);
+
+ switch (prop_id)
+ {
+ case PROP_MSG:
+ g_value_set_string (value, self->msg);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+meson_sample_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ MesonSample *self = MESON_SAMPLE (object);
+
+ switch (prop_id)
+ {
+ case PROP_MSG:
+ self->msg = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+meson_sample_class_init (MesonSampleClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = meson_sample_finalize;
+ object_class->get_property = meson_sample_get_property;
+ object_class->set_property = meson_sample_set_property;
+
+ gParamSpecs [PROP_MSG] =
+ g_param_spec_string ("message",
+ "Message",
+ "The message to print.",
+ NULL,
+ (G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
+}
+
+static void
+meson_sample_init (MesonSample *self)
+{
+}
+
+/**
+ * meson_sample_print_message:
+ * @self: a #MesonSample.
+ *
+ * Prints the message.
+ *
+ * Returns: Nothing.
+ */
+void
+meson_sample_print_message (MesonSample *self, MesonDep1 *dep1, MesonDep2 *dep2)
+{
+ MesonDep2 *samedep;
+ g_return_if_fail (MESON_IS_SAMPLE (self));
+
+ samedep = meson_dep1_just_return_it (dep1, dep2);
+ g_print ("Message: %s\n", meson_dep2_return_message (samedep));
+}
diff --git a/test cases/frameworks/7 gnome/gir/meson-sample.h b/test cases/frameworks/7 gnome/gir/meson-sample.h
new file mode 100644
index 0000000..04e79b8
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/meson-sample.h
@@ -0,0 +1,24 @@
+#ifndef MESON_SAMPLE_H
+#define MESON_SAMPLE_H
+
+#if !defined (MESON_TEST)
+#error "MESON_TEST not defined."
+#endif
+
+#include <glib-object.h>
+#include "dep1/dep1.h"
+
+G_BEGIN_DECLS
+
+#define MESON_TYPE_SAMPLE (meson_sample_get_type())
+
+G_DECLARE_FINAL_TYPE (MesonSample, meson_sample, MESON, SAMPLE, GObject)
+
+MesonSample *meson_sample_new (void);
+void meson_sample_print_message (MesonSample *self,
+ MesonDep1 *dep1,
+ MesonDep2 *dep2);
+
+G_END_DECLS
+
+#endif /* MESON_SAMPLE_H */
diff --git a/test cases/frameworks/7 gnome/gir/meson-sample2.c b/test cases/frameworks/7 gnome/gir/meson-sample2.c
new file mode 100644
index 0000000..f76bc16
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/meson-sample2.c
@@ -0,0 +1,45 @@
+#include "meson-sample2.h"
+
+struct _MesonSample2
+{
+ GObject parent_instance;
+};
+
+G_DEFINE_TYPE (MesonSample2, meson_sample2, G_TYPE_OBJECT)
+
+/**
+ * meson_sample2_new:
+ *
+ * Allocates a new #MesonSample2.
+ *
+ * Returns: (transfer full): a #MesonSample2.
+ */
+MesonSample2 *
+meson_sample2_new (void)
+{
+ return g_object_new (MESON_TYPE_SAMPLE2, NULL);
+}
+
+static void
+meson_sample2_class_init (MesonSample2Class *klass)
+{
+}
+
+static void
+meson_sample2_init (MesonSample2 *self)
+{
+}
+
+/**
+ * meson_sample2_print_message:
+ * @self: a #MesonSample2.
+ *
+ * Prints Hello.
+ *
+ * Returns: Nothing.
+ */
+void
+meson_sample2_print_message (MesonSample2 *self)
+{
+ g_print ("Message: Hello\n");
+}
diff --git a/test cases/frameworks/7 gnome/gir/meson-sample2.h b/test cases/frameworks/7 gnome/gir/meson-sample2.h
new file mode 100644
index 0000000..d39084e
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/meson-sample2.h
@@ -0,0 +1,21 @@
+#ifndef MESON_SAMPLE2_H
+#define MESON_SAMPLE2_H
+
+#if !defined (MESON_TEST)
+#error "MESON_TEST not defined."
+#endif
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define MESON_TYPE_SAMPLE2 (meson_sample2_get_type())
+
+G_DECLARE_FINAL_TYPE (MesonSample2, meson_sample2, MESON, SAMPLE2, GObject)
+
+MesonSample2 *meson_sample2_new (void);
+void meson_sample2_print_message (MesonSample2 *self);
+
+G_END_DECLS
+
+#endif /* MESON_SAMPLE2_H */
diff --git a/test cases/frameworks/7 gnome/gir/meson.build b/test cases/frameworks/7 gnome/gir/meson.build
new file mode 100644
index 0000000..fbff206
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/meson.build
@@ -0,0 +1,60 @@
+subdir('dep1')
+
+libsources = ['meson-sample.c', 'meson-sample.h']
+lib2sources = ['meson-sample2.c', 'meson-sample2.h']
+
+gen_source = custom_target(
+ 'meson_smaple3.h',
+ input : 'meson-sample.h',
+ output : 'meson-sample3.h',
+ command : [find_program('copy.py'), '@INPUT@', '@OUTPUT@'],
+ build_by_default : false, # this will force a race condition if one exists
+)
+
+girlib = shared_library(
+ 'gir_lib',
+ sources : libsources,
+ dependencies : [gobj, dep1_dep],
+ install : true
+)
+
+girlib2 = shared_library(
+ 'gir_lib2',
+ sources : lib2sources,
+ dependencies : [gobj],
+ install : true
+)
+
+girexe = executable(
+ 'girprog',
+ sources : 'prog.c',
+ dependencies : [glib, gobj, gir, dep1_dep],
+ link_with : girlib
+)
+
+fake_dep = dependency('no-way-this-exists', required: false)
+
+gnome.generate_gir(
+ girlib, girlib2,
+ sources : [libsources, lib2sources, gen_source],
+ nsversion : '1.0',
+ namespace : 'Meson',
+ symbol_prefix : 'meson',
+ identifier_prefix : 'Meson',
+ includes : ['GObject-2.0', 'MesonDep1-1.0'],
+ # dep1_dep pulls in dep2_dep for us
+ dependencies : [[fake_dep, dep1_dep]],
+ install : true,
+ build_by_default : true,
+)
+
+test('gobject introspection/c', girexe)
+gir_paths = ':'.join([girlib.outdir(), dep1lib.outdir(), dep2lib.outdir(), dep3lib.outdir()])
+envdata = environment()
+envdata.append('GI_TYPELIB_PATH', gir_paths, separator : ':')
+envdata.append('LD_LIBRARY_PATH', gir_paths)
+if ['windows', 'cygwin'].contains(host_machine.system())
+ envdata.append('PATH', gir_paths)
+endif
+test('gobject introspection/py', find_program('prog.py'),
+ env : envdata)
diff --git a/test cases/frameworks/7 gnome/gir/prog.c b/test cases/frameworks/7 gnome/gir/prog.c
new file mode 100644
index 0000000..001f6d0
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/prog.c
@@ -0,0 +1,35 @@
+#include <girepository.h>
+
+#include "meson-sample.h"
+
+gint
+main (gint argc,
+ gchar *argv[])
+{
+ GError * error = NULL;
+
+ GOptionContext * ctx = g_option_context_new (NULL);
+ g_option_context_add_group (ctx, g_irepository_get_option_group ());
+
+ if (!g_option_context_parse (ctx, &argc, &argv, &error)) {
+ g_print ("sample: %s\n", error->message);
+ g_option_context_free (ctx);
+ if (error) {
+ g_error_free (error);
+ }
+
+ return 1;
+ }
+
+ MesonSample * i = meson_sample_new ();
+ MesonDep1 * dep1 = meson_dep1_new ();
+ MesonDep2 * dep2 = meson_dep2_new ("Hello, meson/c!");
+ meson_sample_print_message (i, dep1, dep2);
+
+ g_object_unref (i);
+ g_object_unref (dep1);
+ g_object_unref (dep2);
+ g_option_context_free (ctx);
+
+ return 0;
+}
diff --git a/test cases/frameworks/7 gnome/gir/prog.py b/test cases/frameworks/7 gnome/gir/prog.py
new file mode 100755
index 0000000..aa1f9a7
--- /dev/null
+++ b/test cases/frameworks/7 gnome/gir/prog.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+from gi.repository import Meson, MesonDep1, MesonDep2
+
+if __name__ == "__main__":
+ s = Meson.Sample.new()
+ dep1 = MesonDep1.Dep1.new()
+ dep2 = MesonDep2.Dep2.new("Hello, meson/py!")
+ s.print_message(dep1, dep2)
+
+ s2 = Meson.Sample2.new()
+ s2.print_message()