Package: barry
Version: 0.18.5-1
Severity: important
Tags: patch sid jessie
User: freewx-ma...@lists.alioth.debian.org
Usertags: wx3.0
Control: block 748169 by -1

Dear maintainer,

We're aiming to migrate the archive to using wxwidgets3.0 instead of
wxwidgets2.8, and intend to drop wxwidgets2.8 before jessie is released.

I've tried to rebuild barry with wxwidgets3.0, and just updating the
build-dependencies isn't enough - some changes are needed to the
upstream source.  I fixed a few, but hit this - I'm not confident I
know what's going on with this code:

bsyncjail.cc: In member function 'virtual void 
BarrySyncJail::HandleConflict(OpenSync::SyncConflict&)':
bsyncjail.cc:221:59: error: invalid conversion from 'const void*' to 'wxChar* 
{aka wchar_t*}' [-fpermissive]
  buf = m_conflict_con->Request(CONFLICT_ITEM_ANSWER, &size);

I've attached a patch with the fixes I made to get this far, which I
hope will be of use.  You may also find wx upstream's overview of
changes since wx2.8 useful:

http://docs.wxwidgets.org/3.0/overview_changes_since28.html

One particular thing to be aware of is that wx3.0 turns on "WXDEBUG"
mode by default, and as a result at run-time some applications throw up
a lot of assertion failed dialogs due to using the wx API in invalid
ways.  If you compile your package with -DNDEBUG then such assertions
aren't checked, and the same fallbacks which were quietly used in wx2.8
are used instead.

If you hit any problems with getting things working with wxwidgets3.0
which you can't overcome, let me know and I'll try to help.

Cheers,
    Olly
diff -Nru barry-0.18.5/debian/changelog barry-0.18.5/debian/changelog
--- barry-0.18.5/debian/changelog	2013-11-19 07:32:59.000000000 +1300
+++ barry-0.18.5/debian/changelog	2014-06-12 00:38:56.000000000 +1200
@@ -1,3 +1,10 @@
+barry (0.18.5-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update to build with wxWidgets 3.0 (new patch: wx3.0-compat.patch).
+
+ -- Olly Betts <o...@survex.com>  Thu, 12 Jun 2014 00:38:30 +1200
+
 barry (0.18.5-1) unstable; urgency=low
 
   * New upstream version 0.18.5
diff -Nru barry-0.18.5/debian/control barry-0.18.5/debian/control
--- barry-0.18.5/debian/control	2013-11-19 07:32:59.000000000 +1300
+++ barry-0.18.5/debian/control	2014-03-14 14:48:15.000000000 +1300
@@ -32,7 +32,7 @@
 Section: misc
 Priority: optional
 Maintainer: Chris Frey <cdf...@foursquare.net>
-Build-Depends: debhelper (>= 7.0.0), g++ (>= 4.1), cdbs, autoconf, autoconf-archive, automake, libtool, pkg-config, libusb-dev, libboost-serialization-dev, libxml++2.6-dev, libfuse-dev (>= 2.5), zlib1g-dev, libtar-dev, libglibmm-2.4-dev, libgtkmm-2.4-dev, libglademm-2.4-dev, autopoint | gettext (<< 0.18), libgcal-dev, wx-common, libwxgtk2.8-dev, libsdl-dev, php5-cli
+Build-Depends: debhelper (>= 7.0.0), g++ (>= 4.1), cdbs, autoconf, autoconf-archive, automake, libtool, pkg-config, libusb-dev, libboost-serialization-dev, libxml++2.6-dev, libfuse-dev (>= 2.5), zlib1g-dev, libtar-dev, libglibmm-2.4-dev, libgtkmm-2.4-dev, libglademm-2.4-dev, autopoint | gettext (<< 0.18), libgcal-dev, wx-common, libwxgtk3.0-dev, libsdl-dev, php5-cli
 Standards-Version: 3.9.4
 Homepage: http://netdirect.ca/barry
 Vcs-Git: git://repo.or.cz/barry.git -b v0.18.x
diff -Nru barry-0.18.5/debian/patches/series barry-0.18.5/debian/patches/series
--- barry-0.18.5/debian/patches/series	1970-01-01 12:00:00.000000000 +1200
+++ barry-0.18.5/debian/patches/series	2014-03-14 14:59:07.000000000 +1300
@@ -0,0 +1 @@
+wx3.0-compat.patch
diff -Nru barry-0.18.5/debian/patches/wx3.0-compat.patch barry-0.18.5/debian/patches/wx3.0-compat.patch
--- barry-0.18.5/debian/patches/wx3.0-compat.patch	1970-01-01 12:00:00.000000000 +1200
+++ barry-0.18.5/debian/patches/wx3.0-compat.patch	2014-06-12 01:13:55.000000000 +1200
@@ -0,0 +1,37 @@
+Description: Fix to build with wxWidgets 3.0
+ Should be compatible with wx2.8 too.
+Author: Olly Betts <o...@survex.com>
+Last-Update: 2013-03-14
+
+--- a/desktop/src/Mode.h
++++ b/desktop/src/Mode.h
+@@ -23,6 +23,7 @@
+ #define __BARRYDESKTOP_MODE_H__
+ 
+ #include <wx/wx.h>
++#include <wx/listctrl.h>
+ 
+ class Mode
+ {
+--- a/desktop/src/bsyncjail.cc
++++ b/desktop/src/bsyncjail.cc
+@@ -177,7 +177,7 @@
+ void BarrySyncJail::HandleConflict(OpenSync::SyncConflict &conflict)
+ {
+ 	OpenSync::SyncConflict::iterator i;
+-	int size = 0;
++	size_t size = 0;
+ 	wxChar *buf = 0;
+ 
+ 	// start with a new sequence ID
+--- a/desktop/src/MigrateDlg.cc
++++ b/desktop/src/MigrateDlg.cc
+@@ -81,7 +81,7 @@ bool EventDesktopConnector::PasswordProm
+ 	wxCommandEvent event(MET_PROMPT_PASSWORD, wxID_ANY);
+ 	event.SetEventObject(m_dlg);
+ 	event.SetInt(bp.remaining_tries());
+-	m_dlg->AddPendingEvent(event);
++	m_dlg->GetEventHandler()->ProcessEvent(event);
+ 	m_dlg->WaitForEvent();
+ 
+ 	password_result = m_dlg->GetPassword().utf8_str();

Reply via email to