aboutsummaryrefslogtreecommitdiffstats
path: root/main/gobject-introspection
diff options
context:
space:
mode:
Diffstat (limited to 'main/gobject-introspection')
-rw-r--r--main/gobject-introspection/0001-repository-Fix-g_irepository_get_c_prefix.patch52
-rw-r--r--main/gobject-introspection/0002-Skip-analysis-of-params-that-have-been-skip-d.patch29
-rw-r--r--main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch39
-rw-r--r--main/gobject-introspection/0007-giconstantinfo-Add-API-to-fix-memory-leak.patch75
-rw-r--r--main/gobject-introspection/0008-scanner-split-CC-environment-variable.patch31
-rw-r--r--main/gobject-introspection/APKBUILD16
6 files changed, 239 insertions, 3 deletions
diff --git a/main/gobject-introspection/0001-repository-Fix-g_irepository_get_c_prefix.patch b/main/gobject-introspection/0001-repository-Fix-g_irepository_get_c_prefix.patch
new file mode 100644
index 0000000000..e556ecfec5
--- /dev/null
+++ b/main/gobject-introspection/0001-repository-Fix-g_irepository_get_c_prefix.patch
@@ -0,0 +1,52 @@
+From e8b336cc0747b528263ec809d142f4803dcbdf35 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters@verbum.org>
+Date: Wed, 21 Sep 2011 13:13:45 -0400
+Subject: [PATCH 1/8] repository: Fix g_irepository_get_c_prefix()
+
+It was returning the wrong data.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=659749
+---
+ girepository/girepository.c | 2 +-
+ tests/repository/gitestrepo.c | 5 +++++
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/girepository/girepository.c b/girepository/girepository.c
+index cc81107..b5cd4c7 100644
+--- a/girepository/girepository.c
++++ b/girepository/girepository.c
+@@ -929,7 +929,7 @@ g_irepository_get_c_prefix (GIRepository *repository,
+ g_return_val_if_fail (typelib != NULL, NULL);
+
+ header = (Header *) typelib->data;
+- if (header->shared_library)
++ if (header->c_prefix)
+ return g_typelib_get_string (typelib, header->c_prefix);
+ else
+ return NULL;
+diff --git a/tests/repository/gitestrepo.c b/tests/repository/gitestrepo.c
+index cdaeb4c..05ea5d9 100644
+--- a/tests/repository/gitestrepo.c
++++ b/tests/repository/gitestrepo.c
+@@ -46,6 +46,7 @@ main(int argc, char **argv)
+ GIBaseInfo *siginfo;
+ GIEnumInfo *errorinfo;
+ GType gtype;
++ const char *prefix;
+
+ g_type_init ();
+
+@@ -55,6 +56,10 @@ main(int argc, char **argv)
+ if (!ret)
+ g_error ("%s", error->message);
+
++ prefix = g_irepository_get_c_prefix (repo, "Gio");
++ g_assert (prefix != NULL);
++ g_assert_cmpstr (prefix, ==, "G");
++
+ info = g_irepository_find_by_name (repo, "Gio", "Cancellable");
+ g_assert (info != NULL);
+ g_assert (g_base_info_get_type (info) == GI_INFO_TYPE_OBJECT);
+--
+1.7.7
+
diff --git a/main/gobject-introspection/0002-Skip-analysis-of-params-that-have-been-skip-d.patch b/main/gobject-introspection/0002-Skip-analysis-of-params-that-have-been-skip-d.patch
new file mode 100644
index 0000000000..a043b17d99
--- /dev/null
+++ b/main/gobject-introspection/0002-Skip-analysis-of-params-that-have-been-skip-d.patch
@@ -0,0 +1,29 @@
+From 9234ff4eac87a5b635a6f19fa12e081d628dcf61 Mon Sep 17 00:00:00 2001
+From: Stef Walter <stefw@collabora.co.uk>
+Date: Wed, 28 Sep 2011 14:01:26 +0200
+Subject: [PATCH 2/8] Skip analysis of params that have been (skip)'d
+
+Otherwise we get warnings for params that have been skipped
+
+https://bugzilla.gnome.org/show_bug.cgi?id=660352
+---
+ giscanner/introspectablepass.py | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
+index 95d54b0..77a0e4f 100644
+--- a/giscanner/introspectablepass.py
++++ b/giscanner/introspectablepass.py
+@@ -74,6 +74,9 @@ class IntrospectablePass(object):
+ else:
+ target = None
+
++ if node.skip:
++ return
++
+ if not node.type.resolved:
+ self._parameter_warning(parent, node,
+ "Unresolved type: %r" % (node.type.unresolved_string, ))
+--
+1.7.7
+
diff --git a/main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch b/main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch
new file mode 100644
index 0000000000..368920103a
--- /dev/null
+++ b/main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch
@@ -0,0 +1,39 @@
+From e9a83d543e13b422762ed1dd06e6e0d37568f776 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed, 28 Sep 2011 08:25:26 +0000
+Subject: [PATCH 3/8] Bug 660338: Account for padding in struct size check
+
+On some platform like armel or powerpc the compiler adds extra padding to
+structs. Make the test_size_of_struct_with_array_of_anon_unions() check more
+liberal by only requiring that the size of the struct is at least as big as
+expected. Also use g_assert_cmpuint() to make it easier to see the actual diff.
+---
+ tests/repository/gitypelibtest.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/tests/repository/gitypelibtest.c b/tests/repository/gitypelibtest.c
+index de821e0..8356d93 100644
+--- a/tests/repository/gitypelibtest.c
++++ b/tests/repository/gitypelibtest.c
+@@ -120,14 +120,15 @@ test_size_of_struct_with_array_of_anon_unions(GIRepository *repo)
+ struct_info = g_irepository_find_by_name (repo, "Regress", "TestStructE");
+ if (!struct_info)
+ g_error ("Could not find Regress.TestStructE");
+- g_assert (g_struct_info_get_size (struct_info)
+- == sizeof (GType) + 2*sizeof (gint64));
++ /* need to use >=, there might be padding */
++ g_assert_cmpuint (g_struct_info_get_size (struct_info),
++ >=, sizeof (GType) + 2*sizeof (gint64));
+ g_base_info_unref (struct_info);
+
+ struct_info = g_irepository_find_by_name (repo, "GObject", "Value");
+ if (!struct_info)
+ g_error ("Could not find GObject.Value");
+- g_assert (g_struct_info_get_size (struct_info) == sizeof (GValue));
++ g_assert_cmpuint (g_struct_info_get_size (struct_info), ==, sizeof (GValue));
+ g_base_info_unref (struct_info);
+ }
+
+--
+1.7.7
+
diff --git a/main/gobject-introspection/0007-giconstantinfo-Add-API-to-fix-memory-leak.patch b/main/gobject-introspection/0007-giconstantinfo-Add-API-to-fix-memory-leak.patch
new file mode 100644
index 0000000000..09f0398a9f
--- /dev/null
+++ b/main/gobject-introspection/0007-giconstantinfo-Add-API-to-fix-memory-leak.patch
@@ -0,0 +1,75 @@
+From 8e970f46b8525396009d4d833a1f1cdacd3df6a1 Mon Sep 17 00:00:00 2001
+From: "Jasper St. Pierre" <jstpierre@mecheye.net>
+Date: Wed, 5 Oct 2011 16:31:43 -0400
+Subject: [PATCH 7/8] giconstantinfo: Add API to fix memory leak
+
+https://bugzilla.gnome.org/show_bug.cgi?id=654069
+---
+ girepository/giconstantinfo.c | 30 ++++++++++++++++++++++++++++++
+ girepository/giconstantinfo.h | 2 ++
+ 2 files changed, 32 insertions(+), 0 deletions(-)
+
+diff --git a/girepository/giconstantinfo.c b/girepository/giconstantinfo.c
+index c082303..2c3cc29 100644
+--- a/girepository/giconstantinfo.c
++++ b/girepository/giconstantinfo.c
+@@ -69,6 +69,35 @@ g_constant_info_get_type (GIConstantInfo *info)
+ memcpy((dest_addr), (src_addr), sizeof(type))
+
+ /**
++ * g_constant_info_free_value: (skip)
++ * @info: a #GIConstantInfo
++ * @value: the argument
++ *
++ * Free the value returned from g_constant_info_get_value().
++ *
++ * Since: 1.30.1
++ */
++void
++g_constant_info_free_value (GIConstantInfo *info,
++ GIArgument *value)
++{
++ GIRealInfo *rinfo = (GIRealInfo *)info;
++ ConstantBlob *blob;
++
++ g_return_if_fail (info != NULL);
++ g_return_if_fail (GI_IS_CONSTANT_INFO (info));
++
++ blob = (ConstantBlob *)&rinfo->typelib->data[rinfo->offset];
++
++ /* FIXME non-basic types ? */
++ if (blob->type.flags.reserved == 0 && blob->type.flags.reserved2 == 0)
++ {
++ if (blob->type.flags.pointer)
++ g_free (value->v_pointer);
++ }
++}
++
++/**
+ * g_constant_info_get_value: (skip)
+ * @info: a #GIConstantInfo
+ * @value: (out): an argument
+@@ -76,6 +105,7 @@ g_constant_info_get_type (GIConstantInfo *info)
+ * Obtain the value associated with the #GIConstantInfo and store it in the
+ * @value parameter. @argument needs to be allocated before passing it in.
+ * The size of the constant value stored in @argument will be returned.
++ * Free the value with g_constant_info_free_value().
+ *
+ * Returns: size of the constant
+ */
+diff --git a/girepository/giconstantinfo.h b/girepository/giconstantinfo.h
+index a2679bd..2e7d697 100644
+--- a/girepository/giconstantinfo.h
++++ b/girepository/giconstantinfo.h
+@@ -34,6 +34,8 @@ G_BEGIN_DECLS
+ (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_CONSTANT)
+
+ GITypeInfo * g_constant_info_get_type (GIConstantInfo *info);
++void g_constant_info_free_value(GIConstantInfo *info,
++ GIArgument *value);
+ gint g_constant_info_get_value(GIConstantInfo *info,
+ GIArgument *value);
+ G_END_DECLS
+--
+1.7.7
+
diff --git a/main/gobject-introspection/0008-scanner-split-CC-environment-variable.patch b/main/gobject-introspection/0008-scanner-split-CC-environment-variable.patch
new file mode 100644
index 0000000000..24a12df912
--- /dev/null
+++ b/main/gobject-introspection/0008-scanner-split-CC-environment-variable.patch
@@ -0,0 +1,31 @@
+From 99abcd268792ef3531346a7f885cc55d2ab0f8f4 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 10 Oct 2011 13:37:55 +0000
+Subject: [PATCH 8/8] scanner: split CC environment variable
+
+This fixes compilation where CC="ccache gcc" and similar.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=660160
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ giscanner/sourcescanner.py | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
+index 5f0ec2d..1e61ecf 100644
+--- a/giscanner/sourcescanner.py
++++ b/giscanner/sourcescanner.py
+@@ -274,7 +274,8 @@ class SourceScanner(object):
+
+ defines = ['__GI_SCANNER__']
+ undefs = []
+- cpp_args = [os.environ.get('CC', 'cc'), '-E', '-C', '-I.', '-']
++ cpp_args = os.environ.get('CC', 'cc').split()
++ cpp_args += ['-E', '-C', '-I.', '-']
+
+ cpp_args += self._cpp_options
+ proc = subprocess.Popen(cpp_args,
+--
+1.7.7
+
diff --git a/main/gobject-introspection/APKBUILD b/main/gobject-introspection/APKBUILD
index aaac610762..6b2635b74c 100644
--- a/main/gobject-introspection/APKBUILD
+++ b/main/gobject-introspection/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gobject-introspection
-pkgver=1.32.1
+pkgver=1.30.0
pkgrel=0
pkgdesc="Introspection system for GObject-based libraries"
url="http://live.gnome.org/GObjectInstrospection"
@@ -10,7 +10,12 @@ depends_dev="python glib-dev libffi-dev cairo-dev"
makedepends="$depends_dev flex bison python-dev libtool"
depends=
replaces="libgirepository"
-source="http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
+source="http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
+ 0001-repository-Fix-g_irepository_get_c_prefix.patch
+ 0002-Skip-analysis-of-params-that-have-been-skip-d.patch
+ 0003-Bug-660338-Account-for-padding-in-struct-size-check.patch
+ 0007-giconstantinfo-Add-API-to-fix-memory-leak.patch
+ 0008-scanner-split-CC-environment-variable.patch
"
# since this is a dev package by definition we dont bother separate -dev
@@ -51,4 +56,9 @@ dev() {
replaces="gobject-introspection"
}
-md5sums="7bbdb696c37bb98aef5af02c4b8975e3 gobject-introspection-1.32.1.tar.xz"
+md5sums="2dca065ef8ad95600040177a38b370fe gobject-introspection-1.30.0.tar.bz2
+33dab841cc8892fe3b3dc9548ef07667 0001-repository-Fix-g_irepository_get_c_prefix.patch
+bd84cf5039f224d0535f5930c7b99366 0002-Skip-analysis-of-params-that-have-been-skip-d.patch
+b4ee37cce3aa251ead694c10c5ff96a3 0003-Bug-660338-Account-for-padding-in-struct-size-check.patch
+a36853f88ac252095312e63cd014888a 0007-giconstantinfo-Add-API-to-fix-memory-leak.patch
+47321b30c92038439c36bcb051caebb2 0008-scanner-split-CC-environment-variable.patch"