Update to 0.37.90

This commit is contained in:
Kalev Lember 2017-08-21 20:02:24 +02:00
parent d5a55e151b
commit f5aac331de
5 changed files with 7 additions and 94 deletions

1
.gitignore vendored
View File

@ -41,3 +41,4 @@
/vala-0.36.3.tar.xz
/vala-0.36.4.tar.xz
/vala-0.37.2.tar.xz
/vala-0.37.90.tar.xz

View File

@ -1,60 +0,0 @@
From b3e178b00ea77e2734f81262263e4ea1aab1e362 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Thu, 1 Dec 2016 18:09:48 +0100
Subject: [PATCH] codegen: Add function-prototypes for all register-type calls
Make sure to match the list of called register-type calls and include
implemented classes and interfaces.
https://bugzilla.gnome.org/show_bug.cgi?id=775446
---
codegen/valaccodemethodmodule.vala | 6 ++++++
codegen/valatyperegisterfunction.vala | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index fc5ffc7..0f051f5 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -267,6 +267,12 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
}
}
+ // Add function prototypes for required register-type-calls which are likely external
+ var register_func = new CCodeFunction ("%s_register_type".printf (get_ccode_lower_case_name (type_symbol, null)), "GType");
+ register_func.add_parameter (new CCodeParameter ("module", "GTypeModule *"));
+ register_func.is_declaration = true;
+ cfile.add_function_declaration (register_func);
+
var register_call = new CCodeFunctionCall (new CCodeIdentifier ("%s_register_type".printf (get_ccode_lower_case_name (type_symbol, null))));
register_call.add_argument (new CCodeIdentifier (module_init_param_name));
ccode.add_expression (register_call);
diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala
index b7c18f8..79ae1b3 100644
--- a/codegen/valatyperegisterfunction.vala
+++ b/codegen/valatyperegisterfunction.vala
@@ -80,6 +80,10 @@ public abstract class Vala.TypeRegisterFunction {
// avoid C warning as this function is not always used
fun.attributes += " G_GNUC_UNUSED";
}
+
+ fun.is_declaration = true;
+ declaration_fragment.append (fun.copy ());
+ fun.is_declaration = false;
} else {
fun = new CCodeFunction ("%s_register_type".printf (CCodeBaseModule.get_ccode_lower_case_name (get_type_declaration ())), "GType");
fun.add_parameter (new CCodeParameter ("module", "GTypeModule *"));
@@ -252,10 +256,6 @@ public abstract class Vala.TypeRegisterFunction {
type_block.add_statement (new CCodeReturnStatement (new CCodeIdentifier (type_id_name)));
}
- fun.is_declaration = true;
- declaration_fragment.append (fun.copy ());
- fun.is_declaration = false;
-
fun.block = type_block;
definition_fragment.append (fun);
--
2.9.3

View File

@ -1 +1 @@
SHA512 (vala-0.37.2.tar.xz) = 6167accc943b8ab3a77465bcaf2c51005eca1bfbd45899fb53aa4ef99184aa1393047140548e4f71c499f57b9b9d5673170150c098a58c553effcb24bee81222
SHA512 (vala-0.37.90.tar.xz) = 8bbfd17e95a40088a6f793415f3a0974ec6fa5b543011e9742b5aa5de1e312d0f52a8da33738fc07221f234621de755903456696051f69fdd9fdb2746be0b7df

View File

@ -2,7 +2,7 @@
%global priority 90
Name: vala
Version: 0.37.2
Version: 0.37.90
Release: 1%{?dist}
Summary: A modern programming language for GNOME
@ -11,9 +11,6 @@ License: LGPLv2+ and BSD
URL: https://wiki.gnome.org/Projects/Vala
Source0: https://download.gnome.org/sources/vala/0.37/vala-%{version}.tar.xz
# https://bugzilla.gnome.org/show_bug.cgi?id=786505
Patch0: valadoc-tests.patch
BuildRequires: flex
BuildRequires: bison
BuildRequires: glib2-devel
@ -21,7 +18,7 @@ BuildRequires: gobject-introspection-devel
BuildRequires: graphviz-devel
BuildRequires: libxslt
# only if Vala source files are patched
BuildRequires: vala
#BuildRequires: vala
# for tests
BuildRequires: dbus-x11
@ -138,9 +135,6 @@ done
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vala/vapi
find %{buildroot} -name '*.la' -exec rm -f {} ';'
# Copy over previous libvala for temporary binary compat
cp -a %{_libdir}/libvala-0.36.so.* $RPM_BUILD_ROOT%{_libdir}/
%check
make check
@ -187,7 +181,6 @@ done
%{_bindir}/vapigen-%{api_ver}
%{_libdir}/pkgconfig/vapigen*.pc
%{_libdir}/vala-%{api_ver}/
%{_libdir}/libvala-0.36.so.*
%{_libdir}/libvala-%{api_ver}.so.*
%{_datadir}/aclocal/vala.m4
%{_datadir}/aclocal/vapigen.m4
@ -224,6 +217,9 @@ done
%changelog
* Mon Aug 21 2017 Kalev Lember <klember@redhat.com> - 0.37.90-1
- Update to 0.37.90
* Thu Aug 10 2017 Kalev Lember <klember@redhat.com> - 0.37.2-1
- Update to 0.37.2

View File

@ -1,24 +0,0 @@
From b35e06350034af188705b9a89b686dc09264c245 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Sat, 19 Aug 2017 13:05:22 +0200
Subject: [PATCH] valadoc/tests: Add the source vapi directory to driver-test
https://bugzilla.gnome.org/show_bug.cgi?id=786505
---
valadoc/tests/drivers/generic-api-test.vala | 1 +
1 file changed, 1 insertion(+)
diff --git a/valadoc/tests/drivers/generic-api-test.vala b/valadoc/tests/drivers/generic-api-test.vala
index bf71bfe31..759120543 100644
--- a/valadoc/tests/drivers/generic-api-test.vala
+++ b/valadoc/tests/drivers/generic-api-test.vala
@@ -2720,6 +2720,7 @@ public static void test_driver () {
settings.with_deps = false;
settings.verbose = false;
settings.wiki_directory = null;
+ settings.vapi_directories = { Path.build_filename (TOP_SRC_DIR, "vapi") };
settings.pkg_name = "out";
settings.path = "out";
--
2.14.1