Control: tags 749861 + patch
I had a go at updating qutemol to use wx3.0, with some success - see the
attached NMU diff.
I tested the rebuilt package by loading this sample file from gnuplot:
gnuplot-4.6.4/demo/GM1_sugar.pdb
It loads and displays OK, though clicking on some of the display option
buttons causing a segfault. However, if I install the version of
qutemol currently in unstable, it appears to crash when those same
buttons are pressed, so this patch doesn't actually see to make things
any worse, though I wonder if qutemol is actually fit for release as-is.
Anyway, I'd appreciate further testing from people who've used the
package before.
Cheers,
Olly
diff -u qutemol-0.4.1~cvs20081111/debian/changelog qutemol-0.4.1~cvs20081111/debian/changelog
--- qutemol-0.4.1~cvs20081111/debian/changelog
+++ qutemol-0.4.1~cvs20081111/debian/changelog
@@ -1,3 +1,14 @@
+qutemol (0.4.1~cvs20081111-3.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Update to use wxWidgets 3.0 (Closes: #749861):
+ + New patch: debian/patches/36_wx3.0_compat.dpatch
+ * debian/patches/20_main.cpp.dpatch: Update to actually set the icon from
+ the XPM data correctly (wx3.0 gives a warning dialog for this rather
+ than quietly failing to load the file "sample_xpm").
+
+ -- Olly Betts <[email protected]> Tue, 12 Aug 2014 11:44:08 +1200
+
qutemol (0.4.1~cvs20081111-3) unstable; urgency=low
* debian/upstream: New file.
diff -u qutemol-0.4.1~cvs20081111/debian/control qutemol-0.4.1~cvs20081111/debian/control
--- qutemol-0.4.1~cvs20081111/debian/control
+++ qutemol-0.4.1~cvs20081111/debian/control
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debichem Team <[email protected]>
Uploaders: Morten Kjeldgaard <[email protected]>, Michael Banck <[email protected]>
-Build-Depends: debhelper (>= 5), cdbs, dpatch, libwxgtk2.8-dev, libglew1.5-dev,
+Build-Depends: debhelper (>= 5), cdbs, dpatch, libwxgtk3.0-dev, libglew1.5-dev,
libgif-dev, libpng12-dev
Standards-Version: 3.9.2
Homepage: http://qutemol.sourceforge.net/
diff -u qutemol-0.4.1~cvs20081111/debian/patches/00list qutemol-0.4.1~cvs20081111/debian/patches/00list
--- qutemol-0.4.1~cvs20081111/debian/patches/00list
+++ qutemol-0.4.1~cvs20081111/debian/patches/00list
@@ -35,0 +36 @@
+36_wx3.0_compat.dpatch
diff -u qutemol-0.4.1~cvs20081111/debian/patches/20_main.cpp.dpatch qutemol-0.4.1~cvs20081111/debian/patches/20_main.cpp.dpatch
--- qutemol-0.4.1~cvs20081111/debian/patches/20_main.cpp.dpatch
+++ qutemol-0.4.1~cvs20081111/debian/patches/20_main.cpp.dpatch
@@ -110,7 +110,7 @@
+#if WIN32
+ SetIcon(wxIcon(_T("sample"),wxBITMAP_TYPE_ICO_RESOURCE,32,32));
+#else
-+ SetIcon(wxIcon(_T("sample_xpm"),wxBITMAP_TYPE_XPM,32,32));
++ SetIcon(wxIcon(sample_xpm));
#endif
+
resize_mode=NATURAL;
diff -u qutemol-0.4.1~cvs20081111/debian/rules qutemol-0.4.1~cvs20081111/debian/rules
--- qutemol-0.4.1~cvs20081111/debian/rules
+++ qutemol-0.4.1~cvs20081111/debian/rules
@@ -4,7 +4,9 @@
INCDIRS = -Ivcg -Isrc -I.
#OPTFLAGS = -Os -Wall -g
-CXXFLAGS = -DPKGDATADIR='\"/usr/share/qutemol\"' $(INCDIRS) $(OPTFLAGS) `wx-config --cppflags`
+# Define NDEBUG to quietly ignore WXDEBUG assertion failures (as happens by
+# default under wx2.8).
+CXXFLAGS = -DPKGDATADIR='\"/usr/share/qutemol\"' $(INCDIRS) $(OPTFLAGS) `wx-config --cppflags` -DNDEBUG
include /usr/share/cdbs/1/rules/dpatch.mk
include /usr/share/cdbs/1/class/makefile.mk
only in patch2:
unchanged:
--- qutemol-0.4.1~cvs20081111.orig/debian/patches/36_wx3.0_compat.dpatch
+++ qutemol-0.4.1~cvs20081111/debian/patches/36_wx3.0_compat.dpatch
@@ -0,0 +1,48 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## wx3.0_compact.dpatch by Olly Betts <[email protected]>
+## These changes should maintain compatibility with wxwidgets2.8.
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: modification to source code
+
+@DPATCH@
+
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -421,15 +421,15 @@
+ static const wxCmdLineEntryDesc cmdLineDesc[] =
+ {
+ {
+- wxCMD_LINE_PARAM,_T(""),_T(""),_T("filename.pdb:(molecule to be drawn)"),
++ wxCMD_LINE_PARAM,wxT_2(""),wxT_2(""),wxT_2("filename.pdb:(molecule to be drawn)"),
+ wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
+ },
+ {
+- wxCMD_LINE_OPTION,_T("a"),_T(""),_T("filename.art: optional Atom Render Table"),
++ wxCMD_LINE_OPTION,wxT_2("a"),wxT_2(""),wxT_2("filename.art: optional Atom Render Table"),
+ wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
+ },
+ {
+- wxCMD_LINE_SWITCH,_T("v"),_T(""),_T("don't start, show version name"),
++ wxCMD_LINE_SWITCH,wxT_2("v"),wxT_2(""),wxT_2("don't start, show version name"),
+ wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
+ },
+ { wxCMD_LINE_NONE }
+@@ -836,7 +836,7 @@
+ wxString(), // def path
+ wxString(),
+ FILETYPES,
+- wxSAVE | /*wxCHANGE_DIR |*/ wxOVERWRITE_PROMPT
++ wxFD_SAVE | /*wxFD_CHANGE_DIR |*/ wxFD_OVERWRITE_PROMPT
+ );
+
+ static int lastFilterIndex=-1;
+@@ -1004,7 +1004,7 @@
+ wxString(), // def path
+ wxString(),
+ FILETYPES,
+- wxOPEN | wxFILE_MUST_EXIST/*| wxCHANGE_DIR*/,
++ wxFD_OPEN | wxFD_FILE_MUST_EXIST/*| wxFD_CHANGE_DIR*/,
+ wxDefaultPosition);
+
+ if (openFileDialog->ShowModal() == wxID_OK) {