tags 750001 + patch
thanks

Thanks for your feedback.  I've updated the patch to just define
wxTHICK_BORDER as wx2.8 does, so it should work fine with wxGlade.

Cheers,
    Olly
diff -Nru freedink-dfarc-3.10/debian/changelog freedink-dfarc-3.10/debian/changelog
--- freedink-dfarc-3.10/debian/changelog	2012-09-28 01:55:08.000000000 +1200
+++ freedink-dfarc-3.10/debian/changelog	2014-06-28 17:57:40.000000000 +1200
@@ -1,3 +1,11 @@
+freedink-dfarc (3.10-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update to use wxwidgets3.0.  New patch: wx3.0-compat.patch.
+    (Closes: #750001)
+
+ -- Olly Betts <[email protected]>  Sat, 28 Jun 2014 17:55:59 +1200
+
 freedink-dfarc (3.10-1.1) unstable; urgency=low
 
   * Non-maintainer upload
diff -Nru freedink-dfarc-3.10/debian/.gitignore freedink-dfarc-3.10/debian/.gitignore
--- freedink-dfarc-3.10/debian/.gitignore	2008-08-26 08:13:37.000000000 +1200
+++ freedink-dfarc-3.10/debian/.gitignore	1970-01-01 12:00:00.000000000 +1200
@@ -1,9 +0,0 @@
-# rules:
-build-stamp
-build
-dfarc2
-# debhelper:
-files
-dfarc2.postinst.debhelper
-dfarc2.postrm.debhelper
-dfarc2.substvars
diff -Nru freedink-dfarc-3.10/debian/patches/series freedink-dfarc-3.10/debian/patches/series
--- freedink-dfarc-3.10/debian/patches/series	1970-01-01 12:00:00.000000000 +1200
+++ freedink-dfarc-3.10/debian/patches/series	2013-11-22 16:57:14.000000000 +1300
@@ -0,0 +1 @@
+wx3.0-compat.patch
diff -Nru freedink-dfarc-3.10/debian/patches/wx3.0-compat.patch freedink-dfarc-3.10/debian/patches/wx3.0-compat.patch
--- freedink-dfarc-3.10/debian/patches/wx3.0-compat.patch	1970-01-01 12:00:00.000000000 +1200
+++ freedink-dfarc-3.10/debian/patches/wx3.0-compat.patch	2014-06-28 17:57:40.000000000 +1200
@@ -0,0 +1,266 @@
+Description: fix to build with wxwidgets 3.0
+ wxLogError, etc are macros in wx 3.0.
+ wxGlade lacks wx3 support and adds wxTHICK_FRAME.  This was deprecated in
+ wx2.8 and just a #define to wxRESIZE_BORDER for compatiblity with wx2.6.
+ In wx3.0, wxTHICK_FRAME has been removed, so we just defined it as wx2.8
+ did to keep wxGlade happy.
+Author: Olly Betts <[email protected]>
+Forwarded: yes (debian maintainer is also upstream)
+Debian-Bug: http://bugs.debian.org/750001
+Last-Update: 2014-06-28
+
+--- a/src/InstallVerifyFrame.cpp
++++ b/src/InstallVerifyFrame.cpp
+@@ -166,7 +166,7 @@
+     }
+   else
+     {
+-      ::wxLogError(_("An error occured while extracting the .dmod file."));
++      wxLogError(_("An error occured while extracting the .dmod file."));
+     }
+   ::wxRemoveFile(mTarFilePath);
+   // TODO: return error code instead of wxID_OK if something goes wrong
+--- a/src/DFArcFrame.cpp
++++ b/src/DFArcFrame.cpp
+@@ -343,7 +343,7 @@
+ {
+   wxString description = _("D-Mod files (*.dmod)");
+   wxFileDialog FileDlg(0, _("Select a .dmod file"), _T(""), _T(""), description + _T("|*.dmod"),
+-        wxOPEN | wxFILE_MUST_EXIST);
++        wxFD_OPEN | wxFD_FILE_MUST_EXIST);
+      
+   if (FileDlg.ShowModal() == wxID_OK)
+     {
+@@ -912,7 +912,7 @@
+                 {
+ 		  if (::wxRmdir(mConfig->mSelectedDmod) == false)
+                     {
+-		      ::wxLogError(_("Unable to remove D-Mod directory. All other files were removed."));
++		      wxLogError(_("Unable to remove D-Mod directory. All other files were removed."));
+ 		      lSuccess = false;
+                     }
+                 }
+--- a/src/RecursiveDelete.cpp
++++ b/src/RecursiveDelete.cpp
+@@ -52,7 +52,7 @@
+       {
+         if (::wxRemoveFile(aFilename) == false)
+         {
+-	  ::wxLogError(_("Could not remove %s"), aFilename.c_str());
++	  wxLogError(_("Could not remove %s"), aFilename.c_str());
+ 	  mError = true;
+         }
+     }
+@@ -70,7 +70,7 @@
+     {
+       if ( ::wxRmdir( aDirname ) == false )
+ 	{
+-	  ::wxLogError(_("Could not remove %s"), aDirname.c_str());
++	  wxLogError(_("Could not remove %s"), aDirname.c_str());
+ 	  mError = true;
+ 	}
+     }
+--- a/src/Package.cpp
++++ b/src/Package.cpp
+@@ -120,7 +120,7 @@
+ {
+   if (mIdentifier->GetValue().Len() == 0)
+     {
+-      ::wxLogError(_("You must provide an identifier filename."));
++      wxLogError(_("You must provide an identifier filename."));
+       return;
+     }
+   
+--- a/src/BZip.cpp
++++ b/src/BZip.cpp
+@@ -297,7 +297,7 @@
+     
+     if ( lDmodFileIn == NULL )
+       {
+-	::wxLogError(_("Error: Could not open input file '%s' for bzip decompression."), mFilePath.c_str());
++	wxLogError(_("Error: Could not open input file '%s' for bzip decompression."), mFilePath.c_str());
+         return _T("");
+       }
+ 
+@@ -312,7 +312,7 @@
+ 
+     if( lError != BZ_OK )
+       {
+-	::wxLogError(_("Error: Invalid .dmod file selected!"));
++	wxLogError(_("Error: Invalid .dmod file selected!"));
+ 	fclose(lDmodFileIn);
+         return _T("");
+       }
+@@ -322,7 +322,7 @@
+     
+     if (lTarFileOut == NULL)
+       {
+-	::wxLogError(_("Error: Could not write to '%s'."), lTempFileName.c_str());
++	wxLogError(_("Error: Could not write to '%s'."), lTempFileName.c_str());
+         fclose(lDmodFileIn);
+         return _T("");
+     }
+@@ -354,35 +354,35 @@
+             }
+             else if ( lError == BZ_PARAM_ERROR )
+             {
+-                ::wxLogError( _("Invalid .dmod file specified.") );
++                wxLogError( _("Invalid .dmod file specified.") );
+             }
+             else if ( lError == BZ_SEQUENCE_ERROR )
+             {
+-                ::wxLogError( _("Critical program function error: opened for write.") );
++                wxLogError( _("Critical program function error: opened for write.") );
+             }
+             else if ( lError == BZ_IO_ERROR )
+             {
+-                ::wxLogError( _("Could not read .dmod file.") );
++                wxLogError( _("Could not read .dmod file.") );
+             }
+             else if ( lError == BZ_UNEXPECTED_EOF )
+             {
+-                ::wxLogError( _("Incomplete .dmod file. Please download it again.") );
++                wxLogError( _("Incomplete .dmod file. Please download it again.") );
+             }
+             else if ( lError == BZ_DATA_ERROR )
+             {
+-                ::wxLogError( _("The .dmod file is corrupted.  Please download it again.") );
++                wxLogError( _("The .dmod file is corrupted.  Please download it again.") );
+             }
+             else if ( lError == BZ_DATA_ERROR_MAGIC )
+             {
+-                ::wxLogError( _("The file is not a valid .dmod file.") );
++                wxLogError( _("The file is not a valid .dmod file.") );
+             }
+             else if ( lError == BZ_MEM_ERROR )
+             {
+-                ::wxLogError( _("Out of memory error.") );
++                wxLogError( _("Out of memory error.") );
+             }
+             else
+             {
+-                ::wxLogError( _("An unhandled error occured.") );
++                wxLogError( _("An unhandled error occured.") );
+             }
+             wxRemoveFile(lTempFileName);
+             lTempFileName = _T("");
+--- a/src/Tar.cpp
++++ b/src/Tar.cpp
+@@ -126,8 +126,8 @@
+   FILE* out = fopen(mFilePath.fn_str(), "wb");
+   if (!out)
+     {
+-      ::wxLogError(_("Error: Could not open tar file '%s' for bzip compression."), mFilePath.c_str());
+-      return _("ERROR");
++      wxLogError(_("Error: Could not open tar file '%s' for bzip compression."), mFilePath.c_str());
++      return true;
+     }
+   
+   /* libbz2 init */
+@@ -148,7 +148,7 @@
+   
+   if (iErr != BZ_OK)
+     {
+-      ::wxLogError(_("Error: Could not initialize compression method!"
++      wxLogError(_("Error: Could not initialize compression method!"
+ 		     "  "
+ 		     "Will not generate a correct .dmod file."
+ 		     "  "
+@@ -181,7 +181,7 @@
+       FILE *in = fopen(fileinfos[i].fullpath.fn_str(), "rb");
+       if (in == NULL)
+         {
+-	  ::wxLogFatalError(_("Error: File '%s' not found!  Cannot archive file."),
++	  wxLogFatalError(_("Error: File '%s' not found!  Cannot archive file."),
+ 			    fileinfos[i].fullpath.c_str());
+ 	  throw;
+         }
+@@ -473,7 +473,7 @@
+     if(!f_In.good())
+     {
+       lError = 1;
+-      ::wxLogFatalError(_("Error: File '%s' not found!  Cannot extract data."), mFilePath.c_str());
++      wxLogFatalError(_("Error: File '%s' not found!  Cannot extract data."), mFilePath.c_str());
+       throw;
+     }
+     
+@@ -483,7 +483,7 @@
+       wxFileName::Mkdir(destdir, 0777, wxPATH_MKDIR_FULL); // 0777 minus umask
+     if (!::wxDirExists(destdir))
+       {
+-	::wxLogFatalError(_("Error: Cannot create directory '%s'.  Cannot extract data."), destdir.c_str());
++	wxLogFatalError(_("Error: Cannot create directory '%s'.  Cannot extract data."), destdir.c_str());
+ 	throw;
+       }
+     // Move to the directory.
+@@ -565,7 +565,7 @@
+                 {
+                     lStreamOut.close();
+                     lStreamOut.clear();
+-		    ::wxLogError(_("Error: Improperly archived file '%s'.  Skipping."), lCurrentFilePath.c_str());
++		    wxLogError(_("Error: Improperly archived file '%s'.  Skipping."), lCurrentFilePath.c_str());
+                     lError = 1;
+                     continue;
+                 }
+--- a/src/Config.cpp
++++ b/src/Config.cpp
+@@ -213,7 +213,7 @@
+   strSysRoot += _T("/dinksmallwood.ini");
+   if (!::wxFileExists(strSysRoot))
+     {
+-      ::wxLogVerbose(_("Error: dinksmallwood.ini not found. "
++      wxLogVerbose(_("Error: dinksmallwood.ini not found. "
+ 		       "Please run the main game and try running this program again."));
+       return fallback_woe_dir;
+     }
+@@ -221,7 +221,7 @@
+   f_In.open(strSysRoot.fn_str(), std::ios::in);
+   if (!f_In.good())
+     {
+-      ::wxLogVerbose(_("Error opening dinksmallwood.ini"), strSysRoot.c_str());
++      wxLogVerbose(_("Error opening dinksmallwood.ini"), strSysRoot.c_str());
+       return fallback_woe_dir;
+     }
+   
+--- a/src/Options_Base.cpp
++++ b/src/Options_Base.cpp
+@@ -2,6 +2,11 @@
+ 
+ #include "Options_Base.h"
+ 
++// Work-around lack of wxGlade support for wx3.
++#ifndef wxTHICK_FRAME
++# define wxTHICK_FRAME wxRESIZE_BORDER
++#endif
++
+ // begin wxGlade: ::extracode
+ // end wxGlade
+ 
+--- a/src/InstallVerifyFrame_Base.cpp
++++ b/src/InstallVerifyFrame_Base.cpp
+@@ -2,6 +2,11 @@
+ 
+ #include "InstallVerifyFrame_Base.h"
+ 
++// Work-around lack of wxGlade support for wx3.
++#ifndef wxTHICK_FRAME
++# define wxTHICK_FRAME wxRESIZE_BORDER
++#endif
++
+ // begin wxGlade: ::extracode
+ // end wxGlade
+ 
+--- a/src/Package_Base.cpp
++++ b/src/Package_Base.cpp
+@@ -2,6 +2,11 @@
+ 
+ #include "Package_Base.h"
+ 
++// Work-around lack of wxGlade support for wx3.
++#ifndef wxTHICK_FRAME
++# define wxTHICK_FRAME wxRESIZE_BORDER
++#endif
++
+ // begin wxGlade: ::extracode
+ // end wxGlade
+ 
diff -Nru freedink-dfarc-3.10/debian/rules freedink-dfarc-3.10/debian/rules
--- freedink-dfarc-3.10/debian/rules	2012-04-28 01:34:34.000000000 +1200
+++ freedink-dfarc-3.10/debian/rules	2014-06-01 01:33:20.000000000 +1200
@@ -27,7 +27,9 @@
 	#   (e.g. not the case for Fedora)
 	# Using '--disable-desktopfiles' to avoid installing FreeDesktop files
 	#   on the builder (rather than on the end-user computer)
-	dh_auto_configure -- --bindir=/usr/games --datadir=/usr/share/games --disable-desktopfiles
+	# Pass CPPFLAGS=-DNDEBUG to disable WXDEBUG assertions, which are on by
+	# default in wx3.0.
+	dh_auto_configure -- --bindir=/usr/games --datadir=/usr/share/games --disable-desktopfiles CPPFLAGS=-DNDEBUG
 
 override_dh_strip:
 	# Create -dbg package with debug symbols for gdb

Reply via email to