[libsocialweb] introspection: Add a way to modify the .gir to workaround bugs in g-i



commit fcfcb9cea0ae9d7e6221aa68e0bdcaea54377656
Author: Marco Barisione <marco barisione org>
Date:   Wed Oct 27 15:13:16 2010 +0100

    introspection: Add a way to modify the .gir to workaround bugs in g-i
    
    An XSLT file is used to fix the .gir's XML tree, so we can workaround
    bugs in gobject-introspection.

 libsocialweb-client/Makefile.am |    5 ++++-
 libsocialweb-client/kludge.xsl  |   14 ++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/libsocialweb-client/Makefile.am b/libsocialweb-client/Makefile.am
index 4c097bc..c0c76d1 100644
--- a/libsocialweb-client/Makefile.am
+++ b/libsocialweb-client/Makefile.am
@@ -26,6 +26,7 @@ INTROSPECTION_FILES = $(HANDWRITTED_C_SOURCES) \
 
 SocialWebClient-0.25.gir: $(INTROSPECTION_SCANNER) \
 		$(INTROSPECTION_FILES) \
+		kludge.xsl \
 		libsocialweb-client.la
 	$(AM_V_GEN)$(INTROSPECTION_SCANNER) -v \
 		--namespace SocialWebClient \
@@ -38,8 +39,10 @@ SocialWebClient-0.25.gir: $(INTROSPECTION_SCANNER) \
 		--libtool="$(top_builddir)/libtool" \
 		--library=libsocialweb-client.la \
 		--warn-all \
-		--output $@ \
+		--output $  tmp \
 		$(INTROSPECTION_FILES)
+	@xsltproc kludge.xsl $  tmp > $@
+	@rm -f $  tmp
 
 girdir = $(datadir)/gir-1.0
 gir_DATA = SocialWebClient-0.25.gir
diff --git a/libsocialweb-client/kludge.xsl b/libsocialweb-client/kludge.xsl
new file mode 100644
index 0000000..13ee18e
--- /dev/null
+++ b/libsocialweb-client/kludge.xsl
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:gi="http://www.gtk.org/introspection/core/1.0";
+                xmlns:glib="http://www.gtk.org/introspection/glib/1.0";
+                xmlns:c="http://www.gtk.org/introspection/c/1.0";
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+		version="1.0">
+
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>



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