[gcr] Gcr-3.gir: Unbreak virtual-method output for GcrCertificate.get_der_data



commit e1b2825190707853b715069f7eb0b955f57fae8e
Author: Stef Walter <stefw gnome org>
Date:   Sun Mar 2 15:14:19 2014 +0100

    Gcr-3.gir: Unbreak virtual-method output for GcrCertificate.get_der_data
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=725501 for more
    details.

 Makefile.decl          |   13 ++++++++++++-
 build/Makefile.am      |    3 ++-
 build/g-ir-unbreak.xsl |   23 +++++++++++++++++++++++
 configure.ac           |    8 +++++++-
 gcr/Makefile.am        |   24 +++++++++++++-----------
 gcr/gcr-certificate.c  |   10 +++++-----
 6 files changed, 62 insertions(+), 19 deletions(-)
---
diff --git a/Makefile.decl b/Makefile.decl
index c648774..531cb72 100644
--- a/Makefile.decl
+++ b/Makefile.decl
@@ -46,4 +46,15 @@ pkgconfigdir = $(libdir)/pkgconfig
 ENUM_TEMPLATE_C = $(top_srcdir)/build/enum-template.c
 ENUM_TEMPLATE_H = $(top_srcdir)/build/enum-template.h
 
-SUFFIXES = .desktop.in .desktop.in.in .service .service.in
+V_XSLTPROC = $(V_XSLTPROC_$(V))
+V_XSLTPROC_ = $(V_XSLTPROC_$(AM_DEFAULT_VERBOSITY))
+V_XSLTPROC_0 = @echo "  XSLTPROC" $@;
+
+FIX_GIR = $(top_srcdir)/build/g-ir-unbreak.xsl
+
+.broken.gir.gir:
+       $(V_XSLTPROC) xsltproc -o $@ $(FIX_GIR) $<
+.broken.typelib.typelib:
+       $(AM_V_GEN) cp $< $@
+
+SUFFIXES = .desktop.in .desktop.in.in .service .service.in .broken.typelib .broken.gir .gir
diff --git a/build/Makefile.am b/build/Makefile.am
index ae72110..1b89dea 100644
--- a/build/Makefile.am
+++ b/build/Makefile.am
@@ -20,7 +20,8 @@ EXTRA_DIST = \
        $(VALGRIND_CONTRIB) \
        $(SUPPRESSIONS) \
        enum-template.c \
-       enum-template.h
+       enum-template.h \
+       g-ir-unbreak.xsl
 
 all-local: valgrind-suppressions
 
diff --git a/build/g-ir-unbreak.xsl b/build/g-ir-unbreak.xsl
new file mode 100644
index 0000000..0734e4e
--- /dev/null
+++ b/build/g-ir-unbreak.xsl
@@ -0,0 +1,23 @@
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+    xmlns="http://www.gtk.org/introspection/core/1.0";
+    xmlns:gir="http://www.gtk.org/introspection/core/1.0";
+    xmlns:c="http://www.gtk.org/introspection/c/1.0";>
+
+    <!--
+      HACK: Workarounds for https://bugzilla.gnome.org/show_bug.cgi?id=725501
+    -->
+    <xsl:template match="gir:virtual-method[ name='get_der_data']">
+        <xsl:copy>
+            <xsl:attribute name="invoker">get_der_data</xsl:attribute>
+            <xsl:apply-templates select="@*"/>
+            <xsl:apply-templates select="../gir:method[ name='get_der_data']/*"/>
+        </xsl:copy>
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()"/>
+        </xsl:copy>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/configure.ac b/configure.ac
index 52b4f4e..2e48d29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,12 +89,18 @@ AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
 GLIB_GSETTINGS
-GOBJECT_INTROSPECTION_CHECK([1.34])
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
 
 GTK_DOC_CHECK(1.9)
 
+GOBJECT_INTROSPECTION_CHECK([1.34])
+if test "$enable_introspection" = "yes"; then
+       AC_PATH_PROG(XSLTPROC, xsltproc,
+                    AC_MSG_ERROR([Need xsltproc in order to build with gobject introspection])
+       )
+fi
+
 # --------------------------------------------------------------------
 # Optional GTK+ widgets build, avoid building gtk-doc wihtout GTK+
 #
diff --git a/gcr/Makefile.am b/gcr/Makefile.am
index 8db78bd..e88f8ec 100644
--- a/gcr/Makefile.am
+++ b/gcr/Makefile.am
@@ -213,7 +213,7 @@ if HAVE_INTROSPECTION
 
 include $(INTROSPECTION_MAKEFILE)
 
-INTROSPECTION_GIRS = Gcr- GCR_MAJOR@.gir
+INTROSPECTION_GIRS = Gcr- GCR_MAJOR@.broken.gir
 INTROSPECTION_SCANNER_ARGS = \
        $(INTROSPECTION_FLAGS) \
        --warn-all \
@@ -223,23 +223,25 @@ INTROSPECTION_COMPILER_ARGS = \
        --includedir=$(srcdir) \
        --includedir=$(top_builddir)/gck
 
-Gcr- GCR_MAJOR@.gir: libgcr-base- GCR_MAJOR@.la
+Gcr- GCR_MAJOR@.gir: Gcr- GCR_MAJOR@.broken.gir $(FIX_GIR)
 
-Gcr_ GCR_MAJOR@_gir_PACKAGES = p11-kit-1
-Gcr_ GCR_MAJOR@_gir_EXPORT_PACKAGES = gcr-base- GCR_MAJOR@
-Gcr_ GCR_MAJOR@_gir_INCLUDES = GLib-2.0 GObject-2.0
-Gcr_ GCR_MAJOR@_gir_LIBS = libgcr-base- GCR_MAJOR@.la
-Gcr_ GCR_MAJOR@_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) \
+Gcr- GCR_MAJOR@.broken.gir: libgcr-base- GCR_MAJOR@.la
+
+Gcr_ GCR_MAJOR@_broken_gir_PACKAGES = p11-kit-1
+Gcr_ GCR_MAJOR@_broken_gir_EXPORT_PACKAGES = gcr-base- GCR_MAJOR@
+Gcr_ GCR_MAJOR@_broken_gir_INCLUDES = GLib-2.0 GObject-2.0
+Gcr_ GCR_MAJOR@_broken_gir_LIBS = libgcr-base- GCR_MAJOR@.la
+Gcr_ GCR_MAJOR@_broken_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) \
        -DGCR_COMPILATION -DGCR_API_SUBJECT_TO_CHANGE
-Gcr_ GCR_MAJOR@_gir_FILES = $(PUBLIC_FILES)
-Gcr_ GCR_MAJOR@_gir_SCANNERFLAGS = --c-include "gcr/gcr-base.h" \
+Gcr_ GCR_MAJOR@_broken_gir_FILES = $(PUBLIC_FILES)
+Gcr_ GCR_MAJOR@_broken_gir_SCANNERFLAGS = --c-include "gcr/gcr-base.h" \
        --identifier-prefix Gcr
 
 girdir = $(datadir)/gir-1.0
-gir_DATA = $(INTROSPECTION_GIRS)
+gir_DATA = Gcr- GCR_MAJOR@.gir
 
 typelibsdir = $(libdir)/girepository-1.0
-typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+typelibs_DATA = $(gir_DATA:.gir=.typelib)
 
 if ENABLE_VAPIGEN
 
diff --git a/gcr/gcr-certificate.c b/gcr/gcr-certificate.c
index c5d118c..0b7d58a 100644
--- a/gcr/gcr-certificate.c
+++ b/gcr/gcr-certificate.c
@@ -252,7 +252,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
                CERTIFICATE_INFO = g_quark_from_static_string ("_gcr_certificate_certificate_info");
 
                /**
-                * GcrCertificate:label: (allow-none)
+                * GcrCertificate:label:
                 *
                 * A readable label for this certificate.
                 */
@@ -270,7 +270,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
                                              "", G_PARAM_READABLE));
 
                /**
-                * GcrCertificate:markup: (allow-none)
+                * GcrCertificate:markup:
                 *
                 * GLib markup to describe the certificate
                 */
@@ -288,7 +288,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
                                              G_TYPE_ICON, G_PARAM_READABLE));
 
                /**
-                * GcrCertificate:subject: (allow-none)
+                * GcrCertificate:subject:
                 *
                 * Common name part of the certificate subject
                 */
@@ -297,7 +297,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
                                                "", G_PARAM_READABLE));
 
                /**
-                * GcrCertificate:issuer: (allow-none)
+                * GcrCertificate:issuer:
                 *
                 * Common name part of the certificate issuer
                 */
@@ -306,7 +306,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
                                                "", G_PARAM_READABLE));
 
                /**
-                * GcrCertificate:expiry: (allow-none)
+                * GcrCertificate:expiry:
                 *
                 * The expiry date of the certificate
                 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]