diff --git a/gi-find-deps.sh b/gi-find-deps.sh new file mode 100644 index 0000000..c5470f6 --- /dev/null +++ b/gi-find-deps.sh @@ -0,0 +1,82 @@ +#!/bin/sh + +# Automatically find Provides and Requires for typelib() gobject-introspection bindings. +# can be started with -R (Requires) and -P (Provides) + +# Copyright 2011 by Dominique Leuenberger, Amsterdam, Netherlands (dimstar [at] opensuse.org) +# This file is released under the GPLv2 or later. + +function split_name_version { +base=$1 +symbol=${base%-*} +version=${base#*-} +# In case there is no '-' in the filename, then the split above 'fails' and version == symbol (thus: no version specified) +if [ "$symbol" = "$version" ]; then + unset version +fi +} + +function print_req_prov { +echo -n "typelib($symbol)" +if [ ! -z "$version" ]; then + echo " = ${version}" +else + echo "" +fi +} + +function find_provides { +while read file; do + case $file in + /usr/lib[^/]*/girepository-1.0/*.typelib) + split_name_version $(basename $file | sed 's,.typelib$,,') + print_req_prov + ;; + esac +done +} + +function find_requires { +# FIXME: There are multiple ways gi bindings can be imported. We only catch the 'basic' one +# Currently, we detect: +# - in python: +# . from gi.repository import foo [Unversioned requirement of 'foo'] +# . from gi.repository import foo-1.0 [versioned requirement] +# . And we do not stumble over: +# from gi.repository import foo as _bar +# from gi.repository import foo, bar +# - in JS: +# . imports.gi.foo; [unversioned requirement of 'foo'] +# . imports.gi.goo-1.0; [versioned requirement] +# . The imports can be listed on one line, and we catch them. +# Forms currently not detected: +# - js: imports.gi.versions.Gtk = '3.0'; +# - py: gi.require_version('Gtk', '3.0') + +while read file; do + case $file in + *.js) + for module in $(grep -h -P -o "imports.gi.([^\s;]+)" $file | grep -v "imports.gi.version" | sed 's,imports.gi.,,'); do + split_name_version $module + print_req_prov + done + ;; + *.py) + for module in $(grep -h -P "from gi.repository import (\w+)" $file | sed -e 's,from gi.repository import,,' -r -e 's:\s+as\s+\w+::g' -e 's:,::g'); do + split_name_version $module + print_req_prov + done + ;; + esac +done +} + +case $1 in + -P) + find_provides + ;; + -R) + find_requires + ;; +esac + diff --git a/gobject-introspection-0.10.1.tar.bz2 b/gobject-introspection-0.10.1.tar.bz2 deleted file mode 100644 index 9a7f9aa..0000000 --- a/gobject-introspection-0.10.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59033bcb428fd507f9b8399424e847ab24d5e1fe5d587f6915be9940fde69890 -size 1081666 diff --git a/gobject-introspection-0.10.8.tar.bz2 b/gobject-introspection-0.10.8.tar.bz2 new file mode 100644 index 0000000..9b6b4b2 --- /dev/null +++ b/gobject-introspection-0.10.8.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b1387ff37f03db880a2b1cbd6c6b6dfb923a29468d4d8367c458abf7704c61e +size 1024874 diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 1c4275d..0576358 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,80 @@ +------------------------------------------------------------------- +Wed Apr 27 09:16:02 UTC 2011 - dimstar@opensuse.org + +- Add gi-find-deps.sh: automatically detect Requires and Provides + for gobject-introspection typelibs. + +------------------------------------------------------------------- +Tue Apr 26 14:52:08 UTC 2011 - fcrozat@novell.com + +- Update to version 0.10.8: + + bgo#647621: g_spawn_async_with_pipes annotation corrections. + + gimarshallingtests: Remove incorrect cast. + + bgo#647796: Added annotation for g_variant_new_variant to mark + it as const. + +------------------------------------------------------------------- +Tue Apr 5 11:16:05 UTC 2011 - fcrozat@novell.com + +- Update to version 0.10.7: + + add annotations for g_base64_encode and g_base64_decode + + bgo#640264: girparser: use c:identifier-prefixes instead of + c:prefix. + +------------------------------------------------------------------- +Mon Mar 28 11:23:10 UTC 2011 - fcrozat@novell.com + +- Update to version 0.10.6: + + bgo#645692: fix generation of cairo typelib. +- Changes from version 0.10.5: + + bgo#644749: support setting gobjects and ginterfaces in struct + fields. +- Changes from version 0.10.4: + + Use fully qualified shared library for cairo-1.0.gir. + +------------------------------------------------------------------- +Thu Feb 24 18:15:24 UTC 2011 - fcrozat@novell.com + +- Update to version 0.10.3: + + Visible changes: + - Nested structs and unions (bgo#555960) + - Support Shadows: annotation (bgo#556475) + - Allow annotation of enums as bitfields (bgo#573332) + - Add support for a 'closure' and 'destroy' annotations + (bgo#574284) + - Add short/ushort support (bgo#584423) + + Many improvement and fixes in the scanner, including: + - Parse doc-comment tags case-insensitive (bgo#572086) + - #defines should be parsed in .h files but not .c files + (bgo#572790) + + Various additions and fixes to introspection data shipped with + gobject-introspection, including: + - Add annotations for g_spawn_* functions (bgo#585373) + + Other bugs fixed: bgo#551738, bgo#555964, bgo#561360, + bgo#561604, bgo#563469, bgo#563682, bgo#564016, bgo#566560, + bgo#567906, bgo#568680, bgo#569355, bgo#569633, bgo#569930, + bgo#570594, bgo#570903, bgo#571182, bgo#571248, bgo#571483, + bgo#571548, bgo#571649, bgo#572075, bgo#572423, bgo#572434, + bgo#572563, bgo#572965, bgo#573306, bgo#573309, bgo#574139, + bgo#574501, bgo#575613, bgo#576323, bgo#576605, bgo#576627, + bgo#577065, bgo#577534, bgo#577546, bgo#579522, bgo#579602, + bgo#581680, bgo#581682, bgo#581684, bgo#581685, bgo#581689, + bgo#583338, bgo#584432, bgo#584453, bgo#584816, bgo#584842, + bgo#585081, bgo#585141, bgo#585150, bgo#585328, bgo#585579, + bgo#585584, bgo#585908. +- Changes from version 0.10.2: + + Add (constructor) annotation + + Add (method) overrides + + Disable missing class structure warning. + + Depend on cairo-gobject if available + + Pass shared-library as-is to g_module_open + + Various improvements and bug fixes. +- Add support for source service checkout, with %BUILD_FROM_VCS: + + Add gnome-common and gtk-doc BuildRequires. + + Add call to ./autogen.sh. + + Enforce gtk-doc html generation by passing --enable-gtk-doc to + configure. + ------------------------------------------------------------------- Fri Jan 14 15:25:27 CET 2011 - vuntz@opensuse.org diff --git a/gobject-introspection.spec b/gobject-introspection.spec index 13ce065..466f69a 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -18,7 +18,7 @@ Name: gobject-introspection -Version: 0.10.1 +Version: 0.10.8 Release: 1 # FIXME: when bgo#629930 gets fixed, move the appropriate pkg-config files to the main package and rename the devel package to libgirepository-devel License: LGPLv2.1+ @@ -26,7 +26,9 @@ Summary: GObject Introspection Tools Url: http://live.gnome.org/GObjectIntrospection Group: Development/Libraries/GNOME Source0: %{name}-%{version}.tar.bz2 -Source1: %{name}-rpmlintrc +# gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires. +Source1: gi-find-deps.sh +Source99: %{name}-rpmlintrc BuildRequires: bison BuildRequires: fdupes BuildRequires: flex @@ -35,6 +37,10 @@ BuildRequires: python-devel BuildRequires: python-xml BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(gobject-2.0) +%if 0%{?BUILD_FROM_VCS} +BuildRequires: gnome-common +BuildRequires: gtk-doc +%endif Requires: libgirepository-1_0-1 = %{version} Requires: python-xml BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -67,14 +73,22 @@ a uniform, machine readable format. %prep %setup -q +%if 0%{?BUILD_FROM_VCS} +[ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh +%endif + %build %configure \ +%if 0%{?BUILD_FROM_VCS} + --enable-gtk-doc \ +%endif --disable-static -%__make %{?jobs:-j%jobs} +%__make %{?jobs:-j%jobs} V=1 %install %makeinstall find %{buildroot} -type f -name "*.la" -delete -print +install -D %{S:1} %{buildroot}%{_prefix}/lib/rpm/gi-find-deps.sh %fdupes %{buildroot} %clean @@ -125,5 +139,6 @@ rm -rf %{buildroot} # FIXME: those two files should be moved to the main package when bgo#629930 gets fixed %{_libdir}/pkgconfig/gobject-introspection-1.0.pc %{_libdir}/pkgconfig/gobject-introspection-no-export-1.0.pc +%{_prefix}/lib/rpm/gi-find-deps.sh %changelog