Package: graphthing
Version: 1.3.2-3
Severity: normal
Tags: patch
User: [email protected]
Usertags: wx2.6to2.8

I'm trying to get packages to migrate from wxwidgets2.6 to wxwidgets2.8
so we can remove the former from the archive - it's no longer supported
upstream, and wxwidgets3.0 is supposed to be out early next year.

I've made the required changes to get graphthing to build with wxwidgets2.8
and also fix an unrelated existing FTBFS (I think due to recent g++ being
fussier about treating string constants as non-const char*).  Patch attached.

I'm not familiar with graphthing, so I've not tried to actually test`the
resultant build.  My experience so far is that if a package builds with
2.8, it works, but it would be prudent to test it.

Cheers,
    Olly
diff -u graphthing-1.3.2/debian/control graphthing-1.3.2/debian/control
--- graphthing-1.3.2/debian/control
+++ graphthing-1.3.2/debian/control
@@ -2,7 +2,7 @@
 Section: math
 Priority: optional
 Maintainer: Cyril Brulebois <[email protected]>
-Build-Depends: debhelper (>= 5), cdbs, patchutils, flex, bison, libwxgtk2.6-dev, quilt
+Build-Depends: debhelper (>= 5), cdbs, patchutils, flex, bison, libwxgtk2.8-dev, quilt
 Standards-Version: 3.8.4
 Vcs-Git: git://git.debian.org/git/collab-maint/graphthing.git
 Vcs-Browser: http://git.debian.org/?p=collab-maint/graphthing.git
diff -u graphthing-1.3.2/debian/changelog graphthing-1.3.2/debian/changelog
--- graphthing-1.3.2/debian/changelog
+++ graphthing-1.3.2/debian/changelog
@@ -1,3 +1,12 @@
+graphthing (1.3.2-3.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Update to use wxwidgets2.8 - new patch wx2.8-compatibility.
+  * Fix FTBFS issues with bison generated code - new patch
+    c++-const-string-constant-fix.
+
+ -- Olly Betts <[email protected]>  Tue, 18 Oct 2011 02:24:04 +0000
+
 graphthing (1.3.2-3) unstable; urgency=low
 
   * Fix desktop file encoding (Closes: #460325).
diff -u graphthing-1.3.2/debian/patches/series graphthing-1.3.2/debian/patches/series
--- graphthing-1.3.2/debian/patches/series
+++ graphthing-1.3.2/debian/patches/series
@@ -2,0 +3,2 @@
+wx2.8-compatibility
+c++-const-string-constant-fix
only in patch2:
unchanged:
--- graphthing-1.3.2.orig/debian/patches/wx2.8-compatibility
+++ graphthing-1.3.2/debian/patches/wx2.8-compatibility
@@ -0,0 +1,24 @@
+--- graphthing-1.3.2.orig/src/fancyfileselection.cc
++++ graphthing-1.3.2/src/fancyfileselection.cc
+@@ -21,6 +21,12 @@
+ 	{ "Postscript", ".ps" }
+ };
+ 
++// wxHIDE_READONLY is on by default in modern wx unless 2.4 compatibility is
++// enabled.
++#if !WXWIN_COMPATIBILITY_2_4
++# define wxHIDE_READONLY 0
++#endif
++
+ FancyFileSelection::FancyFileSelection (wxWindow *parent, const wxString &title,
+ 					long style, bool file_types,
+ 					const wxString &mask)
+@@ -30,7 +36,7 @@
+ 		style |= wxHIDE_READONLY;
+ 	else if (style & wxSAVE)
+ 		style |= wxOVERWRITE_PROMPT;
+-	SetStyle (style);
++	SetWindowStyle (style);
+ 
+ 	if (file_types) {
+ 		wxString wc = wxT("");
only in patch2:
unchanged:
--- graphthing-1.3.2.orig/debian/patches/c++-const-string-constant-fix
+++ graphthing-1.3.2/debian/patches/c++-const-string-constant-fix
@@ -0,0 +1,40 @@
+--- graphthing-1.3.2.orig/src/gt-bison.y
++++ graphthing-1.3.2/src/gt-bison.y
+@@ -18,7 +18,7 @@
+ 
+ extern char *yy_gt_text;
+ 
+-int yy_gt_error (char *s);
++int yy_gt_error (const char *s);
+ int yy_gt_lex (void);
+ %}
+ 
+@@ -132,7 +132,7 @@
+ 
+ %%
+ 
+-int yy_gt_error (char *s)
++int yy_gt_error (const char *s)
+ {
+ 	fprintf (stderr, "gt-parse: %s in line %i, at symbol \"%s\"\n",
+ 					s, gt_lineno, yy_gt_text);
+--- graphthing-1.3.2.orig/src/lang-bison.y
++++ graphthing-1.3.2/src/lang-bison.y
+@@ -15,7 +15,7 @@
+ 
+ std::stack<PhraseBlock *> pbs;
+ 
+-int yy_lang_error (char *s);
++int yy_lang_error (const char *s);
+ int yy_lang_lex (void);
+ %}
+ 
+@@ -121,7 +121,7 @@
+ 
+ extern char *yy_lang_text;
+ 
+-int yy_lang_error (char *s)
++int yy_lang_error (const char *s)
+ {
+ 	fprintf (stderr, "lang-parse: %s in line %i, at symbol \"%s\"\n",
+ 			s, lang_lineno, yy_lang_text);

Reply via email to