Thanks for the patch. Note that we've just released 0.13.18-1: https://packages.debian.org/sid/stimfit
It would be good to apply your patch upstream, but I was wondering how your build-depends line would affect packaging for older releases (wheezy and precise)? Is there a way to make this compatible across releases? On Thu, Aug 07, 2014 at 10:51:22AM +1200, Olly Betts wrote: > Package: stimfit > Version: 0.13.15-1 > Severity: important > Tags: patch > Tags: sid jessie > User: freewx-ma...@lists.alioth.debian.org > Usertags: wx3.0 wxpy3.0 > Control: block 748169 by -1 > Control: block 755757 by -1 > > We're aiming to migrate the archive to using wxwidgets3.0/wxpython3.0 > instead of wxwidgets2.8, and hope to drop wxwidgets2.8 before jessie > is released. > > Upstream, stimfit supports wx3.0, but it looks like there's a problem > with this support under wxGTK - when __WXGTK__ is defined, > src/stimfit/gui/app.cpp calls: > > wxMenuBar* menu_bar = CreateUnifiedMenuBar(); > > This defaults the doc parameter to NULL, and if wxCHECK_VERSION(2, 9, 0) > is true (which it is for wx >= 2.9.0) we then try to call a method on > doc, which segfaults: > > ((wxStfDoc*)doc)->SetFileMenu( file_menu ); > > I've added a simple fix for this, though it may not be the best way to > address this. But with the patch, I can run stimfit, and it starts up > OK and I can open a few dialogs. I don't have suitable data to actually > test much functionality though. > > I'm happy to NMU this change if you wish me to - just let me know. > > Cheers, > Olly > diff -Nru stimfit-0.13.15/debian/changelog stimfit-0.13.15/debian/changelog > --- stimfit-0.13.15/debian/changelog 2014-02-17 02:23:17.000000000 +1300 > +++ stimfit-0.13.15/debian/changelog 2014-08-07 09:42:21.000000000 +1200 > @@ -1,3 +1,10 @@ > +stimfit (0.13.15-1.1) unstable; urgency=medium > + > + * Non-maintainer upload. > + * Update to use wxWidgets 3.0 - new patch: wx3.0-compat.patch > + > + -- Olly Betts <o...@survex.com> Thu, 07 Aug 2014 09:42:05 +1200 > + > stimfit (0.13.15-1) unstable; urgency=low > > * Fix half duration limits bug > diff -Nru stimfit-0.13.15/debian/control stimfit-0.13.15/debian/control > --- stimfit-0.13.15/debian/control 2014-02-17 02:23:17.000000000 +1300 > +++ stimfit-0.13.15/debian/control 2014-08-07 09:14:27.000000000 +1200 > @@ -3,13 +3,13 @@ > Priority: optional > Maintainer: Christoph Schmidt-Hieber <chris...@gmx.de> > Uploaders: Yaroslav Halchenko <deb...@onerussian.com> > -Build-Depends: debhelper (>= 7), libboost-dev (>= 1.40.0), python-all-dev > (>= 2.6.6-3), python-numpy, libhdf5-dev, swig, python-wxgtk2.8 (>= 2.8.9), > libwxgtk2.8-dev (>= 2.8.9), libfftw3-dev, liblapack-dev, chrpath, help2man, > libbiosig-dev, libsuitesparse-dev, dh-autoreconf > +Build-Depends: debhelper (>= 7), libboost-dev (>= 1.40.0), python-all-dev > (>= 2.6.6-3), python-numpy, libhdf5-dev, swig, python-wxgtk3.0, > python-wxgtk3.0-dev, libwxgtk3.0-dev, libfftw3-dev, liblapack-dev, chrpath, > help2man, libbiosig-dev, libsuitesparse-dev, dh-autoreconf > Standards-Version: 3.9.4 > Homepage: http://www.stimfit.org > > Package: stimfit > Architecture: any > -Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, > libbiosig-dev, libsuitesparse-dev, python-wxgtk2.8 (>= 2.8.9), python-numpy, > python-matplotlib > +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, > libbiosig-dev, libsuitesparse-dev, python-wxgtk3.0, python-numpy, > python-matplotlib > Recommends: python-scipy > Description: Program for viewing and analyzing electrophysiological data > Stimfit is a free, fast and simple program for viewing and analyzing > diff -Nru stimfit-0.13.15/debian/patches/series > stimfit-0.13.15/debian/patches/series > --- stimfit-0.13.15/debian/patches/series 1970-01-01 12:00:00.000000000 > +1200 > +++ stimfit-0.13.15/debian/patches/series 2014-08-07 09:39:02.000000000 > +1200 > @@ -0,0 +1 @@ > +wx3.0-compat.patch > diff -Nru stimfit-0.13.15/debian/patches/wx3.0-compat.patch > stimfit-0.13.15/debian/patches/wx3.0-compat.patch > --- stimfit-0.13.15/debian/patches/wx3.0-compat.patch 1970-01-01 > 12:00:00.000000000 +1200 > +++ stimfit-0.13.15/debian/patches/wx3.0-compat.patch 2014-08-07 > 09:42:00.000000000 +1200 > @@ -0,0 +1,22 @@ > +Description: Fix build with wx3.0 under __WXGTK__ > + While stimfit has been ported to wx3.0, it seems this hasn't been tested > + under __WXGTK__ as there doc is always NULL in > wxStfApp::CreateUnifiedMenuBar > + but we try to call methods on it for wx >= 2.9.0. > + . > + I don't understand the reason for all the conditionalisation on __WXGTK__, > + __WXMSW__ etc, so this may not be the best fix, but it seems to work. > +Author: Olly Betts <o...@survex.com> > +Forwarded: no > +Last-Update: 2014-08-06 > + > +--- stimfit-0.13.15.orig/src/stimfit/gui/app.cpp > ++++ stimfit-0.13.15/src/stimfit/gui/app.cpp > +@@ -605,7 +605,7 @@ wxMenuBar *wxStfApp::CreateUnifiedMenuBa > + file_menu->AppendSeparator(); > + file_menu->Append(wxID_EXIT); > + > +-#if (wxCHECK_VERSION(2, 9, 0)) > ++#if !defined __WXGTK__ && (wxCHECK_VERSION(2, 9, 0)) > + ((wxStfDoc*)doc)->SetFileMenu( file_menu ); > + #else > + GetDocManager()->FileHistoryLoad( *config ); -- Christoph Schmidt-Hieber Wolfson Institute for Biomedical Research University College London Gower Street London WC1E 6BT UK Phone +44 (0)7551994016
pgpjirAS2nens.pgp
Description: PGP signature