Source: maitreya
Version: 7.0.5-1
Severity: important
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.

Since maitreya depends on wxsqlite3, which itself depends on wxwidgets,
you'll need to update for that too, and coordinate your upload of the
new version.

Currently packages of wxsqlite3 updated to use wxwidgets3 are in
experimental, so you can test build your updated package against this
to make sure you're ready.

I tried a build myself, and fixed some of the issues I hit - I've
attached a patch to get you started.  It looks like upstream has
done some work on wx2.9 support (the long-lived development series
which lead to 3.0), so you may want to talk to them about wx3 support.

You may find wx upstream's overview of changes since wx2.8 useful:

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

One of the most common reasons for packages failing to build seems to
be that wx3.0 drops compatibility with things which were deprecated in
wx2.8 (so for example you now must use wxFD_SAVE not wxSAVE).  Updating
these should remain compatible with wx2.8, so shouldn't block pushing
fixes upstream even if your upstream still cares about supporting wx2.8.

Another thing to be aware of is that wx3.0 turns on "WXDEBUG" mode by
default, and 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 packages working with wxwidgets3.0
which you can't overcome, let me know and I'll try to help.

Cheers,
    Olly
diff -Nru maitreya-7.0.5/debian/changelog maitreya-7.0.5/debian/changelog
--- maitreya-7.0.5/debian/changelog	2014-05-14 10:18:20.000000000 +1200
+++ maitreya-7.0.5/debian/changelog	2014-05-31 22:46:33.000000000 +1200
@@ -1,3 +1,11 @@
+maitreya (7.0.5-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Work on updating to use wxWidgets 3.0 (not yet complete)
+    New patch 0006-wx3.0-compat.patch.
+
+ -- Olly Betts <o...@survex.com>  Sat, 31 May 2014 17:24:06 +1200
+
 maitreya (7.0.5-1) unstable; urgency=medium
 
   * upgrade to release 7.0.5
diff -Nru maitreya-7.0.5/debian/control maitreya-7.0.5/debian/control
--- maitreya-7.0.5/debian/control	2014-05-14 10:18:20.000000000 +1200
+++ maitreya-7.0.5/debian/control	2014-05-31 17:22:50.000000000 +1200
@@ -3,7 +3,7 @@
 Priority: extra
 Maintainer: Paul Elliott <pelli...@blackpatchpanel.com>
 Homepage: http://www.saravali.de/
-Build-Depends: debhelper (>= 9), autotools-dev, libwxbase2.8-dev, libwxgtk2.8-dev, wx2.8-headers, wx2.8-i18n, libfontconfig1-dev, libswe-dev, dh-autoreconf, libwxsqlite3-2.8-dev ,libsqlite3-dev
+Build-Depends: debhelper (>= 9), autotools-dev, libwxbase3.0-dev, libfontconfig1-dev, libswe-dev, dh-autoreconf, libwxsqlite3-3.0-dev, libsqlite3-dev
 Vcs-Git: git://anonscm.debian.org/collab-maint/maitreya.git/
 Vcs-browser: http://anonscm.debian.org/gitweb/?p=collab-maint/maitreya.git
 Standards-Version: 3.9.5
diff -Nru maitreya-7.0.5/debian/patches/0006-wx3.0-compat.patch maitreya-7.0.5/debian/patches/0006-wx3.0-compat.patch
--- maitreya-7.0.5/debian/patches/0006-wx3.0-compat.patch	1970-01-01 12:00:00.000000000 +1200
+++ maitreya-7.0.5/debian/patches/0006-wx3.0-compat.patch	2014-05-31 19:06:57.000000000 +1200
@@ -0,0 +1,79 @@
+Description: Update to build with wxwidgets3.0
+ Incomplete...
+Author: Olly Betts <o...@survex.com>
+Last-Update: 2014-05-31
+
+--- maitreya-7.0.5.orig/src/base/FontConfig.cpp
++++ maitreya-7.0.5/src/base/FontConfig.cpp
+@@ -140,7 +140,7 @@ FontConfig::FontConfig()
+ 	for ( int i = 0; i < MAX_FONTS; i++ )
+ 	{
+ 	fbFont[i] = *wxTheFontList->FindOrCreateFont( defaultfd[i].pointSize, defaultfd[i].family,
+-		defaultfd[i].style, defaultfd[i].weight, defaultfd[i].facename );
++		defaultfd[i].style, defaultfd[i].weight, false, defaultfd[i].facename );
+ 	}
+ }
+ 
+--- maitreya-7.0.5.orig/src/base/WesternChartConfig.cpp
++++ maitreya-7.0.5/src/base/WesternChartConfig.cpp
+@@ -159,7 +159,7 @@ void WesternChartConfigLoader::readSpeci
+ 
+ 	while ( cur )
+ 	{
+-		key = cur->GetName().Trim();
++		key = cur->GetName().Strip();
+ 		if ( ! key.CmpNoCase( XML_NODE_USE_TEXT_COLORS )) XMLNODE2BOOLEAN( cur->GetNodeContent(), wconf->useTextColors )
+ 
+ 		else if ( ! key.CmpNoCase( XML_NODE_WIDGET_BACKGROUND )) parseWidgetBackground( cur, wconf->widgetBackground );
+--- maitreya-7.0.5.orig/src/dialogs/ConfigDialog.cpp
++++ maitreya-7.0.5/src/dialogs/ConfigDialog.cpp
+@@ -170,7 +170,7 @@ ConfigDialog::ConfigDialog(wxWindow* par
+ 	SetSize( config->xConfigDialog, config->yConfigDialog );
+ 
+ 	Connect( wxID_APPLY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog::OnApply ));
+-#ifdef _WX29
++#if 1
+ 	Connect( CONFIG_NOTEBOOK, wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, wxBookCtrlEventHandler( ConfigDialog::OnTreebook ));
+ #else
+ 	Connect( CONFIG_NOTEBOOK, wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, wxTreebookEventHandler( ConfigDialog::OnTreebook ));
+@@ -252,7 +252,7 @@ void ConfigDialog::OnTreebook( wxBookCtr
+ void ConfigDialog::OnTreebook( wxTreebookEvent &event )
+ #endif
+ */
+-void ConfigDialog::OnTreebook( wxTreebookEvent &event )
++void ConfigDialog::OnTreebook( wxBookCtrlEvent &event )
+ {
+ 	showPanel( event.GetSelection());
+ 	if ( event.GetOldSelection() != -1 && configpanel[event.GetOldSelection()] != 0 )
+--- maitreya-7.0.5.orig/src/dialogs/ConfigDialog.h
++++ maitreya-7.0.5/src/dialogs/ConfigDialog.h
+@@ -111,7 +111,7 @@ protected:
+ 
+ 	wxTreebook* notebook;
+ 
+-#ifdef _WX29
++#if 1
+ 	void OnTreebook( class wxBookCtrlEvent& );
+ #else
+ 	void OnTreebook( class wxTreebookEvent& );
+--- maitreya-7.0.5.orig/src/dialogs/guivalidators.cpp
++++ maitreya-7.0.5/src/dialogs/guivalidators.cpp
+@@ -32,6 +32,7 @@
+ 
+ #include <wx/filename.h>
+ #include <wx/settings.h>
++#include <wx/textctrl.h>
+ 
+ extern Config *config;
+ 
+--- maitreya-7.0.5.orig/src/jyotish/textclient.cpp
++++ maitreya-7.0.5/src/jyotish/textclient.cpp
+@@ -49,7 +49,7 @@
+ Config *config;
+ 
+ // wx2.9 workaround
+-#ifdef  _WX29
++#if 1
+ #define wxT1( x ) x
+ #define wxEmptyString1 ""
+ #else
diff -Nru maitreya-7.0.5/debian/patches/series maitreya-7.0.5/debian/patches/series
--- maitreya-7.0.5/debian/patches/series	2014-05-14 10:18:20.000000000 +1200
+++ maitreya-7.0.5/debian/patches/series	2014-05-31 22:44:55.000000000 +1200
@@ -3,3 +3,4 @@
 0003-In-the-Maitreya6.desktop-file-remove.patch
 0004-Add-keywords-to-.desktop-file.patch
 0005-replace-builtin-static-wxsqlite3-sqlite3-with-extern.patch
+0006-wx3.0-compat.patch

Reply via email to