[arch-commits] Commit in valabind/trunk (PKGBUILD vala-0.48.diff)

Jan Steffens heftig at archlinux.org
Tue Mar 3 19:26:40 UTC 2020


    Date: Tuesday, March 3, 2020 @ 19:26:39
  Author: heftig
Revision: 589801

1.7.1-3: vala 0.48

Added:
  valabind/trunk/vala-0.48.diff
Modified:
  valabind/trunk/PKGBUILD

----------------+
 PKGBUILD       |   16 ++++++++----
 vala-0.48.diff |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-03 19:06:52 UTC (rev 589800)
+++ PKGBUILD	2020-03-03 19:26:39 UTC (rev 589801)
@@ -2,18 +2,24 @@
 
 pkgname=valabind
 pkgver=1.7.1
-pkgrel=2
+pkgrel=3
 pkgdesc='Tool to parse vala or vapi files to transform them into swig interface files, C++, NodeJS-ffi or GIR'
 url='https://radare.org/r/'
 arch=('x86_64')
 license=('GPL3')
-depends=('sh' 'glibc' 'glib2' 'vala' 'swig' 'libvala-0.46.so')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/radare/${pkgname}/archive/${pkgver}.tar.gz)
-sha256sums=('b463b18419de656e218855a2f30a71051f03a9c4540254b4ceaea475fb79102e')
-sha512sums=('b82c733777e0caf449cd27f0ed3597a108462072c5663945ec03f4c1da90d389313c0f3ca0f6db2d52c7f80d09b1751992f733454358cd428c2571b7e53850a4')
+depends=('sh' 'glibc' 'glib2' 'vala' 'swig' 'libvala-0.48.so')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/radare/${pkgname}/archive/${pkgver}.tar.gz
+        vala-0.48.diff)
+sha256sums=('b463b18419de656e218855a2f30a71051f03a9c4540254b4ceaea475fb79102e'
+            '0528ba09bb4a5f20944a129d5b91eabeefa2d35a2fcd40378847f976f2ad418e')
+sha512sums=('b82c733777e0caf449cd27f0ed3597a108462072c5663945ec03f4c1da90d389313c0f3ca0f6db2d52c7f80d09b1751992f733454358cd428c2571b7e53850a4'
+            'f9de1b1050f7933a3850fab88ba1a15fc83da6e21dfe1d75edc781a151eee1246a2d7602c201c71bd8adb4029517992737e660a4a35e4a6f9e80bf7bbe23bb30')
 
 prepare() {
   cd ${pkgname}-${pkgver}
+
+  # git diff 1.7.1..9d4fb181e243
+  patch -Np1 -i ../vala-0.48.diff
 }
 
 build() {

Added: vala-0.48.diff
===================================================================
--- vala-0.48.diff	                        (rev 0)
+++ vala-0.48.diff	2020-03-03 19:26:39 UTC (rev 589801)
@@ -0,0 +1,69 @@
+diff --git a/girwriter.vala b/girwriter.vala
+index 51af0b7..33c016b 100644
+--- a/girwriter.vala
++++ b/girwriter.vala
+@@ -1,25 +1,29 @@
+-/* Copyright 2011-2015 -- pancake */
++/* Copyright 2011-2019 -- pancake */
+ 
+ using Vala;
+ 
+ public class GirWriter : ValabindWriter {
+ 	public GLib.List<string> includefiles = new GLib.List<string> ();
+ 	public GLib.List<Method> methods;
+ 	string classname = "";
+ 	string classcname;
+ 	string externs = "";
+ 	string statics = "";
+ 	string extends = "";
+ 	string enums = "";
+ 	string nspace;
+ 
+ 	public GirWriter () {
+ 	}
+ 
+ 	public override string get_filename (string base_name) {
+ 		return base_name+".gir";
+ 	}
+ 
++	public override void write(string file) {
++		context.accept (this);
++	}
++
+ 	string get_alias (string name) {
+ 		string oname = name;
+ 		switch (name) {
+diff --git a/gowriter.vala b/gowriter.vala
+index 56d9fbe..0fb09a6 100644
+--- a/gowriter.vala
++++ b/gowriter.vala
+@@ -214,7 +214,11 @@ public class GoNamer {
+ 	}
+ 
+ 	private string mangle_datatype(DataType d) {
++#if VALA_0_48
++		string ret = d.type_symbol.name;  // i think should unify with get_type_declaration?
++#else
+ 		string ret = d.data_type.name;  // i think should unify with get_type_declaration?
++#endif
+ 		if (d.get_type_arguments().size > 0) {
+ 			foreach(var dd in d.get_type_arguments()) {
+ 				ret += "_";
+diff --git a/nodeffiwriter.vala b/nodeffiwriter.vala
+index 84fede0..eba6329 100644
+--- a/nodeffiwriter.vala
++++ b/nodeffiwriter.vala
+@@ -85,8 +85,13 @@ public class NodeFFIWriter : ValabindWriter {
+ 
+ 		string _type = type.to_string ();
+ 		string local_ns_pfx = ns_pfx;
++#if VALA_0_48
++		if (type.type_symbol != null && type.type_symbol.parent_symbol is Namespace) {
++			Namespace local_ns = (Namespace)type.type_symbol.parent_symbol;
++#else
+ 		if (type.data_type != null && type.data_type.parent_symbol is Namespace) {
+ 			Namespace local_ns = (Namespace)type.data_type.parent_symbol;
++#endif
+ 			if (use_namespace(local_ns))
+ 				local_ns_pfx = local_ns.get_full_name()+".";
+ 		}



More information about the arch-commits mailing list