[zeitgeist/f20] Add a patch from upstream to fix crashes with vala 0.24
Christopher Meng
cicku at fedoraproject.org
Mon Aug 18 09:21:31 UTC 2014
commit 91bf8e987f4eb6752e1d136af379abcf57326aef
Author: Christopher Meng <i at cicku.me>
Date: Mon Aug 18 17:20:48 2014 +0800
Add a patch from upstream to fix crashes with vala 0.24
...-Fix-array-length-to-work-with-string.joi.patch | 29 ++++++++++++++++++++
zeitgeist.spec | 9 ++++--
2 files changed, 35 insertions(+), 3 deletions(-)
---
diff --git a/0001-WhereClause-Fix-array-length-to-work-with-string.joi.patch b/0001-WhereClause-Fix-array-length-to-work-with-string.joi.patch
new file mode 100644
index 0000000..830df89
--- /dev/null
+++ b/0001-WhereClause-Fix-array-length-to-work-with-string.joi.patch
@@ -0,0 +1,29 @@
+From 201bd67de450320520a12e2b0c465c8eb6818bd2 Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz at ubuntu.com>
+Date: Mon, 17 Mar 2014 20:57:49 +0100
+Subject: [PATCH] WhereClause: Fix array-length to work with string.joinv of
+ vala-0.24
+
+---
+ libzeitgeist/where-clause.vala | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libzeitgeist/where-clause.vala b/libzeitgeist/where-clause.vala
+index a830599..d981914 100644
+--- a/libzeitgeist/where-clause.vala
++++ b/libzeitgeist/where-clause.vala
+@@ -211,7 +211,11 @@ namespace Zeitgeist
+ */
+ private T[] generic_array_to_unowned_array<T> (GenericArray<T> gptrarr)
+ {
++#if VALA_0_24
++ long[] pointers = new long[gptrarr.length];
++#else
+ long[] pointers = new long[gptrarr.length + 1];
++#endif
+ Memory.copy(pointers, ((PtrArray *) gptrarr)->pdata,
+ (gptrarr.length) * sizeof (void *));
+ return (T[]) pointers;
+--
+2.0.0
+
diff --git a/zeitgeist.spec b/zeitgeist.spec
index 65e9df8..6ca6951 100644
--- a/zeitgeist.spec
+++ b/zeitgeist.spec
@@ -1,7 +1,7 @@
Summary: Framework providing Desktop activity awareness
Name: zeitgeist
Version: 0.9.14
-Release: 3%{?dist}
+Release: 4%{?dist}
# most of the source code is LGPLv2+, except:
# datahub/ is LGPLv3+
@@ -13,7 +13,7 @@ Release: 3%{?dist}
License: LGPLv2+ and LGPLv3+ and GPLv2+
URL: https://launchpad.net/zeitgeist
Source0: http://launchpad.net/%{name}/0.9/%{version}/+download/%{name}-%{version}.tar.xz
-
+Patch0: 0001-WhereClause-Fix-array-length-to-work-with-string.joi.patch
BuildRequires: dbus-devel
BuildRequires: gettext
BuildRequires: glib2-devel
@@ -63,7 +63,7 @@ developing applications that use %{name}.
%prep
%setup -q
-
+%patch0 -p1
## nuke unwanted rpaths, see also
## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
@@ -116,6 +116,9 @@ rm -rf %{buildroot}%{_datadir}/zeitgeist/doc
%{_datadir}/vala/vapi/zeitgeist-datamodel-2.0.vapi
%changelog
+* Mon Aug 18 2014 Christopher Meng <rpm at cicku.me> - 0.9.14-4
+- Cherry-pick commit to fix SQL errors when built with vala-0.24, Fix BZ#1130769
+
* Tue Aug 12 2014 Christopher Meng <rpm at cicku.me> - 0.9.14-3
- Mark xdg autostart file as noreplace for better UX, Fix BZ#863222
More information about the scm-commits
mailing list