From 96e2ed55682c9bd55e5e5287a1f212ad85db67fb Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Tue, 18 Aug 2020 06:37:47 +0200 Subject: [PATCH] valabind: rebuild for vala-0.48 --- srcpkgs/valabind/patches/vala-048.patch | 44 +++++++++++++++++++++++++ srcpkgs/valabind/template | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/valabind/patches/vala-048.patch diff --git a/srcpkgs/valabind/patches/vala-048.patch b/srcpkgs/valabind/patches/vala-048.patch new file mode 100644 index 00000000000..ffe2e087007 --- /dev/null +++ b/srcpkgs/valabind/patches/vala-048.patch @@ -0,0 +1,44 @@ +From 9d4fb181e24346a8c5d570290fa9892ce10c8c3b Mon Sep 17 00:00:00 2001 +From: Rico Tzschichholz +Date: Thu, 6 Feb 2020 09:45:17 +0100 +Subject: [PATCH] Fix build with Vala 0.48 + +--- + gowriter.vala | 4 ++++ + nodeffiwriter.vala | 5 +++++ + 2 files changed, 9 insertions(+) + +diff --git a/gowriter.vala b/gowriter.vala +index 56d9fbe..0fb09a6 100644 +--- gowriter.vala ++++ 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 +--- nodeffiwriter.vala ++++ 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()+"."; + } diff --git a/srcpkgs/valabind/template b/srcpkgs/valabind/template index 10ebb16fb3f..f6f931c3033 100644 --- a/srcpkgs/valabind/template +++ b/srcpkgs/valabind/template @@ -1,7 +1,7 @@ # Template file for 'valabind' pkgname=valabind version=1.7.1 -revision=4 +revision=5 build_style=meson hostmakedepends="pkg-config vala-devel git" makedepends="vala-devel glib-devel"