diff --git a/g-ir-dep-tool.patch b/g-ir-dep-tool.patch new file mode 100644 index 0000000..c8ce736 --- /dev/null +++ b/g-ir-dep-tool.patch @@ -0,0 +1,133 @@ +From ed8a690dbe738b3096f8d43bdbc627eb3f951523 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger +Date: Tue, 6 Dec 2011 16:23:59 +0100 +Subject: [PATCH] Bug 655672: g-ir-dep-scanner: Scan dependencies of a typelib + and give information. + +This allows distributions to create automatic dependency tracking coming +from .typelib files. + +The dependencies identified at this time are: +typelib - based dependencies +shared library - dependencies +--- + Makefile-tools.am | 10 +++++- + tools/g-ir-dep-tool.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 87 insertions(+), 1 deletions(-) + create mode 100644 tools/g-ir-dep-tool.c + +diff --git a/Makefile-tools.am b/Makefile-tools.am +index f84de99..6bc4da4 100644 +--- a/Makefile-tools.am ++++ b/Makefile-tools.am +@@ -1,5 +1,6 @@ + bin_PROGRAMS += g-ir-compiler g-ir-generate + bin_SCRIPTS += g-ir-scanner g-ir-annotation-tool g-ir-doc-tool ++bin_PROGRAMS += g-ir-dep-tool + + EXTRA_DIST += \ + tools/g-ir-scanner.in \ +@@ -38,8 +39,15 @@ g_ir_generate_LDADD = \ + libgirepository-1.0.la \ + $(GIREPO_LIBS) + ++g_ir_dep_tool_SOURCES = tools/g-ir-dep-tool.c ++g_ir_dep_tool_CFLAGS = $(GIO_CFLAGS) -I$(top_srcdir)/girepository ++g_ir_dep_tool_LDADD = \ ++ libgirepository-internals.la \ ++ libgirepository-1.0.la \ ++ $(GIREPO_LIBS) ++ + GCOVSOURCES = \ + $(g_ir_compiler_SOURCES) \ + $(g_ir_generate_SOURCES) + +-CLEANFILES += g-ir-scanner g-ir-annotation-tool g-ir-doc-tool ++CLEANFILES += g-ir-scanner g-ir-annotation-tool g-ir-doc-tool g-ir-dep-tool +diff --git a/tools/g-ir-dep-tool.c b/tools/g-ir-dep-tool.c +new file mode 100644 +index 0000000..800779b +--- /dev/null ++++ b/tools/g-ir-dep-tool.c +@@ -0,0 +1,78 @@ ++ ++/* -*- Mode: C; c-file-style: "gnu"; -*- */ ++/* GObject introspection: typelib dependency scanner ++ * ++ * Copyright (C) 2011 Dominique Leuenberger ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library 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 ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++#include ++#include ++ ++int main(int argc, char *argv[]) { ++ GError *err = NULL; ++ GITypelib *typelib; ++ gchar **deps; ++ const gchar *shlibs; ++ int i; ++ const char *namespace = argv[1]; ++ const char *version = argv[2]; ++ ++ g_type_init(); ++ ++ if (argc < 2 || argc > 3) { ++ g_print ("Usage: %s []\n\n", argv[0]); ++ g_print (" typelib: The namespace of the typelib to inspect\n"); ++ g_print (" version: The version of the typelib to inspect\n"); ++ return 1; ++ } ++ ++ /* Try to load the typelib specified as parameter */ ++ typelib = g_irepository_require (NULL, namespace, version, 0, &err); ++ ++ if (!typelib) { ++ g_printerr ("ERROR: Failed to load typelib '%s'\n", namespace); ++ return 2; ++ } ++ ++ /* Finding all the typelib based Requires */ ++ deps = g_irepository_get_dependencies (NULL, namespace); ++ if (deps) { ++ for (i=0; deps[i]; i++) { ++ g_print ("typelib: %s\n", deps[i]); ++ } ++ g_strfreev (deps); ++ } ++ ++ /* Finding the shared library we depend on (if any) */ ++ shlibs = g_irepository_get_shared_library (NULL, namespace); ++ ++ if (shlibs != NULL && shlibs[0] != '\0') ++ { ++ /* libs is a comma-separated list of libraries */ ++ gchar **libs = g_strsplit (shlibs, ",", 0); ++ ++ for (i = 0; libs[i]; i++) ++ { ++ g_print ("shlib: %s\n", libs[i]); ++ } ++ } ++ ++ g_typelib_free (typelib); ++ ++ return 0; ++} +-- +1.7.7.3 + diff --git a/gi-find-deps.sh b/gi-find-deps.sh index 86942e3..c87f50f 100644 --- a/gi-find-deps.sh +++ b/gi-find-deps.sh @@ -70,10 +70,38 @@ while read file; do print_req_prov done ;; + *.typelib) + split_name_version $(basename $file | sed 's,.typelib$,,') + oldIFS=$IFS + IFS=$'\n' + for req in $(g-ir-dep-tool $symbol $version); do + case $req in + typelib:*) + module=${req#typelib: } + split_name_version $module + print_req_prov + ;; + shlib:*) + echo "${req#shlib: }${shlib_64}" + ;; + esac + done + IFS=$oldIFS + ;; esac done } +for path in \ + $(for tlpath in \ + $(find ${RPM_BUILD_ROOT}/usr/lib64 ${RPM_BUILD_ROOT}/usr/lib /usr/lib64 /usr/lib -name '*.typelib'); do + dirname $tlpath; done | uniq ); do + export GI_TYPELIB_PATH=$GI_TYPELIB_PATH:$path +done + +if [ "${HOSTTYPE}" == "x86_64" ]; then + shlib_64="()(64bit)" +fi case $1 in -P) find_provides diff --git a/gobject-introspection-1.30.0.tar.bz2 b/gobject-introspection-1.30.0.tar.bz2 deleted file mode 100644 index 6d9b0f0..0000000 --- a/gobject-introspection-1.30.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72f5b8886d23d4bfff1f9824df00831b48b7ebb98d35a50a8f322cb7ff037d12 -size 1279723 diff --git a/gobject-introspection-1.31.6.tar.xz b/gobject-introspection-1.31.6.tar.xz new file mode 100644 index 0000000..92ff369 --- /dev/null +++ b/gobject-introspection-1.31.6.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6694ffc1b7a426d69ee7ab4d092ec1a4bcc943126e40e49f0ec16f9fc7dc61e +size 1105704 diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 071ab4e..02c52f4 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,62 @@ +------------------------------------------------------------------- +Fri Dec 23 11:19:48 UTC 2011 - dimstar@opensuse.org + +- Enhance gi-find-deps.sh: Inject subfolders of libdir containing + .typelib files into GI_TYPELIB_PATH. + +------------------------------------------------------------------- +Tue Dec 20 20:32:17 UTC 2011 - vuntz@opensuse.org + +- Update to version 1.31.6: + + Update annotation for glib 2.31.6. + + giscanner: fix use after decref + +------------------------------------------------------------------- +Tue Dec 6 16:20:59 UTC 2011 - dimstar@opensuse.org + +- Add g-ir-dep-tool.patch: add a tool to inspect .typelib files and + find their dependencies to be added to the rpm packages. +- Add libtool BuildRequires and call to autoreconf, as the + patch above touches the build system. +- Extend gi-find-deps.sh to use the new g-ir-dep-tool and add + Requires coming from the .typelib files. + +------------------------------------------------------------------- +Mon Dec 5 19:46:16 UTC 2011 - dimstar@opensuse.org + +- Update to version 1.31.1: + + Scanner: + - Split CC environment variable + - Allow GObject.Object as a supercall return type + - Support --header-only flag + - Also add an rpath for library paths specified + - Only add rpaths for absolute directories + - Out the -l library name after the .o + + Minor bug fixes + + Bugs fixed: bgo#660338. +- Change license to spdx identifier (LGPL-2.1+). +- Add xz BuildRequires because we can't build a package for a + xz-compressed tarball without explicitly specifying that... See + bnc#697467 for more details. + +------------------------------------------------------------------- +Thu Oct 27 13:03:29 UTC 2011 - dimstar@opensuse.org + +- Update to version 1.31.0: + + No longer use deprecated g_thread_init. + + scanner: + - Support --header-only flag + - Allow GObject.Object as a superclass return type + - Split CC environment variable + - Skip analysis of params that have been (skip)'d + - Show the file/line even when processing FATAL + + libgirepository: + - Add API to fix memory leak + - Fix g_irepository_get_c_prefix() + - Use the correct size when freeing unused info + - Prevents a segfault in gir parser + + Build and test improvements/fixes. + ------------------------------------------------------------------- Wed Sep 21 11:05:11 UTC 2011 - vuntz@opensuse.org diff --git a/gobject-introspection.spec b/gobject-introspection.spec index cb47c78..ee2cabe 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -18,25 +18,31 @@ Name: gobject-introspection -Version: 1.30.0 -Release: 1 +Version: 1.31.6 +Release: 0 # 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+ Summary: GObject Introspection Tools -Url: http://live.gnome.org/GObjectIntrospection +License: LGPL-2.1+ Group: Development/Libraries/GNOME -Source0: http://download.gnome.org/sources/gobject-introspection/1.30/%{name}-%{version}.tar.bz2 +Url: http://live.gnome.org/GObjectIntrospection +Source0: http://download.gnome.org/sources/gobject-introspection/1.31/%{name}-%{version}.tar.xz # gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires. Source1: gi-find-deps.sh Source2: gobjectintrospection.attr Source3: gobject-introspection-typelib.template Source99: %{name}-rpmlintrc +# PATCH-FIX-UPSTREAM g-ir-dep-tool.patch bgo#665672 dimstar@opensuse.org -- Add g-ir-dep-tool to get further automatic dependencies. +Patch0: g-ir-dep-tool.patch BuildRequires: bison BuildRequires: fdupes BuildRequires: flex BuildRequires: libffi-devel +# needed for patch0 +BuildRequires: libtool BuildRequires: python-devel BuildRequires: python-xml +# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467 +BuildRequires: xz BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(gobject-2.0) %if 0%{?BUILD_FROM_VCS} @@ -52,9 +58,7 @@ The goal of the project is to describe the APIs and collect them in a uniform, machine readable format. %package -n libgirepository-1_0-1 -License: LGPLv2.1+ Summary: GObject Introspection Library -Group: Development/Libraries/GNOME # Provide typelib() symbols based on gobject-introspection-typelib.template # The template is checked during install if it matches the installed *.typelib files. %(cat %{S:3} | awk '{ print "Provides: " $0}') @@ -64,9 +68,7 @@ The goal of the project is to describe the APIs and collect them in a uniform, machine readable format. %package devel -License: LGPLv2.1+ Summary: GObject Introspection Development Files -Group: Development/Libraries/GNOME # Note: the devel package requires the binaries, not just the library Requires: %{name} = %{version} Requires: libffi-devel @@ -77,12 +79,15 @@ a uniform, machine readable format. %prep %setup -q +%patch0 -p1 %if 0%{?BUILD_FROM_VCS} [ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh %endif %build +# needed for patch0 +autoreconf -fi %configure \ %if 0%{?BUILD_FROM_VCS} --enable-gtk-doc \ @@ -112,6 +117,7 @@ rm -rf %{buildroot} %doc AUTHORS CONTRIBUTORS COPYING COPYING.GPL NEWS README TODO %{_bindir}/g-ir-annotation-tool %{_bindir}/g-ir-compiler +%{_bindir}/g-ir-dep-tool %{_bindir}/g-ir-doc-tool %{_bindir}/g-ir-generate %{_bindir}/g-ir-scanner