.gear/rules | 3 + .../tags/c59b397278b32a39a2e83396c668604d9a283df1 | 6 + .gear/tags/list | 1 + Makefile-giscanner.am | 4 +- girepository/girepository.c | 2 +- giscanner/sourcescanner.py | 3 +- gobject-introspection-1.29.17-alt-python.patch | 11 ++ gobject-introspection.spec | 167 ++++++++++++++++++++ tests/repository/gitestrepo.c | 5 + tests/repository/gitypelibtest.c | 7 +- 10 files changed, 202 insertions(+), 7 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..fffa50d --- /dev/null +++ b/.gear/rules @@ -0,0 +1,3 @@ +tar: GOBJECT_INTROSPECTION_1_30_0:. +diff: GOBJECT_INTROSPECTION_1_30_0:. . +copy: *.patch \ No newline at end of file diff --git a/.gear/tags/c59b397278b32a39a2e83396c668604d9a283df1 b/.gear/tags/c59b397278b32a39a2e83396c668604d9a283df1 new file mode 100644 index 0000000..678fd21 --- /dev/null +++ b/.gear/tags/c59b397278b32a39a2e83396c668604d9a283df1 @@ -0,0 +1,6 @@ +object bba1d3b336ee9b0766e94a889e984d5503c700a0 +type commit +tag GOBJECT_INTROSPECTION_1_30_0 +tagger Colin Walters 1316611630 -0400 + +1.30.0 diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..6ab0339 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +c59b397278b32a39a2e83396c668604d9a283df1 GOBJECT_INTROSPECTION_1_30_0 diff --git a/Makefile-giscanner.am b/Makefile-giscanner.am index 3655997..dd860e5 100644 --- a/Makefile-giscanner.am +++ b/Makefile-giscanner.am @@ -20,11 +20,11 @@ libgiscanner_la_SOURCES = \ giscanner/scannerparser.y \ giscanner/grealpath.h libgiscanner_la_CPPFLAGS = -I$(top_srcdir)/girepository -I$(top_srcdir)/giscanner -libgiscanner_la_LIBADD = $(GOBJECT_LIBS) +libgiscanner_la_LIBADD = $(GOBJECT_LIBS) -lpython$(PYTHON_VERSION) libgiscanner_la_CFLAGS = $(GOBJECT_CFLAGS) # Python module -pkgpyexecdir = $(pkglibdir)/giscanner +pkgpyexecdir = $(pyexecdir)/giscanner pkgpyexec_LTLIBRARIES = _giscanner.la pkgpyexec_PYTHON = \ giscanner/__init__.py \ 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/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, diff --git a/gobject-introspection-1.29.17-alt-python.patch b/gobject-introspection-1.29.17-alt-python.patch new file mode 100644 index 0000000..3667ea6 --- /dev/null +++ b/gobject-introspection-1.29.17-alt-python.patch @@ -0,0 +1,11 @@ +--- giscanner/docbookdescription.py~ 2011-09-02 09:19:02.000000000 +0000 ++++ giscanner/docbookdescription.py 2011-09-02 09:37:49.000000000 +0000 +@@ -1,7 +1,7 @@ + + TAG_PROGRAM_LISTING = '', ''} ++TAGS = [TAG_PROGRAM_LISTING, TAG_CDATA, ']]>', ''] + + def get_formatted_description(description): + desc = description.replace("|[", "") \ diff --git a/gobject-introspection.spec b/gobject-introspection.spec new file mode 100644 index 0000000..8f2dda8 --- /dev/null +++ b/gobject-introspection.spec @@ -0,0 +1,167 @@ +Name: gobject-introspection +Version: 1.30.0 +Release: alt2 + +Summary: Introspection system for GObject-based libraries +Group: Development/C +License: GPLv2+, LGPLv2+, MIT +URL: http://live.gnome.org/GObjectIntrospection +Packager: Valery Inozemtsev + +Provides: gir-repository = %version-%release +Obsoletes: gir-repository + +Source: %name-%version.tar +Patch: %name-%version-%release.patch +Patch1: gobject-introspection-1.29.17-alt-python.patch + +BuildRequires: flex gtk-doc libcairo-devel libcairo-gobject-devel libffi-devel libgio-devel +BuildRequires: python-devel python-modules-ctypes python-modules-compiler rpm-build-gir + +%description +GObject Introspection can scan C header and source files in order to +generate introspection "typelib" files. It also provides an API to examine +typelib files, useful for creating language bindings among other +things. + +%package devel +Summary: Libraries and headers for gobject-introspection +Group: Development/C +Requires: %name = %version-%release libgio-devel rpm-build-gir +Provides: gir-repository-devel = %version-%release +Obsoletes: gir-repository-devel + +%description devel +Libraries and headers for gobject-introspection + +%package devel-doc +Summary: Documentation for gobject-introspection +Group: Development/C +BuildArch: noarch +Conflicts: %name < %version + +%description devel-doc +This package provides development documentation for gobject-introspection + +%prep +%setup -q +%patch -p1 +%patch1 + +%build +%autoreconf +%configure \ + --disable-static \ + --enable-gtk-doc +%make + +%check +%make check + +%install +%make DESTDIR=%buildroot install + +find %buildroot%_libdir -name \*.la -delete + +%files +%_libdir/lib*.so.* +%_libdir/girepository-1.0 + +%files devel +%_includedir/%name-1.0 +%_bindir/g-ir-* +%_libdir/lib*.so +%python_sitelibdir/giscanner +%_pkgconfigdir/*.pc +%_datadir/gir-1.0 +%_datadir/%name-1.0 +%_datadir/aclocal/*.m4 +%_man1dir/*.1* + +%files devel-doc +%_datadir/gtk-doc/html/* + +%changelog +* Fri Jan 20 2012 Yuri N. Sedunov 1.30.0-alt2 +- updated from upstream git, in particular fixed build on arm platform + +* Mon Oct 24 2011 Vitaly Kuznetsov 1.30.0-alt1.1 +- Rebuild with Python-2.7 + +* Fri Sep 23 2011 Yuri N. Sedunov 1.30.0-alt1 +- 1.30.0 + +* Tue Aug 30 2011 Yuri N. Sedunov 1.29.17-alt1 +- 1.29.17 + +* Fri Aug 12 2011 Yuri N. Sedunov 1.29.16-alt1 +- 1.29.16 + +* Thu Jun 30 2011 Yuri N. Sedunov 1.29.0-alt1 +- 1.29.0 + +* Sat Mar 26 2011 Yuri N. Sedunov 0.10.6-alt1 +- 0.10.6 + +* Fri Mar 11 2011 Yuri N. Sedunov 0.10.4-alt1 +- 0.10.4 + +* Fri Feb 25 2011 Yuri N. Sedunov 0.10.3-alt1 +- 0.10.3 + +* Wed Feb 09 2011 Yuri N. Sedunov 0.10.2-alt1 +- 0.10.2 + +* Mon Jan 31 2011 Alexey Shabalin 0.10.1-alt1 +- 0.10.1 +- new devel-doc subpackage (aris@) + +* Thu Dec 23 2010 Alexey Shabalin 0.10.0-alt1 +- 0.10.0 + +* Mon Oct 18 2010 Alexey Shabalin 0.9.12-alt1 +- 0.9.12 + +* Mon Oct 04 2010 Alexey Shabalin 0.9.10-alt1 +- pre 0.9.11 snapshot +- Obsoletes: gir-repository + +* Thu Aug 19 2010 Kirill A. Shutemov 0.6.14-alt2 +- Rebuild with new libffi. + +* Fri Jun 04 2010 Alexey Shabalin 0.6.14-alt1 +- 0.6.14 + +* Wed May 26 2010 Alexey Shabalin 0.6.12-alt1 +- 0.6.12 + +* Tue Apr 20 2010 Alexey Shabalin 0.6.10-alt1 +- 0.6.10 + +* Wed Mar 31 2010 Alexey Shabalin 0.6.9-alt2 +- rebuild with modified rpm-build-gir + +* Fri Mar 19 2010 Valery Inozemtsev 0.6.9-alt1 +- 0.6.9 + +* Fri Mar 12 2010 Valery Inozemtsev 0.6.8-alt1 +- 0.6.8 + +* Tue Mar 09 2010 Valery Inozemtsev 0.6.7-alt2 +- devel: requires rpm-build-gir + +* Thu Dec 24 2009 Valery Inozemtsev 0.6.7-alt1 +- 0.6.7 + +* Mon Dec 14 2009 Valery Inozemtsev 0.6.6-alt1 +- 0.6.6 + +* Sun Sep 06 2009 Valery Inozemtsev 0.6.5-alt1 +- 0.6.5 + +* Tue Aug 25 2009 Valery Inozemtsev 0.6.4-alt1 +- 0.6.4 + +* Mon Aug 03 2009 Valery Inozemtsev 0.6.3-alt1 +- initial release + 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); 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); }