Bug#878111: sparkleshare: Switch to webkit2

2017-10-09 Thread Jeremy Bicha
I tweaked the changelog entry in the second patch.

Thanks,
Jeremy Bicha
From dfd1c1919d2b2f648234c6e766fbf46585317224 Mon Sep 17 00:00:00 2001
From: Jeremy Bicha 
Date: Mon, 9 Oct 2017 19:28:21 -0400
Subject: [PATCH 2/2] releasing package sparkleshare version 1.5.0-2.1

---
 debian/changelog | 12 
 1 file changed, 12 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6bf13e5..413a11d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+sparkleshare (1.5.0-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add 06-move_to_webkit2.patch:
+- Cherry-picked patch borrowed from Fedora 27 to use the supported
+  webkit2gtk library (Closes: #878111)
+  * debian/control:
+- Build-depend on libwebkit2-sharp-4.0-cil-dev instead of
+  libwebkitgtk3.0-cil-dev
+
+ -- Jeremy Bicha   Mon, 09 Oct 2017 18:47:08 -0400
+
 sparkleshare (1.5.0-2) unstable; urgency=medium
 
   * Fetch updates from the upstream's master branch.
-- 
2.14.1



Bug#878111: sparkleshare: Switch to webkit2

2017-10-09 Thread Jeremy Bicha

From 4dd627bc9f4539796f1a8b162f0578efd16af67e Mon Sep 17 00:00:00 2001
From: Jeremy Bicha 
Date: Mon, 9 Oct 2017 19:25:08 -0400
Subject: [PATCH 1/2] Build with webkit2-sharp

Closes: #878111
---
 debian/control  |   2 +-
 debian/patches/06-move_to_webkit2.patch | 101 
 debian/patches/series   |   1 +
 3 files changed, 103 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/06-move_to_webkit2.patch

diff --git a/debian/control b/debian/control
index 3bc56e4..4b2c892 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Build-Depends-Indep: dh-autoreconf,
  libappindicator3-0.1-cil-dev,
  libgtk3.0-cil-dev,
  libnotify3.0-cil-dev,
- libwebkitgtk3.0-cil-dev,
+ libwebkit2-sharp-4.0-cil-dev,
  mono-devel (>= 3.2.8),
  python-nautilus
 Standards-Version: 3.9.6
diff --git a/debian/patches/06-move_to_webkit2.patch b/debian/patches/06-move_to_webkit2.patch
new file mode 100644
index 000..3bec00e
--- /dev/null
+++ b/debian/patches/06-move_to_webkit2.patch
@@ -0,0 +1,101 @@
+Description: Build with webkit2
+Source: https://src.fedoraproject.org/rpms/sparkleshare/blob/master/f/SparkleShare-1.5.0-move_to_webkit2.patch
+diff -up SparkleShare-1.5.0/build/build.environment.mk.move_to_webkit2 SparkleShare-1.5.0/build/build.environment.mk
+--- SparkleShare-1.5.0/build/build.environment.mk.move_to_webkit2	2015-12-22 15:21:47.0 +0100
 SparkleShare-1.5.0/build/build.environment.mk	2017-10-07 15:48:37.719880936 +0200
+@@ -12,7 +12,7 @@ LINK_MONO_POSIX = -r:Mono.Posix
+ LINK_GLIB = $(GLIBSHARP_LIBS)
+ LINK_GTK = $(GTKSHARP_LIBS)
+ LINK_GNOME = $(GNOME_SHARP_LIBS)
+-LINK_WEBKIT = $(WEBKITGTK_SHARP_LIBS)
++LINK_WEBKIT = $(WEBKIT2_SHARP_LIBS)
+ LINK_APP_INDICATOR = $(APP_INDICATOR_LIBS)
+ 
+ REF_SPARKLELIB = $(LINK_SYSTEM) $(LINK_MONO_POSIX)
+diff -up SparkleShare-1.5.0/configure.ac.move_to_webkit2 SparkleShare-1.5.0/configure.ac
+--- SparkleShare-1.5.0/configure.ac.move_to_webkit2	2015-12-22 15:21:47.0 +0100
 SparkleShare-1.5.0/configure.ac	2017-10-07 16:08:53.666097084 +0200
+@@ -66,12 +66,12 @@ if test "$OSNAME" = "Linux" ; then
+ 
+ 	PKG_CHECK_MODULES(NOTIFY_SHARP, notify-sharp-3.0)
+ 
+-	dnl check for webkitgtk-sharp
+-	PKG_CHECK_MODULES(WEBKITGTK_SHARP, webkitgtk-sharp-3.0, have_webkitgtk_sharp=yes, have_webkitgtk_sharp=no)
+-	if test "x$have_webkitgtk_sharp" = "xno" ; then
+-		AC_ERROR("webkitgtk-sharp is a required dependency: you need to install the appropriate devel package before you can compile")
++	dnl check for webkit2-sharp
++	PKG_CHECK_MODULES(WEBKIT2_SHARP, webkit2-sharp-4.0, have_webkit2_sharp=yes, have_webkit2_sharp=no)
++	if test "x$have_webkit2_sharp" = "xno" ; then
++		AC_ERROR("webkit2-sharp is a required dependency: you need to install the appropriate devel package before you can compile")
+ 	fi
+-	AC_SUBST(WEBKITGTK_SHARP_LIBS)
++	AC_SUBST(WEBKIT2_SHARP_LIBS)
+ 
+ 	APPINDICATOR_REQUIRED=0.1
+ 
+diff -up SparkleShare-1.5.0/SparkleShare/Linux/SparkleEventLog.cs.move_to_webkit2 SparkleShare-1.5.0/SparkleShare/Linux/SparkleEventLog.cs
+--- SparkleShare-1.5.0/SparkleShare/Linux/SparkleEventLog.cs.move_to_webkit2	2015-12-22 15:21:47.0 +0100
 SparkleShare-1.5.0/SparkleShare/Linux/SparkleEventLog.cs	2017-10-07 16:21:12.318399060 +0200
+@@ -18,7 +18,7 @@
+ using System;
+ 
+ using Gtk;
+-using WebKit;
++using WebKit2;
+ 
+ namespace SparkleShare {
+ 
+@@ -71,7 +71,7 @@ namespace SparkleShare {
+ 
+ this.web_view = new WebView () { Editable = false };
+ 			this.web_view.Settings.EnablePlugins = false;
+-this.web_view.NavigationRequested += WebViewNavigationRequested;
++//this.web_view.NavigationRequested += WebViewNavigationRequested;
+ 
+ this.scrolled_window.Add (this.web_view);
+ 
+@@ -263,12 +264,22 @@ namespace SparkleShare {
+ html = html.Replace ("", "file://" + new string [] {icons_path, "document-moved.png"}.Combine ());
+ 
+ this.spinner.Stop ();
+-this.scrolled_window.Remove (this.web_view);
++this.scrolled_window.Remove (this.scrolled_window.Child);
+ this.web_view.Dispose ();
+ 
+ this.web_view = new WebView () { Editable = false };
+-this.web_view.LoadString (html, "text/html", "UTF-8", "file://");
+-this.web_view.NavigationRequested += WebViewNavigationRequested;
++this.web_view.LoadHtml (html, "file:///");
++ 
++
++
++web_view.DecidePolicy += delegate(object o, DecidePolicyArgs args) {
++Console.WriteLine (" " + (args.Decision as NavigationPolicyDecision).NavigationAction.Request.Uri);
++  //  if (args.Decision. == PolicyDecisionType.NavigationAction) {
++   

Bug#878111: sparkleshare: Switch to webkit2

2017-10-09 Thread Jeremy Bicha
Source: sparkleshare
Version: 1.5.0-2
Severity: serious
Tags: patch pending

sparkleshare was removed from Debian Testing a month ago because it
depends on webkitgtk-sharp3 which uses the unmaintained webkitgtk
library that is being removed from Debian.

webkit-sharp2 has recently been uploaded to Debian as a replacement
for webkitgtk-sharp3.

I am uploading a NMU now that is numbered as sparkleshare 1.5.0-2.1
which uses a patch applied in Fedora 27 (slightly modified to apply in
Debian) to build against the new library so that sparkleshare can
return to Debian Testing. I am uploading to DELAYED/7. Please let me
know if I should delay this fix any further.

I'll be attaching the patches in the follow-up to this bug.

Thanks,
Jeremy Bicha