[packages/midori] - up to 0.5.11 - fix vala incompatibilities - still segfaults on startup

baggins baggins at pld-linux.org
Sat Apr 15 10:34:34 CEST 2017


commit 836ade20ee9f0001ca944c38e272ed5d7e81f642
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Apr 15 10:34:04 2017 +0200

    - up to 0.5.11
    - fix vala incompatibilities
    - still segfaults on startup

 midori.spec     | 21 ++++++++++----------
 vala-0.35.patch | 44 ++++++++++++++++++++++++++++++++++++++++++
 vala-0.36.patch | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 115 insertions(+), 10 deletions(-)
---
diff --git a/midori.spec b/midori.spec
index 50a0d8c..4cc74eb 100644
--- a/midori.spec
+++ b/midori.spec
@@ -1,19 +1,19 @@
-# TODO
-# - there's work in progress --enable-webkit2 option enabling WebKit2/ GTK+3
-%bcond_with	gtk3
+%bcond_without	gtk3
 Summary:	Web browser based on GTK+ WebCore
 Summary(hu.UTF-8):	GTK+ WebCore alapú web-böngésző
 Summary(pl.UTF-8):	Przeglądarka WWW oparta na GTK+ WebCore
 Name:		midori
-Version:	0.5.6
-Release:	1
+Version:	0.5.11
+Release:	0.1
 License:	LGPL v2+
 Group:		X11/Applications/Networking
 Source0:	http://midori-browser.org/downloads/%{name}_%{version}_all_.tar.bz2
-# Source0-md5:	62ee86eb103b74efe71d40e343120a3c
+# Source0-md5:	fcc03ef759fce4fe9f2446d9da4a065e
 Patch0:		homepage.patch
 Patch1:		gtk-doc-path.patch
 Patch2:		soversion.patch
+Patch3:		vala-0.35.patch
+Patch4:		vala-0.36.patch
 URL:		http://midori-browser.org/
 BuildRequires:	cmake >= 2.6.0
 BuildRequires:	gcr-devel
@@ -40,7 +40,7 @@ BuildRequires:	python-modules
 BuildRequires:	rpmbuild(macros) >= 1.311
 BuildRequires:	sqlite3-devel >= 3.6.19
 BuildRequires:	vala >= 0.14
-BuildRequires:	vala-zeitgeist1
+BuildRequires:	vala-zeitgeist
 BuildRequires:	xorg-lib-libX11-devel
 Requires(post,postun):	desktop-file-utils
 Requires(post,postun):	gtk-update-icon-cache
@@ -85,6 +85,8 @@ Dokumentacja API midori.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p0
+%patch4 -p1
 
 %build
 install -d build
@@ -101,8 +103,7 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
-%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{nap,no}
 
 %find_lang %{name}
 
@@ -133,9 +134,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_iconsdir}/hicolor/*/*/*.png
 %{_iconsdir}/hicolor/*/*/*.svg
 %{_datadir}/%{name}
+%{_datadir}/appdata/midori.appdata.xml
 
 %files apidocs
 %defattr(644,root,root,755)
 %{_gtkdocdir}/katze
 %{_gtkdocdir}/midori
-
diff --git a/vala-0.35.patch b/vala-0.35.patch
new file mode 100644
index 0000000..23cb7f8
--- /dev/null
+++ b/vala-0.35.patch
@@ -0,0 +1,44 @@
+=== modified file 'extensions/transfers.vala'
+--- extensions/transfers.vala	2016-04-02 08:15:11 +0000
++++ extensions/transfers.vala	2017-02-15 18:50:47 +0000
+@@ -455,7 +455,7 @@
+                 if (notifications.length () == 1)
+                     msg = _("The file '<b>%s</b>' has been downloaded.").printf (filename);
+                 else
+-                    msg = _("'<b>%s</b>' and %d other files have been downloaded.").printf (filename, notifications.length ());
++                    msg = _("'<b>%s</b>' and %d other files have been downloaded.").printf (filename, (int) notifications.length ());
+                 get_app ().send_notification (_("Transfer completed"), msg);
+                 notifications = new GLib.List<string> ();
+             }
+
+=== modified file 'midori/midori-notebook.vala'
+--- midori/midori-notebook.vala	2016-04-02 08:15:11 +0000
++++ midori/midori-notebook.vala	2017-02-15 18:50:47 +0000
+@@ -10,7 +10,7 @@
+ */
+ 
+ namespace Midori {
+-    protected class Tally : Gtk.EventBox {
++    internal class Tally : Gtk.EventBox {
+         public Midori.Tab tab { get; set; }
+         Gtk.Spinner spinner;
+         public Gtk.Label label;
+@@ -22,7 +22,7 @@
+         public bool close_button_left { get; set; default = false; }
+         public bool close_button_visible { get; set; default = false; }
+ 
+-        protected Tally (Midori.Tab tab) {
++        internal Tally (Midori.Tab tab) {
+             this.tab = tab;
+             box = new Gtk.HBox (false, 1);
+             add (box);
+@@ -175,7 +175,7 @@
+         int last_tab_size = 0;
+ 
+ #if !HAVE_GTK3
+-        static const string style_fixup = """
++        const string style_fixup = """
+             style "midori-close-button-style"
+             {
+             GtkWidget::focus-padding = 0
+
diff --git a/vala-0.36.patch b/vala-0.36.patch
new file mode 100644
index 0000000..8979263
--- /dev/null
+++ b/vala-0.36.patch
@@ -0,0 +1,60 @@
+diff -ur midori-0.5.11/extensions/adblock/widgets.vala midori-0.5.11.vala/extensions/adblock/widgets.vala
+--- midori-0.5.11/extensions/adblock/widgets.vala	2015-08-30 13:56:26.000000000 +0200
++++ midori-0.5.11.vala/extensions/adblock/widgets.vala	2017-04-15 10:29:03.324815886 +0200
+@@ -227,7 +227,7 @@
+                             liststore.get (iter, 0, out sub);
+                             if (sub.mutable) {
+                                 config.remove (sub);
+-                                liststore.remove (iter);
++                                liststore.remove (ref iter);
+                                 return true;
+                             }
+                         }
+diff -ur midori-0.5.11/extensions/apps.vala midori-0.5.11.vala/extensions/apps.vala
+--- midori-0.5.11/extensions/apps.vala	2015-08-30 13:56:26.000000000 +0200
++++ midori-0.5.11.vala/extensions/apps.vala	2017-04-15 10:29:09.508222087 +0200
+@@ -265,7 +265,7 @@
+                             store.get (iter, 0, out launcher);
+                             try {
+                                 launcher.file.trash (null);
+-                                store.remove (iter);
++                                store.remove (ref iter);
+ 
+                                 string filename = Midori.Download.clean_filename (launcher.name);
+ #if HAVE_WIN32
+diff -ur midori-0.5.11/extensions/history-list.vala midori-0.5.11.vala/extensions/history-list.vala
+--- midori-0.5.11/extensions/history-list.vala	2015-08-30 13:56:26.000000000 +0200
++++ midori-0.5.11.vala/extensions/history-list.vala	2017-04-15 10:28:23.157677358 +0200
+@@ -223,7 +223,7 @@
+                     FixMe: the retrun value of `Gtk.ListStore.remove` should be checked
+                     Note:  in some cases the return value of `Gtk.ListStore.remove` is wrong
+                 */
+-                model.remove (iter);
++                model.remove (ref iter);
+                 this.browser.close_tab (view);
+                 if (length > 2)
+                     this.resize_treeview ();
+diff -ur midori-0.5.11/extensions/notes.vala midori-0.5.11.vala/extensions/notes.vala
+--- midori-0.5.11/extensions/notes.vala	2015-08-30 13:56:26.000000000 +0200
++++ midori-0.5.11.vala/extensions/notes.vala	2017-04-15 10:27:46.273913128 +0200
+@@ -116,7 +116,7 @@
+                     if (current_note == note) {
+                         current_note = null;
+                     }
+-                    notes_list_store.remove (iter);
++                    notes_list_store.remove (ref iter);
+                     break;
+                 }
+             } while (notes_list_store.iter_next (ref iter));
+diff -ur midori-0.5.11/extensions/transfers.vala midori-0.5.11.vala/extensions/transfers.vala
+--- midori-0.5.11/extensions/transfers.vala	2017-04-15 10:32:21.867181783 +0200
++++ midori-0.5.11.vala/extensions/transfers.vala	2017-04-15 10:28:56.028063308 +0200
+@@ -275,7 +275,7 @@
+                     Transfer found;
+                     store.get (iter, 0, out found);
+                     if (transfer == found) {
+-                        store.remove (iter);
++                        store.remove (ref iter);
+                         break;
+                     }
+                 } while (store.iter_next (ref iter));
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/midori.git/commitdiff/836ade20ee9f0001ca944c38e272ed5d7e81f642



More information about the pld-cvs-commit mailing list