[Pkg-vala-maintainers] Bug#537748: patch against current diff fixing the bug

Heiko Stübner heiko at sntech.de
Sat Jul 25 20:48:17 UTC 2009


attached is a patch against the current vala-git, containing the upstream-
patch mentioned in the initial bug-report as debian/patches-patch and a 
changelog-entry.

Could someone please review it and hopfully do the whole apply and build-pkg 
thingy, as it would be really needed to get the current freesmartphone.org-
stuff from pkg-fso into main.

Thanks
Heiko
-------------- next part --------------
commit 561e213a02d9e727bae4b68f793ab82327769aa3
Author: Heiko Stuebner <heiko at sntech.de>
Date:   Sat Jul 25 21:54:21 2009 +0200

    fix gtypemodule-based plugins

diff --git a/debian/changelog b/debian/changelog
index 573018a..590bd55 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vala (0.7.4-2) UNRELEASED; urgency=low
+
+  * backported upstream-fix to correct build problems with GTypeModule-based plugins
+
+ -- Marc-Andre Lureau <marcandre.lureau at gmail.com>  Fri, 03 Jul 2009 01:08:04 +0300
+
 vala (0.7.4-1) unstable; urgency=low
 
   * New upstream version.
diff --git a/debian/patches/01_fix_0_7_4_gtype_module_plugins b/debian/patches/01_fix_0_7_4_gtype_module_plugins
new file mode 100644
index 0000000..e55f4ef
--- /dev/null
+++ b/debian/patches/01_fix_0_7_4_gtype_module_plugins
@@ -0,0 +1,65 @@
+From a002d00095ce0c2b6e0d73c2dc176381c6cd0aca Mon Sep 17 00:00:00 2001
+From: J?rg Billeter <j at bitron.ch>
+Date: Wed, 08 Jul 2009 10:40:04 +0000
+Subject: Fix GTypeModule-based plugins
+
+---
+diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
+index a38954c..7ac0ed2 100644
+--- a/codegen/valagtypemodule.vala
++++ b/codegen/valagtypemodule.vala
+@@ -529,6 +529,7 @@ internal class Vala.GTypeModule : GErrorModule {
+ 
+ 			var type_fun = new ClassRegisterFunction (cl, context);
+ 			type_fun.init_from_type (in_plugin);
++			source_declarations.add_type_member_declaration (type_fun.get_source_declaration ());
+ 			source_type_member_definition.append (type_fun.get_definition ());
+ 			
+ 			if (in_plugin) {
+diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala
+index 85dfcc0..736883f 100644
+--- a/codegen/valatyperegisterfunction.vala
++++ b/codegen/valatyperegisterfunction.vala
+@@ -1,6 +1,6 @@
+ /* valatyperegisterfunction.vala
+  *
+- * Copyright (C) 2006-2008  J?rg Billeter
++ * Copyright (C) 2006-2009  J?rg Billeter
+  *
+  * This library is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU Lesser General Public
+@@ -26,9 +26,9 @@ using GLib;
+  * C function to register a type at runtime.
+  */
+ public abstract class Vala.TypeRegisterFunction {
+-	private CCodeFragment declaration_fragment = new CCodeFragment ();
+-
+-	private CCodeFragment definition_fragment = new CCodeFragment ();
++	CCodeFragment source_declaration_fragment = new CCodeFragment ();
++	CCodeFragment declaration_fragment = new CCodeFragment ();
++	CCodeFragment definition_fragment = new CCodeFragment ();
+ 
+ 	public CodeContext context { get; set; }
+ 
+@@ -62,7 +62,7 @@ public abstract class Vala.TypeRegisterFunction {
+ 		if (!plugin) {
+ 			type_block.add_statement (cdecl);
+ 		} else {
+-			definition_fragment.append (cdecl);
++			source_declaration_fragment.append (cdecl);
+ 		}
+ 
+ 		CCodeFunction fun;
+@@ -366,6 +366,10 @@ public abstract class Vala.TypeRegisterFunction {
+ 	 */
+ 	public abstract CCodeFragment get_type_interface_init_statements ();
+ 	
++	public CCodeFragment get_source_declaration () {
++		return source_declaration_fragment;
++	}
++
+ 	/**
+ 	 * Returns the declaration for this type register function in C code.
+ 	 *
+--
+cgit v0.8.2


More information about the Pkg-vala-maintainers mailing list